@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/* ============================================================
   Provision — Provisioning Manager
   Design tokens + screen styles
   Type: Hanken Grotesk (UI) · JetBrains Mono (technical)
   ============================================================ */

/* ---- Reset within screens ---- */
.scr, .scr * { box-sizing: border-box; }
.scr {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 100%; min-height: 100dvh;
  position: relative;
  color: var(--text);
  background: var(--bg);
}
.scr p, .scr h1, .scr h2, .scr h3, .scr h4, .scr ul, .scr li { margin: 0; padding: 0; }
.scr ul { list-style: none; }
.scr .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ============================================================
   DARK (default) tokens — color direction #1
   ============================================================ */
.scr {
  --bg:        #0E0F13;
  --bg-grad:   radial-gradient(120% 120% at 100% 0%, #15171F 0%, #0E0F13 55%);
  --surface:   #16181F;
  --surface-2: #1B1E27;
  --surface-3: #22262F;
  --border:    #292D38;
  --border-soft:#20232C;
  --text:      #E9EBF1;
  --text-2:    #A2A8B6;
  --text-3:    #6C7080;
  --accent:    #19699A;
  --accent-hi: #4C9BCC;
  --accent-soft: rgba(25,105,154,0.16);
  --accent-ring: rgba(25,105,154,0.40);
  --ok:    #34D399;
  --ok-soft: rgba(52,211,153,0.14);
  --warn:  #FBBF24;
  --warn-soft: rgba(251,191,36,0.14);
  --info:  #60A5FA;
  --info-soft: rgba(96,165,250,0.14);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.32);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --r-xs: 6px; --r-sm: 8px; --r: 11px; --r-lg: 16px; --r-xl: 22px;
}

/* ============================================================
   LIGHT tokens
   ============================================================ */
.scr.light {
  --bg:        #F6F6F9;
  --bg-grad:   radial-gradient(120% 120% at 100% 0%, #FFFFFF 0%, #F2F3F7 60%);
  --surface:   #FFFFFF;
  --surface-2: #FBFBFD;
  --surface-3: #F1F2F6;
  --border:    #E6E7EE;
  --border-soft:#EEEFF4;
  --text:      #14161D;
  --text-2:    #585F6E;
  --text-3:    #9499A6;
  --accent:    #19699A;
  --accent-hi: #3382B3;
  --accent-soft: rgba(25,105,154,0.10);
  --accent-ring: rgba(25,105,154,0.30);
  --ok:    #0E9F6E;
  --ok-soft: rgba(14,159,110,0.10);
  --warn:  #C2820B;
  --warn-soft: rgba(194,130,11,0.12);
  --info:  #2563EB;
  --info-soft: rgba(37,99,235,0.10);
  --shadow: 0 1px 2px rgba(20,22,29,.06), 0 12px 28px rgba(20,22,29,.08);
  --shadow-sm: 0 1px 2px rgba(20,22,29,.06);
}

/* ============================================================
   App shell: sidebar + main
   ============================================================ */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100dvh; background: var(--bg-grad); }

.side {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  gap: 4px;
  position: sticky; top: 0; height: 100dvh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--accent-hi), var(--accent));
  display: grid; place-items: center;
  box-shadow: 0 4px 12px var(--accent-ring);
}
.brand .mark svg { width: 16px; height: 16px; }
.brand .name { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand .name b { font-weight: 700; }
.brand .name span { color: var(--text-3); font-weight: 500; }

.nav-grp { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .85; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-hi); }
.nav-item.active svg { opacity: 1; }
.nav-item .count { margin-left: auto; font-size: 11px; color: var(--text-3); font-family: "JetBrains Mono", monospace; }
.nav-item.disabled { color: var(--text-3); opacity: .5; cursor: default; pointer-events: none; }
.nav-item.disabled svg { opacity: .5; }

.side-foot { margin-top: auto; }
.usercard {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: var(--r-sm); cursor: pointer;
}
.usercard:hover { background: var(--surface-3); }
.usercard .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(140deg,#F472B6,#A855F7); display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.usercard .u-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.usercard .u-mail { font-size: 11px; color: var(--text-3); }

.main { display: flex; flex-direction: column; min-width: 0; }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.topbar .crumb { font-size: 13px; color: var(--text-3); }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.page-h1 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.page-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.spacer { flex: 1 1 auto; }

.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 12px; width: 280px;
  color: var(--text-3); font-size: 13px;
}
.search svg { width: 15px; height: 15px; flex: 0 0 auto; }
.search .kbd { margin-left: auto; font-size: 10.5px; font-family: "JetBrains Mono", monospace; border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
  padding: 9px 15px; cursor: pointer; border: 1px solid transparent;
  font-family: inherit; white-space: nowrap; transition: .12s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-ring); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-subtle { background: transparent; color: var(--text-2); }
.btn-subtle:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, #F87171 40%, var(--border)); color: #F87171; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.icon-btn { width: 34px; height: 34px; padding: 0; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 100px;
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge.live { background: var(--ok-soft); color: var(--ok); }
.badge.live .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.badge.staging { background: var(--info-soft); color: var(--info); }
.badge.staging .dot { background: var(--info); }
.badge.draft { background: var(--surface-3); color: var(--text-3); }
.badge.draft .dot { background: var(--text-3); }

/* ---- Content area ---- */
.content { padding: 24px 28px; flex: 1 1 auto; }
/* topbar should not scroll away awkwardly inside short content */
.topbar { position: sticky; top: 0; z-index: 6; backdrop-filter: blur(8px); }

