:root {
  color-scheme: light;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-soft: #eff6ff;
  --color-page-bg: #f4f7fb;
  --color-card-bg: #ffffff;
  --color-sidebar-bg: #182235;
  --color-sidebar-text: #eef4ff;
  --color-sidebar-muted: #92a2ba;
  --color-text-primary: #172033;
  --color-text-secondary: #667085;
  --color-border: #e4eaf2;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-card: 0 8px 24px rgba(24, 34, 53, .06);
  --sidebar-width: 236px;
  --sidebar-collapsed-width: 72px;
  --topbar-height: 76px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--color-page-bg); }
body { margin: 0; color: var(--color-text-primary); background: var(--color-page-bg); font: 14px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, [tabindex]:not([tabindex="-1"]) { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-primary) 24%, transparent); outline-offset: 2px; }
input, select, textarea { min-height: 40px; border: 1px solid #cfd8e6; border-radius: var(--radius-sm); background: #fff; color: var(--color-text-primary); padding: 8px 11px; transition: border-color .16s, box-shadow .16s; }
input:hover, select:hover, textarea:hover { border-color: #aebbd0; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent); }
button, .button, .button-link { min-height: 38px; border: 1px solid transparent; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; font-weight: 650; line-height: 1.2; cursor: pointer; transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s, transform .1s; }
button:active, .button:active { transform: translateY(1px); }
button:disabled, .button[aria-disabled="true"] { cursor: not-allowed; opacity: .52; transform: none; }
.button-primary, button:not(.secondary):not(.link):not(.ghost):not(.danger):not(.icon-button):not(.nav-item):not(.user-menu-button):not(.mail-item):not(.mail-folder) { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.button-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
button.secondary, .button-secondary, .button-link { background: #fff; border-color: #cfd8e6; color: #344054; }
button.secondary:hover, .button-secondary:hover, .button-link:hover { background: #f8fafc; border-color: #aebbd0; color: #172033; }
button.ghost, .button-ghost { background: transparent; color: #475467; }
button.danger, .button-danger { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.icon-button { width: 38px; min-width: 38px; padding: 0; background: transparent; border-color: transparent; color: inherit; }
.icon-button svg, button svg, .button svg { width: 18px; height: 18px; fill: currentColor; }
.panel, .card, .stat-card, .overview-card { background: var(--color-card-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.panel { padding: 20px; }
.muted { color: var(--color-text-secondary); }
.badge { min-height: 22px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary-hover); padding: 2px 8px; font-size: 12px; font-weight: 700; line-height: 1.3; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; opacity: .7; }
.badge.neutral { background: #f2f4f7; color: #475467; }
.badge.success { background: #ecfdf3; color: #067647; }
.badge.warning { background: #fffaeb; color: #b54708; }
.badge.danger { background: #fef3f2; color: #b42318; }
.table-wrap { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow-x: auto; background: #fff; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border-bottom: 1px solid var(--color-border); padding: 12px 14px; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #475467; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
tbody tr:hover { background: #f9fbfd; }
tbody tr:last-child td { border-bottom: 0; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.empty-state, .error-state, .loading-state { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed #cfd8e6; border-radius: var(--radius-md); background: #fafcff; color: var(--color-text-secondary); padding: 24px; text-align: center; }
.empty-state svg, .error-state svg { width: 34px; height: 34px; fill: #98a2b3; }
.error-state { border-color: #fecdca; background: #fffbfa; color: #b42318; }
.skeleton { position: relative; overflow: hidden; border-radius: 5px; background: #e9eef5; color: transparent !important; user-select: none; }
.skeleton::after { position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: skeleton-shimmer 1.35s infinite; content: ""; }
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
