:root {
  color-scheme: light;
  --navy-950: #070d19;
  --navy-900: #0b1220;
  --navy-850: #0f172a;
  --navy-800: #152038;
  --navy-700: #22304b;
  --indigo-700: #4338ca;
  --indigo-600: #4f46e5;
  --indigo-500: #6366f1;
  --indigo-100: #e0e7ff;
  --indigo-50: #eef2ff;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --green-700: #047857;
  --green-600: #059669;
  --green-100: #d1fae5;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --slate-950: #0f172a;
  --slate-900: #172033;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-150: #e8edf4;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #fff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 8px 26px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --sidebar-width: 254px;
  font-family: Inter, "SF Pro Text", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--slate-50); }
body { min-height: 100vh; margin: 0; color: var(--slate-800); background: var(--slate-50); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Shared controls */
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--slate-900); font-size: 20px; font-weight: 700; letter-spacing: -.35px; }
.brand-light { color: #fff; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; border-radius: 10px; background: linear-gradient(145deg, #818cf8, #4f46e5 58%, #2563eb); box-shadow: 0 8px 24px rgba(79, 70, 229, .35); }
.brand-mark svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.brand-mark svg .brand-check { fill: none; stroke: #4f46e5; stroke-width: 2.2; }
.brand-mark-large { width: 50px; height: 50px; border-radius: 15px; }
.brand-mark-large svg { width: 32px; height: 32px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 600; font-size: 14px; line-height: 1; transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .08s ease; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, .language-switch:focus-visible, .topbar-profile:focus-visible, .sidebar-user:focus-visible, .sound-toggle:focus-visible { outline: 3px solid rgba(99, 102, 241, .22); outline-offset: 2px; }
.button:disabled, button:disabled { cursor: not-allowed; opacity: .58; }
.button svg { width: 18px; height: 18px; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--indigo-600), #4f46e5 50%, #3b5bdc); box-shadow: 0 7px 18px rgba(79, 70, 229, .2); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #4338ca, #4338ca 50%, #3152cf); box-shadow: 0 9px 22px rgba(79, 70, 229, .26); }
.button-secondary { color: var(--slate-700); background: #fff; border-color: var(--slate-200); box-shadow: var(--shadow-sm); }
.button-secondary:hover:not(:disabled) { color: var(--indigo-600); border-color: #c7d2fe; background: var(--indigo-50); }
.button-danger { color: #fff; background: var(--red-600); }
.button-danger:hover:not(:disabled) { background: var(--red-700); }
.button-block { width: 100%; }
.button-lg { min-height: 50px; border-radius: 11px; font-size: 15px; }
.icon-button { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--slate-500); border: 1px solid transparent; border-radius: 9px; background: transparent; }
.icon-button:hover { color: var(--slate-800); background: var(--slate-100); }
.icon-button svg { width: 20px; height: 20px; }
.spinner { width: 17px; height: 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-large { width: 26px; height: 26px; color: var(--indigo-500); }
.spinner-dark { color: var(--indigo-600); }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: grid; gap: 8px; }
.field > label, .duration-field > legend, .delivery-mode-field > legend { color: var(--slate-700); font-size: 13px; font-weight: 600; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label-row label { color: var(--slate-700); font-size: 13px; font-weight: 600; }
.label-row span { color: var(--slate-400); font-size: 11px; }
.input-shell { position: relative; display: flex; height: 46px; min-height: 46px; align-items: center; color: var(--slate-400); border: 1px solid var(--slate-200); border-radius: 10px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.input-shell:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99, 102, 241, .1); }
.input-shell > svg { flex: 0 0 auto; width: 19px; height: 19px; margin-left: 13px; }
.input-shell input { width: 100%; min-width: 0; height: 44px; padding: 0 13px; color: var(--slate-800); border: 0; outline: 0; background: transparent; }
.input-shell input::placeholder, .search-input input::placeholder { color: var(--slate-400); }
.input-action { flex: 0 0 auto; width: 38px; height: 38px; margin-right: 3px; }
.input-action svg { margin: 0; }
.input-shell-large { height: 58px; min-height: 58px; border-radius: 12px; }
.input-shell-large input { height: 56px; font-size: 24px; font-weight: 700; letter-spacing: 6px; }
.input-prefix { padding-left: 16px; color: var(--slate-300); font-size: 19px; font-weight: 700; letter-spacing: 3px; }
.digit-counter { margin-right: 15px; color: var(--slate-400); font-size: 12px; white-space: nowrap; }
.field-hint { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--slate-500); font-size: 11.5px; line-height: 1.45; }
.field-hint svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; }
.field-error { min-height: 0; color: var(--red-600); font-size: 12px; }
.field-error:empty { display: none; }
.alert { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border: 1px solid; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.alert svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.alert-error { color: var(--red-700); border-color: #fecaca; background: #fff5f5; }
.alert-info { color: #1e40af; border-color: #bfdbfe; background: #eff6ff; }
.language-switch { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 11px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 600; }
.language-switch:hover { color: var(--indigo-600); border-color: #c7d2fe; }
.language-switch svg { width: 17px; height: 17px; }
.language-switch.compact { border-color: rgba(255, 255, 255, .15); }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--indigo-600); font-size: 13px; font-weight: 600; }
.text-link:hover { color: var(--indigo-700); }
.text-link svg { width: 16px; height: 16px; }

/* Login */
.auth-page { overflow-x: hidden; background: #fff; }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr); }
.auth-visual { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: radial-gradient(circle at 20% 10%, #273b75, transparent 33%), radial-gradient(circle at 80% 90%, #312e81, transparent 42%), linear-gradient(145deg, #0b1220 0%, #101a31 48%, #15183c 100%); }
.auth-grid { position: absolute; z-index: -1; inset: 0; opacity: .11; background-image: linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to bottom right, #000, transparent 80%); }
.auth-visual::after { position: absolute; z-index: -1; right: -80px; bottom: -150px; width: 470px; height: 470px; border: 1px solid rgba(129, 140, 248, .22); border-radius: 50%; box-shadow: 0 0 0 70px rgba(129,140,248,.04), 0 0 0 140px rgba(129,140,248,.025); content: ""; }
.auth-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(8px); }
.auth-glow-one { top: 14%; left: 55%; width: 230px; height: 230px; background: rgba(79,70,229,.12); }
.auth-glow-two { right: 20%; bottom: 12%; width: 300px; height: 300px; background: rgba(37,99,235,.08); }
.auth-visual-content { display: flex; min-height: 100%; flex-direction: column; padding: clamp(36px, 5vw, 70px); }
.auth-copy { max-width: 600px; margin: auto 0; padding-bottom: 8vh; }
.eyebrow { display: inline-flex; padding: 7px 11px; color: #c7d2fe; border: 1px solid rgba(165, 180, 252, .2); border-radius: 999px; background: rgba(99,102,241,.1); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.auth-copy h1 { max-width: 580px; margin: 24px 0 17px; color: #fff; font-size: clamp(36px, 4.3vw, 62px); font-weight: 600; line-height: 1.12; letter-spacing: -2.3px; }
.auth-copy p { max-width: 510px; margin: 0; color: #aebbd1; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.72; }
.trust-row { display: flex; flex-wrap: wrap; gap: 25px; color: #9cabc4; font-size: 12px; }
.trust-row > span { display: flex; align-items: center; gap: 7px; }
.trust-row svg { width: 17px; height: 17px; color: #818cf8; }
.auth-panel { display: flex; min-width: 0; flex-direction: column; padding: 28px clamp(32px, 5vw, 80px); background: #fff; }
.auth-panel-top { display: flex; justify-content: flex-end; }
.auth-mobile-brand { display: none; }
.auth-form-wrap { width: min(100%, 425px); margin: auto; padding: 50px 0; }
.auth-form-header { margin-bottom: 32px; }
.section-kicker { display: block; margin-bottom: 9px; color: var(--indigo-600); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.auth-form-header h2 { margin: 0 0 10px; color: var(--slate-950); font-size: 31px; line-height: 1.18; letter-spacing: -.8px; }
.auth-form-header p { margin: 0; color: var(--slate-500); font-size: 14px; }
.auth-form-wrap form { display: grid; gap: 20px; margin-top: 20px; }
.auth-form-wrap .button { margin-top: 4px; }
.auth-help { margin: 21px 0 0; color: var(--slate-500); font-size: 12.5px; text-align: center; }
.auth-footer { display: flex; justify-content: space-between; gap: 20px; color: var(--slate-400); font-size: 11px; }

/* App shell */
.app-loading { position: fixed; z-index: 999; inset: 0; display: grid; place-content: center; justify-items: center; gap: 20px; background: var(--slate-50); }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; display: flex; width: var(--sidebar-width); flex-direction: column; color: #c4cede; background: linear-gradient(180deg, #0b1220, #0b1425 55%, #0b1220); box-shadow: 6px 0 28px rgba(15, 23, 42, .05); }
.sidebar-head { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid rgba(148,163,184,.1); }
.sidebar-close { display: none; color: #aab5c8; }
.side-nav { flex: 1; overflow-y: auto; padding: 22px 13px; }
.nav-label { margin: 0; padding: 15px 12px 8px; color: #68778e; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.nav-item { position: relative; display: flex; min-height: 45px; align-items: center; gap: 12px; margin: 3px 0; padding: 0 12px; color: #9ba9be; border: 1px solid transparent; border-radius: 9px; font-size: 13.5px; font-weight: 500; transition: color .18s, background .18s, border-color .18s; }
.nav-item::before { position: absolute; left: -14px; width: 3px; height: 23px; border-radius: 0 5px 5px 0; background: #818cf8; content: ""; opacity: 0; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #edf2fb; background: rgba(255,255,255,.035); }
.nav-item.active { color: #fff; border-color: rgba(129,140,248,.1); background: linear-gradient(90deg, rgba(79,70,229,.23), rgba(79,70,229,.09)); }
.nav-item.active::before { opacity: 1; }
.nav-item.active svg { color: #a5b4fc; }
.nav-count { margin-left: auto; padding: 2px 7px; color: #c7d2fe; border-radius: 99px; background: rgba(99,102,241,.2); font-size: 10px; }
.sidebar-foot { padding: 15px 13px 18px; border-top: 1px solid rgba(148,163,184,.1); }
.sidebar-user { display: flex; width: 100%; min-height: 54px; align-items: center; gap: 10px; padding: 7px 9px; color: #fff; border: 0; border-radius: 10px; background: rgba(255,255,255,.035); text-align: left; }
.sidebar-user:hover { background: rgba(255,255,255,.065); }
.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy strong { font-size: 12.5px; font-weight: 600; }
.sidebar-user-copy small { margin-top: 3px; color: #8795aa; font-size: 10.5px; }
.sidebar-user > svg { width: 16px; height: 16px; color: #65758e; }
.avatar { display: inline-grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; color: #e0e7ff; border: 1px solid rgba(165,180,252,.2); border-radius: 10px; background: rgba(79,70,229,.25); font-size: 11px; font-weight: 700; }
.avatar-small { width: 32px; height: 32px; color: var(--indigo-700); border-color: #d8ddff; background: var(--indigo-50); }
.main-column { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 40; top: 0; display: flex; height: 78px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px, 3vw, 42px); border-bottom: 1px solid var(--slate-200); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar h1 { margin: 1px 0 0; color: var(--slate-900); font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.breadcrumb { margin: 0; color: var(--slate-400); font-size: 10.5px; }
.menu-button { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.system-indicator { display: inline-flex; align-items: center; gap: 7px; margin-right: 5px; color: var(--slate-500); font-size: 11px; }
.system-indicator > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px #d1fae5; }
.profile-menu-wrap { position: relative; }
.topbar-profile { display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 5px 8px; color: var(--slate-700); border: 1px solid transparent; border-radius: 10px; background: transparent; }
.topbar-profile:hover, .topbar-profile[aria-expanded="true"] { border-color: var(--slate-200); background: var(--slate-50); }
.topbar-profile-copy { min-width: 85px; text-align: left; }
.topbar-profile-copy strong, .topbar-profile-copy small { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-profile-copy strong { color: var(--slate-700); font-size: 11.5px; }
.topbar-profile-copy small { margin-top: 2px; color: var(--slate-400); font-size: 9.5px; }
.topbar-profile > svg { width: 15px; height: 15px; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 188px; padding: 6px; border: 1px solid var(--slate-200); border-radius: 11px; background: #fff; box-shadow: var(--shadow-lg); }
.dropdown-menu button { display: flex; width: 100%; min-height: 39px; align-items: center; gap: 9px; padding: 0 10px; color: var(--slate-700); border: 0; border-radius: 7px; background: transparent; font-size: 12.5px; text-align: left; }
.dropdown-menu button:hover { background: var(--slate-100); }
.dropdown-menu button svg { width: 17px; height: 17px; }
.dropdown-menu .danger-menu-item { color: var(--red-600); }
.content { min-height: calc(100vh - 78px); padding: 32px clamp(20px, 3vw, 42px) 50px; }
.view { max-width: 1420px; margin: 0 auto; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-intro-tight { align-items: center; }
.page-kicker { margin: 0 0 7px; color: var(--indigo-600); font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.page-intro h2 { margin: 0; color: var(--slate-950); font-size: 27px; line-height: 1.2; letter-spacing: -.7px; }
.page-intro p:not(.page-kicker) { margin: 7px 0 0; color: var(--slate-500); font-size: 12.5px; line-height: 1.55; }
.page-date { color: var(--slate-500); font-size: 11.5px; }

/* Cards and dashboard */
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.metric-card { display: flex; min-height: 92px; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--slate-200); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.metric-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; color: var(--blue-600); border-radius: 11px; background: #eff6ff; }
.metric-icon svg { width: 21px; height: 21px; }
.metric-green { color: var(--green-700); background: #ecfdf5; }
.metric-amber { color: var(--amber-700); background: #fffbeb; }
.metric-violet { color: var(--indigo-600); background: var(--indigo-50); }
.metric-slate { color: var(--slate-600); background: var(--slate-100); }
.metric-card > div { min-width: 0; }
.metric-card span:not(.metric-icon) { display: block; margin-bottom: 5px; color: var(--slate-500); font-size: 10.5px; }
.metric-card strong { color: var(--slate-900); font-size: 22px; line-height: 1; letter-spacing: -.5px; }
.panel { border: 1px solid var(--slate-200); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.panel-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--slate-150); }
.panel-header > div:first-child { display: flex; align-items: center; gap: 11px; }
.panel-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--indigo-600); border-radius: 9px; background: var(--indigo-50); }
.panel-icon svg { width: 18px; height: 18px; }
.panel-icon-amber { color: var(--amber-700); background: #fffbeb; }
.panel-header h3 { margin: 0; color: var(--slate-800); font-size: 14px; line-height: 1.25; }
.panel-header p { margin: 4px 0 0; color: var(--slate-400); font-size: 10.5px; }
.secure-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: var(--green-700); border-radius: 99px; background: #ecfdf5; font-size: 9.5px; font-weight: 600; }
.secure-badge svg { width: 13px; height: 13px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(360px, .82fr) minmax(390px, 1.18fr); gap: 16px; }
.generator-form { display: grid; gap: 21px; padding: 20px; }
.duration-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.duration-field legend { margin-bottom: 9px; }
.delivery-mode-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.delivery-mode-field legend { margin-bottom: 9px; }
.delivery-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.delivery-options label { position: relative; cursor: pointer; }
.delivery-options input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-options label > span { display: grid; min-height: 74px; align-content: center; gap: 4px; padding: 10px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); transition: border-color .18s, background .18s, color .18s, box-shadow .18s; }
.delivery-options strong, .delivery-options small { display: block; }
.delivery-options strong { color: var(--slate-700); font-size: 12px; line-height: 1.3; }
.delivery-options small { color: var(--slate-500); font-size: 10px; line-height: 1.35; }
.delivery-options label:hover > span { border-color: #c7d2fe; background: #f8faff; }
.delivery-options input:checked + span { color: var(--indigo-700); border-color: #818cf8; background: var(--indigo-50); box-shadow: 0 0 0 2px rgba(99,102,241,.08); }
.delivery-options input:checked + span strong { color: var(--indigo-700); }
.delivery-options input:focus-visible + span { outline: 3px solid rgba(99,102,241,.2); outline-offset: 2px; }
.article-consent-hint { margin-top: 10px; padding: 9px 10px; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 9px; background: #eff6ff; }
.duration-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-bottom: 9px; }
.article-options { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); width: 100%; }
.article-permission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.article-permission-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); cursor: pointer; font-size: 13px; color: var(--slate-700); }
.article-permission-item:has(input:checked) { border-color: #818cf8; background: var(--indigo-50); color: var(--indigo-700); }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--slate-700); }
.article-options span { flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: auto; min-height: 60px; padding: 10px 6px; text-align: center; }
.article-options strong { font-size: 11px; }
.article-options small { font-size: 9px; color: var(--slate-500); }
.duration-options label { position: relative; cursor: pointer; }
.duration-options input { position: absolute; opacity: 0; pointer-events: none; }
.duration-options span { display: flex; height: 60px; align-items: baseline; justify-content: center; gap: 2px; padding-top: 14px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); transition: border .18s, background .18s, color .18s, box-shadow .18s; }
.duration-options strong { font-size: 18px; }
.duration-options small { font-size: 10.5px; }
.duration-options em { position: absolute; top: 4px; right: 5px; padding: 2px 4px; color: var(--indigo-600); border-radius: 4px; background: var(--indigo-100); font-size: 7px; font-style: normal; font-weight: 700; }
.duration-options label:hover span { border-color: #c7d2fe; }
.duration-options input:checked + span { color: var(--indigo-700); border-color: #818cf8; background: var(--indigo-50); box-shadow: 0 0 0 2px rgba(99,102,241,.08); }
.duration-options input:focus-visible + span { outline: 3px solid rgba(99,102,241,.2); outline-offset: 2px; }
.card-brand-field { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--slate-200); border-radius: 11px; background: var(--slate-50); }
.card-brand-copy { display: flex; min-width: 0; align-items: center; gap: 10px; }
.card-brand-copy > span:last-child { min-width: 0; }
.card-brand-copy strong, .card-brand-copy small { display: block; }
.card-brand-copy strong { color: var(--slate-700); font-size: 11.5px; }
.card-brand-copy small { margin-top: 3px; color: var(--slate-400); font-size: 9.5px; line-height: 1.3; }
.card-logo-preview { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; overflow: hidden; color: #fff; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(145deg, #818cf8, #4f46e5); box-shadow: 0 0 0 1px var(--slate-200), 0 5px 13px rgba(79,70,229,.16); }
.card-logo-preview svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.card-logo-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center; background: #fff; }
.button-compact { min-height: 34px; flex: 0 0 auto; padding: 0 10px; border-radius: 8px; font-size: 10.5px; }
.link-result { margin: 0 20px 20px; padding: 14px; border: 1px solid #a7f3d0; border-radius: 11px; background: linear-gradient(135deg, #f0fdf4, #ecfdf5); }
.result-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.success-check { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; border-radius: 50%; background: var(--green-600); }
.success-check svg { width: 17px; height: 17px; stroke-width: 2.4; }
.result-heading > div { min-width: 0; flex: 1; }
.result-heading strong, .result-heading span:not(.success-check):not(.status-pill) { display: block; }
.result-heading strong { color: #065f46; font-size: 12px; }
.result-heading div span { margin-top: 2px; color: #479078; font-size: 9.5px; }
.result-mode { display: inline-flex; margin: -2px 0 10px 37px; padding: 4px 8px; color: var(--indigo-700); border: 1px solid #c7d2fe; border-radius: 99px; background: var(--indigo-50); font-size: 10px; font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 23px; padding: 0 8px; border-radius: 99px; font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.status-pill::before { width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-active { color: var(--blue-600); background: var(--blue-100); }
.status-used, .status-completed { color: var(--green-700); background: var(--green-100); }
.status-expired, .status-replaced { color: var(--slate-600); background: var(--slate-100); }
.status-failed { color: var(--red-700); background: var(--red-100); }
.copy-field { display: flex; gap: 7px; align-items: center; }
.copy-field .article-lang-select {
  flex: 0 0 auto;
  min-width: 118px;
  max-width: 150px;
  height: 41px;
  padding: 0 10px;
  color: var(--slate-700);
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  font-size: 11px;
  font-weight: 600;
}
.copy-field input { min-width: 0; height: 41px; flex: 1; padding: 0 11px; color: var(--slate-700); border: 1px solid #a7f3d0; border-radius: 8px; outline: 0; background: rgba(255,255,255,.78); font-size: 11px; }
.copy-field .button { min-height: 41px; color: var(--green-700); border-color: #a7f3d0; background: #fff; }
.share-card-button { width: 100%; min-height: 43px; margin-top: 9px; color: #fff; border-color: #4338ca; background: linear-gradient(135deg, #4f46e5, #4338ca); box-shadow: 0 5px 14px rgba(67,56,202,.18); }
.share-card-button:hover:not(:disabled) { background: linear-gradient(135deg, #4338ca, #3730a3); }
.share-card-hint { margin: 6px 0 0; color: #64748b; font-size: 9.5px; text-align: center; }
.result-privacy-note { display: flex; align-items: flex-start; gap: 7px; margin: 9px 0 0; padding: 9px 10px; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; font-size: 10.5px; line-height: 1.45; }
.result-privacy-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.countdown-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(16,185,129,.14); color: #47806e; font-size: 10.5px; }
.countdown-row > span { display: inline-flex; align-items: center; gap: 5px; }
.countdown-row svg { width: 14px; height: 14px; }
.countdown-row strong { color: #065f46; font-size: 13px; font-variant-numeric: tabular-nums; }
.association-panel { min-height: 430px; }
.association-empty { display: grid; min-height: 355px; place-content: center; justify-items: center; padding: 36px; text-align: center; }
.radar-graphic { position: relative; width: 106px; height: 106px; margin-bottom: 22px; border: 1px solid #dbe2ee; border-radius: 50%; background: radial-gradient(circle, transparent 25%, #e8edf4 26%, transparent 27%, transparent 52%, #e8edf4 53%, transparent 54%), linear-gradient(90deg, transparent 49.5%, #e8edf4 50%, transparent 50.5%), linear-gradient(transparent 49.5%, #e8edf4 50%, transparent 50.5%); }
.radar-graphic::before { position: absolute; inset: 7px; border-radius: 50%; background: conic-gradient(from -30deg, rgba(99,102,241,.2), transparent 18%, transparent); content: ""; animation: radar 3s linear infinite; }
.radar-graphic span { position: absolute; top: 31px; left: 61px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--indigo-500); box-shadow: 0 0 0 4px rgba(99,102,241,.13); }
.radar-graphic i { position: absolute; top: 66px; left: 32px; width: 5px; height: 5px; border-radius: 50%; background: #cbd5e1; }
@keyframes radar { to { transform: rotate(360deg); } }
.association-empty h4 { margin: 0 0 7px; color: var(--slate-700); font-size: 14px; }
.association-empty p { max-width: 280px; margin: 0; color: var(--slate-400); font-size: 11px; line-height: 1.55; }
.association-result { padding: 20px; }
.risk-header { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; }
.risk-header.no-risk { border-color: #a7f3d0; background: #ecfdf5; }
.risk-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--amber-700); border-radius: 9px; background: #fef3c7; }
.risk-header.no-risk .risk-icon { color: var(--green-700); background: #d1fae5; }
.risk-icon svg { width: 18px; height: 18px; }
.risk-header > div { min-width: 0; flex: 1; }
.risk-header > div span, .risk-header > div strong { display: block; }
.risk-header > div span { color: #a16207; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.risk-header > div strong { margin-top: 2px; color: #713f12; font-size: 13px; }
.risk-header.no-risk > div span, .risk-header.no-risk > div strong { color: #065f46; }
.confidence-badge { padding: 4px 7px; color: var(--amber-700); border-radius: 6px; background: #fef3c7; font-size: 9px; font-weight: 700; }
.association-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 18px 0 0; border: 1px solid var(--slate-150); border-radius: 10px; overflow: hidden; }
.association-details > div { min-width: 0; padding: 11px 13px; }
.association-details > div:nth-child(odd) { border-right: 1px solid var(--slate-150); }
.association-details > div:nth-child(-n+2) { border-bottom: 1px solid var(--slate-150); }
.association-details dt { margin-bottom: 4px; color: var(--slate-400); font-size: 9.5px; }
.association-details dd { margin: 0; overflow: hidden; color: var(--slate-700); font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.related-sales { margin-top: 14px; }
.related-sales > span { color: var(--slate-400); font-size: 9.5px; }
.related-sales > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.sales-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 99px; background: var(--slate-50); font-size: 10px; }
.sales-chip .avatar { width: 20px; height: 20px; border-radius: 6px; font-size: 7px; }
.association-note { display: flex; gap: 7px; margin: 15px 0 0; padding: 10px; color: var(--slate-500); border-radius: 8px; background: var(--slate-50); font-size: 9.5px; line-height: 1.45; }
.association-note svg { flex: 0 0 auto; width: 14px; height: 14px; }
.recent-panel { margin-top: 16px; }
.recent-panel .table-wrap { max-height: 560px; overflow: auto; }
.recent-panel thead { position: sticky; z-index: 2; top: 0; }
.recent-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.pending-count { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; color: var(--indigo-700); border-radius: 99px; background: var(--indigo-50); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.refresh-cadence { display: inline-flex; align-items: center; gap: 6px; color: var(--slate-500); font-size: 10.5px; white-space: nowrap; }
.refresh-cadence i { width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,.16); }
.sound-toggle { display: inline-flex; min-height: 32px; align-items: center; gap: 6px; padding: 0 9px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 8px; background: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.sound-toggle:hover { color: var(--indigo-600); border-color: #c7d2fe; background: var(--indigo-50); }
.sound-toggle[aria-checked="true"] { color: var(--green-700); border-color: #a7f3d0; background: #ecfdf5; }
.sound-toggle.pending { color: var(--amber-700); border-color: #fde68a; background: #fffbeb; }
.sound-toggle svg { width: 15px; height: 15px; }

/* Tables */
.table-wrap { position: relative; width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
th { padding: 11px 20px; color: var(--slate-400); border-bottom: 1px solid var(--slate-150); background: var(--slate-50); font-size: 9.5px; font-weight: 600; letter-spacing: .02em; text-align: left; white-space: nowrap; }
td { padding: 13px 20px; color: var(--slate-600); border-bottom: 1px solid var(--slate-100); font-size: 11px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfe; }
tbody tr.cross-sales-record td { color: #991b1b; border-bottom-color: #fecaca; background: #fff1f2; }
tbody tr.cross-sales-record:hover td { background: #ffe4e6; }
tbody tr.cross-sales-record td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
tbody tr.cross-sales-record .customer-dot { color: #fff; background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.1); }
tbody tr.cross-sales-record .customer-id strong { color: #991b1b; font-weight: 750; }
tbody tr.cross-sales-record .table-action { color: #b91c1c; border-color: #fca5a5; background: #fff; }
tbody tr.cross-sales-record .table-action:hover { color: #7f1d1d; border-color: #ef4444; background: #fef2f2; }
.align-right { text-align: right; }
.customer-id { display: inline-flex; align-items: center; gap: 9px; }
.customer-dot { display: grid; width: 30px; height: 30px; place-items: center; color: var(--slate-500); border-radius: 8px; background: var(--slate-100); font-size: 9px; font-weight: 700; }
.customer-id strong { color: var(--slate-700); font-size: 11.5px; }
.customer-id small { display: block; margin-top: 2px; color: var(--slate-400); font-size: 8.5px; }
.association-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; font-size: 9.5px; font-weight: 600; }
.association-pill svg { width: 12px; height: 12px; }
.association-pill.high { color: var(--amber-700); background: var(--amber-100); }
.association-pill.low { color: #0369a1; background: #e0f2fe; }
.association-pill.none { color: var(--slate-500); background: var(--slate-100); }
.association-pill.critical { color: #991b1b; border: 1px solid #fca5a5; background: #fee2e2; box-shadow: 0 0 0 3px rgba(220,38,38,.07); font-weight: 800; }
.association-cell { min-width: 200px; white-space: normal; }
.cross-sales-meta { display: grid; gap: 2px; margin-top: 8px; line-height: 1.35; }
.cross-sales-meta strong { color: #991b1b; font-size: 10px; }
.cross-sales-meta span { color: #b91c1c; font-size: 9.5px; }
.table-action { min-height: 28px; padding: 0 9px; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 7px; background: #fff; font-size: 9.5px; font-weight: 600; }
.table-action:hover { color: var(--indigo-600); border-color: #c7d2fe; background: var(--indigo-50); }
.empty-state { color: var(--slate-400); text-align: center; }
.table-empty { display: grid; min-height: 240px; place-content: center; justify-items: center; padding: 30px; }
.table-empty svg { width: 36px; height: 36px; margin-bottom: 11px; color: var(--slate-300); }
.table-empty strong { color: var(--slate-600); font-size: 12px; }
.table-empty span { margin-top: 5px; font-size: 10px; }
.data-panel { min-height: 410px; }
.toolbar { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--slate-150); }
.search-input { display: flex; width: min(360px, 100%); min-height: 39px; align-items: center; gap: 8px; padding: 0 11px; color: var(--slate-400); border: 1px solid var(--slate-200); border-radius: 9px; background: #fff; }
.search-input:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.search-input svg { width: 17px; height: 17px; }
.search-input input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 11.5px; }
.filter-row { display: flex; gap: 8px; }
.select-shell { position: relative; display: inline-flex; min-width: 145px; min-height: 39px; align-items: center; color: var(--slate-600); border: 1px solid var(--slate-200); border-radius: 9px; background: #fff; }
.select-shell select { width: 100%; height: 37px; padding: 0 34px 0 11px; color: inherit; border: 0; outline: 0; appearance: none; background: transparent; font-size: 11px; }
.select-shell > svg { position: absolute; right: 10px; width: 14px; height: 14px; pointer-events: none; }
.select-block { width: 100%; }
.search-summary { padding: 16px 18px 18px; border-bottom: 1px solid var(--slate-150); background: linear-gradient(180deg, #fbfdff, #f8fafc); }
.search-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.search-summary-head h3 { margin: 0; color: var(--slate-800); font-size: 14px; }
.search-summary-head p { margin: 4px 0 0; color: var(--slate-500); font-size: 11px; line-height: 1.45; }
.search-summary-mode { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; color: var(--indigo-700); border-radius: 99px; background: var(--indigo-100); font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.search-summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 13px; }
.search-summary-stat { padding: 10px 11px; border: 1px solid var(--slate-200); border-radius: 9px; background: #fff; }
.search-summary-stat span, .search-summary-stat strong { display: block; }
.search-summary-stat span { color: var(--slate-500); font-size: 10px; }
.search-summary-stat strong { margin-top: 4px; color: var(--slate-900); font-size: 18px; }
.search-summary-stat.alert strong { color: var(--red-700); }
.summary-employee-list { display: grid; gap: 8px; }
.summary-employee { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(80px, .42fr)); align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--slate-200); border-radius: 9px; background: #fff; }
.summary-employee-identity { display: flex; min-width: 0; align-items: center; gap: 9px; }
.summary-employee-identity .avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; }
.summary-employee-identity strong, .summary-employee-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-employee-identity strong { color: var(--slate-800); font-size: 11.5px; }
.summary-employee-identity small { margin-top: 2px; color: var(--slate-500); font-size: 9.5px; }
.summary-employee-count { text-align: right; }
.summary-employee-count span, .summary-employee-count strong { display: block; }
.summary-employee-count span { color: var(--slate-400); font-size: 9px; }
.summary-employee-count strong { margin-top: 2px; color: var(--slate-800); font-size: 13px; }
.summary-employee-count.alert strong { color: var(--red-700); }
.search-summary-disclaimer { display: flex; align-items: flex-start; gap: 6px; margin: 11px 0 0; color: var(--slate-500); font-size: 10.5px; line-height: 1.45; }
.search-summary-disclaimer svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.search-summary-state { display: flex; min-height: 70px; align-items: center; justify-content: center; gap: 9px; color: var(--slate-500); font-size: 11.5px; }
.search-summary-state.error { color: var(--red-700); }
.table-loading { position: absolute; z-index: 3; inset: 0; display: flex; min-height: 250px; align-items: center; justify-content: center; gap: 9px; color: var(--slate-500); background: rgba(255,255,255,.82); font-size: 11px; backdrop-filter: blur(2px); }
.pagination { display: flex; min-height: 55px; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 18px; color: var(--slate-400); border-top: 1px solid var(--slate-150); font-size: 10.5px; }
.pagination > div { display: flex; align-items: center; gap: 8px; }
.pagination .icon-button { width: 31px; height: 31px; border-color: var(--slate-200); background: #fff; }
.pagination .icon-button svg { width: 15px; height: 15px; }
.employees-metrics { grid-template-columns: repeat(3, minmax(0, 220px)); }
.scope-notice { display: flex; align-items: flex-start; gap: 9px; margin: -4px 0 16px; padding: 10px 12px; color: var(--blue-600); border: 1px solid var(--blue-100); border-radius: 10px; background: var(--indigo-50); font-size: 10.5px; line-height: 1.5; }
.scope-notice svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.employee-cell { display: flex; align-items: center; gap: 9px; }
.employee-cell .avatar { width: 31px; height: 31px; color: var(--indigo-700); border-color: var(--indigo-100); background: var(--indigo-50); border-radius: 8px; }
.employee-cell strong, .employee-cell small { display: block; }
.employee-cell strong { color: var(--slate-700); font-size: 11.5px; }
.employee-cell small { margin-top: 2px; color: var(--slate-400); font-size: 8.5px; }
.role-pill { display: inline-flex; padding: 4px 7px; color: var(--indigo-700); border-radius: 6px; background: var(--indigo-50); font-size: 9.5px; font-weight: 600; }
.role-pill.manager { color: #0369a1; background: #e0f2fe; }
.role-pill.super_admin { color: #7e22ce; background: #f3e8ff; }
.status-text { display: inline-flex; align-items: center; gap: 5px; color: var(--green-700); font-size: 10px; font-weight: 600; }
.status-text::before { width: 6px; height: 6px; border-radius: 50%; background: #10b981; content: ""; }
.status-text.disabled { color: var(--slate-500); }
.status-text.disabled::before { background: var(--slate-400); }
.row-actions { display: inline-flex; gap: 5px; }
.row-actions .icon-button { width: 29px; height: 29px; border-color: var(--slate-200); background: #fff; }
.row-actions .icon-button svg { width: 14px; height: 14px; }
.row-actions .icon-button.danger { color: var(--red-600); }
.audit-action { display: inline-flex; padding: 4px 6px; color: var(--slate-600); border-radius: 5px; background: var(--slate-100); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8.5px; font-weight: 600; }
.result-success { color: var(--green-700); font-weight: 600; }
.result-failure { color: var(--red-600); font-weight: 600; }

/* Dialogs */
.modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 24px; border: 0; background: transparent; }
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: rgba(7, 13, 25, .68); backdrop-filter: blur(3px); }
.modal-card { width: min(100%, 500px); overflow: hidden; border: 1px solid var(--slate-200); border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); animation: modal-in .18s ease-out; }
.modal-card-wide { width: min(100%, 680px); }
.modal-card-small { width: min(100%, 440px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 20px; border-bottom: 1px solid var(--slate-150); }
.modal-header > div:first-child { display: flex; align-items: flex-start; gap: 11px; }
.modal-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; color: var(--indigo-600); border-radius: 10px; background: var(--indigo-50); }
.modal-icon-success { color: var(--green-700); background: var(--green-100); }
.modal-icon-warning { color: var(--amber-700); background: var(--amber-100); }
.modal-icon svg { width: 19px; height: 19px; }
.modal-header h2 { margin: 0; color: var(--slate-900); font-size: 16px; letter-spacing: -.25px; }
.modal-header p { margin: 4px 0 0; color: var(--slate-500); font-size: 10.5px; line-height: 1.45; }
.modal-close { width: 31px; height: 31px; }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { display: grid; gap: 16px; max-height: min(65vh, 620px); overflow-y: auto; padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--slate-150); background: var(--slate-50); }
.form-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.form-grid-full { grid-column: 1 / -1; }
.credential-box { overflow: hidden; border: 1px solid var(--slate-200); border-radius: 10px; }
.credential-box > div { display: grid; grid-template-columns: 130px 1fr; padding: 11px 13px; border-bottom: 1px solid var(--slate-150); }
.credential-box > div:last-child { border-bottom: 0; }
.credential-box span { color: var(--slate-500); font-size: 11px; }
.credential-box strong { color: var(--slate-800); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 10px; }
.detail-item { padding: 12px 14px; border-right: 1px solid var(--slate-150); border-bottom: 1px solid var(--slate-150); }
.detail-item:nth-child(2n) { border-right: 0; }
.detail-item:nth-last-child(-n+2) { border-bottom: 0; }
.detail-item.full { grid-column: 1 / -1; border-right: 0; }
.detail-item dt { margin-bottom: 5px; color: var(--slate-400); font-size: 9.5px; }
.detail-item dd { margin: 0; color: var(--slate-700); font-size: 11.5px; font-weight: 600; overflow-wrap: anywhere; }
.detail-pre { margin: 0; white-space: pre-wrap; font: inherit; }
.detail-cross-sales-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; color: #991b1b; border: 1px solid #fca5a5; border-radius: 10px; background: #fff1f2; box-shadow: inset 4px 0 #dc2626; }
.detail-cross-sales-alert > svg { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; }
.detail-cross-sales-alert strong, .detail-cross-sales-alert span { display: block; }
.detail-cross-sales-alert strong { font-size: 12px; }
.detail-cross-sales-alert span { margin-top: 3px; color: #b91c1c; font-size: 10.5px; }
.clipboard-fallback { position: fixed; opacity: 0; pointer-events: none; }

/* Toasts */
.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; width: min(360px, calc(100vw - 40px)); gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; color: var(--slate-700); border: 1px solid var(--slate-200); border-radius: 11px; background: #fff; box-shadow: var(--shadow-lg); animation: toast-in .22s ease-out; pointer-events: auto; }
.toast.closing { animation: toast-out .18s ease-in forwards; }
.toast-icon { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; color: var(--green-700); border-radius: 7px; background: var(--green-100); }
.toast.error .toast-icon { color: var(--red-700); background: var(--red-100); }
.toast.info .toast-icon { color: var(--blue-600); background: var(--blue-100); }
.toast-icon svg { width: 15px; height: 15px; }
.toast > div { flex: 1; }
.toast strong { display: block; font-size: 11.5px; }
.toast p { margin: 3px 0 0; color: var(--slate-500); font-size: 10px; line-height: 1.4; }
.toast button { width: 25px; height: 25px; }
.toast button svg { width: 14px; height: 14px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(7px); } }

/* Customer verification */
.verify-page { display: grid; min-height: 100vh; min-height: 100svh; place-items: center; padding: 22px; background: radial-gradient(circle at 50% -10%, #e8eafd, transparent 38%), linear-gradient(160deg, #f8fafc, #eef2f7); }
.verify-shell { width: min(100%, 430px); }
.verify-card { position: relative; overflow: hidden; padding: 36px 30px 20px; border: 1px solid rgba(203,213,225,.75); border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(15,23,42,.11); text-align: center; }
.verify-card::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, #818cf8, #4f46e5, #2563eb); content: ""; }
.verify-brand { display: flex; justify-content: center; margin-bottom: 25px; }
.verify-state { min-height: 190px; }
.verify-state h1 { margin: 20px 0 9px; color: var(--slate-900); font-size: 22px; line-height: 1.2; letter-spacing: -.45px; }
.verify-state p { max-width: 320px; margin: 0 auto; color: var(--slate-500); font-size: 13px; line-height: 1.65; }
.verify-loader { position: relative; width: 66px; height: 66px; margin: 6px auto 0; border: 2px solid var(--indigo-100); border-radius: 50%; }
.verify-loader::before, .verify-loader::after { position: absolute; border-radius: 50%; content: ""; }
.verify-loader::before { inset: 8px; border: 1px solid #dbe4f3; }
.verify-loader::after { inset: -2px; border: 2px solid transparent; border-top-color: var(--indigo-500); animation: spin 1s linear infinite; }
.verify-loader span { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--indigo-500); box-shadow: 0 0 0 6px rgba(99,102,241,.13); transform: translate(-50%, -50%); }
.verify-loader i { position: absolute; inset: 20px; border-radius: 50%; background: var(--indigo-50); }
.verify-state-icon { display: grid; width: 66px; height: 66px; margin: 6px auto 0; place-items: center; border-radius: 50%; }
.verify-state-icon svg { width: 32px; height: 32px; stroke-width: 2.1; }
.verify-state-icon.success { color: var(--green-700); background: var(--green-100); box-shadow: 0 0 0 8px rgba(16,185,129,.06); }
.verify-state-icon.warning { color: var(--amber-700); background: var(--amber-100); box-shadow: 0 0 0 8px rgba(245,158,11,.06); }
.verify-state-icon.danger { color: var(--red-700); background: var(--red-100); box-shadow: 0 0 0 8px rgba(239,68,68,.06); }
.verify-state-icon.neutral { color: var(--slate-600); background: var(--slate-100); box-shadow: 0 0 0 8px rgba(100,116,139,.06); }
.verify-retry { min-width: 120px; margin-top: 20px; }
.verify-security { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 15px; color: var(--slate-400); border-top: 1px solid var(--slate-100); font-size: 10px; }
.verify-security svg { width: 14px; height: 14px; }
.noscript-message { position: fixed; right: 20px; bottom: 20px; left: 20px; padding: 13px; color: var(--red-700); border: 1px solid #fecaca; border-radius: 10px; background: #fff5f5; font-size: 13px; text-align: center; }
.legal-page { display: grid; min-height: 100vh; place-items: start center; padding: 50px 20px; background: var(--slate-50); }
.legal-card { width: min(100%, 720px); padding: clamp(24px, 5vw, 50px); border: 1px solid var(--slate-200); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.legal-card h1 { margin: 26px 0 18px; color: var(--slate-900); font-size: 28px; }
.legal-card p { color: var(--slate-600); font-size: 14px; line-height: 1.8; }

/* Responsive */
@media (max-width: 1120px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(330px, .9fr) minmax(350px, 1.1fr); }
  .auth-shell { grid-template-columns: minmax(380px, .95fr) minmax(400px, 1.05fr); }
  .auth-copy h1 { font-size: 44px; }
}

@media (max-width: 900px) {
  .auth-shell { display: block; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 24px clamp(22px, 7vw, 55px); }
  .auth-panel-top { justify-content: space-between; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-footer { padding-top: 20px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .mobile-overlay { position: fixed; z-index: 45; inset: 0; display: block; background: rgba(7,13,25,.58); backdrop-filter: blur(2px); }
  .main-column { margin-left: 0; }
  .menu-button { display: inline-grid; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .association-panel { min-height: auto; }
  .recent-panel .panel-header { align-items: flex-start; flex-direction: column; }
  .recent-header-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 14px; }
  .topbar h1 { font-size: 14px; }
  .breadcrumb, .system-indicator, .topbar-profile-copy { display: none; }
  .topbar-profile { min-height: 40px; padding: 3px; }
  .content { min-height: calc(100vh - 68px); padding: 23px 14px 40px; }
  .page-intro { align-items: flex-start; margin-bottom: 18px; }
  .page-intro h2 { font-size: 23px; }
  .page-date { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric-card { min-height: 83px; gap: 9px; padding: 12px; }
  .metric-icon { width: 36px; height: 36px; border-radius: 9px; }
  .metric-icon svg { width: 18px; height: 18px; }
  .metric-card strong { font-size: 18px; }
  .metric-card span:not(.metric-icon) { font-size: 9px; }
  .panel-header { min-height: 65px; padding: 12px 14px; }
  .generator-form { padding: 16px 14px; }
  .link-result { margin: 0 14px 15px; }
  .association-result { padding: 14px; }
  .association-details { grid-template-columns: 1fr; }
  .association-details > div:nth-child(odd) { border-right: 0; }
  .association-details > div:nth-child(-n+3) { border-bottom: 1px solid var(--slate-150); }
  .recent-panel table th:nth-child(2), .recent-panel table td:nth-child(2), .recent-panel table th:nth-child(5), .recent-panel table td:nth-child(5) { display: none; }
  th, td { padding: 11px 13px; }
  .toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
  .search-input { width: 100%; }
  .filter-row { display: grid; grid-template-columns: 1fr 1fr; }
  .select-shell { min-width: 0; width: 100%; }
  .search-summary { padding: 14px 12px; }
  .summary-employee { grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(58px, .35fr)); gap: 7px; }
  .summary-employee-count span { font-size: 8.5px; }
  .employees-metrics { grid-template-columns: repeat(3, 1fr); }
  .employees-metrics .metric-card { display: block; min-height: 74px; }
  .employees-metrics .metric-icon { display: none; }
  .scope-notice { margin-top: -2px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-full { grid-column: auto; }
  .modal { padding: 12px; }
  .modal-body { padding: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item, .detail-item:nth-child(2n) { border-right: 0; border-bottom: 1px solid var(--slate-150); }
  .detail-item:last-child { border-bottom: 0; }
  .credential-box > div { grid-template-columns: 100px 1fr; }
  .verify-page { padding: 14px; }
  .verify-card { padding: 31px 20px 18px; border-radius: 19px; }
}

@media (max-width: 420px) {
  .auth-panel { padding: 20px; }
  .auth-form-wrap { padding: 42px 0; }
  .auth-footer { flex-direction: column; gap: 4px; text-align: center; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { display: block; min-height: 77px; }
  .metric-card .metric-icon { display: none; }
  .copy-field { display: grid; }
  .duration-options { gap: 5px; }
  .duration-options span { height: 56px; border-radius: 8px; }
  .duration-options strong { font-size: 16px; }
  .duration-options small { font-size: 8.5px; }
  .duration-options em { top: 3px; right: 3px; padding: 1px 3px; font-size: 6px; }
  .article-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-options span { min-height: 54px; padding: 8px 4px; }
  .delivery-options { grid-template-columns: 1fr; }
  .delivery-options label > span { min-height: 60px; }
  .card-brand-field { align-items: stretch; flex-direction: column; }
  .button-compact { width: 100%; }
  .language-switch span { display: none; }
  .language-switch { width: 39px; justify-content: center; padding: 0; }
  .page-intro-tight { display: grid; }
  .page-intro-tight > .button { width: 100%; }
  .refresh-cadence { display: none; }
  .recent-header-actions .text-link { margin-left: auto; }
  .search-summary-head { display: grid; }
  .search-summary-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .search-summary-stat { padding: 8px; }
  .search-summary-stat span { font-size: 8.5px; }
  .search-summary-stat strong { font-size: 16px; }
  .summary-employee { grid-template-columns: 1fr; }
  .summary-employee-count { display: flex; align-items: center; justify-content: space-between; padding-top: 7px; border-top: 1px solid var(--slate-100); text-align: left; }
  .summary-employee-count span, .summary-employee-count strong { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
