/* ============================================================
   新媒体MCN工作台 · Design System
   Editorial + Warm Industrial · 森林绿 #2C5F4F · 暖金 #D4A76A
   ============================================================ */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&display=swap');

/* === Design Tokens === */
:root {
  /* Brand */
  --green-deep: #152E24;
  --green-dark: #1A3A2E;
  --green: #2C5F4F;
  --green-light: #3D7A66;
  --green-pale: #E8F0EC;

  --gold: #D4A76A;
  --gold-dark: #B8893F;
  --gold-light: #F0E0C8;
  --gold-pale: #FBF6EF;

  /* Surfaces */
  --bg-page: #F9F6F0;
  --bg-card: #FFFFFF;
  --bg-sidebar: #152E24;
  --bg-sidebar-hover: #1D3D30;
  --bg-input: #FAF9F7;

  /* Text */
  --text: #1E1E1E;
  --text-secondary: #5C5650;
  --text-muted: #9B9590;
  --text-sidebar: #B8C5BF;
  --text-sidebar-active: #FFFFFF;

  /* Semantic */
  --red: #D45D5D;
  --red-bg: #FDF0F0;
  --blue: #5B8CB8;
  --blue-bg: #EEF4F9;
  --orange: #D48B5D;
  --orange-bg: #FDF5EF;
  --purple: #8B6BAE;
  --purple-bg: #F6F2FA;

  /* Borders & Shadows */
  --border: #E8E3DB;
  --border-light: #F0EDE7;
  --shadow-sm: 0 1px 2px rgba(21, 46, 36, 0.04);
  --shadow: 0 1px 3px rgba(21, 46, 36, 0.06), 0 1px 2px rgba(21, 46, 36, 0.04);
  --shadow-md: 0 4px 12px rgba(21, 46, 36, 0.06), 0 2px 4px rgba(21, 46, 36, 0.04);
  --shadow-lg: 0 12px 32px rgba(21, 46, 36, 0.08), 0 4px 8px rgba(21, 46, 36, 0.04);

  /* Spacing */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  /* Typography */
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", "Microsoft YaHei", monospace;

  /* Layout */
  --sidebar-w: 232px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-light); }

/* === App Shell === */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.03em;
  display: block;
}

.sidebar-brand .brand-sub {
  font-size: 0.73rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

.sidebar-project {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-project .project-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 6px;
  vertical-align: middle;
}

.sidebar-project .project-name {
  font-size: 0.8rem;
  color: var(--text-sidebar);
  vertical-align: middle;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav .nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
  padding: 16px 12px 6px;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-sidebar);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.sidebar-nav .nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: #FFFFFF;
}

.sidebar-nav .nav-item.active {
  background: rgba(212, 167, 106, 0.12);
  color: var(--gold);
  font-weight: 600;
}

.sidebar-nav .nav-item.active::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--gold);
  border-radius: 3px 0 0 3px;
}

.sidebar-nav .nav-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-footer .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
}

.sidebar-footer .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-footer .user-name {
  font-size: 0.82rem;
  color: #FFFFFF;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer .user-role {
  font-size: 0.7rem;
  color: var(--text-sidebar);
}

.sidebar-footer .logout-link {
  color: var(--text-sidebar);
  font-size: 0.78rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  text-decoration: none;
}

.sidebar-footer .logout-link:hover {
  opacity: 1;
  color: var(--red);
}

/* === Main Content Area === */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar (subtle) */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar .breadcrumb span {
  color: var(--text-secondary);
}

.topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1280px;
  width: 100%;
}

