/* ============================================================
   YOKE BUILDER — DASHBOARD STYLESHEET
   Redesigned: mobile-first, dark/light theme, gold accent.
   Default: respects device prefers-color-scheme.
   Manual override: data-theme="dark" | data-theme="light" on <html>.
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}

/* ── LIGHT THEME (default) ───────────────────────────────── */
:root {
  --gold:#f5c400; --gold-dk:#d4a900; --gold-text:#a67c00;
  --page:#f2f2ed;
  --surface:#ffffff;     --surface2:#f4f4ee; --surface3:#ececec;
  --border:#e4e4dc;      --border-2:#d9d9d0;
  --text:#2a2a26;        --text-dim:#6c6c65; --text-muted:#9a9a90;
  --ink:#141414;
  --white:#141414;
  --success:#1c7c4a;     --danger:#c0392b;   --info:#2e6fb0; --warn:#b07d10;
  --success-bg:rgba(28,124,74,.1);
  --danger-bg:rgba(192,57,43,.1);
  --gold-bg:rgba(245,196,0,.1);
  --sidebar-w:240px;     --header-h:58px;    --bottom-nav-h:64px;
  --radius:8px;          --radius-lg:16px;   --radius-xl:20px;
  /* aliases kept for compat */
  --ink-2:var(--surface);  --ink-3:var(--surface2);
  --muted:var(--text-dim); --font-display:'Bebas Neue',sans-serif;
}

/* ── DARK THEME ──────────────────────────────────────────── */
[data-theme="dark"],
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --page:#080808;
  --surface:#111111;     --surface2:#131313; --surface3:#1b1b1b;
  --border:#232323;      --border-2:#2c2c2c;
  --text:#f0f0eb;        --text-dim:#8c8c86; --text-muted:#6b6b66;
  --ink:#f5f5f0;
  --white:#f5f5f0;
  --success:#3bd16f;     --danger:#f26666;   --info:#6ab0f5; --warn:#f5c400;
  --success-bg:rgba(59,209,111,.1);
  --danger-bg:rgba(242,102,102,.1);
  --gold-bg:rgba(245,196,0,.08);
  --gold-text:#f5c400;
  --ink-2:var(--surface);  --ink-3:var(--surface2);
  --muted:var(--text-dim);
}}

[data-theme="dark"] {
  --page:#080808;
  --surface:#111111;     --surface2:#131313; --surface3:#1b1b1b;
  --border:#232323;      --border-2:#2c2c2c;
  --text:#f0f0eb;        --text-dim:#8c8c86; --text-muted:#6b6b66;
  --ink:#f5f5f0;
  --white:#f5f5f0;
  --success:#3bd16f;     --danger:#f26666;   --info:#6ab0f5; --warn:#f5c400;
  --success-bg:rgba(59,209,111,.1);
  --danger-bg:rgba(242,102,102,.1);
  --gold-bg:rgba(245,196,0,.08);
  --gold-text:#f5c400;
  --ink-2:var(--surface);  --ink-3:var(--surface2);
  --muted:var(--text-dim);
}
[data-theme="light"] {
  --page:#f2f2ed;
  --surface:#ffffff;     --surface2:#f4f4ee; --surface3:#ececec;
  --border:#e4e4dc;      --border-2:#d9d9d0;
  --text:#2a2a26;        --text-dim:#6c6c65; --text-muted:#9a9a90;
  --ink:#141414;
  --white:#141414;
  --success:#1c7c4a;     --danger:#c0392b;   --info:#2e6fb0; --warn:#b07d10;
  --success-bg:rgba(28,124,74,.1);
  --danger-bg:rgba(192,57,43,.1);
  --gold-bg:rgba(245,196,0,.1);
  --gold-text:#a67c00;
  --ink-2:var(--surface);  --ink-3:var(--surface2);
  --muted:var(--text-dim);
}

/* ── BASE ────────────────────────────────────────────────── */
html,body{height:100%;}
body{
  font-family:'DM Sans',-apple-system,BlinkMacSystemFont,sans-serif;
  font-size:14px;line-height:1.5;
  background:var(--page);color:var(--text);
  transition:background .25s,color .25s;
}
a{color:var(--gold-text);text-decoration:none;}
a:hover{text-decoration:underline;}
code,pre{font-family:'Fira Code',monospace;font-size:12px;}

/* ── LAYOUT ──────────────────────────────────────────────── */
.yb-wrap{display:flex;min-height:100vh;}
.yb-main{margin-left:var(--sidebar-w);flex:1;display:flex;flex-direction:column;min-height:100vh;min-width:0;}
.yb-page-body{padding:28px;flex:1;padding-bottom:calc(28px + var(--bottom-nav-h));}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.yb-sidebar{
  width:var(--sidebar-w);
  background:var(--surface);
  border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  position:fixed;top:0;left:0;bottom:0;
  z-index:300;overflow-y:auto;
  transition:transform .28s ease,background .25s,border-color .25s;
}
.yb-sidebar-brand{
  padding:16px 18px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:10px;min-height:var(--header-h);
}
.yb-brand-logo{display:flex;align-items:center;gap:8px;text-decoration:none;}
.yb-brand-mark{font-size:22px;font-weight:700;color:var(--gold-dk);line-height:1;}
.yb-brand-text{font-family:'Bebas Neue',sans-serif;font-size:18px;letter-spacing:.06em;color:var(--ink);}
.yb-sidebar-close{
  display:none;align-items:center;justify-content:center;
  background:none;border:none;color:var(--text-dim);cursor:pointer;
  width:32px;height:32px;border-radius:var(--radius);margin-left:auto;
}
.yb-sidebar-close:hover{color:var(--ink);background:var(--surface2);}

