:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-warm: #fff5f2;
  --ink: #17202a;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --primary: #f26a21;
  --primary-hover: #dc5514;
  --primary-soft: #fff2eb;
  --success: #117d6c;
  --success-soft: #e8f7f3;
  --warning: #9b6500;
  --warning-soft: #fff4d6;
  --danger: #d64545;
  --danger-soft: #fff0f0;
  --info: #2563a9;
  --info-soft: #eaf3ff;
  --rail: 64px;
  --sidebar: 244px;
  --topbar: 64px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --z-dropdown: 20;
  --z-sticky: 30;
  --z-backdrop: 40;
  --z-drawer: 50;
  --z-toast: 60;
  --z-progress: 70;
  font-family: InterVariable, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: var(--page); color: var(--ink); }
body { min-height: 100vh; min-height: 100dvh; font-size: 14px; line-height: 1.45; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; transform: translateY(-140%); transition: transform .16s ease-out; }
.skip-link:focus { transform: translateY(0); }

.login-screen { display: grid; min-height: 100dvh; place-items: center; padding: 32px 20px; background: #f2f2f2; }
.login-shell { width: min(100%, 440px); border: 1px solid #dededf; border-radius: 16px; background: var(--surface); box-shadow: 0 16px 42px rgba(20,21,23,.08); }
.login-form-panel { min-width: 0; padding: 40px; }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand img { display: block; width: 36px; height: 36px; }
.login-brand span { display: grid; line-height: 1.1; }
.login-brand strong { font-size: 15px; letter-spacing: -.02em; }
.login-brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.login-form-heading { margin-top: 40px; }
.login-form-heading h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.035em; }
.login-form-heading p { margin: 8px 0 0; color: var(--muted); }
.login-form { display: grid; gap: 16px; margin-top: 28px; }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 64px; }
.password-field button { position: absolute; top: 50%; right: 10px; min-height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--primary); font-size: 12px; font-weight: 700; transform: translateY(-50%); }
.password-field button:hover { background: var(--primary-soft); }
.login-submit { position: relative; width: 100%; min-height: 44px; margin-top: 4px; }
.login-submit[aria-busy="true"] { color: transparent; }
.login-submit[aria-busy="true"]::after { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: login-spin .65s linear infinite; content: ""; }
.login-error { margin: 0; padding: 10px 12px; border: 1px solid #ffd2ca; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.login-support { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
@keyframes login-spin { to { transform: rotate(360deg); } }

.app-shell { display: grid; grid-template-columns: var(--rail) var(--sidebar) minmax(0, 1fr); min-height: 100dvh; gap: 0; padding: 8px 8px 8px 0; }
.product-rail { position: sticky; z-index: var(--z-sticky); top: 0; display: flex; height: 100dvh; margin: -8px 0; flex-direction: column; align-items: center; padding: 24px 12px 12px; border: 0; border-radius: 0; background: transparent; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 11px; background: transparent; }
.brand-mark img { display: block; width: 32px; height: 32px; }
.product-nav { display: flex; width: 100%; flex: 1; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.rail-button, .icon-button { position: relative; display: grid; place-items: center; border: 0; background: transparent; color: #55585d; transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1), box-shadow .15s cubic-bezier(.4,0,.2,1); }
.rail-button { width: 40px; height: 40px; border-radius: 8px; }
.rail-button:hover, .icon-button:hover { background: rgba(255,255,255,.68); color: var(--ink); }
.rail-button.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.rail-button .rail-tooltip { position: absolute; z-index: 100; top: 50%; left: 48px; width: min(288px, calc(100vw - 80px)); padding: 10px 12px; visibility: hidden; border: 1px solid #272727; border-radius: 12px; background: #000; color: #fff; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); font-size: 12px; opacity: 0; pointer-events: none; text-align: left; transform: translate(-8px, -50%) scale(.95); transform-origin: left center; transition: opacity .15s cubic-bezier(.16,1,.3,1), transform .15s cubic-bezier(.16,1,.3,1), visibility 0s linear .15s; }
.rail-button .rail-tooltip strong, .rail-button .rail-tooltip small { display: block; }
.rail-button .rail-tooltip strong { font-size: 12px; font-weight: 700; line-height: 1.4; }
.rail-button .rail-tooltip small { margin-top: 6px; color: #d0d0d0; font-size: 12px; font-weight: 400; line-height: 1.55; white-space: normal; }
.rail-button:hover .rail-tooltip, .rail-button:focus-visible .rail-tooltip { visibility: visible; opacity: 1; transform: translate(0, -50%) scale(1); transition-delay: 0s; }
.rail-bottom { display: grid; gap: 10px; justify-items: center; }
.icon-button { width: 40px; height: 40px; border-radius: 9px; }
.avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: #252628; color: #fff; font-size: 13px; font-weight: 800; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid var(--surface); border-radius: 50%; background: var(--primary); }

.section-sidebar { position: sticky; top: 8px; display: flex; width: calc(var(--sidebar) - 8px); height: calc(100dvh - 16px); min-width: 0; margin-right: 8px; flex-direction: column; padding: 20px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sidebar-heading { padding: 0 8px; }
.sidebar-heading p, .sidebar-heading h1 { margin: 0; }
.product-name { display: none; }
.sidebar-heading h1 { margin-top: 0; font-size: 20px; letter-spacing: -.02em; }
.section-nav { display: flex; flex: 1; flex-direction: column; gap: 24px; margin-top: 24px; }
.section-nav-group { display: grid; gap: 6px; }
.section-group-label { margin: 0 12px; color: var(--muted); font-size: 12px; font-weight: 450; line-height: 1.35; }
.section-group-links { display: grid; gap: 2px; }
.section-link { display: flex; min-height: 30px; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #55585d; text-align: left; transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1); }
.section-link svg { width: 16px; height: 16px; }
.section-link:hover { background: var(--surface-soft); color: var(--ink); }
.section-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.section-nav-label { margin: 19px 11px 6px; color: var(--faint); font-size: 11px; font-weight: 700; }
.text-button { display: inline-flex; min-height: 32px; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 12px; font-weight: 700; }
.text-button svg { width: 14px; height: 14px; }

.workspace { min-width: 0; overflow: clip; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.topbar { position: sticky; z-index: var(--z-sticky); top: 0; display: flex; height: var(--topbar); align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(12px); }
.global-search { display: flex; width: min(520px, 48vw); height: 40px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; background: var(--surface-soft); color: var(--muted); }
.global-search:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }
.global-search svg { width: 18px; height: 18px; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.global-search input::placeholder { color: #6c7075; }
kbd { padding: 2px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.account-button { display: none; min-height: 44px; align-items: center; gap: 9px; padding: 4px 7px; border: 0; border-radius: 8px; background: transparent; text-align: left; transition: background-color .15s cubic-bezier(.4,0,.2,1); }
.account-button:hover { background: var(--surface-soft); }
.account-button span:nth-child(2) { display: grid; }
.account-button strong { font-size: 13px; }
.account-button small { color: var(--muted); font-size: 11px; }
.account-button > svg { width: 14px; height: 14px; transform: rotate(90deg); }
.mobile-menu, .topbar-bell { display: none; }
.account-menu { position: fixed; z-index: var(--z-dropdown); width: 288px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); transform-origin: bottom left; animation: popover-in .15s cubic-bezier(.16,1,.3,1); }
.account-menu-profile { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.account-menu-profile > span:last-child { display: grid; }
.account-menu-profile small, .account-menu button small { color: var(--muted); font-size: 11px; font-weight: 400; }
.account-menu-separator { height: 1px; margin: 2px 0 6px; background: var(--line); }
.account-menu button { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; transition: background-color .15s cubic-bezier(.4,0,.2,1); }
.account-menu button:hover, .account-menu button:focus-visible { background: var(--surface-soft); }
.account-menu button span { display: grid; gap: 2px; }
.account-menu button svg { width: 17px; height: 17px; }
.notification-center { width: min(380px, calc(100vw - 16px)); max-height: min(560px, calc(100dvh - 16px)); padding: 0; overflow: hidden; }
.notification-center-header { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); }
.notification-center-header h2, .notification-center-header p { margin: 0; }
.notification-center-header h2 { font-size: 17px; }
.notification-center-header p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.notification-center-list { max-height: 410px; overflow-y: auto; }
.notification-item { display: grid; width: 100%; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: start; gap: 10px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; transition: background-color .12s ease; }
.notification-item:hover, .notification-item:focus-visible { background: #fafafa; }
.notification-item > span:nth-child(2) { min-width: 0; }
.notification-item strong, .notification-item small, .notification-item time { display: block; }
.notification-item strong { font-size: 13px; }
.notification-item small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.notification-item time { margin-top: 4px; color: var(--faint); font-size: 10px; }
.notification-item > svg { width: 14px; height: 14px; margin-top: 10px; color: var(--faint); }
.notification-item-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.notification-item-icon svg { width: 17px; height: 17px; }
.notification-item.danger .notification-item-icon { background: var(--danger-soft); color: var(--danger); }
.notification-empty { display: grid; min-height: 180px; place-content: center; justify-items: center; padding: 24px; text-align: center; }
.notification-empty > svg { width: 32px; height: 32px; margin-bottom: 10px; color: var(--success); }
.notification-empty span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.notification-center-footer { display: flex; min-height: 48px; align-items: center; justify-content: flex-end; padding: 6px 14px; background: #fafafa; }

#main-content { width: min(100%, 1520px); margin: 0 auto; padding: 28px 28px 48px; }
#main-content:focus { outline: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-header h2, .page-header p { margin: 0; }
.page-header h2 { font-size: 25px; line-height: 1.18; letter-spacing: -.03em; text-wrap: balance; }
.page-header p { max-width: 70ch; margin-top: 6px; color: var(--muted); text-wrap: pretty; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border-radius: 8px; font-weight: 680; transition: background-color .15s cubic-bezier(.4,0,.2,1), color .15s cubic-bezier(.4,0,.2,1), border-color .15s cubic-bezier(.4,0,.2,1), transform .15s cubic-bezier(.4,0,.2,1), box-shadow .15s cubic-bezier(.4,0,.2,1); }
.button svg { width: 17px; height: 17px; }
.button:active { transform: translateY(1px); }
.button.primary { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.button.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button.secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.button[aria-busy="true"] { position: relative; color: transparent; }
.button[aria-busy="true"]::after { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; color: var(--surface); animation: login-spin .65s linear infinite; content: ""; }
.button.secondary[aria-busy="true"]::after { color: var(--ink); }
.button.secondary:hover { border-color: #b9b9bb; background: var(--surface-soft); }
.button.secondary.is-active { border-color: #f0c2b8; background: var(--primary-soft); color: var(--primary); }
.button.danger { border: 1px solid #e4b3b3; background: var(--danger-soft); color: var(--danger); }
.button.ghost { border: 0; background: transparent; color: var(--primary); }
.button.small { min-height: 34px; padding: 0 10px; font-size: 12px; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.field-inline, .select-wrap { position: relative; display: flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.field-inline svg { width: 17px; height: 17px; }
.field-inline input, .select-wrap select { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.field-inline .page-search { width: clamp(280px, 30vw, 460px); }
.select-wrap select { min-height: 38px; padding-right: 16px; }
.filter-spacer { flex: 1; }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat { min-width: 0; padding: 18px; border-right: 1px solid var(--line); transition: background-color .15s ease; }
.stat:last-child { border-right: 0; }
.stat.featured { background: var(--surface-soft); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.stat-label svg { width: 17px; height: 17px; }
.stat strong { display: block; margin-top: 8px; font-size: 24px; line-height: 1; letter-spacing: -.03em; }
.stat small { display: block; margin-top: 7px; color: var(--muted); }
.trend-up { color: var(--success) !important; }
.trend-down { color: var(--danger) !important; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 16px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-header h3, .panel-header p { margin: 0; }
.panel-header h3 { font-size: 15px; }
.panel-header p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.panel-body { padding: 16px; }
.chart { position: relative; display: flex; height: 240px; align-items: flex-end; gap: clamp(10px, 3vw, 32px); padding: 30px 20px 30px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 52px, #eceef0 52px 53px); }
.chart-column { position: relative; display: flex; min-width: 22px; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; }
.chart-column i { display: block; width: min(100%, 36px); min-height: 4px; border-radius: 5px 5px 2px 2px; background: #f7aa9a; transition: filter .15s ease, transform .15s ease; transform-origin: bottom; }
.chart-column:hover i { filter: saturate(1.12); transform: scaleX(1.08); }
.chart-column.active i { background: var(--primary); }
.chart-value { position: absolute; bottom: calc(100% + 7px); padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 4px 12px rgba(0,0,0,.07); font-size: 10px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .12s ease, transform .12s ease; }
.chart-column:hover .chart-value, .chart-column:focus-within .chart-value { opacity: 1; transform: translateY(0); }
.chart-column span { position: absolute; top: calc(100% + 8px); color: var(--muted); font-size: 11px; }
.chart-legend { display: flex; gap: 18px; padding: 12px 16px; color: var(--muted); font-size: 12px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--primary); }
.legend-dot.soft { background: #f6a391; }
.attention-list { display: grid; }
.attention-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 64px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.attention-item:last-child { border-bottom: 0; }
.attention-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--warning-soft); color: var(--warning); }
.attention-icon.danger { background: var(--danger-soft); color: var(--danger); }
.attention-item strong, .attention-item small { display: block; }
.attention-item small { color: var(--muted); }
.link-button { border: 0; background: transparent; color: var(--primary); font-weight: 700; }
.dashboard-table { grid-column: 1 / -1; }

.table-wrap { min-width: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fafafa; color: #696b70; font-size: 11px; font-weight: 720; text-align: left; white-space: nowrap; }
.data-table td { min-height: 56px; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfcfc; }
.cell-title { display: block; font-weight: 700; }
.cell-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.cell-title, .cell-subtitle { max-width: 42ch; overflow-wrap: anywhere; }
.status { display: inline-flex; min-height: 26px; align-items: center; gap: 6px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status.success { background: var(--success-soft); color: var(--success); }
.status.warning { background: var(--warning-soft); color: var(--warning); }
.status.danger { background: var(--danger-soft); color: var(--danger); }
.status.info { background: var(--info-soft); color: var(--info); }
.status.neutral { background: var(--surface-soft); color: var(--muted); }
.table-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.table-checkbox { width: 18px; height: 18px; accent-color: var(--primary); }
.empty-state { display: grid; min-height: 280px; place-content: center; justify-items: center; padding: 36px; text-align: center; }
.empty-state svg { width: 36px; height: 36px; color: var(--faint); }
.empty-state h3 { margin: 12px 0 4px; }
.empty-state p { max-width: 48ch; margin: 0 0 15px; color: var(--muted); }

.detail-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.4fr); align-items: start; gap: 16px; }
.customer-list { display: grid; max-height: calc(100dvh - 230px); align-content: start; overflow-y: auto; }
.customer-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 70px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1); }
.customer-row:last-child { border-bottom: 0; }
.customer-row:hover { background: #fafafa; }
.customer-row.active { background: var(--primary-soft); }
.customer-row > svg { color: var(--muted); transition: color .15s cubic-bezier(.4,0,.2,1); }
.customer-row.active > svg { color: var(--primary); }
.customer-monogram { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #e9eaec; color: #4d5055; font-weight: 800; }
.customer-row .customer-monogram { transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1); }
.customer-row.active .customer-monogram { background: var(--primary); color: #fff; }
.customer-detail-panel { contain: layout paint; }
.customer-row strong, .customer-row small { display: block; }
.customer-row small { color: var(--muted); }
.profile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px; border-bottom: 1px solid var(--line); }
.profile-identity { display: flex; align-items: center; gap: 13px; }
.profile-identity .customer-monogram { width: 48px; height: 48px; font-size: 17px; }
.profile-identity h3, .profile-identity p { margin: 0; }
.profile-identity p { margin-top: 3px; color: var(--muted); }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.profile-facts > div { padding: 15px 20px; border-right: 1px solid var(--line); }
.profile-facts > div:last-child { border-right: 0; }
.profile-facts span, .profile-facts strong { display: block; }
.profile-facts span { color: var(--muted); font-size: 11px; }
.profile-facts strong { margin-top: 3px; }
.subsection-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 8px; }
.subsection-title h4 { margin: 0; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); padding: 28px 20px 24px; }
.timeline-step { position: relative; text-align: center; }
.timeline-step::before { position: absolute; z-index: 0; top: 12px; right: 50%; left: -50%; height: 2px; background: #d9dbde; content: ""; }
.timeline-step:first-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; display: grid; width: 24px; height: 24px; margin: 0 auto 8px; place-items: center; border: 4px solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.timeline-step strong, .timeline-step small { display: block; }
.timeline-step small { margin-top: 3px; color: var(--muted); }

.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-list { display: grid; }
.payment-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.payment-detail-grid > div { display: grid; min-width: 0; gap: 5px; padding: 18px 20px; border-right: 1px solid var(--line); }
.payment-detail-grid > div:last-child { border-right: 0; }
.payment-detail-grid small { color: var(--muted); }
.payment-detail-grid strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.setting-row { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong, .setting-row small { display: block; }
.setting-row small { margin-top: 2px; color: var(--muted); }
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 100%; border-radius: 999px; background: #c7c9cd; transition: background .16s ease-out; }
.switch span::after { display: block; width: 18px; height: 18px; margin: 3px; border-radius: 50%; background: #fff; content: ""; transition: transform .16s ease-out; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

.usage-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .7fr); gap: 16px; }
.usage-bars { display: grid; gap: 12px; }
.usage-row { display: grid; grid-template-columns: 136px minmax(100px, 1fr) 80px; align-items: center; gap: 12px; }
.usage-row > span:first-child { display: grid; min-width: 0; gap: 1px; }
.usage-row > span:first-child strong, .usage-row > span:first-child small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-row > span:first-child small { text-align: left; }
.usage-track { height: 9px; overflow: hidden; border-radius: 999px; background: #eceef0; }
.usage-track span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.usage-row small { color: var(--muted); text-align: right; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 13px 15px; border: 1px solid #bcd5f4; border-radius: var(--radius); background: var(--info-soft); color: #244d7e; }

.coupon-code { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px dashed var(--primary); border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-marker { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--primary); }
.activity-row p { margin: 0; }
.activity-row small { color: var(--muted); }

.community-shell { width: min(100%, 1200px); margin: 0 auto; }
.community-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.community-filters { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-soft); }
.community-filter { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 680; }
.community-filter:hover { color: var(--ink); }
.community-filter.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.community-filter span { display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 999px; background: #e8e8e9; color: var(--muted); font-size: 10px; }
.community-filter.active span { background: var(--primary-soft); color: var(--primary); }
.community-search { display: flex; width: min(280px, 30vw); min-height: 38px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.community-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.community-search svg { width: 16px; height: 16px; }
.community-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.community-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 18px; }
.feed { display: grid; gap: 14px; }
.community-composer { display: flex; align-items: center; gap: 11px; padding: 12px; }
.community-composer > .customer-monogram { flex: 0 0 auto; border-radius: 50%; }
.composer-prompt { display: grid; min-width: 0; flex: 1; gap: 1px; padding: 8px 12px; border: 0; border-radius: 9px; background: var(--surface-soft); color: var(--ink); text-align: left; transition: background-color .15s ease; }
.composer-prompt:hover { background: #ececed; }
.composer-prompt strong, .composer-prompt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-prompt small { color: var(--muted); font-size: 11px; }
.post { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 9px; }
.post-head .customer-monogram { border-radius: 50%; }
.post-head > span:nth-child(2) { flex: 1; }
.post-head strong, .post-head small { display: block; }
.post-head small { color: var(--muted); }
.post-head small i { font-style: normal; }
.post-kind { color: var(--primary); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.post-content { padding: 3px 16px 15px; }
.post-content h3 { margin: 5px 0 4px; font-size: 18px; letter-spacing: -.015em; }
.post-content p { max-width: 70ch; margin: 0; color: #4f5257; }
.event-card { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 14px; margin: 2px 16px 16px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; }
.event-date { display: grid; width: 68px; height: 64px; place-content: center; border-radius: 9px; background: var(--primary); color: #fff; text-align: center; }
.event-date strong { font-size: 25px; line-height: 1; }
.event-date small { margin-top: 4px; font-size: 10px; font-weight: 800; }
.event-details { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.event-details > span { display: flex; align-items: center; gap: 7px; }
.event-details svg { width: 15px; height: 15px; color: var(--ink); }
.post-media { position: relative; display: grid; min-height: 220px; place-content: center; margin: 0 16px; overflow: hidden; border-radius: 11px; background: #1f2022; color: #fff; text-align: center; }
.post-media::before { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, rgba(255,86,48,.18), transparent 30%); content: ""; }
.media-play { position: relative; display: grid; width: 48px; height: 48px; margin: 0 auto 10px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; background: rgba(255,255,255,.08); color: var(--primary); }
.media-play svg { width: 25px; height: 25px; }
.post-media strong, .post-media small { position: relative; }
.score-share { display: grid; min-height: 116px; grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr); align-items: center; gap: 22px; margin: 0 16px; padding: 18px 24px; border: 1px solid var(--line); border-radius: 11px; background: #fafafa; text-align: center; }
.score-share > span { display: grid; gap: 3px; }
.score-share > span small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.score-share > span strong { font-size: 14px; }
.score-share > b { font-size: 30px; letter-spacing: -.04em; }
.score-share > b i { padding: 0 4px; color: var(--faint); font-style: normal; font-weight: 400; }
.post-actions { display: flex; border-top: 1px solid var(--line); }
.post-actions button { display: flex; min-height: 46px; flex: 1; align-items: center; justify-content: center; gap: 7px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); }
.post-actions button:last-child { border-right: 0; }
.post-actions button:hover, .post-actions button.active { background: var(--primary-soft); color: var(--primary); }
.post-actions button b { min-width: 18px; font-size: 11px; }
.community-sidebar { position: sticky; top: calc(var(--topbar) + 14px); display: grid; align-content: start; gap: 14px; }
.upcoming-event { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.upcoming-event:last-child { border-bottom: 0; }
.upcoming-event > span:last-child { min-width: 0; }
.upcoming-event > span:last-child strong, .upcoming-event > span:last-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-event > span:last-child small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.mini-event-date { display: grid; width: 44px; height: 44px; place-content: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); text-align: center; }
.mini-event-date strong { font-size: 17px; line-height: 1; }
.mini-event-date small { margin-top: 3px; font-size: 8px; font-weight: 800; }
.club-item { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line); }
.club-item:last-child { border-bottom: 0; }
.club-item > span:nth-child(2) { flex: 1; }
.club-item strong, .club-item small { display: block; }
.club-item small { color: var(--muted); }

.portal-overview { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(480px, 1.1fr); align-items: stretch; gap: 14px; margin-bottom: 14px; }
.portal-welcome { display: flex; min-height: 112px; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.portal-welcome-mark { display: grid; width: 50px; height: 50px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--primary); color: #fff; font-size: 19px; font-weight: 800; box-shadow: 0 6px 14px rgba(255,86,48,.2); }
.portal-welcome h2, .portal-welcome p { margin: 0; }
.portal-welcome h2 { margin-top: 3px; font-size: 23px; letter-spacing: -.025em; }
.portal-welcome p { margin-top: 4px; color: var(--muted); }
.portal-eyebrow { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.portal-stat-card { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.portal-stat-card .portal-stat-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #f0f1f2; color: #5d6065; }
.portal-stat-card.success .portal-stat-icon { background: var(--success-soft); color: var(--success); }
.portal-stat-card.attention .portal-stat-icon { background: var(--warning-soft); color: #9a6200; }
.portal-stat-icon svg { width: 18px; height: 18px; }
.portal-stat-card > span:last-child { display: flex; min-width: 0; flex-direction: column-reverse; }
.portal-stat-card strong { font-size: 25px; line-height: 1.05; letter-spacing: -.03em; }
.portal-stat-card small { margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.portal-renew-notice { display: grid; min-height: 70px; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid #f3c1b7; border-radius: var(--radius); background: color-mix(in srgb, var(--primary-soft) 72%, var(--surface)); }
.portal-renew-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.portal-renew-icon svg { width: 18px; height: 18px; }
.portal-renew-notice h3, .portal-renew-notice p { margin: 0; }
.portal-renew-notice h3 { font-size: 14px; }
.portal-renew-notice p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.portal-renew-notice p strong { color: var(--ink); }
.portal-home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); align-items: start; gap: 14px; margin-top: 14px; }
.portal-license-list { display: grid; }
.portal-license-row { display: grid; min-height: 76px; grid-template-columns: 34px minmax(180px, 1fr) 118px 104px 140px; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.portal-license-row:last-child { border-bottom: 0; }
.portal-license-row:hover { background: var(--surface-soft); }
.portal-device-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--surface-soft); color: var(--muted); }
.portal-device-mark svg { width: 17px; height: 17px; }
.portal-license-identity, .portal-license-expiry { display: grid; min-width: 0; gap: 2px; }
.portal-license-identity strong, .portal-license-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-license-identity small, .portal-license-expiry small { color: var(--muted); font-size: 11px; }
.portal-license-expiry strong { font-size: 13px; }
.portal-license-row > .status { justify-self: start; }
.portal-license-actions { display: grid; width: 140px; grid-template-columns: 66px 68px; gap: 6px; justify-content: end; }
.portal-license-actions .button { width: 100%; padding-right: 8px; padding-left: 8px; }
.portal-activity-panel { overflow: hidden; }
.portal-activity-row { grid-template-columns: 32px minmax(0, 1fr); align-items: center; padding: 13px 14px; }
.portal-activity-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.portal-activity-icon svg { width: 15px; height: 15px; }
.portal-activity-row p { font-weight: 650; }
.portal-activity-empty { min-height: 190px; }
.renew-steps { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.renew-step { display: flex; min-height: 54px; align-items: center; gap: 9px; padding: 10px 13px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.renew-step:last-child { border-right: 0; }
.renew-step b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--surface-soft); }
.renew-step.active { color: var(--primary); font-weight: 700; }
.renew-step.active b { background: var(--primary); color: #fff; }
.pricing-term { display: inline-flex; min-width: 76px; min-height: 30px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-weight: 750; }
.modal-copy { margin: 0; color: var(--muted); font-size: 12px; }
.integration-section { margin-bottom: 16px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.integration-card { display: grid; min-width: 0; align-content: start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.integration-card-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.integration-card-head > span:nth-child(2), .connected-account > span:last-child { min-width: 0; }
.integration-card-head strong, .integration-card-head small, .connected-account strong, .connected-account small { display: block; }
.integration-card-head small, .connected-account small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.integration-logo { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; color: #fff; font-weight: 850; }
.resend-logo { background: #111; }
.zalo-logo { background: #0868ff; }
.integration-card-body { min-height: 100px; padding: 16px; }
.integration-card-body > p { margin: 0; color: var(--muted); line-height: 1.55; }
.integration-card-actions { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; }
.connected-account { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.connected-account img, .connected-account-avatar, .connected-account-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--surface); object-fit: cover; }
.connected-account-icon svg { width: 17px; height: 17px; color: var(--primary); }
.connected-account-avatar { background: #0868ff; color: #fff; font-weight: 800; }
.integration-warning { display: block; margin-top: 10px; color: #9a6700; line-height: 1.45; }
.danger-text { color: var(--danger); }
.qr-connect-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: center; }
.qr-frame { display: grid; width: 220px; height: 220px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.qr-placeholder { display: grid; justify-items: center; gap: 10px; color: var(--muted); text-align: center; }
.qr-placeholder svg { width: 30px; height: 30px; }
.connection-steps { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: connect-step; }
.connection-steps li { display: grid; grid-template-columns: 24px 1fr; align-items: start; gap: 9px; color: var(--muted); line-height: 1.45; counter-increment: connect-step; }
.connection-steps li::before { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--surface-soft); color: var(--ink); font-size: 11px; font-weight: 750; content: counter(connect-step); }
.notification-rules { gap: 16px; }
.notification-history, .notification-templates { margin-top: 16px; }
.notification-templates .panel-header { border-bottom: 0; }
.compact-timeline { padding: 26px 16px 22px; }

.drawer { position: fixed; z-index: var(--z-drawer); top: 8px; right: 8px; display: flex; width: min(480px, calc(100vw - 16px)); height: calc(100dvh - 16px); flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 24px 56px rgba(0,0,0,.18); transform: translateX(calc(100% + 16px)); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.drawer-header p, .drawer-header h2 { margin: 0; }
.drawer-header p { color: var(--primary); font-size: 11px; font-weight: 750; }
.drawer-header h2 { margin-top: 2px; font-size: 19px; }
.drawer-body { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow-y: auto; padding: 16px; }
.drawer-backdrop, .mobile-backdrop { position: fixed; z-index: var(--z-backdrop); inset: 0; background: rgba(20,21,23,.36); }
.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-field { display: grid; grid-auto-rows: max-content; align-content: start; gap: 6px; }
.form-field label, .form-field legend { color: #4e5156; font-size: 12px; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; background: var(--surface); transition: border-color .15s cubic-bezier(.4,0,.2,1), box-shadow .15s cubic-bezier(.4,0,.2,1); }
.number-field { position: relative; }
.number-field input { padding-right: 34px; font-variant-numeric: tabular-nums; }
.number-field span { position: absolute; top: 50%; right: 12px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.form-field textarea { min-height: 90px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-field small { color: var(--muted); }
.native-control { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0 !important; pointer-events: none !important; }
.selection-control, .date-control { position: relative; display: inline-flex; min-width: 0; }
.form-field > .selection-control, .form-field > .date-control { width: 100%; }
.selection-trigger, .date-trigger { display: flex; width: 100%; height: 40px; min-height: 40px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); text-align: left; transition: border-color .15s cubic-bezier(.4,0,.2,1), box-shadow .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1); }
.selection-trigger:hover, .date-trigger:hover { border-color: #b8b8b8; background: #fafafa; }
.selection-trigger[aria-expanded="true"], .date-trigger[aria-expanded="true"] { border-color: #f0c2b8; background: var(--primary-soft); box-shadow: none; }
.selection-trigger > span, .date-trigger > span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-trigger svg, .date-trigger svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.selection-trigger > svg:last-child, .date-trigger > svg:last-child { display: none; }
.selection-trigger::after, .date-trigger::after { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; color: var(--muted); content: ""; transform: translateY(-2px) rotate(45deg); transition: transform .15s cubic-bezier(.4,0,.2,1); }
.selection-trigger[aria-expanded="true"]::after, .date-trigger[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.select-wrap .selection-control { min-width: 110px; flex: 1; }
.select-wrap .selection-trigger { min-height: 38px; padding-right: 9px; padding-left: 4px; border: 0; background: transparent; box-shadow: none; }
.component-popover { position: fixed; inset: auto; z-index: 100; max-height: min(420px, calc(100dvh - 16px)); margin: 0; overflow: auto; border: 1px solid #dedede; border-radius: 11px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 24px rgba(0,0,0,.13), 0 2px 6px rgba(0,0,0,.06); transform-origin: top; }
.component-popover:popover-open { animation: popover-in .15s cubic-bezier(.16,1,.3,1); }
.component-popover::backdrop { background: transparent; }
.context-menu { width: 250px; padding: 4px; }
.context-menu button { display: grid; width: 100%; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 9px; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.context-menu button:hover, .context-menu button:focus-visible { background: var(--surface-soft); }
.context-menu button > svg { width: 17px; height: 17px; margin-top: 2px; color: var(--muted); }
.context-menu button strong, .context-menu button small { display: block; }
.context-menu button small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.context-menu button.danger strong, .context-menu button.danger > svg { color: var(--danger); }
.selection-popover { padding: 4px; }
.selection-option { display: flex; width: 100%; min-height: 32px; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; transition: background-color .12s cubic-bezier(.4,0,.2,1), color .12s cubic-bezier(.4,0,.2,1); }
.selection-option:hover, .selection-option:focus-visible { background: var(--surface-soft); }
.selection-option.selected { background: #f7f7f7; color: var(--ink); font-weight: 650; }
.selection-option svg { width: 16px; height: 16px; color: var(--ink); }
.is-hidden { visibility: hidden; }
.date-popover { width: 320px; padding: 12px; overflow: visible; }
.date-popover-header { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; margin-bottom: 8px; text-align: center; }
.date-popover-header button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.date-popover-header button:hover { background: var(--surface-soft); color: var(--ink); }
.date-popover-header button:first-child svg { transform: rotate(180deg); }
.date-popover-header svg { width: 16px; height: 16px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-weekday { display: grid; height: 28px; place-items: center; color: var(--muted); font-size: 11px; font-weight: 650; }
.calendar-day { display: grid; aspect-ratio: 1; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 12px; transition: background-color .12s ease, color .12s ease; }
.calendar-day:hover, .calendar-day:focus-visible { background: var(--surface-soft); }
.calendar-day.outside { color: #b3b3b3; }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); }
.calendar-day.selected { background: var(--primary); color: #fff; box-shadow: none; font-weight: 700; }
.date-popover-footer { display: flex; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.checkbox-list { display: grid; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; }
.checkbox-row { display: flex; min-height: 52px; align-items: center; gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.checkbox-row:last-child { border-bottom: 0; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.checkbox-row span { flex: 1; }
.checkbox-row strong, .checkbox-row small { display: block; }
.checkbox-row small { color: var(--muted); }
.order-summary { display: grid; gap: 8px; padding: 14px; border-radius: 10px; background: var(--surface-soft); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; }
.summary-row.total { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line-strong); font-size: 16px; font-weight: 800; }
.device-detail-intro { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.device-detail-intro > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.device-detail-intro small, .device-detail-grid small { color: var(--muted); }
.device-detail-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 11px; background: var(--surface); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.device-detail-icon svg { width: 20px; height: 20px; }
.device-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.device-detail-grid > div { display: grid; min-width: 0; gap: 5px; padding: 14px; }
.device-detail-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.device-detail-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.device-detail-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.renewal-form { gap: 16px; }
.renewal-selection { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.renewal-selection-head { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.renewal-selection-head > span:nth-child(2) { min-width: 0; }
.renewal-selection-head strong, .renewal-selection-head small { display: block; }
.renewal-selection-head small { margin-top: 2px; color: var(--muted); }
.renewal-selection-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.renewal-selection-icon svg, .renewal-device-icon svg, .renewal-rate svg { width: 17px; height: 17px; }
.renewal-license-list { display: grid; }
.renewal-license-row { display: grid; min-height: 58px; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.renewal-license-row:last-child { border-bottom: 0; }
.renewal-device-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--surface-soft); color: var(--muted); }
.renewal-license-name strong, .renewal-license-name small, .renewal-expiry strong, .renewal-expiry small { display: block; }
.renewal-license-name small, .renewal-expiry small { color: var(--muted); font-size: 11px; }
.renewal-expiry { text-align: right; }
.renewal-expiry strong { margin-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.renewal-config { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.renewal-rate { display: grid; min-height: 40px; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.renewal-rate > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: var(--surface); color: var(--primary); }
.renewal-rate strong { font-variant-numeric: tabular-nums; }
.renewal-rate small { color: var(--muted); }
.renewal-payment-method { display: flex; min-height: 40px; align-items: center; gap: 9px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.renewal-payment-method > svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--primary); }
.renewal-payment-method strong, .renewal-payment-method small { display: block; }
.renewal-payment-method strong { font-size: 12px; }
.renewal-payment-method small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.renewal-summary { padding: 16px; border: 1px solid var(--line); background: var(--surface-soft); }
.renewal-summary .summary-row.total { font-size: 17px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.drawer-body > .form-grid { min-height: 100%; }
.drawer-body > .form-grid > .form-actions:last-child { position: sticky; bottom: -16px; margin-top: auto; padding: 14px 0 16px; border-top: 1px solid var(--line); background: var(--surface); }
.drawer-note { margin: 0; padding: 12px 14px; border-radius: 9px; background: var(--info-soft); color: #244d7e; }
.guideline-list { display: grid; gap: 4px; }
.guideline-list > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.guideline-list > div:last-child { border-bottom: 0; }
.guideline-list > div > svg { width: 18px; height: 18px; margin-top: 2px; color: var(--success); }
.guideline-list strong, .guideline-list small { display: block; }
.guideline-list small { margin-top: 3px; color: var(--muted); }

.confirm-dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 24px 48px rgba(0,0,0,.18); }
.confirm-dialog[open] { animation: dialog-in .15s cubic-bezier(.16,1,.3,1); }
.confirm-dialog::backdrop { background: rgba(20,21,23,.45); }
.confirm-dialog form { padding: 24px; text-align: center; }
.confirm-icon { display: grid; width: 46px; height: 46px; margin: 0 auto 13px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.confirm-dialog h2 { margin: 0; font-size: 19px; }
.confirm-dialog p { margin: 8px 0 20px; color: var(--muted); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-dialog { width: min(620px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); padding: 0; overflow: hidden; border: 1px solid #d9d9da; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 70px rgba(20,21,23,.22); }
.form-dialog[data-size="wide"] { width: min(760px, calc(100vw - 32px)); }
.form-dialog[open] { display: flex; flex-direction: column; animation: dialog-in .15s cubic-bezier(.16,1,.3,1); }
.form-dialog::backdrop { background: rgba(20,21,23,.42); backdrop-filter: blur(3px); }
.modal-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, var(--surface-raised)); }
.modal-header p, .modal-header h2 { margin: 0; }
.modal-header p { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.modal-header h2 { margin-top: 3px; font-size: 20px; letter-spacing: -.015em; }
.modal-body { overflow-y: auto; padding: 20px; }
.form-dialog .form-actions { position: sticky; z-index: 2; bottom: -20px; margin: 4px -20px -20px; padding: 14px 20px 20px; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -6px 14px rgba(20,21,23,.04); }
.toast-region { position: fixed; z-index: var(--z-toast); inset: auto 18px 18px auto; display: grid; width: min(380px, calc(100vw - 36px)); margin: 0; padding: 0; overflow: visible; border: 0; background: transparent; gap: 8px; }
.toast { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 10px; background: #252628; color: #fff; box-shadow: 0 6px 8px rgba(0,0,0,.15); animation: toast-in .2s ease-out; }
.toast > svg { color: #79d49f; }
.toast.error { background: color-mix(in srgb, var(--danger) 72%, var(--ink)); }
.toast.error > svg { color: #ffd4d4; }
.toast button { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #fff; }
.toast button:hover { background: rgba(255,255,255,.12); }
.toast button svg { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes popover-in { from { opacity: 0; transform: translateY(-8px) scale(.95); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.95); } }

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

@media (max-width: 1120px) {
  :root { --sidebar: 210px; }
  #main-content { padding-right: 20px; padding-left: 20px; }
  .dashboard-grid, .usage-layout { grid-template-columns: 1fr; }
  .portal-home-grid { grid-template-columns: 1fr; }
  .portal-license-row { grid-template-columns: 34px minmax(160px, 1fr) 104px 140px; }
  .portal-license-expiry { display: none; }
  .dashboard-table { grid-column: auto; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .community-layout { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 820px) {
  :root { --topbar: 58px; }
  .app-shell { display: block; padding: 0 0 62px; }
  .product-rail { position: fixed; top: auto; right: 0; bottom: 0; left: 0; display: flex; width: auto; height: 62px; margin: 0; flex-direction: row; justify-content: space-around; padding: 6px 10px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-right: 0; background: var(--surface); }
  .brand-mark, .rail-bottom { display: none; }
  .product-nav { display: flex; flex: 1; flex-direction: row; justify-content: space-around; gap: 2px; margin: 0; }
  .rail-button { width: 44px; height: 46px; }
  .rail-button .rail-tooltip { display: none; }
  .section-sidebar { position: fixed; z-index: var(--z-drawer); top: 0; bottom: 0; left: 0; width: min(300px, 84vw); height: auto; margin: 0; transform: translateX(-102%); transition: transform .2s cubic-bezier(.22,1,.36,1); }
  .app-shell.mobile-open .section-sidebar { transform: translateX(0); }
  .mobile-menu, .topbar-bell { display: grid; }
  .account-button { display: flex; }
  .global-search { width: auto; flex: 1; }
  .global-search kbd, .account-button > span:nth-child(2), .account-button > svg { display: none; }
  .topbar { padding: 0 12px; }
  .topbar .icon-button, .topbar .account-button { min-width: 44px; height: 44px; }
  .workspace { min-height: calc(100dvh - 62px); border: 0; border-radius: 0; }
  .account-menu { width: min(288px, calc(100vw - 16px)); }
  .topbar-actions { gap: 2px; }
  .toast-region { inset: auto 12px 78px auto; width: min(380px, calc(100vw - 24px)); }
  #main-content { padding: 20px 16px 36px; }
  .page-header { align-items: stretch; flex-direction: column; gap: 14px; }
  .header-actions { justify-content: flex-start; }
  .detail-layout, .split-grid, .community-layout, .portal-home-grid { grid-template-columns: 1fr; }
  .integration-grid, .qr-connect-layout { grid-template-columns: 1fr; }
  .qr-frame { width: min(220px, 100%); }
  .customer-list { max-height: 320px; }
  .community-toolbar { align-items: stretch; flex-direction: column; }
  .community-search { width: 100%; }
  .community-sidebar { grid-template-columns: repeat(2, 1fr); }
  .community-sidebar { position: static; }
  .portal-overview { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-screen { align-items: start; padding: max(24px, env(safe-area-inset-top)) 12px 24px; }
  .login-shell { border-radius: 14px; box-shadow: 0 8px 24px rgba(20,21,23,.06); }
  .login-form-panel { padding: 28px 24px; }
  .login-form-heading { margin-top: 32px; }
  .login-form-heading h1 { font-size: 24px; }
  .global-search { display: none; }
  .filter-bar > .field-inline:has(.page-search) { width: 100%; }
  .field-inline .page-search { width: 100%; }
  .topbar { justify-content: space-between; }
  .page-header h2 { font-size: 21px; }
  .button { min-height: 44px; }
  .renewal-config, .renewal-payment-fields { grid-template-columns: 1fr; }
  .renewal-license-row { grid-template-columns: 30px minmax(0, 1fr); }
  .renewal-expiry { grid-column: 2; text-align: left; }
  .renewal-expiry small, .renewal-expiry strong { display: inline; }
  .renewal-expiry small::after { content: " · "; }
  .header-actions .button { flex: 1; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px; }
  .stat strong { font-size: 20px; }
  .chart { height: 210px; gap: 8px; }
  .table-wrap { overflow: visible; }
  .responsive-table thead { display: none; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td { display: grid; grid-template-columns: 105px minmax(0, 1fr); min-height: 0; padding: 5px 0; border: 0; }
  .responsive-table td::before { color: var(--muted); font-size: 11px; font-weight: 700; content: attr(data-label); }
  .responsive-table td[data-label=""]::before { display: none; }
  .responsive-table td[data-label=""] { display: block; }
  .responsive-table .table-actions { margin-top: 5px; }
  .profile-head { align-items: stretch; flex-direction: column; }
  .profile-facts { grid-template-columns: 1fr; }
  .profile-facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .profile-facts > div:last-child { border-bottom: 0; }
  .payment-detail-grid { grid-template-columns: 1fr; }
  .payment-detail-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .payment-detail-grid > div:last-child { border-bottom: 0; }
  .device-detail-grid { grid-template-columns: 1fr; }
  .device-detail-grid > div:nth-child(odd) { border-right: 0; }
  .device-detail-grid > div + div { border-top: 1px solid var(--line); }
  .timeline { grid-template-columns: 1fr; gap: 14px; padding-left: 36px; }
  .timeline-step { display: grid; grid-template-columns: 28px 1fr; text-align: left; }
  .timeline-step::before { top: -18px; bottom: auto; left: 11px; width: 2px; height: 28px; }
  .timeline-dot { margin: 0; }
  .usage-row { grid-template-columns: 88px minmax(80px, 1fr) 58px; }
  .community-sidebar { grid-template-columns: 1fr; }
  .community-filters { overflow-x: auto; }
  .community-filter { flex: 0 0 auto; }
  .community-composer { align-items: stretch; flex-wrap: wrap; }
  .community-composer .composer-prompt { width: calc(100% - 50px); }
  .community-composer > .button { width: 100%; }
  .score-share { grid-template-columns: 1fr; gap: 10px; }
  .score-share > b { grid-row: 2; }
  .portal-stat-grid { grid-template-columns: 1fr; }
  .portal-stat-card { min-height: 72px; }
  .portal-renew-notice { grid-template-columns: auto minmax(0, 1fr); }
  .portal-renew-notice .button { grid-column: 1 / -1; }
  .portal-license-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .portal-license-expiry { display: none; }
  .portal-license-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .renew-steps { display: flex; overflow-x: auto; }
  .renew-step { min-width: 135px; }
  .form-row { grid-template-columns: 1fr; }
  .drawer { inset: 0; width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .form-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .date-popover { width: min(320px, calc(100vw - 16px)); }
}

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