/* Barça Yönetim Merkezi — shared design layer.
   Loaded after every module stylesheet. Tokens first, then shell, shared
   components and module refinements. Module markup and IDs are unchanged. */

@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/admin/assets/fonts/inter-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/admin/assets/fonts/inter-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root,[data-theme="dark"]{
  color-scheme:dark;
  --bg:#08090c;--glow-1:rgba(165,0,68,.16);--glow-2:rgba(0,77,152,.18);
  --sidebar:rgba(11,12,16,.72);--surface:#0f1115;--surface-2:#15171c;--surface-3:#1b1e24;--field:#0b0c10;
  --card-sheen:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.01));
  --line:rgba(255,255,255,.07);--line-2:rgba(255,255,255,.11);--line-3:rgba(255,255,255,.17);
  --text:#ecedf1;--text-2:#a3a9b6;--text-3:#6b7180;
  --accent:#a50044;--accent-hover:#bd1458;--accent-ink:#ffffff;--accent-fg:#f0558f;--accent-soft:rgba(165,0,68,.16);--accent-line:rgba(240,85,143,.38);--accent-ring:rgba(240,85,143,.2);--focus:#f0558f;--brand-blue:#004d98;--brand-gold:#edbb00;--brand-gradient:linear-gradient(135deg,#a50044 0%,#5c1f73 52%,#004d98 100%);
  --danger:#f47c7c;--danger-fg:#ffc4c4;--danger-soft:rgba(244,124,124,.08);--danger-line:rgba(244,124,124,.35);
  --warning:#f2b84b;--warning-fg:#f7d79b;--warning-soft:rgba(242,184,75,.08);--warning-line:rgba(242,184,75,.35);
  --success:#5fd38d;--success-fg:#bfe8cf;--success-soft:rgba(95,211,141,.08);--success-line:rgba(95,211,141,.3);
  --info:#5aa2ff;--teal:#4fd1c5;--blue:#5aa2ff;--amber:#edbb00;--violet:#b49cff;
  --glass:rgba(8,9,12,.72);--glass-strong:rgba(15,17,21,.92);--scrim:rgba(3,4,6,.66);
  --code-text:#d7dcc4;--line-num:#4b5262;--toggle-off:#2a303a;--toggle-off-line:#363d49;--scroll:#2a2f39;--avatar:linear-gradient(135deg,#2a3140,#1d222b);
  --shadow-sm:inset 0 1px 0 rgba(255,255,255,.04),0 1px 2px rgba(0,0,0,.35);
  --shadow-md:inset 0 1px 0 rgba(255,255,255,.04),0 8px 24px rgba(0,0,0,.35);
  --shadow-lg:0 24px 64px rgba(0,0,0,.55),0 2px 8px rgba(0,0,0,.3);
  --radius-sm:7px;--radius:10px;--radius-lg:14px;--radius-xl:18px;
  --mono:"JetBrains Mono","SFMono-Regular",Consolas,"Liberation Mono",monospace;
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  /* Legacy names used by module stylesheets. */
  --panel:var(--surface);--muted:var(--text-2);--lime:var(--accent);--red:var(--danger);--gold:var(--warning);
}
[data-theme="light"]{
  color-scheme:light;
  --bg:#f4f5f7;--glow-1:rgba(165,0,68,.07);--glow-2:rgba(0,77,152,.08);
  --sidebar:rgba(255,255,255,.72);--surface:#ffffff;--surface-2:#f4f5f7;--surface-3:#eceef2;--field:#ffffff;
  --card-sheen:linear-gradient(180deg,rgba(255,255,255,1),rgba(255,255,255,1));
  --line:rgba(15,23,42,.08);--line-2:rgba(15,23,42,.13);--line-3:rgba(15,23,42,.22);
  --text:#0e1116;--text-2:#545d6b;--text-3:#8a93a0;
  --accent:#a50044;--accent-hover:#8c003a;--accent-ink:#ffffff;--accent-fg:#a50044;--accent-soft:rgba(165,0,68,.08);--accent-line:rgba(165,0,68,.3);--accent-ring:rgba(165,0,68,.16);--focus:#a50044;--brand-blue:#004d98;--brand-gold:#c79a00;--brand-gradient:linear-gradient(135deg,#a50044 0%,#5c1f73 52%,#004d98 100%);
  --danger:#d64545;--danger-fg:#a62b2b;--danger-soft:rgba(214,69,69,.07);--danger-line:rgba(214,69,69,.3);
  --warning:#c58a12;--warning-fg:#86600a;--warning-soft:rgba(197,138,18,.08);--warning-line:rgba(197,138,18,.32);
  --success:#1f9d5c;--success-fg:#17774a;--success-soft:rgba(31,157,92,.08);--success-line:rgba(31,157,92,.3);
  --info:#004d98;--teal:#0f8f80;--blue:#004d98;--amber:#b08600;--violet:#6a4bd6;
  --glass:rgba(255,255,255,.75);--glass-strong:rgba(255,255,255,.94);--scrim:rgba(15,23,42,.35);
  --code-text:#24292f;--line-num:#a0a8b3;--toggle-off:#d5d9e0;--toggle-off-line:#c4c9d2;--scroll:#c9ced6;--avatar:linear-gradient(135deg,#e7eaef,#d9dde4);
  --shadow-sm:0 1px 2px rgba(15,23,42,.06);
  --shadow-md:0 1px 2px rgba(15,23,42,.05),0 8px 24px rgba(15,23,42,.07);
  --shadow-lg:0 24px 60px rgba(15,23,42,.16),0 2px 8px rgba(15,23,42,.06);
}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
body{background:radial-gradient(1100px 560px at 0% -12%,var(--glow-1),transparent 60%),radial-gradient(900px 520px at 100% -12%,var(--glow-2),transparent 60%),var(--bg);background-attachment:fixed;color:var(--text);font-family:var(--font);font-size:14px;line-height:1.5;font-feature-settings:"cv11","ss01"}
::selection{background:var(--accent-ring)}
*{scrollbar-width:thin;scrollbar-color:var(--scroll) transparent}
::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--scroll);border-radius:10px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-track{background:transparent}
:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden}
.icon{width:16px;height:16px;flex:none;stroke-width:1.9}
code,kbd{font-family:var(--mono)}