/* ── SITE SWITCHER ───────────────────────────────────────── */
.yb-site-switcher{
  padding:12px 16px;border-bottom:1px solid var(--border);
  background:var(--gold-bg);
}
.yb-site-current{display:flex;align-items:center;gap:10px;margin-bottom:6px;}
.yb-site-badge{width:8px;height:8px;border-radius:50%;background:var(--text-muted);flex-shrink:0;}
.yb-site-badge.live{background:var(--success);}
.yb-site-badge.building{background:var(--warn);}
.yb-site-badge.draft{background:var(--text-muted);}
.yb-site-name{font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px;}
.yb-site-type{font-size:10px;color:var(--text-dim);text-transform:uppercase;letter-spacing:.08em;}
.yb-site-switch-link{font-size:11px;color:var(--text-dim);}
.yb-site-switch-link:hover{color:var(--gold-dk);text-decoration:none;}

/* ── NAV ─────────────────────────────────────────────────── */
.yb-nav{flex:1;padding:8px 0;}
.yb-nav-section{
  font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-muted);padding:14px 18px 4px;
}
.yb-nav-link{
  display:flex;align-items:center;gap:9px;padding:9px 18px;
  color:var(--text-dim);font-size:13px;
  border-left:3px solid transparent;
  transition:background .15s,color .15s,border-color .15s;
  text-decoration:none;
}
.yb-nav-link:hover{background:var(--surface2);color:var(--ink);text-decoration:none;}
.yb-nav-link.active{
  color:var(--gold-dk);background:var(--gold-bg);
  border-left-color:var(--gold);font-weight:600;
}
[data-theme="dark"] .yb-nav-link.active,[data-theme="dark"] .yb-nav-link.active svg{color:var(--gold);}
.yb-nav-link svg{width:15px;height:15px;flex-shrink:0;opacity:.7;}
.yb-badge-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;padding:0 5px;border-radius:999px;
  background:#ef4444;color:#fff;font-size:10px;font-weight:700;margin-left:auto;line-height:1;
}

/* ── SIDEBAR FOOTER ──────────────────────────────────────── */
.yb-sidebar-footer{padding:14px 16px;border-top:1px solid var(--border);}
.yb-user-info{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.yb-user-avatar{
  width:32px;height:32px;background:var(--gold);color:#111;
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:13px;flex-shrink:0;
}
.yb-user-name{font-size:13px;font-weight:600;color:var(--ink);}
.yb-user-plan{font-size:10px;color:var(--text-dim);text-transform:uppercase;letter-spacing:.07em;}
.yb-logout-link{font-size:12px;color:var(--text-dim);}
.yb-logout-link:hover{color:var(--danger);text-decoration:none;}

/* ── TOPBAR ──────────────────────────────────────────────── */
.yb-topbar{
  height:var(--header-h);
  background:var(--surface);border-bottom:1px solid var(--border);
  display:flex;align-items:center;padding:0 20px;gap:12px;
  position:sticky;top:0;z-index:100;
  transition:background .25s,border-color .25s;
}
.yb-menu-btn{
  display:none;align-items:center;justify-content:center;
  background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--radius);color:var(--ink);cursor:pointer;
  width:38px;height:38px;flex-shrink:0;transition:background .15s;
}
.yb-menu-btn:hover{background:var(--gold);border-color:var(--gold);color:#111;}
.yb-topbar-title{font-size:15px;font-weight:600;color:var(--ink);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.yb-topbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.yb-topbar-btn{
  font-size:12px;color:var(--text-dim);padding:5px 10px;
  border:1px solid var(--border);border-radius:var(--radius);
  transition:background .15s,color .15s;
}
.yb-topbar-btn:hover{background:var(--surface2);color:var(--ink);text-decoration:none;}
.yb-topbar-status{font-size:11px;padding:4px 10px;border-radius:var(--radius);border:1px solid var(--border);color:var(--text-dim);text-transform:capitalize;}
.yb-topbar-status.live{color:var(--success);border-color:var(--success);}
.yb-topbar-status.building{color:var(--warn);border-color:var(--warn);}

/* Theme toggle button */
.yb-theme-btn{
  background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--radius);color:var(--text-dim);cursor:pointer;
  width:34px;height:34px;display:flex;align-items:center;justify-content:center;
  font-size:16px;transition:background .15s,color .15s;flex-shrink:0;
}
.yb-theme-btn:hover{background:var(--gold);color:#111;border-color:var(--gold);}

/* ── PLAN BADGES ─────────────────────────────────────────── */
.yb-plan-badge{
  font-size:10px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;padding:3px 8px;border-radius:var(--radius);
}
.yb-plan-badge.starter{background:var(--surface2);color:var(--text-dim);}
.yb-plan-badge.executive{background:var(--gold-bg);color:var(--gold-dk);}
.yb-plan-badge.enterprise{background:var(--gold-bg);color:var(--gold-dk);border:1px solid rgba(245,196,0,.4);}

/* ── MOBILE BOTTOM NAV ───────────────────────────────────── */
.yb-bottom-nav{
  display:none;
  position:fixed;bottom:0;left:0;right:0;height:var(--bottom-nav-h);
  background:var(--surface);border-top:1px solid var(--border);
  z-index:200;
  padding:0;
  transition:background .25s,border-color .25s;
  /* iOS safe area */
  padding-bottom:env(safe-area-inset-bottom,0);
}
.yb-bottom-nav-inner{
  display:flex;align-items:stretch;height:100%;
}
.yb-bnav-item{
  flex:1;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:3px;text-decoration:none;
  color:var(--text-muted);font-size:9px;font-weight:600;
  letter-spacing:.04em;text-transform:uppercase;
  padding:6px 4px 4px;position:relative;
  transition:color .15s;
  -webkit-tap-highlight-color:transparent;
}
.yb-bnav-item svg{width:20px;height:20px;stroke:currentColor;transition:color .15s;}
.yb-bnav-item.active{color:var(--gold);}
[data-theme="light"] .yb-bnav-item.active{color:var(--gold-dk);}
.yb-bnav-item.active::before{
  content:'';position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:32px;height:3px;border-radius:0 0 3px 3px;
  background:var(--gold);
}
.yb-bnav-badge{
  position:absolute;top:6px;right:calc(50% - 16px);
  min-width:14px;height:14px;padding:0 3px;
  background:#ef4444;color:#fff;font-size:9px;font-weight:700;
  border-radius:99px;display:flex;align-items:center;justify-content:center;
  line-height:1;
}

/* ── STAT CARDS ──────────────────────────────────────────── */
.yb-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin-bottom:24px;}
.yb-stat{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:18px;
  transition:transform .15s,box-shadow .15s,border-color .15s,background .25s;
}
a.yb-stat:hover{transform:translateY(-2px);box-shadow:0 6px 22px rgba(0,0,0,.08);border-color:var(--gold);text-decoration:none;color:inherit;}
.yb-stat-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);margin-bottom:7px;font-weight:700;}
.yb-stat-value{font-size:28px;font-weight:700;color:var(--ink);line-height:1;}
.yb-stat-sub{font-size:11px;color:var(--text-dim);margin-top:5px;}
.yb-stat.gold{border-top:3px solid var(--gold);}
.yb-stat.success{border-top:3px solid var(--success);}
.yb-stat.info{border-top:3px solid var(--info);}
.yb-stat.warn{border-top:3px solid var(--warn);}