/* === Login Page (standalone, no sidebar) === */
.login-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-sidebar);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 80%;
  height: 180%;
  background: radial-gradient(ellipse at center, rgba(212,167,106,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: 5%;
  left: 10%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(44,95,79,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.login-container {
  display: flex;
  width: 100%;
  position: relative;
  z-index: 1;
}

.login-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 60px;
}

.login-hero-content {
  max-width: 440px;
}

.login-hero .hero-brand {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.login-hero .hero-tagline {
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.login-hero .hero-desc {
  font-size: 0.92rem;
  color: var(--text-sidebar);
  line-height: 1.8;
  max-width: 360px;
}

.login-hero .hero-dots {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}

.login-hero .hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.login-hero .hero-dot.active {
  background: var(--gold);
}

.login-panel {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  padding: 60px;
}

.login-box {
  width: 100%;
  max-width: 360px;
}

.login-box .login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.login-box .login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.3s;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === Page Header === */
.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.page-header .back-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}

.page-header .back-link:hover {
  color: var(--green);
}

.page-header .text-muted {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* === Stats Grid === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  border-radius: 3px 3px 0 0;
}

.stat-card.stat-green::before  { background: var(--green); }
.stat-card.stat-blue::before   { background: var(--blue); }
.stat-card.stat-orange::before { background: var(--orange); }
.stat-card.stat-gold::before   { background: var(--gold); }
.stat-card.stat-purple::before { background: var(--purple); }

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-green .stat-number  { color: var(--green); }
.stat-blue .stat-number   { color: var(--blue); }
.stat-orange .stat-number { color: var(--orange); }
.stat-gold .stat-number   { color: var(--gold-dark); }

/* === Status Tabs === */
.status-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.25s;
  font-weight: 500;
}

.tab:hover:not(.active) {
  background: var(--green-pale);
  border-color: var(--green);
  color: var(--green);
}

.tab.active {
  background: var(--green);
  color: #FFFFFF;
  border-color: var(--green);
  font-weight: 600;
}

/* === Tables === */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.2s;
}

.table tbody tr:hover {
  background: var(--gold-pale);
}

.table a {
  color: var(--green);
  font-weight: 500;
}

.kv-table { width: 100%; }
.kv-table td {
  padding: 6px 12px 6px 0;
  font-size: 0.88rem;
  vertical-align: top;
}
.kv-table td:first-child {
  color: var(--text-muted);
  width: 90px;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #F0EDE7;
  color: var(--text-muted);
  white-space: nowrap;
}

.badge-draft           { background: var(--orange-bg); color: var(--orange); }
.badge-approved        { background: var(--green-pale); color: var(--green); }
.badge-in_production   { background: var(--blue-bg); color: var(--blue); }
.badge-published       { background: var(--purple-bg); color: var(--purple); }
.badge-reviewed        { background: #E8F5E9; color: #2E7D32; }
.badge-pending         { background: var(--orange-bg); color: var(--orange); }
.badge-in_progress     { background: var(--blue-bg); color: var(--blue); }
.badge-completed       { background: var(--green-pale); color: var(--green); }
.badge-delayed         { background: var(--red-bg); color: var(--red); }

/* === Platform Tags === */
.platform-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.platform-小红书 { background: #FFECEC; color: #C41A1A; }
.platform-抖音   { background: #F0F0F0; color: #1A1A1A; }
.platform-视频号 { background: #E8F5E9; color: #2E7D32; }
.platform-公众号 { background: #E3F2FD; color: #1565C0; }

/* === Topic Cards (list view) === */
.topic-card {
  border-left: 4px solid var(--border);
  transition: all 0.25s;
}

.topic-card:hover {
  border-left-color: var(--green);
  box-shadow: var(--shadow-md);
}

.topic-card.border-draft      { border-left-color: var(--orange); }
.topic-card.border-approved   { border-left-color: var(--green); }
.topic-card.border-production { border-left-color: var(--blue); }
.topic-card.border-published  { border-left-color: var(--purple); }

.topic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}

.topic-card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.topic-card-header h3 a {
  color: var(--text);
  transition: color 0.2s;
}

.topic-card-header h3 a:hover {
  color: var(--green);
}

.topic-card-meta {
  display: flex;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}

/* === Task Cards === */
.task-card {
  transition: all 0.25s;
}

.task-card:hover {
  box-shadow: var(--shadow-md);
}

.task-card.border-pending  { border-left: 4px solid var(--orange); }
.task-card.border-progress { border-left: 4px solid var(--blue); }

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}

.task-card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.task-card-header h3 a {
  color: var(--text);
  transition: color 0.2s;
}

.task-card-header h3 a:hover {
  color: var(--green);
}

.task-card-meta {
  display: flex;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}

/* === Content Cards === */
.content-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.content-card-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.content-card-header h3 a {
  color: var(--text);
}

.content-card-header h3 a:hover {
  color: var(--green);
}

.content-card-meta {
  display: flex;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* === Content Sections (draft detail) === */
.content-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.content-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.content-section h4 {
  font-size: 0.82rem;
  color: var(--green);
  margin-bottom: 8px;
}

.json-content p,
.json-content dl,
.json-content ul {
  font-size: 0.9rem;
}

.json-content dt {
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 0.8rem;
}

.json-content dd {
  margin-left: 18px;
  font-size: 0.9rem;
}

/* === Review Cards === */
.review-card {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.review-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.review-header {
  margin-bottom: 10px;
}

.md-content {
  font-size: 0.9rem;
  line-height: 1.8;
}

.md-content h4 {
  font-size: 0.85rem;
  color: var(--green);
  margin: 14px 0 6px;
}

/* === Forms === */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: var(--bg-input);
  color: var(--text);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 95, 79, 0.08);
  background: #FFFFFF;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .form-group {
  flex: 1;
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.form-inline .form-group {
  margin-bottom: 0;
}

.checkbox-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.88rem;
}

.form-card {
  max-width: 640px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-body);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:hover {
  background: var(--bg-page);
  border-color: #D0CBC3;
}

.btn-primary {
  background: var(--green);
  color: #FFFFFF;
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #FFFFFF;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-danger {
  background: var(--red);
  color: #FFFFFF;
  border-color: var(--red);
}

.btn-danger:hover {
  background: #C44D4D;
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-page);
  color: var(--text);
}

/* === Alerts === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.87rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: alertIn 0.3s ease;
}

.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #F5D0D0;
}

.alert-success {
  background: var(--green-pale);
  color: var(--green);
  border: 1px solid #C8DDD4;
}

@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Grid Layouts === */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-2col.wide-left  { grid-template-columns: 2fr 1fr; }
.grid-2col.wide-right { grid-template-columns: 1fr 2fr; }

/* === Data Lists === */
dl dt {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

dl dd {
  font-size: 0.9rem;
  margin-bottom: 4px;
  padding-left: 4px;
}

ol {
  padding-left: 22px;
}

ol li {
  font-size: 0.9rem;
  margin-bottom: 6px;
  line-height: 1.6;
}

/* === Link styling === */
.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* === Card entrance animation === */
.card-animate {
  animation: cardUp 0.45s ease both;
}

@keyframes cardUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Staggered delays for list items */
.card-animate:nth-child(1) { animation-delay: 0s; }
.card-animate:nth-child(2) { animation-delay: 0.05s; }
.card-animate:nth-child(3) { animation-delay: 0.1s; }
.card-animate:nth-child(4) { animation-delay: 0.15s; }
.card-animate:nth-child(5) { animation-delay: 0.2s; }
.card-animate:nth-child(6) { animation-delay: 0.25s; }
.card-animate:nth-child(7) { animation-delay: 0.3s; }
.card-animate:nth-child(8) { animation-delay: 0.35s; }
.card-animate:nth-child(9) { animation-delay: 0.4s; }
.card-animate:nth-child(10) { animation-delay: 0.45s; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D0CBC3; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #B0A8A0; }

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* === Responsive === */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2col, .grid-2col.wide-left, .grid-2col.wide-right {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
    --sidebar-w: 232px;
  }

  .main-area {
    margin-left: 0;
  }

  .main-content {
    padding: 20px 16px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .login-hero {
    display: none;
  }

  .login-panel {
    width: 100%;
    padding: 40px 24px;
  }

  /* Mobile menu toggle */
  .menu-toggle {
    display: flex !important;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 1.5rem; }
}