.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 15px 17px; }
.stat .k { font-size: 12px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.stat .k svg { width: 14px; height: 14px; opacity: .7; }
.stat .v { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; }
.stat .v small { font-size: 13px; color: var(--ok); font-weight: 600; margin-left: 6px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 7px; }
.seg button svg { width: 14px; height: 14px; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 12px; font-size: 12.5px; color: var(--text-2); font-weight: 500; cursor: pointer; }
.filter-chip svg { width: 14px; height: 14px; }

/* ============================================================
   Profile card (dashboard grid)
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  transition: .14s; box-shadow: var(--shadow-sm);
}
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard .banner { height: 64px; position: relative; display: flex; align-items: center; padding: 0 16px; gap: 12px; }
.pcard .plogo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; flex: 0 0 auto; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.pcard .pmeta { min-width: 0; }
.pcard .pname { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.pcard .pdomain { font-size: 11.5px; color: rgba(255,255,255,.78); font-family: "JetBrains Mono", monospace; margin-top: 2px; }
.pcard .pbody { padding: 14px 16px 16px; }
.pcard .ptag { font-size: 12.5px; color: var(--text-2); line-height: 1.45; min-height: 36px; }
.swatches { display: flex; gap: 5px; margin-top: 13px; }
.swatches i { width: 22px; height: 22px; border-radius: 6px; display: block; border: 1px solid rgba(255,255,255,.10); }
.pcard .pfoot { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border-soft); }
.pcard .pfoot .upd { font-size: 11px; color: var(--text-3); margin-left: auto; }

/* ============================================================
   Profile table (dashboard list)
   ============================================================ */
.ptable { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; border-collapse: collapse; }
.ptable thead th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ptable tbody { }
.ptable td { padding: 13px 18px; border-bottom: 1px solid var(--border-soft); font-size: 13px; vertical-align: middle; }
.ptable tr:last-child td { border-bottom: none; }
.ptable tr.row:hover td { background: var(--surface-2); }
.ptable .cell-name { display: flex; align-items: center; gap: 12px; }
.ptable .tlogo { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.ptable .tname { font-weight: 600; font-size: 13.5px; }
.ptable .tsub { font-size: 11px; color: var(--text-3); }
.ptable .tdomain { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--text-2); }
.ptable .tsw { display: flex; gap: 4px; }
.ptable .tsw i { width: 16px; height: 16px; border-radius: 4px; display: block; }
.ptable .row-act { display: flex; gap: 4px; opacity: .55; }

/* ============================================================
   Login
   ============================================================ */
.login { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100dvh; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login .pane-l { display: none; } }
.login .pane-l {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 80% at 18% 10%, rgba(25,105,154,.42) 0%, transparent 55%),
    radial-gradient(80% 80% at 90% 90%, rgba(76,155,204,.22) 0%, transparent 50%),
    #0A0F14;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
}
.login .pane-l .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 38px 38px; mask-image: radial-gradient(80% 80% at 30% 30%, #000 0%, transparent 80%); }
.login .pane-l .l-brand { display: flex; align-items: center; gap: 11px; position: relative; }
.login .pane-l .l-brand .mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(140deg,#4C9BCC,#19699A); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(25,105,154,.5); }
.login .pane-l .l-brand .mark svg { width: 17px; height: 17px; }
.login .pane-l .l-brand .name { font-size: 17px; font-weight: 700; }
.login .pane-l .l-mid { position: relative; }
.login .pane-l .l-tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #4C9BCC; font-weight: 700; font-family: "JetBrains Mono", monospace; }
.login .pane-l h2 { font-size: 34px; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; margin-top: 16px; max-width: 12ch; }
.login .pane-l .l-desc { font-size: 14.5px; color: rgba(255,255,255,.62); margin-top: 16px; max-width: 38ch; line-height: 1.55; }
.login .pane-l .l-foot { position: relative; font-size: 12px; color: rgba(255,255,255,.4); }

/* floating mini preview cards in login left pane */
.login .float-stack { position: relative; margin-top: 30px; display: flex; gap: 14px; }
.login .float-card { background: rgba(22,24,31,.7); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.09); border-radius: 12px; padding: 13px; width: 168px; }
.login .float-card .fc-top { display: flex; align-items: center; gap: 9px; }
.login .float-card .fc-logo { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.login .float-card .fc-name { font-size: 12.5px; font-weight: 700; color: #fff; }
.login .float-card .fc-dom { font-size: 9.5px; color: rgba(255,255,255,.5); font-family: "JetBrains Mono", monospace; }
.login .float-card .fc-bars { margin-top: 11px; display: flex; flex-direction: column; gap: 6px; }
.login .float-card .fc-bars i { height: 6px; border-radius: 4px; display: block; background: rgba(255,255,255,.12); }

.login .pane-r { background: var(--bg); display: grid; place-items: center; padding: 40px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.auth-box .sub { font-size: 14px; color: var(--text-2); margin-top: 8px; }
.sso { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.sso-btn:hover { background: var(--surface-3); }
.sso-btn svg, .sso-btn img { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--text-3); }
.input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 13px; font-size: 13.5px; color: var(--text);
  font-family: inherit;
}
.input::placeholder { color: var(--text-3); }
.input.focused { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-affix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.input-affix .pre, .input-affix .post { display: grid; place-items: center; padding: 0 12px; background: var(--surface-3); color: var(--text-3); font-size: 12.5px; font-family: "JetBrains Mono", monospace; }
.input-affix input { border: none; background: transparent; padding: 11px 13px; flex: 1; font-size: 13.5px; color: var(--text); font-family: inherit; min-width: 0; }
.input-affix.focused { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row-2 { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 18px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.checkbox .box { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; }
.checkbox.on .box { background: var(--accent); border-color: var(--accent); }
.checkbox.on .box svg { width: 11px; height: 11px; color: #fff; }
.link { color: var(--accent-hi); font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 24px; }

/* dark/light pill toggle (top-right of screens) */
.mode-pill { position: absolute; top: 18px; right: 22px; z-index: 5; display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 100px; padding: 3px; gap: 2px; box-shadow: var(--shadow-sm); }
.mode-pill button { width: 30px; height: 26px; border: none; background: transparent; border-radius: 100px; cursor: pointer; display: grid; place-items: center; color: var(--text-3); }
.mode-pill button svg { width: 14px; height: 14px; }
.mode-pill button.on { background: var(--surface-3); color: var(--text); }
.editor .form-top .mode-pill { position: static; top: auto; right: auto; margin-left: auto; }

/* ============================================================
   Create / Edit form layout
   ============================================================ */
.editor { display: grid; grid-template-columns: 1fr 480px; min-height: 100dvh; align-items: start; }
.editor .form-col { display: flex; flex-direction: column; min-width: 0; background: var(--bg-grad); }
.editor .form-top { padding: 18px 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 5; background: var(--surface); }
.editor .form-top .back { width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--text-2); cursor: pointer; }
.editor .form-top .back svg { width: 16px; height: 16px; }
.editor .form-top .page-h1 { white-space: nowrap; }

/* stepper */
.stepper { display: flex; align-items: center; gap: 0; padding: 18px 32px 4px; }
.step { display: flex; align-items: center; gap: 10px; }
.step .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; font-family: "JetBrains Mono", monospace; border: 1px solid var(--border); color: var(--text-3); flex: 0 0 auto; }
.step .lbl { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.step.done .num { background: var(--accent-soft); border-color: transparent; color: var(--accent-hi); }
.step.done .lbl { color: var(--text-2); }
.step.cur .num { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.step.cur .lbl { color: var(--text); }
.step-line { width: 34px; height: 1px; background: var(--border); margin: 0 12px; }

.form-scroll { padding: 26px 32px 32px; flex: 1; }
.form-sect { margin-bottom: 30px; }
.form-sect .fs-head { margin-bottom: 16px; }
.form-sect .fs-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.form-sect .fs-desc { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* color scheme editor */
.color-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); margin-bottom: 9px; }
.color-row .sw { width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.12); cursor: pointer; }
.color-row .cr-name { font-size: 13px; font-weight: 600; }
.color-row .cr-role { font-size: 11px; color: var(--text-3); }
.color-row .cr-hex { margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--text-2); background: var(--surface-3); padding: 5px 10px; border-radius: 6px; }

.palette-presets { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.preset { display: flex; gap: 3px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.preset.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.preset i { width: 16px; height: 22px; border-radius: 3px; display: block; }

/* logo uploader */
.uploader { display: flex; gap: 14px; align-items: flex-start; }
.drop { flex: 1; border: 1.5px dashed var(--border); border-radius: var(--r); padding: 16px; text-align: center; background: var(--surface-2); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 150px; }
.drop > [data-dropzone-target="dropzone"] { width: 100%; }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; margin: 0 auto 8px; color: var(--text-2); }
.drop .ic svg { width: 19px; height: 19px; }
.drop .dt { font-size: 13px; font-weight: 600; }
.drop .dt b { color: var(--accent-hi); }
.drop .dh { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.logo-current { width: 360px; height: 150px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 14px; }
.logo-current .lc-mark { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; }
.logo-current .lc-lab { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }

.typo-opt { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; margin-bottom: 9px; }
.typo-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.typo-opt .radio { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--border); flex: 0 0 auto; display: grid; place-items: center; }
.typo-opt.on .radio { border-color: var(--accent); }
.typo-opt.on .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.typo-opt .tp-spec { font-size: 18px; font-weight: 700; flex: 0 0 auto; width: 92px; }
.typo-opt .tp-name { font-size: 13px; font-weight: 600; }
.typo-opt .tp-meta { font-size: 11px; color: var(--text-3); }

.form-foot { display: flex; align-items: center; gap: 12px; padding: 18px 32px; border-top: 1px solid var(--border); background: var(--surface); position: sticky; bottom: 0; z-index: 4; }

/* domain rows */
.dom-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); margin-bottom: 9px; }
.dom-row .dico { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: 0 0 auto; }
.dom-row .dico svg { width: 15px; height: 15px; }
.dom-row .dname { font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 500; }
.dom-row .dmeta { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ============================================================
   Preview pane (the signature feature)
   ============================================================ */
.preview-col { background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; padding: 22px; position: sticky; top: 0; height: 100dvh; }
.preview-col .pv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.preview-col .pv-head > svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--accent-hi); }
.preview-col .pv-head .pv-t { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.preview-col .pv-head .pv-tag { font-size: 10.5px; color: var(--text-3); font-family: "JetBrains Mono", monospace; }
.preview-col .pv-device-row { display: flex; gap: 6px; margin-left: auto; }
.preview-col .pv-device-row button { width: 28px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--text-3); cursor: pointer; }
.preview-col .pv-device-row button.on { background: var(--surface-3); color: var(--text); }
.preview-col .pv-device-row button svg { width: 13px; height: 13px; }

/* the rendered mock-app frame */
.appframe { border-radius: 13px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); flex: 1; display: flex; flex-direction: column; background: var(--pv-bg, #fff); }
.appframe .af-bar { display: flex; align-items: center; gap: 7px; padding: 9px 13px; background: var(--pv-chrome, rgba(0,0,0,.04)); border-bottom: 1px solid rgba(0,0,0,.07); }
.appframe .af-bar .dots { display: flex; gap: 5px; }
.appframe .af-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.14); }
.appframe .af-url { margin-left: 6px; font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--pv-fg-dim, rgba(0,0,0,.45)); background: var(--pv-bg, #fff); border-radius: 100px; padding: 3px 11px; border: 1px solid rgba(0,0,0,.08); }
.appframe .af-body { flex: 1; display: grid; grid-template-columns: 52px 1fr; min-height: 0; }
.appframe .af-side { background: var(--pv-accent); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 14px; }
.appframe .af-side .af-logo { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.95); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--pv-accent); }
.appframe .af-side .af-nav { display: flex; flex-direction: column; gap: 11px; align-items: center; margin-top: 4px; }
.appframe .af-side .af-nav i { width: 18px; height: 18px; border-radius: 6px; background: rgba(255,255,255,.28); }
.appframe .af-side .af-nav i.act { background: rgba(255,255,255,.95); }
.appframe .af-main { padding: 16px; background: var(--pv-bg, #fff); overflow: hidden; }
.appframe .af-h { display: flex; align-items: center; gap: 10px; }
.appframe .af-h .af-title { font-size: 14px; font-weight: 800; color: var(--pv-fg, #111); font-family: var(--pv-font, "Hanken Grotesk"); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appframe .af-h .af-pill { margin-left: auto; font-size: 9px; font-weight: 700; color: #fff; background: var(--pv-accent); padding: 4px 10px; border-radius: 100px; flex: 0 0 auto; }
.appframe .af-sub { font-size: 10px; color: var(--pv-fg-dim, rgba(0,0,0,.5)); margin-top: 4px; }
.appframe .af-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.appframe .af-card { border: 1px solid rgba(0,0,0,.08); border-radius: 9px; padding: 11px; background: var(--pv-card, #fff); }
.appframe .af-card .afc-k { font-size: 8.5px; color: var(--pv-fg-dim, rgba(0,0,0,.5)); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.appframe .af-card .afc-v { font-size: 18px; font-weight: 800; color: var(--pv-fg, #111); margin-top: 5px; font-family: var(--pv-font, "Hanken Grotesk"); }
.appframe .af-card .afc-bar { height: 4px; border-radius: 3px; background: var(--pv-accent); margin-top: 8px; opacity: .85; }
.appframe .af-btn { margin-top: 14px; background: var(--pv-accent); color: #fff; font-size: 10.5px; font-weight: 700; padding: 9px; border-radius: 8px; text-align: center; }
.appframe .af-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.appframe .af-list .afl { display: flex; align-items: center; gap: 8px; }
.appframe .af-list .afl .afl-av { width: 18px; height: 18px; border-radius: 50%; background: var(--pv-accent); opacity: .8; }
.appframe .af-list .afl .afl-bar { height: 7px; border-radius: 4px; background: rgba(0,0,0,.08); flex: 1; }

/* ============================================================
   Detail screen
   ============================================================ */
.detail-wrap { padding: 0; display: flex; flex-direction: column; }
.detail-hero { padding: 24px 28px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 18px; position: relative; overflow: hidden; }
.detail-hero .dh-glow { position: absolute; inset: 0; opacity: .14; }
.detail-hero .dlogo { width: 60px; height: 60px; border-radius: 15px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 26px; flex: 0 0 auto; box-shadow: 0 8px 24px rgba(0,0,0,.3); position: relative; }
.detail-hero .dh-meta { position: relative; }
.detail-hero h1 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.detail-hero .dh-dom { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--text-2); margin-top: 6px; display: flex; align-items: center; gap: 7px; }
.detail-hero .dh-dom svg { width: 13px; height: 13px; }
.detail-hero .dh-act { margin-left: auto; display: flex; gap: 10px; position: relative; }

.detail-body { display: grid; grid-template-columns: 1fr 420px; gap: 22px; padding: 24px 28px; flex: 1; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; }
.panel .p-title { font-size: 13px; font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 9px; }
.panel .p-title svg { width: 15px; height: 15px; opacity: .7; }
.panel .p-title .edit { margin-left: auto; font-size: 11.5px; color: var(--accent-hi); font-weight: 600; cursor: pointer; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; }
.kv dt { font-size: 12.5px; color: var(--text-3); }
.kv dd { font-size: 12.5px; color: var(--text); font-weight: 500; }
.kv dd.mono { font-family: "JetBrains Mono", monospace; font-size: 12px; }

.token-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; }
.token { text-align: center; }
.token .tk-sw { height: 52px; border-radius: 9px; border: 1px solid rgba(255,255,255,.08); }
.token .tk-name { font-size: 11px; font-weight: 600; margin-top: 7px; }
.token .tk-hex { font-size: 10px; color: var(--text-3); font-family: "JetBrains Mono", monospace; margin-top: 1px; }

.specimen { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.specimen .sp-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.specimen .sp-w { font-size: 11px; color: var(--text-3); width: 70px; font-family: "JetBrains Mono", monospace; font-weight: 400; }

.activity { display: flex; flex-direction: column; gap: 0; }
.act-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.act-item:last-child { border-bottom: none; }
.act-item .ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: 0 0 auto; }
.act-item .ai-txt { font-size: 12.5px; color: var(--text); }
.act-item .ai-txt b { font-weight: 600; }
.act-item .ai-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ============================================================
   AI logo-analysis flow (create · branding)
   ============================================================ */
.ai-promise {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px; border-radius: var(--r-sm); margin-top: 14px;
  background: linear-gradient(100deg, var(--accent-soft), color-mix(in srgb, var(--accent) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
}
.ai-sparkle {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(140deg, #F2A23C, #E2553C); display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(226,85,60,.4);
}
.ai-sparkle svg { width: 16px; height: 16px; color: #fff; }
.ai-promise .ai-pt { font-size: 13px; font-weight: 600; }
.ai-promise .ai-ps { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }

/* drop zone with an uploaded logo + scanning */
.scan-stage {
  border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface-2);
  padding: 26px; display: flex; align-items: center; gap: 22px; position: relative; overflow: hidden;
}
.scan-logo {
  width: 104px; height: 104px; border-radius: 22px; flex: 0 0 auto; position: relative; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 46px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.scan-logo .scan-line {
  position: absolute; left: 0; right: 0; height: 36%; top: -36%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.55), transparent);
  animation: scanmove 1.7s cubic-bezier(.5,0,.5,1) infinite;
}
.scan-logo .scan-ring { position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.5); border-radius: 22px; mix-blend-mode: overlay; }
@keyframes scanmove { 0% { top: -36%; } 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .scan-logo .scan-line { animation: none; opacity: .4; top: 32%; } }

.scan-info { flex: 1; min-width: 0; }
.scan-info .si-file { display: flex; align-items: center; gap: 9px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--text-2); }
.scan-info .si-file .si-ok { width: 16px; height: 16px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.scan-info .si-file .si-ok svg { width: 10px; height: 10px; }
.scan-info .si-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13.5px; font-weight: 600; }
.scan-info .si-status .si-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-info .si-sub { font-size: 11.5px; color: var(--text-3); margin-top: 6px; font-family: "JetBrains Mono", monospace; }
.scan-prog { height: 5px; border-radius: 4px; background: var(--surface-3); margin-top: 16px; overflow: hidden; }
.scan-prog i { display: block; height: 100%; width: 62%; border-radius: 4px; background: linear-gradient(90deg, #F2A23C, #E2553C); }
.scan-chips { display: flex; gap: 6px; margin-top: 16px; }
.scan-chips i { width: 26px; height: 26px; border-radius: 7px; display: block; border: 1px solid rgba(255,255,255,.12); animation: pop .4s ease backwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* AI suggestion result card */
.ai-result { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.ai-result .air-head { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--border-soft); background: linear-gradient(100deg, var(--accent-soft), transparent); }
.ai-result .air-head .air-t { font-size: 13.5px; font-weight: 700; }
.ai-result .air-head .air-s { font-size: 11.5px; color: var(--text-2); margin-top: 1px; }
.aa-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 4px 9px; border-radius: 100px; }
.aa-badge svg { width: 12px; height: 12px; }
.ai-result .air-body { padding: 16px 17px; }
.ai-result .air-lab { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 10px; }

/* extracted raw colors strip */
.ex-strip { display: flex; gap: 8px; }
.ex-strip .ex { text-align: center; }
.ex-strip .ex i { width: 100%; height: 34px; border-radius: 8px; display: block; border: 1px solid rgba(255,255,255,.1); min-width: 44px; }
.ex-strip .ex span { font-size: 9.5px; color: var(--text-3); font-family: "JetBrains Mono", monospace; margin-top: 5px; display: block; }

/* alternative scheme cards */
.scheme-card { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 11px; cursor: pointer; background: var(--surface-2); }
.scheme-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.scheme-card .sc-pal { display: flex; height: 30px; border-radius: 7px; overflow: hidden; }
.scheme-card .sc-pal i { flex: 1; display: block; }
.scheme-card .sc-name { font-size: 12px; font-weight: 600; margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.scheme-card .sc-name .sc-check { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin-left: auto; }
.scheme-card .sc-name .sc-check svg { width: 9px; height: 9px; }
.scheme-card .sc-meta { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

/* custom palette generated from the logo */
.custom-scheme { display: block; cursor: pointer; }
.custom-scheme.hidden { display: none; }
.cs-card {
  display: flex; align-items: center; gap: 14px; padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: var(--r-sm); background: var(--surface-2);
  background-image: linear-gradient(100deg, var(--accent-soft), transparent);
}
.custom-scheme input:checked + .cs-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background-color: var(--surface); }
.cs-card .cs-pal { display: flex; width: 96px; height: 40px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.cs-card .cs-pal i { flex: 1; display: block; }
.cs-card .cs-info { min-width: 0; flex: 1; }
.cs-card .cs-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.cs-card .cs-spark { width: 18px; height: 18px; border-radius: 6px; flex: 0 0 auto; background: linear-gradient(140deg, #F2A23C, #E2553C); display: grid; place-items: center; }
.cs-card .cs-spark svg { width: 11px; height: 11px; color: #fff; }
.cs-card .cs-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.cs-card .sc-check { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; margin-left: auto; }
.cs-card .sc-check svg { width: 10px; height: 10px; }
.custom-scheme input:checked + .cs-card .sc-check { display: grid; }

/* "or choose a curated palette" divider */
.scheme-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--text-3); font-size: 11.5px; }
.scheme-or::before, .scheme-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }


/* curated schemes, grouped into hue-family columns (wraps for many families) */
.scheme-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 12px; align-items: start; }
.scheme-col { display: flex; flex-direction: column; gap: 8px; }
.scheme-col .scol-head { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 700; padding-left: 2px; }
.sc-suggest { display: none; margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 100px; }
.scheme-card.suggested { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.scheme-card.suggested .sc-suggest { display: inline-block; }
.scheme-card.suggested .sc-name .sc-check { display: none; }
/* an explicit pick always wins over the "suggested" hint */
.scheme-columns label input:checked + .scheme-card .sc-suggest { display: none; }

/* ============================================================
   App integration helpers (not in original handoff)
   ============================================================ */
.scr a { color: inherit; text-decoration: none; }
.scr button { font-family: inherit; }
.scr .link:hover { text-decoration: underline; }

/* full-height app body reset so the shell fills the viewport */
body.scr-body { margin: 0; background: var(--bg, #0E0F13); }

/* flash / notice toast */
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; margin: 0 0 18px; border: 1px solid transparent; }
.flash svg { width: 16px; height: 16px; flex: 0 0 auto; }
.flash { transition: opacity .35s ease, transform .35s ease; }
.flash.flash-out { opacity: 0; transform: translateY(-6px); }
.empty-state .es-ic svg { width: 22px; height: 22px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.flash.err { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* empty state */
.empty-state { text-align: center; padding: 64px 24px; border: 1.5px dashed var(--border); border-radius: var(--r); background: var(--surface-2); }
.empty-state .es-ic { width: 48px; height: 48px; border-radius: 13px; background: var(--surface-3); display: grid; place-items: center; margin: 0 auto 16px; color: var(--text-2); }
.empty-state .es-t { font-size: 16px; font-weight: 700; }
.empty-state .es-s { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* select styled like the design's inputs */
.scr select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236C7080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

/* dropzone active drag state (used by dropzone controller) */
.drop.dragover { border-color: var(--accent); background: var(--accent-soft); }

/* sampled-from-logo strip animates in */
.ex-strip .ex i.popped { animation: pop .4s ease backwards; }

/* scheme radio cards: drive .on state straight from the (sr-only) radio */
.scheme-columns label { display: block; cursor: pointer; }
.scheme-columns label input:checked + .scheme-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.scheme-card .sc-name .sc-check { display: none; margin-left: auto; }
.scheme-columns label input:checked + .scheme-card .sc-name .sc-check { display: grid; }

/* sample swatch role tag (dominant / accent) */
.ex-strip .ex .ex-role { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-top: 2px; }

/* compact color-role chip grid (keeps scheme-selector targets present) */
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.role-chip { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.role-chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.role-chip .rc-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.role-chip .rc-lab { font-size: 11px; color: var(--text-2); font-weight: 600; }
.role-chip .rc-hex { font-size: 9.5px; color: var(--text-3); }
/* native color input rendered as a swatch */
.role-chip input[type="color"].rc-sw { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(128,128,128,.28); border-radius: 7px; background: none; cursor: pointer; flex: 0 0 auto; }
.role-chip input[type="color"].rc-sw::-webkit-color-swatch-wrapper { padding: 0; }
.role-chip input[type="color"].rc-sw::-webkit-color-swatch { border: none; border-radius: 6px; }
.role-chip input[type="color"].rc-sw::-moz-color-swatch { border: none; border-radius: 6px; }

/* ============================================================
   Live preview — CommStadium "Calls" screen (faithful render)
   Themed from the profile's 19 token vars (set inline / by JS);
   mute + rule derive from --text-primary.
   ============================================================ */
.cs-phone {
  --mute: color-mix(in srgb, var(--text-primary) 55%, transparent);
  --rule: color-mix(in srgb, var(--text-primary) 9%, transparent);
  width:390px; height:818px; background:var(--page-bg); color:var(--text-primary);
  border-radius:48px; border:11px solid #0b0b0f;
  box-shadow:0 20px 60px -20px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
  overflow:hidden; position:relative; display:flex; flex-direction:column; max-width:100%;
  font-family:'Space Grotesk', system-ui, sans-serif; -webkit-font-smoothing:antialiased;
}
.cs-phone *, .cs-phone *::before, .cs-phone *::after { box-sizing:border-box; }
.cs-phone .material-symbols-outlined {
  font-family:'Material Symbols Outlined'; font-weight:normal; font-style:normal; line-height:1;
  letter-spacing:normal; text-transform:none; white-space:nowrap; direction:ltr;
  font-feature-settings:'liga'; -webkit-font-smoothing:antialiased; display:inline-block;
  font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
}
.cs-phone .ico-fill { font-variation-settings:'FILL' 1,'wght' 400,'GRAD' 0,'opsz' 24; }
.cs-phone .notch { position:absolute; top:0; left:50%; transform:translateX(-50%); width:128px; height:30px; background:#0b0b0f; border-radius:0 0 18px 18px; z-index:40; }
.cs-phone .statusbar { display:flex; justify-content:space-between; align-items:center; padding:14px 30px 0; font-size:14px; font-weight:600; flex-shrink:0; }
.cs-phone .statusbar .r { display:flex; gap:7px; align-items:center; }
.cs-phone .statusbar .material-symbols-outlined { font-size:17px; }
.cs-phone .cs-header { padding:24px 24px 18px; border-bottom:1px solid var(--rule); flex-shrink:0; }
.cs-phone .cs-header .top { display:flex; align-items:center; }
.cs-phone .cs-title { flex:1; font-size:38px; font-weight:500; letter-spacing:-1.14px; line-height:1.1; }
.cs-phone .hbtn { width:44px; height:44px; display:flex; align-items:center; justify-content:center; color:var(--mute); cursor:pointer; flex-shrink:0; }
.cs-phone .hbtn .material-symbols-outlined { font-size:22px; }
.cs-phone .hbtn.gap { margin-left:4px; }
.cs-phone .dialpad { width:22px; height:22px; display:grid; grid-template-columns:repeat(3,1fr); place-items:center; }
.cs-phone .dialpad i { width:3.1px; height:3.1px; border-radius:50%; background:currentColor; }
.cs-phone .filters { display:flex; gap:8px; margin-top:10px; overflow-x:auto; scrollbar-width:none; }
.cs-phone .filters::-webkit-scrollbar { display:none; }
.cs-phone .chip { padding:7px 14px; border-radius:999px; border:1px solid var(--rule); font-size:14px; font-weight:400; letter-spacing:-.14px; line-height:1; color:var(--text-primary); background:transparent; white-space:nowrap; cursor:pointer; }
.cs-phone .chip.on { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.cs-phone .list { flex:1; overflow-y:auto; }
.cs-phone .list::-webkit-scrollbar { width:0; }
.cs-phone .row { display:flex; align-items:center; padding:6px 20px; border-bottom:1px solid var(--rule); cursor:pointer; }
.cs-phone .row.last { border-bottom:none; }
.cs-phone .lead { margin-right:12px; flex-shrink:0; }
.cs-phone .avatar { width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:500; letter-spacing:-.16px; }
.cs-phone .conf { width:42px; height:42px; border-radius:50%; background:var(--accent); color:var(--ink); display:flex; align-items:center; justify-content:center; }
.cs-phone .conf .material-symbols-outlined { font-size:20px; }
.cs-phone .body { flex:1; min-width:0; }
.cs-phone .ttl { font-size:17px; font-weight:500; letter-spacing:-.17px; line-height:1.15; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-phone .ttl.missed { color:var(--danger); }
.cs-phone .sub { display:flex; align-items:center; margin-top:1px; color:var(--mute); font-size:14px; font-weight:400; letter-spacing:-.14px; line-height:1.15; }
.cs-phone .sub .material-symbols-outlined { font-size:11px; margin-right:6px; }
.cs-phone .sub.missed, .cs-phone .sub.missed .material-symbols-outlined { color:var(--danger); }
.cs-phone .hint { margin-left:8px; font-family:'IBM Plex Mono', monospace; font-size:11px; font-weight:500; letter-spacing:.6px; color:var(--mute); flex-shrink:0; }
.cs-phone .info { margin-left:8px; padding:6px 4px; color:var(--accent); flex-shrink:0; display:flex; cursor:pointer; }
.cs-phone .info .material-symbols-outlined { font-size:22px; }
.cs-phone .tabbar { display:flex; justify-content:space-around; border-top:1px solid var(--rule); padding:10px 4px 12px; background:var(--page-bg); flex-shrink:0; }
.cs-phone .tab { flex:1; display:flex; flex-direction:column; align-items:center; padding:4px 0; color:var(--mute); }
.cs-phone .tab .material-symbols-outlined { font-size:22px; }
.cs-phone .tab .lbl { margin-top:3px; font-size:10px; font-weight:400; letter-spacing:-.1px; }
.cs-phone .tab.on { color:var(--accent); }
.cs-phone .tab.on .lbl { font-weight:500; }

/* logo current tile shows uploaded image */
.logo-current #imgTag { width: 100%; max-width: 240px; max-height: 96px; object-fit: contain; }

/* ============================================================
   Live preview — CommStadium "Calls" (CallsHomeScreen)
   Faithful reproduction of the provided mockup, scoped under .cp.
   ONLY the palette differs: the semantic tokens are wired to the
   profile's selected scheme (light + dark) via inline --p-* vars.
   ============================================================ */
.cp[data-mode="light"] {
  --surface: var(--p-bg-l); --surface-alt: var(--p-alt-l); --surface-subdued: var(--p-subdued-l);
  --on-surface: var(--p-on-l); --mute: var(--p-mute-l); --rule: var(--p-rule-l);
  --gold: var(--p-accent-l); --ivory: var(--p-ivory-l); --navy: var(--p-navy-l);
  --red: var(--p-red); --green: var(--p-green); --frame-shadow: rgba(0,0,0,.18);
}
.cp[data-mode="dark"] {
  --surface: var(--p-bg-d); --surface-alt: var(--p-alt-d); --surface-subdued: var(--p-subdued-d);
  --on-surface: var(--p-on-d); --mute: var(--p-mute-d); --rule: var(--p-rule-d);
  --gold: var(--p-accent-d); --ivory: var(--p-ivory-d); --navy: var(--p-navy-d);
  --red: var(--p-red); --green: var(--p-green); --frame-shadow: rgba(0,0,0,.5);
}

.cp { display: flex; justify-content: center; }
.cp * { box-sizing: border-box; }
.cp .material-symbols-outlined {
  font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap;
  direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased; display: inline-block;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.cp .ico-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ── Phone frame ──────────────────────────────────────────── */
.cp .phone {
  width: 390px; height: 818px; background: var(--surface); color: var(--on-surface);
  border-radius: 48px; border: 11px solid #0b0b0f;
  box-shadow: 0 30px 80px var(--frame-shadow), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
.cp .notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 128px; height: 30px; background: #0b0b0f; border-radius: 0 0 18px 18px; z-index: 40; }
.cp .statusbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 30px 0; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.cp .statusbar .r { display: flex; gap: 7px; align-items: center; }
.cp .statusbar .material-symbols-outlined { font-size: 17px; }

/* ── Header: title + filters (_TitleAndFilters) ───────────── */
.cp .cs-header { padding: 24px 24px 18px; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.cp .cs-header .top { display: flex; align-items: center; }
.cp .cs-title { flex: 1; font-size: 38px; font-weight: 500; letter-spacing: -1.14px; line-height: 1.1; }
.cp .hbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--mute); cursor: pointer; flex-shrink: 0; }
.cp .hbtn .material-symbols-outlined { font-size: 22px; }
.cp .hbtn.gap { margin-left: 4px; }
.cp .dialpad { width: 22px; height: 22px; display: grid; grid-template-columns: repeat(3,1fr); place-items: center; }
.cp .dialpad i { width: 3.1px; height: 3.1px; border-radius: 50%; background: currentColor; }
.cp .filters { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.cp .filters::-webkit-scrollbar { display: none; }
.cp .chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); font-size: 14px; font-weight: 400; letter-spacing: -.14px; line-height: 1; color: var(--on-surface); background: transparent; white-space: nowrap; cursor: pointer; }
.cp .chip.on { background: var(--gold); border-color: var(--gold); color: var(--ivory); }

/* ── Call list ────────────────────────────────────────────── */
.cp .list { flex: 1; overflow-y: auto; }
.cp .list::-webkit-scrollbar { width: 0; }
.cp .row { display: flex; align-items: center; padding: 6px 20px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.cp .row.last { border-bottom: none; }
.cp .row .lead { margin-right: 12px; flex-shrink: 0; }
.cp .avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 500; letter-spacing: -.16px; }
/* avatar tones driven by live theme vars (flip with scheme + light/dark) */
.cp .avatar.tone-0 { background: var(--gold); color: var(--ivory); }
.cp .avatar.tone-1 { background: var(--on-surface); color: var(--surface); }
.cp .avatar.tone-2 { background: var(--surface-subdued); color: var(--on-surface); }
.cp .avatar.tone-3 { background: color-mix(in srgb, var(--gold) 62%, var(--on-surface)); color: var(--ivory); }
.cp .avatar.tone-4 { background: var(--mute); color: var(--surface); }
.cp .avatar.tone-5 { background: color-mix(in srgb, var(--on-surface) 24%, var(--surface)); color: var(--on-surface); }
.cp .conf { width: 42px; height: 42px; border-radius: 50%; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.cp .conf .material-symbols-outlined { font-size: 20px; }
.cp .body { flex: 1; min-width: 0; }
.cp .ttl { font-size: 17px; font-weight: 500; letter-spacing: -.17px; line-height: 1.15; color: var(--on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp .ttl.missed { color: var(--red); }
.cp .sub { display: flex; align-items: center; margin-top: 1px; color: var(--mute); font-size: 14px; font-weight: 400; letter-spacing: -.14px; line-height: 1.15; }
.cp .sub .material-symbols-outlined { font-size: 11px; margin-right: 6px; }
.cp .sub.missed, .cp .sub.missed .material-symbols-outlined { color: var(--red); }
.cp .hint { margin-left: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .6px; color: var(--mute); flex-shrink: 0; }
.cp .info { margin-left: 8px; padding: 6px 4px; color: var(--gold); flex-shrink: 0; display: flex; cursor: pointer; }
.cp .info .material-symbols-outlined { font-size: 22px; }

/* ── Tab bar (CSTabBar) ───────────────────────────────────── */
.cp .tabbar { display: flex; justify-content: space-around; border-top: 1px solid var(--rule); padding: 10px 4px 12px; background: var(--surface); flex-shrink: 0; }
.cp .tab { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 4px 0; color: var(--mute); }
.cp .tab .material-symbols-outlined { font-size: 22px; }
.cp .tab span.lbl { margin-top: 3px; font-size: 10px; font-weight: 400; letter-spacing: -.1px; }
.cp .tab.on { color: var(--gold); }
.cp .tab.on span.lbl { font-weight: 500; }

/* preview sidebar real nav icons */
.appframe .af-side .af-nav i svg { width: 13px; height: 13px; color: var(--pv-accent); }

/* kebab menu within cards, restyled to tokens */
.pcard .kebab { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(0,0,0,.28); color: #fff; border: none; cursor: pointer; z-index: 2; }
.pcard .kebab:hover { background: rgba(0,0,0,.45); }
.menu { position: absolute; top: 42px; right: 10px; z-index: 10; min-width: 150px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 5px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 11px; font-size: 12.5px; border-radius: 6px; color: var(--text); background: transparent; border: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-3); }
.menu a.danger, .menu button.danger { color: #F87171; }
.menu.hidden { display: none; }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