/* ── CARDS ───────────────────────────────────────────────── */
.yb-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);margin-bottom:20px;overflow:hidden;
  transition:background .25s,border-color .25s;
}
.yb-card-header{
  padding:14px 20px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;
}
.yb-card-header h2{font-size:13px;font-weight:600;color:var(--ink);}
.yb-card-body{padding:20px;}

/* ── TABLES ──────────────────────────────────────────────── */
.yb-table{width:100%;border-collapse:collapse;}
.yb-table th{
  text-align:left;font-size:10px;font-weight:700;
  text-transform:uppercase;letter-spacing:.07em;color:var(--text-dim);
  padding:9px 12px;border-bottom:1px solid var(--border);white-space:nowrap;
}
.yb-table td{padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px;color:var(--text);vertical-align:middle;}
.yb-table tr:last-child td{border-bottom:none;}
.yb-table tr:hover td{background:var(--surface2);}
.yb-table .empty td{text-align:center;padding:40px;color:var(--text-dim);}

/* ── BUTTONS ─────────────────────────────────────────────── */
.yb-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:9px 18px;border-radius:var(--radius);
  font-size:13px;font-weight:600;cursor:pointer;
  border:1px solid transparent;
  transition:background .15s,border-color .15s,color .15s;
  text-decoration:none;white-space:nowrap;line-height:1;
}
.yb-btn-primary{background:var(--gold);color:#111;border-color:var(--gold);}
.yb-btn-primary:hover{background:var(--gold-dk);border-color:var(--gold-dk);text-decoration:none;color:#111;}
.yb-btn-ghost{background:transparent;color:var(--text-dim);border-color:var(--border);}
.yb-btn-ghost:hover{background:var(--surface2);color:var(--ink);text-decoration:none;}
.yb-btn-danger{background:transparent;color:var(--danger);border-color:var(--danger);}
.yb-btn-danger:hover{background:var(--danger);color:#fff;text-decoration:none;}
.yb-btn-success{background:var(--success);color:#fff;border-color:var(--success);}
.yb-btn-sm{padding:5px 11px;font-size:11px;}

/* ── FORMS ───────────────────────────────────────────────── */
.yb-field{display:flex;flex-direction:column;gap:5px;margin-bottom:16px;}
.yb-field label{font-size:11px;font-weight:600;color:var(--text-dim);letter-spacing:.04em;}
.yb-field input,.yb-field select,.yb-field textarea{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);color:var(--text);
  padding:10px 13px;font-size:14px;font-family:inherit;
  transition:border-color .15s,box-shadow .15s;width:100%;
}
.yb-field input:focus,.yb-field select:focus,.yb-field textarea:focus{
  outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(245,196,0,.18);
}
.yb-field textarea{resize:vertical;min-height:90px;}
.yb-field-note{font-size:11px;color:var(--text-dim);}
.yb-form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}

/* ── ALERTS ──────────────────────────────────────────────── */
.yb-alert,.alert{padding:12px 16px;border-radius:var(--radius);font-size:13px;margin-bottom:18px;}
.yb-alert-success,.alert-success{background:var(--success-bg);border:1px solid rgba(28,124,74,.3);color:var(--success);}
.yb-alert-error,.alert-error{background:var(--danger-bg);border:1px solid rgba(192,57,43,.3);color:var(--danger);}
.yb-alert-info,.alert-info{background:rgba(46,111,176,.1);border:1px solid rgba(46,111,176,.3);color:var(--info);}
.yb-alert-warn,.alert-warn{background:rgba(176,125,16,.12);border:1px solid rgba(176,125,16,.3);color:var(--warn);}

/* ── STATUS / PLAN BADGES ────────────────────────────────── */
.yb-badge-status,.badge{
  display:inline-block;padding:3px 10px;border-radius:999px;
  font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:capitalize;
}
.yb-badge-status.draft,.badge-draft{background:var(--surface2);color:var(--text-dim);}
.yb-badge-status.building,.badge-building{background:rgba(176,125,16,.15);color:var(--warn);}
.yb-badge-status.live,.badge-live{background:var(--success-bg);color:var(--success);}
.yb-badge-status.suspended,.badge-suspended{background:var(--danger-bg);color:var(--danger);}
.badge-success{background:var(--success-bg);color:var(--success);}
.yb-badge-plan{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:3px 8px;border-radius:var(--radius);}
.yb-badge-plan.starter,.plan-badge.starter{background:var(--surface2);color:var(--text-dim);}
.yb-badge-plan.executive,.plan-badge.executive{background:var(--gold-bg);color:var(--gold-dk);}
.yb-badge-plan.enterprise,.plan-badge.enterprise{background:var(--gold-bg);color:var(--gold-dk);border:1px solid rgba(245,196,0,.4);}
.plan-badge{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:3px 8px;border-radius:var(--radius);}

/* ── ORDER / STATUS PILLS (new design) ───────────────────── */
.yb-pill{display:inline-flex;align-items:center;padding:3px 10px;border-radius:99px;font-size:10px;font-weight:700;letter-spacing:.06em;}
.yb-pill-green{background:rgba(59,209,111,.12);color:#3bd16f;border:1px solid rgba(59,209,111,.25);}
.yb-pill-yellow{background:rgba(245,196,0,.12);color:#d4a900;border:1px solid rgba(245,196,0,.25);}
.yb-pill-red{background:rgba(242,102,102,.12);color:#f26666;border:1px solid rgba(242,102,102,.25);}
.yb-pill-grey{background:var(--surface2);color:var(--text-dim);border:1px solid var(--border);}
[data-theme="light"] .yb-pill-green{background:rgba(28,124,74,.1);color:#1c7c4a;}
[data-theme="light"] .yb-pill-yellow{background:rgba(176,125,16,.1);color:#b07d10;}
[data-theme="light"] .yb-pill-red{background:rgba(192,57,43,.1);color:#c0392b;}

/* ── PAGINATION ──────────────────────────────────────────── */
.yb-pagination{display:flex;gap:5px;align-items:center;margin-top:14px;flex-wrap:wrap;}
.yb-pagination a,.yb-pagination span{padding:4px 9px;border-radius:var(--radius);font-size:12px;border:1px solid var(--border);color:var(--text-dim);text-decoration:none;}
.yb-pagination a:hover{background:var(--surface2);color:var(--ink);}
.yb-pagination .current,.yb-pagination .current-page{background:var(--gold);border-color:var(--gold);color:#111;}

/* ── OVERLAY ─────────────────────────────────────────────── */
.yb-overlay{
  display:block;position:fixed;inset:0;
  background:rgba(0,0,0,.55);z-index:250;
  opacity:0;visibility:hidden;
  transition:opacity .28s,visibility .28s;
}
.yb-overlay.active{opacity:1;visibility:visible;}

/* ── AUTH PAGES ──────────────────────────────────────────── */
.yb-auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--page);padding:24px;}
.yb-auth-card{width:420px;max-width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-xl);padding:40px;box-shadow:0 12px 40px rgba(0,0,0,.08);}
.yb-auth-brand{font-family:'Bebas Neue',sans-serif;font-size:22px;letter-spacing:.06em;color:var(--ink);display:flex;align-items:center;gap:8px;margin-bottom:24px;}
.yb-auth-brand span{color:var(--gold-dk);}
.yb-auth-card h1{font-size:20px;font-weight:700;color:var(--ink);margin-bottom:4px;}
.yb-auth-card p{font-size:13px;color:var(--text-dim);margin-bottom:24px;line-height:1.5;}
.yb-auth-card .yb-btn{width:100%;justify-content:center;padding:12px;font-size:14px;margin-top:4px;}
.yb-auth-switch{margin-top:20px;text-align:center;font-size:13px;color:var(--text-dim);}

/* ── SCORE WIDGET ────────────────────────────────────────── */
.yb-score-widget{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px;display:flex;align-items:center;gap:24px;margin-bottom:24px;}
.yb-score-ring{position:relative;width:80px;height:80px;flex-shrink:0;}
.yb-score-ring svg{transform:rotate(-90deg);}
.yb-score-ring .track{fill:none;stroke:var(--border-2);stroke-width:6;}
.yb-score-ring .fill{fill:none;stroke:var(--gold);stroke-width:6;stroke-linecap:round;transition:stroke-dashoffset .6s ease;}
.yb-score-number{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:var(--gold-dk);}
.yb-score-info h3{font-size:14px;font-weight:600;color:var(--ink);margin-bottom:6px;}
.yb-score-info p{font-size:12px;color:var(--text-dim);line-height:1.6;}

/* ── SITE CARDS ──────────────────────────────────────────── */
.site-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;margin-bottom:32px;}
.site-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;
  text-decoration:none;color:inherit;display:flex;flex-direction:column;
  transition:transform .15s,box-shadow .15s,border-color .15s,background .25s;
}
.site-card:hover{transform:translateY(-2px);box-shadow:0 6px 22px rgba(0,0,0,.1);border-color:var(--gold);text-decoration:none;}
.site-card-thumb{height:100px;background:linear-gradient(135deg,var(--surface2),var(--border));position:relative;display:flex;align-items:center;justify-content:center;}
.site-card-thumb-label{font-size:32px;font-weight:700;color:rgba(0,0,0,.1);letter-spacing:.1em;}
[data-theme="dark"] .site-card-thumb-label{color:rgba(255,255,255,.06);}
.site-card-type-badge{position:absolute;top:8px;right:8px;background:var(--surface);border:1px solid var(--border);padding:3px 8px;border-radius:var(--radius);font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);font-weight:700;}
.site-card-body{padding:14px;display:flex;flex-direction:column;gap:6px;flex:1;}
.site-card-name{font-size:15px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.site-card-domain{font-size:12px;color:var(--text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.site-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;}
.site-card-new{align-items:center;justify-content:center;text-align:center;padding:28px;border-style:dashed;cursor:pointer;}
.site-card-new:hover{border-color:var(--gold);background:var(--gold-bg);}
.site-card-new-icon{font-size:40px;color:var(--text-dim);margin-bottom:8px;}
.site-card-new p{font-size:12px;color:var(--text-dim);margin-top:4px;}

/* ── SOURCE CODE CARD ────────────────────────────────────── */
.source-card{
  background:var(--surface);border:1px solid var(--border);
  border-left:4px solid var(--gold);
  border-radius:var(--radius-lg);padding:24px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;
  margin-bottom:22px;
  transition:background .25s;
}
.source-card-left h3{font-family:'Bebas Neue',sans-serif;font-size:22px;letter-spacing:.03em;color:var(--ink);margin-bottom:6px;}
.source-card-left p{font-size:13px;color:var(--text-dim);line-height:1.6;max-width:480px;}
.source-card-price{font-family:'Bebas Neue',sans-serif;font-size:32px;letter-spacing:.03em;color:var(--gold-dk);white-space:nowrap;}

/* ── UPGRADE BANNER ──────────────────────────────────────── */
.upgrade-banner{
  background:var(--gold-bg);border:1px solid rgba(245,196,0,.25);
  border-left:4px solid var(--gold);
  border-radius:var(--radius-lg);padding:16px 20px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  margin-bottom:24px;flex-wrap:wrap;
}
.upgrade-banner p{font-size:13px;color:var(--text);margin:0;flex:1;}
.upgrade-banner strong{color:var(--gold-dk);}
[data-theme="dark"] .upgrade-banner strong{color:var(--gold);}

/* ── HEALTH GAUGE (design 01 — site health ring) ────────── */
.yb-health-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-xl);padding:20px;margin-bottom:20px;
  transition:background .25s,border-color .25s;
}
.yb-health-card-label{
  font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--text-muted);margin-bottom:14px;
}
.yb-health-inner{display:flex;align-items:center;gap:20px;}
.yb-gauge-wrap{position:relative;width:90px;height:90px;flex-shrink:0;}
.yb-gauge-wrap svg{transform:rotate(-90deg);}
.yb-gauge-track{fill:none;stroke:var(--border-2);stroke-width:8;}
.yb-gauge-fill{fill:none;stroke:var(--gold);stroke-width:8;stroke-linecap:round;transition:stroke-dashoffset .7s ease;}
.yb-gauge-label{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
}
.yb-gauge-pct{font-size:22px;font-weight:800;color:var(--ink);line-height:1;}
.yb-gauge-sub{font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);margin-top:2px;}
.yb-health-side{flex:1;min-width:0;}
.yb-health-count{font-size:26px;font-weight:800;color:var(--ink);line-height:1;}
.yb-health-count-sub{font-size:12px;color:var(--text-dim);margin-top:3px;margin-bottom:14px;}
.yb-health-cta{
  display:inline-flex;align-items:center;gap:5px;
  background:var(--gold);color:#111;border:none;
  padding:9px 16px;border-radius:var(--radius);font-size:12px;font-weight:700;
  cursor:pointer;text-decoration:none;transition:background .15s;white-space:nowrap;
}
.yb-health-cta:hover{background:var(--gold-dk);text-decoration:none;color:#111;}

/* ── STAT CARDS ROW (design 01) ──────────────────────────── */
.yb-stat-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;margin-bottom:20px;
}
.yb-stat-mini{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:14px;
  transition:background .25s,border-color .25s;
}
.yb-stat-mini-label{font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);margin-bottom:6px;}
.yb-stat-mini-value{font-size:22px;font-weight:800;color:var(--ink);line-height:1;word-break:break-all;}
.yb-stat-mini-sub{font-size:10px;color:var(--text-dim);margin-top:4px;font-weight:600;}
.yb-stat-mini-sub.up{color:var(--success);}
.yb-stat-mini-sub.gold{color:var(--warn);}
[data-theme="dark"] .yb-stat-mini-sub.gold{color:var(--gold);}
@media (max-width:380px){
  .yb-stat-row{grid-template-columns:1fr 1fr;}
}

