:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --panel-3: #eef2f6;
  --line: #e8ecf2;
  --line-strong: #d8dee8;
  --text: #202939;
  --muted: #6b7280;
  --primary: #3178f6;
  --primary-dark: #2463d4;
  --blue: #3b82f6;
  --orange: #d97706;
  --danger: #dc2626;
  --sidebar: #ffffff;
  --shadow: 0 14px 36px rgba(25, 38, 64, .10);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 90% 0, #edf4ff 0, transparent 28%), var(--bg); color: var(--text); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 540px) 1fr; background: #f8fafc; }
.login-panel { padding: 50px 64px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); background: #f8fafc; position: relative; z-index: 2; }
.login-aside { position: relative; overflow: hidden; display: flex; align-items: center; padding: clamp(56px, 8vw, 130px); background: radial-gradient(circle at 78% 18%, rgba(37, 99, 235, .08), transparent 32%), linear-gradient(145deg, #f8fbff, #eef4ff); }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-login { position: absolute; top: 38px; left: 64px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--primary); font-weight: 900; font-size: 21px; box-shadow: 0 8px 22px rgba(37, 99, 235, .18); }
.brand h1, .brand strong { margin: 0; font-size: 17px; letter-spacing: .02em; }
.brand p, .brand span { color: var(--muted); margin: 3px 0 0; font-size: 10px; letter-spacing: .16em; display: block; }
.login-copy { max-width: 420px; margin-bottom: 24px; }
.login-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--primary); font-size: 12px; font-weight: 800; }
.login-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px rgba(37, 99, 235, .09); }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; color: var(--primary); letter-spacing: .12em; font-weight: 700; font-size: 11px; }
.login-copy h2 { font-size: 34px; line-height: 1.2; margin: 0 0 11px; max-width: 390px; letter-spacing: -.03em; }
.login-copy p { color: var(--muted); line-height: 1.7; font-size: 14px; margin: 0; }
.stack-form { display: grid; gap: 18px; }
.login-form-card { width: 100%; max-width: 430px; padding: 24px; gap: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 34px rgba(15, 23, 42, .055); }
.form-heading { display: grid; gap: 5px; margin-bottom: 3px; }
.form-heading strong { font-size: 16px; }
.form-heading span { color: var(--muted); font-size: 12px; }
.stack-form label, .field { display: grid; gap: 8px; color: #344054; font-size: 13px; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); background: #fff; color: var(--text); border-radius: 7px; padding: 9px 11px; outline: none; font-size: 12px; transition: .2s border, .2s box-shadow, .2s background; }
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
input:disabled, select:disabled, textarea:disabled { color: #667085; background: #eef2f6; border-color: #d8dee8; cursor: not-allowed; box-shadow: none; }
textarea { min-height: 84px; resize: vertical; }
.btn { border: 1px solid transparent; border-radius: 7px; padding: 8px 13px; font-size: 12px; font-weight: 650; color: #344054; background: var(--panel-3); box-shadow: 0 1px 2px rgba(15, 23, 42, .03); transition: transform .15s, background .15s, border .15s, box-shadow .15s; }
.btn:hover { background: #e4e9ef; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #3b82f6, var(--primary-dark)); box-shadow: 0 4px 11px rgba(49, 120, 246, .18); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { color: var(--danger); background: #fff5f5; border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-ghost { border-color: var(--line-strong); background: #fff; }
.btn-ghost:hover { background: #f8fafc; }
.btn-small { padding: 6px 10px; font-size: 11px; }
.btn-block { width: 100%; padding: 11px; }
.form-status { min-height: 18px; margin: -4px 0 -4px; color: var(--danger); font-size: 12px; }
.login-trust { display: flex; justify-content: center; gap: 18px; padding-top: 13px; border-top: 1px solid var(--line); color: #98a2b3; font-size: 10px; }
.login-trust span::before { content: "✓"; margin-right: 4px; color: #22c55e; font-weight: 800; }
.login-switch { width: 100%; max-width: 430px; display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.portal-link { color: var(--primary); font-size: 11px; font-weight: 700; text-decoration: none; }
.portal-link:hover { text-decoration: underline; }
.login-showcase { width: min(760px, 100%); position: relative; z-index: 2; }
.showcase-kicker { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.login-showcase > h2 { margin: 18px 0 16px; color: #172033; font-size: clamp(34px, 3.2vw, 50px); line-height: 1.2; letter-spacing: -.04em; }
.login-showcase > p { max-width: 580px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.login-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 14px; margin-top: 38px; }
.login-feature { min-width: 0; padding: 20px; border: 1px solid rgba(213, 219, 227, .9); background: rgba(255, 255, 255, .88); border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .035); position: relative; z-index: 2; }
.feature-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 9px; color: var(--primary); background: #eff6ff; font-size: 13px; font-weight: 900; }
.login-feature strong { font-size: 16px; }
.login-feature p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.showcase-foot { display: flex; align-items: center; gap: 11px; margin-top: 28px; color: #667085; font-size: 12px; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-one { width: 360px; height: 360px; background: rgba(37, 99, 235, .06); right: -100px; top: -80px; }
.orb-two { width: 260px; height: 260px; background: rgba(148, 163, 184, .08); left: 10%; bottom: -80px; }

.simple-login-view { grid-template-columns: 1fr; place-items: center; padding: 24px; background: radial-gradient(circle at 50% -10%, #e9f3ff 0, #f7f9fc 40%, #f3f5f8 100%); }
.simple-login-card { width: min(356px, 100%); padding: 32px 29px 26px; border: 1px solid rgba(216, 222, 232, .88); border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 18px 50px rgba(25, 38, 64, .10); backdrop-filter: blur(12px); }
.simple-login-title { margin: 0 0 27px; color: var(--primary); text-align: center; font-size: 23px; font-weight: 750; letter-spacing: .03em; }
.simple-login-form { display: grid; gap: 12px; }
.simple-field { height: 43px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #dde2ea; border-radius: 7px; background: #fbfcfe; transition: border-color .2s, box-shadow .2s, background .2s; }
.simple-field:focus-within { border-color: #249bf0; box-shadow: 0 0 0 3px rgba(36, 155, 240, .10); }
.simple-field-icon { width: 19px; height: 19px; flex: 0 0 19px; color: #c4c8ce; }
.simple-field-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.simple-field input { min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 12px; }
.simple-field input:focus { border: 0; box-shadow: none; }
.simple-field input::placeholder { color: #909399; }
.simple-remember { display: flex; align-items: center; gap: 7px; width: fit-content; color: #667085; font-size: 12px; cursor: pointer; }
.simple-remember input { width: 15px; height: 15px; margin: 0; accent-color: #249bf0; }
.simple-login-button { height: 42px; border-radius: 7px; background: linear-gradient(135deg, #4090f7, #2463d4); font-size: 12px; font-weight: 700; }
.simple-login-button:hover { background: #168ddd; }
.simple-login-form .form-status { min-height: 18px; margin: -6px 0 0; text-align: center; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 218px 1fr; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 218px; padding: 20px 13px 15px; display: flex; flex-direction: column; background: rgba(255, 255, 255, .96); border-right: 1px solid var(--line); box-shadow: 5px 0 24px rgba(25, 38, 64, .035); backdrop-filter: blur(18px); z-index: 10; }
.sidebar .brand { padding: 0 8px 17px; border-bottom: 1px solid var(--line); }
.sidebar .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.sidebar .brand strong { font-size: 14px; }
.main-nav { flex: 1; min-height: 0; margin-top: 9px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.nav-section { color: #a0a8b5; font-size: 9px; font-weight: 800; letter-spacing: .14em; margin: 15px 10px 6px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 10px; margin: 2px 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #667085; text-align: left; font-size: 11.5px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.nav-item span { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 17px; color: #98a2b3; text-align: center; font-size: 13px; }
.nav-item span svg, .account-action span svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.account-action span { display: grid; place-items: center; }
.nav-item:hover { color: var(--text); background: #f5f7fa; }
.nav-item.active { color: var(--primary-dark); border-color: #dbeafe; background: linear-gradient(90deg, #edf5ff, #f7faff); box-shadow: inset 2px 0 var(--primary), 0 3px 10px rgba(49, 120, 246, .055); }
.nav-item.active span { color: var(--primary); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 5px rgba(34, 197, 94, .10); }
.sidebar-account { position: relative; flex: 0 0 auto; margin-top: 11px; padding-top: 12px; border-top: 1px solid var(--line); }
.account-trigger { position: relative; width: 100%; min-height: 49px; display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid transparent; border-radius: 9px; color: var(--text); background: transparent; text-align: left; transition: background .16s, border-color .16s, box-shadow .16s; }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { border-color: #dbe5f3; background: #f7faff; box-shadow: 0 4px 14px rgba(25, 38, 64, .045); }
.account-trigger .avatar { flex: 0 0 31px; }
.account-meta { min-width: 0; flex: 1; }
.account-meta strong, .account-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta strong { font-size: 11px; font-weight: 700; }
.account-meta span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.account-chevron { width: 16px; color: #98a2b3; text-align: center; font-size: 11px; transition: transform .16s; }
.account-trigger[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-status-dot { position: absolute; left: 33px; bottom: 8px; width: 6px; height: 6px; border: 2px solid #fff; box-shadow: none; }
.account-popover { position: absolute; left: 0; right: 0; bottom: calc(100% - 4px); z-index: 30; display: grid; gap: 3px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(255, 255, 255, .98); box-shadow: 0 14px 34px rgba(25, 38, 64, .14); backdrop-filter: blur(16px); transform-origin: bottom center; animation: account-pop .14s ease-out; }
.account-action { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 9px; border: 0; border-radius: 6px; color: #475467; background: transparent; text-align: left; font-size: 11px; }
.account-action span { width: 16px; color: #8b95a5; text-align: center; font-size: 13px; }
.account-action:hover { color: var(--primary-dark); background: #eff6ff; }
.account-action.danger { color: #b42318; }
.account-action.danger:hover { color: #b42318; background: #fff1f0; }
@keyframes account-pop { from { opacity: 0; transform: translateY(5px) scale(.98); } }

.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .90); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 8; }
.topbar h1 { font-size: 16px; margin: 0; letter-spacing: -.01em; }
.topbar .eyebrow { margin-bottom: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: #667085; border-radius: 7px; font-size: 15px; box-shadow: 0 1px 2px rgba(15, 23, 42, .03); }
.icon-btn:hover { background: #f8fafc; }
.refresh-btn { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; border: 1px solid #dfe5ed; border-radius: 8px; color: #667085; background: linear-gradient(180deg, #fff, #f8fafc); box-shadow: 0 1px 2px rgba(15, 23, 42, .025); font-size: 10px; font-weight: 650; transition: color .16s, border-color .16s, background .16s, box-shadow .16s, transform .16s; }
.refresh-btn:hover { color: var(--primary-dark); border-color: #cdddf4; background: #f4f8ff; box-shadow: 0 4px 12px rgba(49, 120, 246, .08); }
.refresh-btn:active { transform: translateY(1px); }
.refresh-icon { display: inline-grid; place-items: center; width: 15px; height: 15px; color: var(--primary); font-size: 14px; line-height: 1; transition: transform .35s ease; }
.refresh-btn:hover .refresh-icon { transform: rotate(135deg); }
.refresh-label { line-height: 1; }
.user-menu { display: flex; align-items: center; gap: 9px; margin-left: 7px; padding: 0 7px; }
.user-menu strong, .user-menu span { display: block; }
.user-menu strong { font-size: 12px; }
.user-menu span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #bfdbfe; color: var(--primary); border-radius: 8px; background: #eff6ff; font-size: 11px; font-weight: 800; }
.warning-banner { margin: 15px 24px 0; padding: 10px 13px; border-radius: 8px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; font-size: 11px; }
.warning-banner button { border: 0; background: transparent; color: var(--orange); font-weight: 800; margin-left: 10px; }
.content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 21px 24px 42px; }

.page-head { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 72px; margin-bottom: 13px; padding: 13px 15px 13px 18px; gap: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(110deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .96)); box-shadow: 0 4px 16px rgba(25, 38, 64, .032); }
.page-head::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #5b9cff, var(--primary-dark)); }
.page-head::after { content: ""; position: absolute; width: 120px; height: 120px; right: -52px; top: -75px; border-radius: 50%; background: rgba(49, 120, 246, .045); pointer-events: none; }
.page-head > * { position: relative; z-index: 1; }
.page-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.page-context-chip { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 5px 9px; border: 1px solid #dbeafe; border-radius: 999px; color: var(--primary-dark); background: #f0f6ff; font-size: 9px; font-weight: 750; }
.page-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 138px; margin-bottom: 14px; padding: 21px 23px; border: 1px solid #dce7f8; border-radius: 11px; background: linear-gradient(135deg, rgba(255,255,255,.98), #f0f6ff); box-shadow: 0 8px 24px rgba(49, 120, 246, .05); }
.hero-copy { min-width: 0; }
.hero-kicker { display: block; margin-bottom: 9px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.hero-panel h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.hero-panel p { max-width: 640px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.hero-actions { display: flex; gap: 9px; flex-shrink: 0; }
.status-pills { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: #667085; background: rgba(255, 255, 255, .80); font-size: 9px; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }
.status-pill.ok i { background: #22c55e; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 11px; margin-bottom: 14px; }
.stat-card, .panel, .loading-card { border: 1px solid var(--line); background: rgba(255, 255, 255, .96); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(25, 38, 64, .032); }
.stat-card { min-height: 110px; padding: 15px 16px; position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; }
.stat-card:hover { transform: translateY(-1px); border-color: #d9e4f4; box-shadow: 0 8px 22px rgba(25, 38, 64, .055); }
.stat-card::after { content: ""; position: absolute; width: 70px; height: 70px; right: -20px; top: -20px; border-radius: 50%; background: var(--card-color, rgba(37, 99, 235, .09)); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--metric-color, var(--primary)); background: var(--metric-bg, #eff6ff); font-size: 12px; font-weight: 900; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { display: block; margin: 13px 0 4px; font-size: 23px; letter-spacing: -.025em; }
.stat-note { color: #98a2b3; font-size: 9px; }
.panel { position: relative; padding: 15px; margin-bottom: 13px; transition: border-color .18s, box-shadow .18s; }
.panel:hover { border-color: #dfe6f0; box-shadow: 0 6px 20px rgba(25, 38, 64, .043); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.panel-head h3 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; }
.panel-head h3::before { content: ""; width: 3px; height: 13px; border-radius: 3px; background: linear-gradient(180deg, #6da8ff, var(--primary)); box-shadow: 0 0 0 3px rgba(49, 120, 246, .06); }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 13px; align-items: start; }
.task-list { display: grid; gap: 9px; }
.task-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: linear-gradient(100deg, #fff, #fbfcff); text-align: left; transition: border-color .16s, background .16s, transform .16s; }
.task-item:hover { transform: translateX(2px); border-color: #cfe0f8; background: #f6faff; }
.task-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 9px; color: #b45309; background: #fffbeb; font-weight: 900; }
.task-mark.done { color: #15803d; background: #f0fdf4; }
.task-item div { min-width: 0; flex: 1; }
.task-item strong, .task-item small { display: block; }
.task-item strong { font-size: 12px; }
.task-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.task-arrow { color: var(--primary); font-size: 11px; font-weight: 800; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-action { min-height: 82px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: #344054; background: linear-gradient(145deg, #fff, #fbfcff); text-align: left; transition: border-color .16s, box-shadow .16s, transform .16s; }
.quick-action:hover { transform: translateY(-1px); border-color: #cfe0f8; background: #f7faff; box-shadow: 0 6px 16px rgba(49, 120, 246, .07); }
.quick-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: #eff6ff; font-size: 11px; font-weight: 900; }
.quick-action strong { font-size: 12px; }
.mini-status-list { display: grid; gap: 0; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-row div strong, .status-row div span { display: block; }
.status-row div strong { font-size: 12px; }
.status-row div span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-bottom: 13px; }
.mini-stat-card { position: relative; min-height: 86px; overflow: hidden; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #fff, #fbfcff); box-shadow: 0 4px 16px rgba(25, 38, 64, .032); }
.mini-stat-card::after { content: ""; position: absolute; width: 58px; height: 58px; right: -19px; top: -20px; border-radius: 50%; background: rgba(49, 120, 246, .08); }
.mini-stat-card.success::after { background: rgba(16, 185, 129, .09); }
.mini-stat-card.warning::after { background: rgba(245, 158, 11, .10); }
.mini-stat-card > span, .mini-stat-card > strong, .mini-stat-card > small { position: relative; z-index: 1; display: block; }
.mini-stat-card > span { color: var(--muted); font-size: 10px; }
.mini-stat-card > strong { margin-top: 8px; font-size: 18px; letter-spacing: -.02em; }
.mini-stat-card > small { margin-top: 4px; color: #98a2b3; font-size: 9px; }
.invite-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 16px; }
.invite-primary { background: linear-gradient(145deg, #fff, #f2f7ff); }
.invite-label { color: var(--muted); font-size: 11px; }
.invite-banner { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 13px; padding: 18px 21px; overflow: hidden; border: 1px solid #dce7f8; border-radius: 11px; background: radial-gradient(circle at 88% 20%, rgba(49, 120, 246, .12), transparent 28%), linear-gradient(135deg, #fff, #eef5ff); box-shadow: 0 8px 24px rgba(49, 120, 246, .05); }
.invite-banner h2 { margin: 0; font-size: 19px; }
.invite-banner p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.invite-banner-code { flex: 0 0 auto; min-width: 170px; padding: 12px 15px; border: 1px solid rgba(191, 219, 254, .9); border-radius: 10px; background: rgba(255, 255, 255, .78); text-align: center; }
.invite-banner-code span, .invite-banner-code strong { display: block; }
.invite-banner-code span { color: var(--muted); font-size: 9px; }
.invite-banner-code strong { margin-top: 5px; color: var(--primary); font-family: "SFMono-Regular", Consolas, monospace; font-size: 18px; letter-spacing: .12em; }
.invite-steps { display: grid; gap: 10px; margin-top: 18px; }
.invite-step { display: flex; gap: 11px; align-items: flex-start; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(100deg, #fff, #fbfcff); }
.invite-step > span { width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 26px; border-radius: 50%; color: var(--primary); background: #eff6ff; font-size: 10px; font-weight: 900; }
.invite-step strong, .invite-step small { display: block; }
.invite-step strong { font-size: 12px; }
.invite-step small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.source-card { border: 1px solid var(--line); border-radius: 9px; padding: 13px 14px; background: linear-gradient(120deg, #fff, #f8faff); box-shadow: 0 2px 8px rgba(25, 38, 64, .025); transition: border-color .16s, box-shadow .16s; }
.source-card:hover { border-color: #d5e3f6; box-shadow: 0 5px 15px rgba(25, 38, 64, .04); }
.source-card header { display: flex; justify-content: space-between; align-items: center; }
.source-card h4 { margin: 0; font-size: 12px; }
.source-card p { color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.status-chip, .badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 650; border: 1px solid var(--line); color: #667085; background: #f8fafc; }
.status-chip.ok, .badge.active, .badge.completed, .badge.settled, .badge.open { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.status-chip.offline, .badge.disabled, .badge.rejected, .badge.void, .badge.closed, .badge.left { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.badge.pending, .badge.draft { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.club-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11px; font-weight: 650; }
.club-status-light { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(148, 163, 184, .14); }
.club-status.normal { color: #15803d; }
.club-status.normal .club-status-light { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .14); }
.club-status.blocked { color: #b91c1c; }
.club-status.blocked .club-status-light { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .14); }
.action-menu-trigger { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #101828; background: transparent; cursor: pointer; }
.action-menu-trigger:hover { color: #000; background: #eaecf0; }
.action-menu-trigger span { display: block; color: currentColor; font-size: 24px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
.club-action-popover { position: fixed; z-index: 100; width: 116px; display: grid; padding: 5px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; box-shadow: 0 12px 28px rgba(16, 24, 40, .14); }
.club-action-popover button { width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; color: #344054; background: transparent; text-align: left; font-size: 11px; cursor: pointer; }
.club-action-popover button:hover { background: #f2f4f7; color: #101828; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -3px -3px 12px; padding: 8px; border: 1px solid #edf0f4; border-radius: 8px; background: #f9fafc; }
.search-group { display: flex; gap: 8px; flex-wrap: wrap; }
.search-group input, .search-group select { width: auto; min-width: 148px; padding: 7px 9px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: inset 0 1px rgba(255,255,255,.9); scrollbar-width: thin; scrollbar-color: #cfd8e6 transparent; }
.hierarchy-player {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-left: calc(var(--hierarchy-level, 0) * 22px);
  min-width: 220px;
}
.hierarchy-branch {
  color: var(--primary);
  font-weight: 700;
  line-height: 20px;
}
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.summary-strip > span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
}
.summary-strip strong {
  margin-left: 5px;
  color: var(--text);
}
.game-play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 9px;
}
.game-play-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.game-play-option:hover {
  border-color: #cbdcf4;
  background: #f9fbff;
}
.game-play-option.selected {
  border-color: #bfd7fb;
  background: #f2f7ff;
  box-shadow: inset 3px 0 var(--primary);
}
.game-play-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}
.game-play-option strong,
.game-play-option small {
  display: block;
}
.game-play-option strong {
  color: var(--text);
  font-size: 11.5px;
}
.game-play-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; color: #637083; background: linear-gradient(180deg, #fafcff, #f3f6fa); font-size: 9px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; box-shadow: inset 0 -1px #e7ebf0; }
td { color: #344054; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f5f9ff; }
.empty-state { margin: 2px; padding: 38px 20px; border: 1px dashed #dce3ed; border-radius: 8px; text-align: center; color: var(--muted); background: #fbfcfe; font-size: 10px; }
.empty-state strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 12px; }
.inline-actions { display: flex; gap: 6px; }
.text-btn { border: 0; border-radius: 5px; background: transparent; padding: 4px 6px; color: var(--primary); font-size: 10px; font-weight: 700; }
.text-btn:hover { background: #edf5ff; }
.text-btn.danger { color: var(--danger); }
.text-btn.danger:hover { background: #fff1f0; }
.money-positive { color: var(--primary); }
.money-negative { color: var(--danger); }
.rank-mark { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; color: #667085; background: #f2f4f7; font-size: 9px; font-weight: 800; }
.rank-mark.rank-1 { color: #92400e; background: #fef3c7; }
.rank-mark.rank-2 { color: #475467; background: #eef2f6; }
.rank-mark.rank-3 { color: #9a3412; background: #ffedd5; }
.invite-code { font-size: 34px; letter-spacing: .16em; color: var(--primary); font-weight: 900; margin: 12px 0; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; }
.invite-copy-row input { min-width: 0; color: #475467; background: #f8fafc; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.cell-note { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }
.muted { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 6px 0 0; }
.danger-zone { border-color: #f6d4d1; background: linear-gradient(135deg, #fff, #fffafa); }
.danger-zone .panel-head h3::before { background: linear-gradient(180deg, #fb7185, #dc2626); box-shadow: 0 0 0 3px rgba(220, 38, 38, .05); }
.loading-card { min-height: 180px; display: grid; place-items: center; color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .40); backdrop-filter: blur(3px); }
.modal-card { width: min(580px, 100%); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.modal-card > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.modal-card h2 { margin: 0; font-size: 14px; }
.modal-card form { min-height: 0; display: flex; flex-direction: column; }
.modal-body { padding: 17px; overflow-y: auto; }
.modal-card footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 17px; border-top: 1px solid var(--line); background: #fafbfc; }
.toast-region { position: fixed; right: 22px; top: 20px; z-index: 200; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; box-shadow: var(--shadow); font-size: 12px; animation: slide-in .18s ease-out; }
.toast.error { border-color: #fecaca; }
.toast.success { border-color: #bbf7d0; }
@keyframes slide-in { from { transform: translateX(12px); opacity: 0; } }

.register-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% -10%, #e6f1ff 0, #f7f9fc 42%, #f2f5f8 100%); }
.register-card { width: min(430px, 100%); min-height: 440px; padding: 28px; border: 1px solid rgba(216, 222, 232, .9); border-radius: 14px; background: rgba(255, 255, 255, .97); box-shadow: 0 20px 60px rgba(25, 38, 64, .11); }
.register-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.register-brand .brand-mark { width: 36px; height: 36px; font-size: 18px; }
.register-brand strong, .register-brand small { display: block; }
.register-brand strong { font-size: 13px; }
.register-brand small { margin-top: 3px; color: #98a2b3; font-size: 8px; letter-spacing: .15em; }
.register-form { display: grid; gap: 14px; }
.register-form h1, .register-state h1 { margin: 0; font-size: 21px; }
.register-form > p, .register-state p { margin: -5px 0 7px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.register-form label { display: grid; gap: 7px; color: #475467; font-size: 11px; font-weight: 650; }
.register-kicker { color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.register-state { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; text-align: center; color: var(--muted); }
.register-state-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #15803d; background: #ecfdf3; font-size: 20px; font-weight: 800; }
.register-state-icon.error { color: #b42318; background: #fff1f0; }
.register-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .dashboard-grid, .invite-layout { grid-template-columns: 1fr; }
  .topbar-actions .btn-small { display: none; }
}
@media (max-width: 820px) {
  .login-view { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-panel { padding: 36px 25px; }
  .brand-login { position: static; margin-bottom: 48px; }
  .login-form-card, .login-copy, .login-switch { max-width: none; }
  .app-shell { grid-template-columns: 72px 1fr; }
  .sidebar { width: 72px; padding: 20px 9px; }
  .sidebar .brand > div:last-child, .nav-section, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .sidebar .brand { padding: 0 5px 17px; }
  .brand-mark { width: 40px; height: 40px; }
  .nav-item { justify-content: center; padding: 11px; }
  .nav-item span { font-size: 17px; }
  .account-meta, .account-chevron { display: none; }
  .sidebar-account { padding-top: 10px; }
  .account-trigger { min-height: 46px; justify-content: center; padding: 7px; }
  .account-status-dot { left: auto; right: 12px; bottom: 8px; }
  .account-popover { left: calc(100% + 8px); right: auto; bottom: 0; width: 146px; }
  .workspace { grid-column: 2; }
  .topbar { padding: 0 16px; }
  .topbar .user-menu div:last-child, .topbar .eyebrow { display: none; }
  .content { padding: 20px 16px 40px; }
  .warning-banner { margin: 12px 16px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .mini-stat-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 15px; }
  .user-menu { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .invite-banner { align-items: flex-start; flex-direction: column; }
  .invite-banner-code { width: 100%; }
  .copy-row { align-items: stretch; flex-direction: column; }
  .hero-panel { align-items: flex-start; flex-direction: column; padding: 22px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .quick-grid { grid-template-columns: 1fr; }
  .login-switch { align-items: flex-start; flex-direction: column; }
  .simple-login-view { padding: 16px; }
  .simple-login-card { padding: 34px 22px 26px; border-color: #edf0f3; box-shadow: 0 7px 20px rgba(15, 23, 42, .055); }
  .simple-login-title { margin-bottom: 28px; font-size: 25px; }
  .refresh-btn { width: 30px; justify-content: center; padding: 0; }
  .refresh-label { display: none; }
  .register-view { padding: 14px; }
  .register-card { min-height: 420px; padding: 22px; }
}