/* ---------- Typography & headings ---------- */
h1{font-size:22px;line-height:1.3;letter-spacing:-.02em;font-weight:620;margin:0 0 4px}
.page-heading,.hub-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 24px}
.page-heading .eyebrow,.hub-heading .eyebrow,.page-heading h1 .accent,.hub-heading h1 .accent{display:none}
.page-heading h1,.hub-heading h1{font-size:22px;margin:0 0 4px}
.page-heading p,.hub-heading p{margin:0;color:var(--text-2);font-size:13.5px}
.page-heading>.button{margin:0}
.eyebrow{font-size:11px;letter-spacing:.06em;font-weight:600;color:var(--text-3);text-transform:uppercase}
.accent{color:var(--accent-fg)}

/* ---------- Buttons ---------- */
.button{height:36px;padding:0 14px;gap:8px;border-radius:var(--radius);font-size:13px;font-weight:560;letter-spacing:0;transition:background .15s,border-color .15s,color .15s;line-height:1}
.button:hover:not(:disabled){transform:none}
.button .icon{width:15px;height:15px}
.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}
.secondary{background:var(--surface-2);color:var(--text);border-color:var(--line-2)}
.secondary:hover:not(:disabled){background:var(--surface-3);border-color:var(--line-3)}
button:disabled,.button:disabled{opacity:.5;cursor:not-allowed}
.text-button{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--text-2);padding:4px 2px;border-radius:var(--radius-sm)}
.text-button:hover{color:var(--text)}
.text-button .icon{width:14px;height:14px}

/* ---------- Forms ---------- */
label{font-size:13px;font-weight:520;color:var(--text);margin-bottom:6px}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select{min-height:38px;background:var(--field);border:1px solid var(--line-2);border-radius:var(--radius);color:var(--text);padding:8px 12px;font-size:13.5px;transition:border-color .15s,box-shadow .15s}
input:not([type=checkbox]):not([type=radio]):hover,select:hover{border-color:var(--line-3)}
input:focus,select:focus,textarea:focus{border-color:var(--accent-line);box-shadow:0 0 0 3px var(--accent-ring);outline:none}
input::placeholder,textarea::placeholder{color:var(--text-3)}
select{appearance:none;-webkit-appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a91a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px}
input[type=checkbox],input[type=radio]{accent-color:var(--accent-fg)}
small{font-size:12px}