/* ── GREETING (design 01) ────────────────────────────────── */
.yb-greeting-section{margin-bottom:24px;}
.yb-greeting-time{font-size:28px;font-weight:800;color:var(--text);line-height:1.1;}
.yb-greeting-name{font-size:28px;font-weight:800;color:var(--gold);line-height:1.1;margin-bottom:7px;}
.yb-greeting-tagline{font-size:13px;color:var(--text-dim);line-height:1.5;}

/* ── "MORE" SCREEN (05-account-more design) ──────────────── */
.yb-more-profile{display:flex;align-items:center;gap:14px;margin-bottom:20px;}
.yb-more-avatar{
  width:52px;height:52px;border-radius:50%;
  background:var(--surface2);border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:20px;font-weight:700;color:var(--gold);flex-shrink:0;
}
.yb-more-name{font-size:17px;font-weight:700;color:var(--ink);}
.yb-more-email{font-size:12px;color:var(--text-dim);margin-top:2px;}
.yb-plan-chip{
  display:inline-flex;align-items:center;justify-content:space-between;
  background:var(--gold-bg);border:1px solid rgba(245,196,0,.3);
  border-radius:var(--radius-lg);padding:12px 16px;margin-bottom:20px;width:100%;
}
.yb-plan-chip-label{font-size:13px;font-weight:700;color:var(--gold-dk);}
[data-theme="dark"] .yb-plan-chip-label{color:var(--gold);}
.yb-plan-chip-sub{font-size:11px;color:var(--text-dim);margin-top:2px;}
.yb-section-list{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;margin-bottom:16px;
}
.yb-section-list-label{
  font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--text-muted);padding:14px 18px 6px;
}
.yb-list-row{
  display:flex;align-items:center;padding:14px 18px;
  border-bottom:1px solid var(--border);
  text-decoration:none;color:var(--text);
  transition:background .15s;
  font-size:14px;
}
.yb-list-row:last-child{border-bottom:none;}
.yb-list-row:hover{background:var(--surface2);text-decoration:none;}
.yb-list-row-icon{width:20px;height:20px;margin-right:12px;opacity:.6;flex-shrink:0;}
.yb-list-row-chevron{margin-left:auto;font-size:16px;color:var(--text-muted);opacity:.7;}
.yb-logout-row{
  display:flex;align-items:center;justify-content:center;
  padding:15px;border:1px solid var(--danger-bg);
  border-radius:var(--radius-lg);margin-top:20px;
  color:var(--danger);font-size:14px;font-weight:700;
  text-decoration:none;transition:background .15s;
}
.yb-logout-row:hover{background:var(--danger-bg);text-decoration:none;}

