/* AllosDigital — Static UI Prototype Design System (visual only) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #0F4C4C;
  --primary-light: #1A6B6B;
  --primary-dark: #0A3838;
  --accent: #FF6B5A;
  --accent-hover: #E85A4A;
  --neutral-bg: #F4F6F8;
  --neutral-card: #FFFFFF;
  --graphite: #2C2F33;
  --graphite-muted: #5C6370;
  --border: #E2E6EA;
  --success: #2D9D78;
  --warning: #E6A23C;
  --danger: #D64545;
  --info: #3B82F6;
  --shadow-sm: 0 1px 3px rgba(44, 47, 51, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 47, 51, 0.1);
  --shadow-lg: 0 12px 32px rgba(44, 47, 51, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --max-width: 1440px;
  --sidebar-width: 240px;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--neutral-bg);
  color: var(--graphite);
  line-height: 1.5;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Typography */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
.text-muted { color: var(--graphite-muted); font-size: 0.875rem; }
.text-mono { font-family: var(--mono); font-size: 0.8125rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--primary); color: #fff; }
.btn-secondary:hover { background: var(--primary-light); }
.btn-ghost {
  background: transparent;
  color: var(--graphite);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--neutral-bg); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-live { background: #D4F5E9; color: #1A7A5C; }
.badge-draft { background: #E8ECF0; color: var(--graphite-muted); }
.badge-paused { background: #FFF3CD; color: #856404; }
.badge-completed { background: #D6E4FF; color: #1E4A8C; }

/* Cards */
.card {
  background: var(--neutral-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.kpi {
  background: var(--neutral-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.kpi-label { font-size: 0.75rem; color: var(--graphite-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-top: 0.25rem; }
.kpi-delta { font-size: 0.8125rem; margin-top: 0.25rem; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* Filters */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  background: var(--neutral-card);
  cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
select, input[type="text"], input[type="search"] {
  font-family: var(--font);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--neutral-card);
}

/* App shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary-dark);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand img { width: 36px; height: 36px; border-radius: 8px; }
.sidebar-brand span { font-weight: 700; font-size: 0.95rem; }
.sidebar-nav { padding: 1rem 0.75rem; flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  color: rgba(255,255,255,0.75);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 2px;
  text-decoration: none;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}
.sidebar-nav .nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  padding: 1rem 0.85rem 0.35rem;
}
.main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.global-header {
  height: var(--header-height);
  background: var(--neutral-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.global-header .search {
  flex: 1;
  max-width: 400px;
}
.global-header .search input { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}
.page-content {
  padding: 1.5rem;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

/* Channel cards */
.channel-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--neutral-card);
}
.channel-card .icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.channel-card .metric { font-size: 1.25rem; font-weight: 700; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--graphite-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: var(--neutral-bg); }

/* Activity feed */
.activity-item {
  padding: 1rem;
  border-left: 3px solid var(--primary);
  background: var(--neutral-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-left-width: 3px;
}
.activity-item .time { font-size: 0.75rem; color: var(--graphite-muted); }

/* Wizard */
.wizard-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.wizard-step {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1rem;
  background: var(--neutral-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  text-align: center;
}
.wizard-step.active { border-color: var(--primary); background: rgba(15,76,76,0.08); font-weight: 600; }
.wizard-step.done { border-color: var(--success); color: var(--success); }

/* Tiles */
.platform-tile {
  aspect-ratio: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--neutral-card);
  cursor: pointer;
  transition: border-color 0.2s;
}
.platform-tile:hover { border-color: var(--primary); }
.platform-tile.connected { border-style: solid; border-color: var(--success); }

/* macOS window */
.macos-frame {
  max-width: 1100px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid #ccc;
}
.macos-titlebar {
  background: linear-gradient(180deg, #E8E8E8, #D0D0D0);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.macos-dot { width: 12px; height: 12px; border-radius: 50%; }
.macos-dot.red { background: #FF5F57; }
.macos-dot.yellow { background: #FFBD2E; }
.macos-dot.green { background: #28CA42; }
.macos-body { display: flex; min-height: 520px; background: var(--neutral-bg); }
.macos-sidebar {
  width: 200px;
  background: var(--graphite);
  color: #fff;
  padding: 1rem 0;
}
.macos-sidebar a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  text-decoration: none;
}
.macos-sidebar a.active { background: rgba(255,255,255,0.1); color: #fff; }
.macos-main { flex: 1; padding: 1.5rem; }

.dropzone {
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  background: rgba(15,76,76,0.04);
  margin-bottom: 1.5rem;
}

/* Hub index */
.hub-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.hub-hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}
.hub-hero img { width: 80px; margin: 0 auto 1rem; border-radius: 12px; }
.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.screen-card {
  background: var(--neutral-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.screen-card:hover { box-shadow: var(--shadow-md); }
.screen-card img { width: 100%; height: 140px; object-fit: cover; background: var(--neutral-bg); }
.screen-card .body { padding: 1rem; }
.screen-card h3 { margin-bottom: 0.35rem; }
.palette-swatch {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-right: 0.5rem;
  vertical-align: middle;
  border: 1px solid var(--border);
}

.aldos-input-full {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font);
}

.page-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.sidebar-toggle {
  display: none;
  margin: 0.75rem 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .page-content { max-width: 100%; }
  .global-header { padding: 0 1rem; flex-wrap: wrap; height: auto; min-height: var(--header-height); padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .global-header .search { max-width: 100%; flex: 1 1 200px; }
  .header-actions { flex: 1 1 auto; justify-content: flex-end; }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .onboarding-connect-matrix { font-size: 0.75rem; }
  .table-wrap table { min-width: 520px; }
}

@media (max-width: 768px) {
  .sidebar-toggle { display: inline-flex; align-items: center; }
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    max-height: 0;
    overflow: hidden;
    position: relative;
    transition: max-height 0.25s ease;
  }
  .sidebar.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem; }
  .sidebar-nav .nav-section { display: none; }
  .sidebar-nav a { padding: 0.5rem 0.65rem; font-size: 0.75rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .global-header .search { order: 3; flex: 1 1 100%; display: block; max-width: none; }
  .brand-switcher { min-width: 0; flex: 1; max-width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title-row { flex-direction: column; }
  .aldos-wp-actions { width: 100%; }
  h1 { font-size: 1.35rem; }
}

@media (max-width: 480px) {
  .page-content { padding: 1rem; }
  .kpi-grid { grid-template-columns: 1fr; }
  .card { padding: 1rem; }
  .btn { width: 100%; justify-content: center; }
  .aldos-wp-actions .btn { width: auto; }
  .global-header { gap: 0.5rem; }
}

/* Phase & feature tags */
.phase-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.phase-badge.p1 { background: #D4F5E9; color: #1A7A5C; }
.phase-badge.p2 { background: #E8ECF0; color: var(--graphite-muted); }
.phase-badge.p3 { background: #E0E7FF; color: #3730A3; }
.phase-badge.new { background: #FFE8E5; color: #C44A3A; }
.phase-badge.live { background: #D4F5E9; color: #1A7A5C; }

.feature-list { list-style: none; font-size: 0.8125rem; }
.feature-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.feature-list li:last-child { border-bottom: none; }

.brand-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--neutral-card);
}
.brand-card h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.brand-card .url { font-family: var(--mono); font-size: 0.75rem; color: var(--primary-light); }
.brand-card.hostvelox { border-left: 4px solid #3B82F6; }
.brand-card.payvib { border-left: 4px solid var(--accent); }
.brand-card.techruum { border-left: 4px solid var(--primary); }
.brand-card.nesabook { border-left: 4px solid #8B5CF6; }

.roadmap-panel {
  background: linear-gradient(135deg, rgba(15,76,76,0.06), rgba(255,107,90,0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.roadmap-panel h3 { font-size: 0.875rem; margin-bottom: 0.5rem; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.35rem; }
.status-dot.ok { background: var(--success); }
.status-dot.warn { background: var(--warning); }

/* Demo / prototype buttons disabled in production PHP app */
button.aldos-demo-btn,
.aldos-demo-btn {
  opacity: 0.55;
  cursor: not-allowed !important;
}

/* Blog post image previews */
.blog-preview { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--neutral-card); }
.blog-preview-featured {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 55%, rgba(255,107,90,0.35) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 1rem;
  position: relative;
}
.blog-preview-featured .label {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(0,0,0,0.55);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.blog-preview-featured .icon { font-size: 2rem; opacity: 0.9; margin-bottom: 0.35rem; }
.blog-preview-featured .caption { font-size: 0.75rem; opacity: 0.85; max-width: 280px; }
.blog-preview-body { padding: 1rem 1.25rem; font-size: 0.875rem; }
.blog-preview-inline {
  width: 100%;
  aspect-ratio: 2/1;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  background: linear-gradient(145deg, #E8ECF0, #D0D8E0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--graphite-muted);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px dashed var(--border);
}
.blog-preview-inline.img-2 { aspect-ratio: 21/9; background: linear-gradient(145deg, rgba(15,76,76,0.12), #E8ECF0); }
.image-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.image-setting-item {
  padding: 0.65rem;
  background: var(--neutral-bg);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
.image-thumb-mini {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 4px;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.brand-switcher { min-width: 180px; font-size: 0.8125rem; }

.brand-filter-banner {
  font-size: 0.8125rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--neutral-card);
}
.brand-filter-banner.all { border-left: 4px solid var(--primary); }
.brand-filter-banner.single { border-left: 4px solid var(--accent); }

.brand-dashboard-section {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--neutral-card);
  border: 1px solid var(--border);
}
.brand-dashboard-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.brand-dashboard-header h2 { font-size: 1.125rem; margin: 0; }
.brand-dashboard-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.brand-dashboard-kpis > div { text-align: right; }
.brand-dashboard-kpis .kpi-label { display: block; font-size: 0.7rem; color: var(--text-muted); }
.brand-channel-grid { margin-top: 0.5rem; }

.onboarding-connect-matrix td,
.onboarding-connect-matrix th {
  vertical-align: middle;
  padding: 0.65rem 0.5rem;
  font-size: 0.8125rem;
}
.onboarding-connect-matrix .matrix-cell-connected {
  background: rgba(34, 197, 94, 0.06);
}

.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.brand-dot.payvib { background: var(--accent); }
.brand-dot.techruum { background: var(--primary); }
.brand-dot.nesabook { background: #8B5CF6; }
.brand-dot.hostvelox { background: #3B82F6; }

/* Prototype banner */
.prototype-banner {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