/* ---------- Shell: sidebar ---------- */
.sidebar{width:248px;background:var(--sidebar);border-right:1px solid var(--line);padding:14px 12px 12px;z-index:40}
.brand,.login-brand{display:flex;align-items:center;gap:10px;font-size:15px;letter-spacing:-.01em;font-weight:650;line-height:1.2}
.sidebar .brand{margin:2px 8px 18px;padding:4px 0}
.brand-mark{width:30px;height:30px;border-radius:8px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-size:17px;font-weight:800;letter-spacing:-.04em;flex:none;box-shadow:inset 0 -2px 0 rgba(0,0,0,.12)}
.brand-name{display:flex;flex-direction:column;color:var(--text)}
.brand-name small{font-size:11.5px;font-weight:500;color:var(--text-3);letter-spacing:0;margin-top:1px}
.panel-nav{padding:0 0 12px;margin:0 -4px;padding-inline:4px}
.panel-nav .nav-label,.nav-label{font-size:11px;font-weight:600;letter-spacing:.06em;color:var(--text-3);margin:18px 10px 6px;text-transform:uppercase}
.panel-nav .nav-label:first-child{margin-top:4px}
.sidebar nav{gap:1px}
.nav-button{height:34px;padding:0 10px;gap:10px;border:0;border-radius:7px;color:var(--text-2);font-size:13.5px;font-weight:500;width:100%;transition:background .12s,color .12s}
.nav-button .icon{width:17px;height:17px;color:var(--text-3);transition:color .12s}
.nav-button .nav-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-button:hover{background:var(--surface-2);color:var(--text)}
.nav-button:hover .icon{color:var(--text-2)}
.nav-button.active{background:var(--surface-3);border:0;color:var(--text)}
.nav-button.active .icon{color:var(--accent-fg)}
.nav-button .count{margin-left:auto}
.count{font-size:11px;font-weight:600;line-height:18px;background:var(--line);color:var(--text-2);padding:0 6px;border-radius:5px}
.module-subnav{margin:2px 0 6px 18px;padding:2px 0 2px 10px;border-left:1px solid var(--line-2);gap:1px}
.module-subnav button{font-size:13px;color:var(--text-2);padding:0 10px;height:30px;border-radius:6px}
.module-subnav button:hover{background:var(--surface-2);color:var(--text)}
.module-subnav button.active{background:var(--accent-soft);color:var(--accent-fg)}
.sidebar-bottom{border-top:1px solid var(--line);padding-top:10px;margin-top:auto}
.user-card{display:flex;align-items:center;gap:10px;padding:6px 6px 2px}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--avatar);border:1px solid var(--line-2);display:grid;place-items:center;font-size:12.5px;font-weight:650;color:var(--text);flex:none}
.user-meta{display:flex;flex-direction:column;font-size:13px;font-weight:550;min-width:0}
.user-meta small{font-size:12px;font-weight:450;color:var(--text-3)}
.logout{margin-left:auto;width:32px;height:32px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--text-3);display:grid;place-items:center}
.logout:hover{background:var(--surface-2);color:var(--danger)}
.logout .icon{width:17px;height:17px}