/* ── DETAIL ROWS ─────────────────────────────────────────── */
.detail-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);}
.detail-row:last-child{border-bottom:none;}
.detail-row .lbl{font-size:11px;font-weight:600;color:var(--text-dim);text-transform:uppercase;letter-spacing:.07em;}
.detail-row .val{font-size:13px;color:var(--text);text-align:right;}
.detail-row .mono{font-family:'Fira Code',monospace;font-size:12px;}

/* ── SEARCH & FILTER ─────────────────────────────────────── */
.search-bar{flex:1;min-width:200px;}
.search-bar input{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);padding:8px 12px;font-size:13px;width:100%;}
.search-bar input:focus{outline:none;border-color:var(--gold);}
.filter-select{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);padding:8px 12px;font-size:13px;min-width:140px;}
.filter-select:focus{outline:none;border-color:var(--gold);}

/* ── EMPTY / ACTION ROWS ─────────────────────────────────── */
.action-cell{white-space:nowrap;}
.empty-row td{text-align:center;padding:40px !important;color:var(--text-dim);font-style:italic;}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width:900px) {
  .yb-sidebar{transform:translateX(-100%);}
  .yb-sidebar.open{transform:translateX(0);box-shadow:8px 0 40px rgba(0,0,0,.2);}
  .yb-sidebar-close{display:flex;}
  .yb-main{margin-left:0;}
  .main-content{margin-left:0;}
  .yb-topbar{padding:0 14px;}
  .yb-menu-btn{display:flex;}
  .yb-page-body{padding:16px;padding-bottom:calc(16px + var(--bottom-nav-h) + 4px);}
  .yb-bottom-nav{display:block;}
  .yb-stats-grid{grid-template-columns:1fr 1fr;gap:10px;}
  .yb-form-row,.form-grid{grid-template-columns:1fr;}
  .yb-card{overflow-x:auto;}
  .yb-table{min-width:500px;}
  .plan-grid{grid-template-columns:1fr !important;}
  .yb-topbar-title{font-size:14px;}
  .yb-topbar-right{gap:6px;}
  .yb-topbar-btn{font-size:11px;padding:4px 8px;}
  .detail-row{flex-direction:column;gap:4px;}
  .detail-row .lbl{width:auto;}
  .yb-onboard-right{display:none;}
  .yb-type-grid{grid-template-columns:1fr;}
}

@media (max-width:480px) {
  .yb-stats-grid{grid-template-columns:1fr;}
  .yb-auth-card{padding:28px 20px;width:100%;}
  .yb-page-body{padding:12px;padding-bottom:calc(12px + var(--bottom-nav-h) + 4px);}
  .yb-topbar{height:50px;padding:0 12px;}
  .yb-topbar-title{font-size:13px;}
  .yb-stat-value{font-size:22px;}
  .plan-grid{gap:12px !important;}
  .source-card{flex-direction:column;align-items:flex-start;padding:16px;}
  .source-card-price{font-size:24px;}
  .yb-auth-wrap{padding:16px;}
  .site-cards{grid-template-columns:1fr;}
  .yb-more-name{font-size:15px;}
}

/* ── ONBOARDING ──────────────────────────────────────────── */
.yb-onboard-wrap{min-height:100vh;background:var(--page);display:flex;align-items:stretch;}
.yb-onboard-left{width:480px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);padding:48px 40px;display:flex;flex-direction:column;}
.yb-onboard-right{flex:1;display:flex;align-items:center;justify-content:center;padding:48px;background:var(--surface2);position:relative;overflow:hidden;}
.yb-onboard-step{display:none;}
.yb-onboard-step.active{display:block;}
.yb-step-num{font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:var(--gold-dk);margin-bottom:12px;}
.yb-step-title{font-family:'Bebas Neue',sans-serif;font-size:36px;letter-spacing:.03em;color:var(--ink);line-height:1;margin-bottom:12px;}
.yb-step-sub{font-size:14px;color:var(--text-dim);line-height:1.7;margin-bottom:28px;}
.yb-progress-bar{width:100%;height:3px;background:var(--border-2);border-radius:2px;margin-bottom:36px;}
.yb-progress-fill{height:100%;background:var(--gold);border-radius:2px;transition:width .4s ease;}
.yb-type-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.yb-type-card{border:1px solid var(--border);border-radius:var(--radius);padding:16px;cursor:pointer;transition:border-color .15s,background .15s;text-align:left;background:var(--surface);}
.yb-type-card:hover{border-color:var(--gold);background:var(--gold-bg);}
.yb-type-card.selected{border-color:var(--gold);background:var(--gold-bg);}
.yb-type-card-icon{font-size:20px;margin-bottom:8px;}
.yb-type-card-name{font-size:13px;font-weight:600;color:var(--ink);margin-bottom:3px;}
.yb-type-card-desc{font-size:11px;color:var(--text-dim);line-height:1.4;}
.yb-color-swatches{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}
.yb-swatch{width:32px;height:32px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:transform .15s,border-color .15s;}
.yb-swatch:hover,.yb-swatch.selected{border-color:var(--ink);transform:scale(1.15);}
@media (max-width:900px){
  .yb-onboard-left{width:100%;border-right:none;}
}