/* ---------- Shell: workspace & topbar ---------- */
.workspace{margin-left:248px;width:calc(100% - 248px);min-width:0}
.topbar{justify-content:flex-start;position:sticky;top:0;z-index:30;height:56px;padding:0 28px;gap:16px;background:var(--glass);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid var(--line);font-size:13px;color:var(--text-2)}
.crumbs{display:flex;align-items:center;gap:6px;min-width:0}
.crumb-sep{width:14px;height:14px;color:var(--text-3)}
.topbar strong{color:var(--text);font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-tag{margin-left:auto;font-size:12px;color:var(--text-2);border:1px solid var(--line);border-radius:999px;padding:4px 10px 4px 9px;gap:7px}
.dot{width:7px;height:7px;background:var(--success);box-shadow:0 0 0 3px rgba(95,211,141,.12)}
.dot.small{width:6px;height:6px;box-shadow:none}
.nav-toggle{display:none;width:36px;height:36px;margin-left:-8px;border:0;border-radius:8px;background:transparent;color:var(--text);place-items:center;padding:0}
.nav-toggle:hover{background:var(--surface-2)}
.nav-toggle .icon{width:20px;height:20px}
.sidebar-scrim{position:fixed;inset:0;background:var(--scrim);backdrop-filter:blur(2px);z-index:35}
.page-content{padding:28px 32px 24px;max-width:1480px}
.page-footer{margin-top:40px;padding-top:16px;border-top:1px solid var(--line);color:var(--text-3);font-size:12px;letter-spacing:0}
#notice{border-radius:var(--radius);font-size:13px;padding:12px 14px;margin-bottom:20px;border-color:var(--success-line);background:var(--success-soft);color:var(--success-fg)}
#notice.error{color:var(--danger-fg);border-color:var(--danger-line);background:var(--danger-soft)}
#notice.warning{color:var(--warning-fg);border-color:var(--warning-line);background:var(--warning-soft)}

/* ---------- Overview ---------- */
.hub-heading{margin:0 0 24px}
.module-grid{grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}
.module-card>*{align-self:stretch}
.module-card{--module-accent:var(--accent);--module-soft:var(--accent-soft);min-height:0;padding:20px;border-radius:var(--radius-lg);background:var(--surface);border:1px solid var(--line);gap:0;transition:border-color .15s,background .15s}
.module-card:hover{transform:none;border-color:var(--line-2);background:var(--surface-2)}
.module-seo{--module-accent:var(--teal);--module-soft:color-mix(in srgb,var(--teal) 10%,transparent)}
.module-telegram{--module-accent:var(--blue);--module-soft:color-mix(in srgb,var(--blue) 10%,transparent)}
.module-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.module-icon{width:38px;height:38px;border-radius:10px;margin:0;border:1px solid color-mix(in srgb,var(--module-accent) 28%,transparent);background:var(--module-soft);color:var(--module-accent);font-size:0}
.module-icon .icon{width:19px;height:19px}
.module-arrow{width:18px;height:18px;color:var(--text-3);transition:transform .15s,color .15s}
.module-card:hover .module-arrow{color:var(--text);transform:translateX(2px)}
.module-title{font-size:15.5px;font-weight:620;letter-spacing:-.01em}
.module-description{color:var(--text-2);font-size:13px;line-height:1.55;margin:6px 0 18px;max-width:none}
.module-meta{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-2);margin-top:auto;padding:14px 0 0;border-top:1px solid var(--line)}
.module-meta .dot{background:var(--module-accent);box-shadow:none;width:6px;height:6px}
.hub-bottom{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:16px;margin-top:16px;padding-top:0;border-top:0}
.hub-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:18px 20px}
.hub-panel h2{font-size:14px;font-weight:620;margin:0 0 10px}
.hub-shortcuts{display:flex;flex-direction:column;gap:2px}
.hub-shortcuts button,.hub-shortcuts a{display:flex;align-items:center;gap:12px;padding:9px 10px;margin:0 -10px;border:0;border-radius:7px;background:none;color:var(--text);font-size:13.5px;text-align:left}
.hub-shortcuts button:hover,.hub-shortcuts a:hover{background:var(--surface-2);color:var(--text)}
.hub-shortcuts .icon{color:var(--text-3)}
.hub-shortcuts .row-arrow{margin-left:auto;width:15px;height:15px}
.hub-domains dl{margin:0}
.hub-domains dl>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.hub-domains dl>div:last-child{border-bottom:0}
.hub-domains dt{font-size:13px;font-weight:550;color:var(--text)}
.hub-domains dd{margin:0;font-size:12.5px;color:var(--text-2);text-align:right}

/* ---------- Login ---------- */
.login-page{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;min-height:100dvh;padding:32px 16px;background:radial-gradient(900px 500px at 50% -10%,rgba(205,238,106,.07),transparent 60%),var(--bg)}
.login-card{width:100%;max-width:380px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:32px;box-shadow:var(--shadow-lg)}
.login-brand{margin-bottom:28px}
.login-card h1{font-size:20px;margin:0 0 6px}
.login-card>p{font-size:13.5px;color:var(--text-2);margin:0 0 24px}
.login-card label{margin-top:14px}
.login-card input{width:100%}
.login-card .button{width:100%;height:40px;justify-content:center;margin-top:6px;font-size:13.5px}
.login-card .error-text{color:var(--danger);margin:10px 0 6px;font-size:12.5px;min-height:18px}
.secure-note{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--text-3);font-size:12px;margin-top:18px}
.secure-note .icon{width:14px;height:14px}
.login-footer{display:block;margin-top:24px;color:var(--text-3);font-size:12px;letter-spacing:0}