/* ── PAGE HEADER (design 02/03/04 pattern) ──────────────── */
.yb-page-header{margin-bottom:22px;}
.yb-page-header h1{
  font-size:clamp(22px,5vw,28px);font-weight:800;
  color:var(--ink);line-height:1.15;margin-bottom:4px;
}
.yb-page-header .yb-page-sub{
  font-size:13px;color:var(--text-dim);line-height:1.5;
}
.yb-page-header-row{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:16px;flex-wrap:wrap;margin-bottom:22px;
}
.yb-page-header-row h1{
  font-size:clamp(20px,4vw,26px);font-weight:800;
  color:var(--ink);line-height:1.15;margin:0 0 3px;
}
.yb-page-header-row .yb-page-sub{font-size:13px;color:var(--text-dim);}
.yb-page-header-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;flex-shrink:0;}

/* ── PERIOD TOGGLE pill (design 03/04) ──────────────────── */
.yb-period-toggle{
  background:var(--surface2);border:1px solid var(--border);
  border-radius:99px;padding:4px;display:inline-flex;gap:2px;
  flex-wrap:wrap;margin-bottom:20px;
}
.yb-period-toggle a{
  padding:7px 14px;border-radius:99px;font-size:11px;font-weight:600;
  text-decoration:none;transition:background .15s,color .15s;
  color:var(--text-dim);
}
.yb-period-toggle a.active{background:var(--gold);color:#111;}
.yb-period-toggle a:hover:not(.active){background:var(--surface3);color:var(--ink);text-decoration:none;}

/* ── ORDER CARD ROW (design 04) ──────────────────────────── */
.yb-order-row{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:14px 18px;
  margin-bottom:8px;
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  transition:background .15s,border-color .15s;
}
.yb-order-row:hover{background:var(--surface2);border-color:var(--border-2);}
.yb-order-ref{font-size:13px;font-weight:700;color:var(--ink);font-family:monospace;min-width:100px;}
.yb-order-customer{flex:1;min-width:120px;}
.yb-order-customer-name{font-size:13px;font-weight:600;color:var(--ink);}
.yb-order-customer-note{font-size:11px;color:var(--text-dim);margin-top:1px;}
.yb-order-amount{font-size:13px;font-weight:700;color:var(--ink);font-family:monospace;white-space:nowrap;}
.yb-order-actions{display:flex;gap:6px;flex-shrink:0;}

/* ── SITE PAGE CARD (design 02) ──────────────────────────── */
.yb-page-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:14px 18px;
  display:flex;align-items:center;gap:14px;margin-bottom:8px;
  text-decoration:none;color:inherit;
  transition:background .15s,border-color .15s;
}
.yb-page-card:hover{background:var(--surface2);border-color:var(--gold);text-decoration:none;}
.yb-page-card-icon{
  width:46px;height:46px;background:var(--surface2);border:1px solid var(--border);
  border-radius:var(--radius);display:flex;align-items:center;justify-content:center;
  font-size:18px;flex-shrink:0;
}
.yb-page-card-name{font-size:14px;font-weight:700;color:var(--ink);}
.yb-page-card-meta{font-size:11px;color:var(--text-dim);margin-top:2px;}
.yb-page-card-chevron{margin-left:auto;color:var(--text-muted);font-size:18px;flex-shrink:0;}