/* ---------- Widget editor, history, settings ---------- */
.stats{background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg);margin-bottom:20px}
.stat{padding:16px 20px}
.stat+.stat{border-left-color:var(--line)}
.stat-label{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--text-3);margin-bottom:8px}
.stat strong{font-size:16px;font-weight:600;letter-spacing:-.01em}
.stat small{font-size:12px;color:var(--text-2);margin-top:4px}
.editor-card{border-color:var(--line);border-radius:var(--radius-lg);box-shadow:none}
.editor-toolbar{background:var(--surface);border-bottom-color:var(--line);min-height:44px}
.file-tab{height:44px;background:var(--field);border-right-color:var(--line);border-top:0;box-shadow:inset 0 -2px 0 var(--accent);font-size:13px;padding:0 18px}
.js-icon{background:#e6cf5c;border-radius:3px;font-size:8.5px}
.editor-tools{gap:14px;padding:0 14px}
.editor-area{background:var(--field)}
.editor-area textarea{font:12.5px/22px var(--mono);color:var(--code-text)}
#line-numbers{font:11.5px/22px var(--mono);color:var(--line-num)}
.editor-status{background:var(--surface);border-top-color:var(--line);font-size:11.5px;color:var(--text-3);padding:7px 16px}
.publish-bar{padding:18px 0 16px}
.publish-bar strong{font-size:13.5px;font-weight:600;color:var(--text)}
.publish-bar p{font-size:12.5px;color:var(--text-2)}
.footnote{border-top-color:var(--line);font-size:12px;color:var(--text-3);padding-top:14px}
.footnote code{font-size:12px;color:var(--text-2)}
kbd{border-color:var(--line-2);background:var(--surface-2);font-size:11px;color:var(--text-2);padding:1px 6px;border-radius:4px}
.history-list{background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg)}
.history-item{padding:14px 20px}
.history-item+.history-item{border-top-color:var(--line)}
.history-item strong{font-size:13.5px;font-weight:580}
.history-item small{font-size:12px;color:var(--text-2);margin-top:3px}
.empty-state{font-size:13.5px;color:var(--text-2);padding:56px 24px}
.empty-state strong{font-size:16px;font-weight:620;color:var(--text);margin-bottom:6px}
.empty-state .empty-icon{font-size:28px;color:var(--text-3)}
.settings-layout{gap:16px}
.settings-card,.help-card{background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg);padding:24px}
.card-heading{padding-bottom:18px;margin-bottom:20px;border-bottom-color:var(--line);gap:12px}
.card-heading h2{font-size:15px;font-weight:620}
.card-heading p{font-size:12.5px;color:var(--text-2);margin-top:2px}
.cloud-icon{width:38px;height:38px;border-radius:10px;background:rgba(242,184,75,.1);border-color:rgba(242,184,75,.28);color:var(--warning);font-size:0}
.cloud-icon .icon{width:19px;height:19px}
.settings-card label:not(:first-child){margin-top:18px}
.settings-card small{font-size:12px;color:var(--text-2);margin-top:6px;line-height:1.55}
.settings-actions{margin-top:24px}
.help-card h3{font-size:16px;font-weight:620;letter-spacing:-.01em;margin:10px 0 14px}
.help-card ol{font-size:13px;color:var(--text-2)}
.help-card li{margin:8px 0}
.help-card p,.help-card a{font-size:12.5px;line-height:1.6}
#token-status{font-size:12px}

/* ---------- Shared module pieces (tabs, cards, bars) ---------- */
.content-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:22px;border-bottom:1px solid var(--line);margin-bottom:22px;scrollbar-width:none}
.content-tabs::-webkit-scrollbar{display:none}
.content-tab{flex:none;background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:10px 1px 11px;margin-bottom:-1px;font-size:13.5px;font-weight:520;color:var(--text-2)}
.content-tab:hover{color:var(--text)}
.content-tab.active{background:none;color:var(--text);border-color:var(--accent-fg)}
.content-overview,.tg-connection-bar{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:12px 16px;margin-bottom:20px}
.content-overview strong{font-size:13.5px;font-weight:600}
.content-overview small{font-size:12px;color:var(--text-2)}
.content-overview-actions{gap:12px}
.content-publish,.tg-publish{background:var(--glass-strong);border:1px solid var(--line-2);border-radius:var(--radius-lg);padding:14px 16px;box-shadow:0 -10px 40px rgba(0,0,0,.35);backdrop-filter:blur(14px)}
.content-publish strong,.tg-publish strong{font-size:13.5px;font-weight:600}
.content-publish small,.tg-publish small{font-size:12px;color:var(--text-2);margin-top:3px}