/* ── REVENUE SUMMARY CARD (design 04) ───────────────────── */
.yb-revenue-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-xl);padding:18px 20px;
  display:grid;grid-template-columns:1fr auto 1fr auto 1fr;
  align-items:center;gap:0;margin-bottom:20px;
  transition:background .25s;
}
.yb-revenue-card-divider{width:1px;background:var(--border);height:48px;margin:0 4px;}
.yb-revenue-block{padding:0 12px;}
.yb-revenue-block:first-child{padding-left:0;}
.yb-revenue-label{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);margin-bottom:6px;}
.yb-revenue-value{font-size:clamp(18px,3vw,24px);font-weight:800;color:var(--ink);line-height:1;}
.yb-revenue-value.gold{color:var(--warn);}
[data-theme="dark"] .yb-revenue-value.gold{color:var(--gold);}
@media (max-width:480px){
  .yb-revenue-card{grid-template-columns:1fr 1fr;gap:14px;}
  .yb-revenue-card-divider{display:none;}
}

/* ── BACKWARD COMPAT — aliases without yb- prefix ───────── */
.admin-wrap{display:flex;min-height:100vh;}
.main-content{margin-left:var(--sidebar-w);flex:1;display:flex;flex-direction:column;min-height:100vh;min-width:0;}
.page-body{padding:28px;flex:1;padding-bottom:calc(28px + var(--bottom-nav-h));}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin-bottom:24px;}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px;transition:transform .15s,box-shadow .15s,border-color .15s,background .25s;}
.stat-card.gold{border-top:3px solid var(--gold);}
.stat-card.success{border-top:3px solid var(--success);}
.stat-card.info{border-top:3px solid var(--info);}
.stat-card.warn{border-top:3px solid var(--warn);}
.stat-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);margin-bottom:7px;font-weight:700;}
.stat-value{font-size:28px;font-weight:700;color:var(--ink);line-height:1;}
.stat-sub{font-size:11px;color:var(--text-dim);margin-top:5px;}
.stat-link{display:block;text-decoration:none;color:inherit;}
a.stat-link:hover{transform:translateY(-2px);box-shadow:0 6px 22px rgba(0,0,0,.08);border-color:var(--gold);text-decoration:none;color:inherit;}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);margin-bottom:20px;overflow:hidden;transition:background .25s,border-color .25s;}
.card-header{padding:14px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.card-header h2{font-size:13px;font-weight:600;color:var(--ink);}
.card-body{padding:20px;}
.btn{display:inline-flex;align-items:center;gap:6px;padding:9px 18px;border-radius:var(--radius);font-size:13px;font-weight:600;cursor:pointer;border:1px solid transparent;transition:background .15s,border-color .15s,color .15s;text-decoration:none;white-space:nowrap;line-height:1;}
.btn-primary{background:var(--gold);color:#111;border-color:var(--gold);}
.btn-primary:hover{background:var(--gold-dk);border-color:var(--gold-dk);text-decoration:none;color:#111;}
.btn-ghost{background:transparent;color:var(--text-dim);border-color:var(--border);}
.btn-ghost:hover{background:var(--surface2);color:var(--ink);text-decoration:none;}
.btn-danger{background:transparent;color:var(--danger);border-color:var(--danger);}
.btn-danger:hover{background:var(--danger);color:#fff;text-decoration:none;}
.btn-success{background:var(--success);color:#fff;border-color:var(--success);}
.btn-sm{padding:5px 11px;font-size:11px;}
.btn-lg{padding:12px 24px;font-size:14px;}
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:16px;}
.field label{font-size:11px;font-weight:600;color:var(--text-dim);letter-spacing:.04em;}
.field input,.field select,.field textarea{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);padding:10px 13px;font-size:14px;font-family:inherit;transition:border-color .15s,box-shadow .15s;width:100%;}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(245,196,0,.18);}
.field textarea{resize:vertical;min-height:90px;}
.field-note{font-size:11px;color:var(--text-dim);}
.data-table{width:100%;border-collapse:collapse;}
.data-table th{text-align:left;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-dim);padding:9px 12px;border-bottom:1px solid var(--border);white-space:nowrap;}
.data-table td{padding:10px 12px;border-bottom:1px solid var(--border);font-size:13px;color:var(--text);vertical-align:middle;}
.data-table tr:last-child td{border-bottom:none;}
.data-table tr:hover td{background:var(--surface2);}
.text-muted{color:var(--text-dim);}

@media (max-width:900px){
  .main-content{margin-left:0;}
  .page-body{padding:16px;padding-bottom:calc(16px + var(--bottom-nav-h) + 4px);}
  .stats-grid{grid-template-columns:1fr 1fr;gap:10px;}
  .card{overflow-x:auto;}
  .form-grid{grid-template-columns:1fr !important;}
  .site-cards{grid-template-columns:1fr;}
  .source-card{flex-direction:column;align-items:stretch;}
  .upgrade-banner{flex-direction:column;align-items:stretch;text-align:center;}
}
@media (max-width:480px){
  .page-body{padding:12px;padding-bottom:calc(12px + var(--bottom-nav-h) + 4px);}
  .stats-grid{grid-template-columns:1fr;gap:8px;}
  .stat-value{font-size:22px;}
  .card-header{padding:10px 14px;}
  .card-header h2{font-size:12px;}
  .card-body{padding:14px;}
  .field input,.field select,.field textarea{font-size:16px;padding:12px 14px;}
  .btn{padding:10px 16px;font-size:14px;}
  .btn-primary{width:100%;justify-content:center;}
  .source-card{padding:16px;}
  .source-card-price{font-size:22px;}
}