/* Widget Studio */
.customize-layout{gap:20px}
#content-editor>h2{font-size:17px;font-weight:620;letter-spacing:-.01em;margin-bottom:4px}
.section-help{font-size:13px;color:var(--text-2);line-height:1.6;margin-bottom:18px}
.section-options,.content-history{background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg);padding:13px 16px}
.section-options>summary,.content-history>summary{font-size:13.5px;font-weight:580}
.content-history p{font-size:12.5px;color:var(--text-2)}
.content-fields{gap:16px}
.content-field label,.content-field-title{font-size:12.5px;font-weight:520;color:var(--text-2);margin-bottom:6px}
.content-field input,.content-field select{font-size:13px;padding:7px 11px;background:var(--field)}
.content-field small{font-size:12px;line-height:1.55}
.toggle-field label{font-size:13px;color:var(--text)}
.toggle-field input{background:var(--toggle-off);border-color:var(--toggle-off-line)}
.toggle-field input:checked{background:var(--accent);border-color:var(--accent-fg)}
.toggle-field input:checked:before{background:var(--accent-ink)}
.content-media-input .text-button{font-size:12.5px;color:var(--accent-fg)}
.content-group{background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg)}
.content-group h3{font-size:14px;font-weight:620;margin-bottom:16px}
.array-heading h3{font-size:14px;font-weight:620}
.array-heading .count{font-size:11px;padding:0 6px}
.array-heading .button{height:32px;padding:0 12px;font-size:12.5px}
.content-item{background:var(--surface);border-color:var(--line);border-radius:10px;margin-bottom:8px;transition:border-color .15s}
.content-item:hover{border-color:var(--line-2)}
.content-item[open]{border-color:var(--accent-line)}
.content-item[open]>summary{background:var(--accent-soft);border-bottom-color:var(--line)}
.content-item>summary{padding:10px 12px}
.item-thumb{width:40px;height:40px;flex-basis:40px;border-radius:8px;background:var(--surface-3)}
.item-info strong{font-size:13.5px;font-weight:580}
.item-info small{font-size:12px;color:var(--text-2);margin-top:2px}
.item-action{min-width:30px;height:30px;padding:0 8px;background:var(--surface-2);border-color:var(--line-2);border-radius:7px;color:var(--text-2);font-size:13px}
.item-action:hover{border-color:var(--line-3);color:var(--text)}
.item-action.remove{font-size:12.5px;color:var(--text-3);background:transparent;border-color:transparent}
.item-action.remove:hover{color:var(--danger);border-color:transparent}
.content-empty{background:var(--surface);border-color:var(--line-2);font-size:13px}
.content-warning{font-size:13px;border-radius:var(--radius)}
.preview-panel{top:76px;background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg);padding:16px}
.preview-panel>p{font-size:12.5px;color:var(--text-2);line-height:1.55}
.preview-panel>label{font-size:12.5px;color:var(--text-2)}
.preview-panel>input{font-size:13px}
.preview-panel>small,.preview-tip{font-size:12px;color:var(--text-3);line-height:1.55}
.preview-device{border-color:var(--line-2);border-radius:12px;background:#090b0e}
#media-dialog{background:var(--surface);border-color:var(--line-2);border-radius:14px;padding:24px;box-shadow:var(--shadow-lg)}
#media-dialog::backdrop{background:var(--scrim);backdrop-filter:blur(4px)}
.media-dialog-head h2{font-size:18px;font-weight:620;letter-spacing:-.01em;margin-top:4px}
.media-dialog-head .button{width:36px;padding:0}
#media-dialog>p{font-size:12.5px;color:var(--text-2)}
.media-upload-area{border-color:var(--line-2);background:var(--field);border-radius:10px}
.media-upload-area span{font-size:12.5px;color:var(--text-2)}
.media-card{background:var(--surface-2);border-color:var(--line);border-radius:10px}
.media-card>strong{font-size:12.5px;font-weight:560}
.media-card>small{font-size:11.5px}
.media-card>.button,.media-card>.text-button{font-size:12px;height:30px;padding:0 10px}

/* Telegram */
.tg-logo{width:36px;height:36px;background:#2aa3e6;font-size:0}
.tg-logo .icon{width:17px;height:17px;margin:1px 1px 0 -1px}
.tg-phone-header .tg-logo .icon{width:14px;height:14px}
.tg-connection-bar strong{font-size:13.5px}
.tg-connection-bar small{font-size:12px;color:var(--text-2);margin-top:2px}
.tg-compose-layout{gap:20px}
.tg-editor-card,.tg-template-card,.tg-history-item{background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg)}
.tg-editor-card{padding:20px;margin-bottom:16px}
.tg-card-head h2{font-size:15px;font-weight:620}
.tg-card-head p,.tg-editor-card small{font-size:12px;color:var(--text-2);line-height:1.55}
.tg-card-head .button{height:32px;font-size:12.5px;padding:0 12px}
.tg-editor-card label{font-size:13px}
.tg-format-toolbar{background:var(--surface-2);border-color:var(--line-2);border-radius:var(--radius) var(--radius) 0 0}
.tg-format-toolbar button{background:var(--field);border-color:var(--line-2);color:var(--text);border-radius:6px;height:28px}
.tg-format-toolbar button:hover{border-color:var(--line-3)}
.tg-format-toolbar span{font-size:11.5px;color:var(--text-3)}
.tg-rich-editor{background:var(--field);border-color:var(--line-2);border-radius:0 0 var(--radius) var(--radius)}
.tg-rich-editor:focus{border-color:var(--accent-line);box-shadow:0 0 0 3px var(--accent-ring)}
.tg-character-bar{font-size:11.5px;color:var(--text-3)}
.tg-options label{font-size:13px;color:var(--text)}
.tg-button-row{background:var(--field);border-color:var(--line-2);border-radius:10px}
.tg-button-row-head strong{font-size:12.5px}
.tg-empty-inline{font-size:12.5px;color:var(--text-3)}
.tg-preview-panel{top:76px;background:var(--surface);border-color:var(--line);border-radius:var(--radius-lg)}
.tg-preview-panel>p{font-size:12px;color:var(--text-3)}
.tg-destination span{font-size:11px;letter-spacing:.05em;color:var(--text-3)}
.tg-destination strong{font-size:12.5px}
.tg-list-toolbar p{font-size:13px;color:var(--text-2)}
.tg-list-toolbar label{font-size:12.5px}
.tg-template-card{padding:18px}
.tg-template-card h3{font-size:15px;font-weight:620}
.tg-template-summary{font-size:12.5px;color:var(--text-2)}
.tg-template-card>small,.tg-history-item small{font-size:12px;color:var(--text-3)}
.tg-history-item{padding:16px 18px}
.tg-history-item p{font-size:12.5px;color:var(--text-2)}
.tg-pending p{font-size:12.5px}
.tg-pending .button{font-size:12.5px}
.tg-pending .text-button{font-size:12px}
#tg-token-status{font-size:12px}

/* SEO workspace: the embedded page brings its own header. */
body[data-view="seo"] .page-content{height:calc(100dvh - 56px)}

/* ---------- Responsive ---------- */
@media(max-width:1200px){
  .sidebar{width:232px;padding:14px 10px 12px}
  .workspace{margin-left:232px;width:calc(100% - 232px)}
  .topbar{padding:0 20px}
  .page-content{padding:24px 22px 20px}
  .page-heading h1{font-size:21px}
}
@media(max-width:900px){
  .sidebar{position:fixed;inset:0 auto 0 0;width:272px;transform:translateX(-100%);transition:transform .2s ease;display:flex;flex-direction:column;box-shadow:var(--shadow-lg);border-right:1px solid var(--line);padding:14px 12px 12px}
  body.nav-open .sidebar{transform:none}
  .sidebar .brand{margin:2px 8px 18px;font-size:15px}
  .panel-nav{display:block;overflow:auto;padding:0 4px 12px}
  .panel-nav>nav{display:flex;flex-direction:column}
  .panel-nav .nav-label{display:block}
  .panel-nav .nav-button{flex:none;padding:0 10px;font-size:13.5px;justify-content:flex-start;gap:10px}
  .nav-button>.icon{display:block}
  .module-subnav{order:0;width:auto;display:grid;overflow:visible;border:0;border-left:1px solid var(--line-2);margin:2px 0 6px 18px;padding:2px 0 2px 10px}
  .sidebar-bottom{display:block;position:static;padding-top:10px}
  .logout{width:32px;padding:0}
  .logout .avatar{display:grid}
  .app-shell{display:block}
  .workspace{margin:0;width:100%}
  .nav-toggle{display:grid}
  .topbar{height:56px;padding:0 16px}
  .topbar-tag{display:none}
  .crumb-root,.crumb-sep{display:none}
  .page-content{padding:20px 16px 16px}
  body[data-view="seo"] .page-content{height:calc(100dvh - 56px);min-height:0}
}
@media(max-width:760px){
  .page-heading,.hub-heading{flex-direction:column;align-items:stretch;gap:12px}
  .page-heading>.button{align-self:flex-start;margin:0}
  .page-heading h1,h1{font-size:20px}
  .page-heading p{font-size:13px}
  .eyebrow{font-size:11px}
  .stat{padding:12px 12px}
  .stat-label{font-size:10.5px;letter-spacing:.03em}
  .stat strong{font-size:14px}
  .stat small{font-size:11.5px}
  .text-button{font-size:12.5px}
  .file-tab{font-size:12.5px}
  .editor-area textarea{font-size:12px}
  .footnote,.footnote code{font-size:11.5px}
  .page-footer{font-size:11.5px;margin-top:28px}
  .module-grid{grid-template-columns:1fr}
  .module-card{display:flex;padding:16px}
  .module-icon{grid-row:auto}
  .module-meta{grid-column:auto}
  .hub-bottom{grid-template-columns:1fr}
  .hub-domains dl>div{flex-direction:column;align-items:flex-start;gap:2px}
  .hub-domains dd{text-align:left}
  .login-card{padding:24px}
  .history-item{padding:14px 16px}
  .tg-connection-bar small{font-size:11.5px}
  .tg-connection-bar .text-button{font-size:12px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Legacy shell rules target the first span of a nav button (old glyph icon). */
.nav-button>.nav-text{display:block;font-size:inherit;width:auto;text-align:left}

/* ---------- Chat single sign-on ---------- */
.sso-button{width:100%;height:40px;font-size:13.5px;margin-top:2px}
.sso-button .icon{width:16px;height:16px}
.sign-in-message{font-size:12.5px;line-height:1.5;padding:10px 12px;border-radius:var(--radius);margin:0 0 16px;border:1px solid rgba(95,211,141,.3);background:rgba(95,211,141,.07);color:#bfe8cf}
.sign-in-message.error{border-color:rgba(244,124,124,.35);background:rgba(244,124,124,.07);color:#ffc4c4}
.emergency-login{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.emergency-login>summary{cursor:pointer;font-size:12.5px;color:var(--text-2);list-style:none;display:flex;align-items:center;gap:6px}
.emergency-login>summary::-webkit-details-marker{display:none}
.emergency-login>summary::before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.emergency-login[open]>summary::before{transform:rotate(45deg)}
.emergency-login>summary:hover{color:var(--text)}
.emergency-login>p{font-size:12px;color:var(--text-3);line-height:1.5;margin:10px 0 0}
.emergency-login .button{width:100%;height:38px;margin-top:6px}
.chat-link{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;margin:0 0 6px;border-radius:7px;color:var(--text-2);font-size:13px}
.chat-link:hover{background:var(--surface-2);color:var(--text)}
.chat-link .icon{width:16px;height:16px;color:var(--text-3)}

/* ---------- Chat module ---------- */
#chat-frame,#admin-frame{width:100%;height:100%;border:0;display:block;background:var(--bg)}
body[data-view="chat"] .page-content,body[data-view="admin"] .page-content{padding:0;max-width:none;height:calc(100dvh - 56px);display:flex;flex-direction:column}
body[data-view="chat"] #view-chat,body[data-view="admin"] #view-admin{flex:1;min-height:0}
body[data-view="chat"] .page-footer,body[data-view="admin"] .page-footer{display:none}
body[data-view="chat"] #notice,body[data-view="admin"] #notice{margin:10px 20px;flex:none}
body[data-view="chat"] .account-warning,body[data-view="admin"] .account-warning{margin:10px 20px}
.count.unread{background:var(--accent);color:var(--accent-ink)}
.module-chat{--module-accent:var(--amber);--module-soft:color-mix(in srgb,var(--amber) 10%,transparent)}

/* ---------- Account sign-in ---------- */
.account-form .step-code,.account-form[data-step="code"] .step-password,.account-form[data-step="code"] .login-links{display:none}
.account-form[data-step="code"] .step-code{display:block}
.account-form input{width:100%}
.account-form .button{width:100%;height:40px;margin-top:6px;font-size:13.5px}
.account-form label{margin-top:14px}
#account-code{font-family:var(--mono);letter-spacing:.18em;font-size:16px;text-align:center}
.login-links{display:flex;justify-content:space-between;gap:12px;margin-top:14px;font-size:12.5px}
.login-links a{color:var(--text-2)}
.login-links a:hover{color:var(--text)}
.login-card>h1{font-size:20px;margin:0 0 6px}
.login-card>p{font-size:13.5px;color:var(--text-2);margin:0 0 18px}
.account-warning{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:#f7d79b;border:1px solid rgba(242,184,75,.35);background:rgba(242,184,75,.07);border-radius:var(--radius);padding:10px 14px;margin:0 0 20px}
.account-warning .text-button{color:var(--warning);text-decoration:underline}
