/* ==========================================================================
   Blogger Cooperation Approval & Budget Management System
   Design system - modern SaaS look (soft shadows, generous spacing, calm
   color palette, rounded corners) built with plain CSS custom properties.
   ========================================================================== */

:root {
  --c-primary: #6366f1;
  --c-primary-dark: #4f46e5;
  --c-primary-light: #eef2ff;
  --c-accent: #8b5cf6;
  --c-success: #10b981;
  --c-success-light: #ecfdf5;
  --c-danger: #ef4444;
  --c-danger-light: #fef2f2;
  --c-warning: #f59e0b;
  --c-warning-light: #fffbeb;
  --c-info: #0ea5e9;
  --c-info-light: #f0f9ff;

  --c-bg: #f6f7fb;
  --c-surface: #ffffff;
  --c-border: #e7e9f3;
  --c-text: #1e2233;
  --c-text-soft: #6b7186;
  --c-text-faint: #9ca0b4;

  --sidebar-bg: #15172b;
  --sidebar-bg-active: #23254a;
  --sidebar-text: #c9cbe0;
  --sidebar-text-active: #ffffff;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 22, 50, 0.04), 0 1px 3px rgba(20, 22, 50, 0.06);
  --shadow-md: 0 4px 16px rgba(20, 22, 50, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 22, 50, 0.12);

  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #d946ef 100%);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
/* Default icon size - more specific rules below (.nav-item svg, .stat-icon svg, etc.)
   override this for contexts that need a different size. Without this, a bare
   inline <svg> with no width/height attribute renders at the browser's huge
   ~300x150 default, which is why every icon() call must be covered here. */
svg { width: 16px; height: 16px; flex-shrink: 0; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 4px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 8px; }
a { color: var(--c-primary); text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--c-primary-light); }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d7d9ea; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Layout shell ---------- */
#app-root { height: 100%; }

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
  color: #fff;
}
.sidebar-brand .logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: white;
  box-shadow: 0 4px 14px rgba(99,102,241,.5);
}
.sidebar-brand .brand-text { font-size: 15px; font-weight: 700; line-height: 1.2; }
.sidebar-brand .brand-sub { font-size: 11px; color: var(--sidebar-text); font-weight: 400; opacity: .7; }

.sidebar-section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: #6c7093; margin: 18px 10px 8px; font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); cursor: pointer; margin-bottom: 2px;
  font-size: 13.5px; font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(2px); }
.nav-item.active { background: var(--sidebar-bg-active); color: var(--sidebar-text-active); }
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px;
  background: var(--gradient-brand); border-radius: 4px;
  animation: slideInLeft .2s ease;
}
.nav-item .nav-badge {
  margin-left: auto; background: var(--c-danger); color: #fff; font-size: 10.5px;
  font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); min-width: 18px; text-align: center;
}

.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: var(--c-surface);
  border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 19px; font-weight: 700; }
.topbar .page-subtitle { font-size: 12.5px; color: var(--c-text-soft); font-weight: 400; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  border: 1px solid var(--c-border); background: var(--c-surface);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .15s ease; position: relative; color: var(--c-text-soft);
}
.icon-btn:hover { background: var(--c-primary-light); color: var(--c-primary); border-color: var(--c-primary-light); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-danger); border: 2px solid var(--c-surface);
}

.lang-toggle {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: var(--radius-full); border: 1px solid var(--c-border); background: var(--c-surface);
  cursor: pointer; font-weight: 600; font-size: 13px; transition: all .15s ease;
}
.lang-toggle:hover { border-color: var(--c-primary); color: var(--c-primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.lang-toggle svg { width: 16px; height: 16px; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: var(--radius-full); border: 1px solid var(--c-border); cursor: pointer; transition: all .15s ease; }
.user-chip:hover { box-shadow: var(--shadow-sm); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.user-chip .user-name { font-weight: 600; font-size: 13px; }
.user-chip .user-role { font-size: 11px; color: var(--c-text-soft); text-transform: capitalize; }

.content-area { padding: 24px 28px 60px; max-width: 1400px; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--c-surface); border-radius: var(--radius-lg); border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm); padding: 20px; transition: box-shadow .2s ease, transform .2s ease;
}
.card.hoverable:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 12.5px; color: var(--c-text-soft); margin-top: 2px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: var(--c-surface); border-radius: var(--radius-lg); border: 1px solid var(--c-border);
  padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  animation: fadeInUp .35s ease both;
}
.stat-card .stat-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.stat-card .stat-icon svg { width: 19px; height: 19px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 12.5px; color: var(--c-text-soft); font-weight: 500; margin-top: 2px; }
.stat-card .stat-trend { font-size: 11.5px; font-weight: 600; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; }

.tone-primary { color: var(--c-primary); background: var(--c-primary-light); }
.tone-success { color: var(--c-success); background: var(--c-success-light); }
.tone-danger { color: var(--c-danger); background: var(--c-danger-light); }
.tone-warning { color: var(--c-warning); background: var(--c-warning-light); }
.tone-info { color: var(--c-info); background: var(--c-info-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .15s ease;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,.35); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 6px 18px rgba(99,102,241,.45); transform: translateY(-1px); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-ghost { background: transparent; color: var(--c-text-soft); }
.btn-ghost:hover { background: var(--c-bg); color: var(--c-text); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ripple */
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.5); transform: scale(0); animation: ripple .55s ease-out; pointer-events: none; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--c-text-soft); }
.form-label .req { color: var(--c-danger); }
.form-control, select.form-control, textarea.form-control {
  width: 100%; padding: 10px 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--c-border);
  font-size: 13.5px; font-family: inherit; background: var(--c-surface); color: var(--c-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-help { font-size: 11.5px; color: var(--c-text-faint); margin-top: 5px; }
/* Cooperation Method 3-box calculator (owner-requested 2026-07-13) - see
   paymentsShared.js's cooperationMethodBoxesHtml doc comment. */
.coop-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.coop-method-box { border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.coop-method-box.selected { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-light); }
.coop-method-box-label { font-size: 12.5px; font-weight: 600; color: var(--c-text-soft); cursor: pointer; }
.form-error { font-size: 11.5px; color: var(--c-danger); margin-top: 5px; font-weight: 600; }
.input-icon-wrap { position: relative; }
.input-icon-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--c-text-faint); }
.input-icon-wrap .form-control { padding-left: 38px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--c-border); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.2px; min-width: 600px; }
table.data-table thead th {
  text-align: left; padding: 11px 14px; background: #fafbfe; color: var(--c-text-soft);
  font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--c-border); white-space: nowrap;
}
table.data-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
table.data-table tbody tr { transition: background .12s ease; animation: fadeIn .3s ease both; }
table.data-table tbody tr:hover { background: #fafbff; }
table.data-table tbody tr:last-child td { border-bottom: none; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--c-text-faint); }
.table-empty svg { width: 42px; height: 42px; margin-bottom: 10px; opacity: .5; }

/* Date dividers (owner-requested 2026-07-11: "when date is changed make
   some prominent that new payments of this date starts from here, same
   for all requests") - dataTable()'s dateDividerField option injects one
   of these full-width rows wherever the Dubai calendar day changes between
   two consecutive rows, on My Requests/My Payments/Team Requests/Team
   Payments. */
table.data-table tbody tr.date-divider-row td {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 14px;
  border-left: 3px solid var(--c-primary);
}
table.data-table tbody tr.date-divider-row:hover td { background: var(--c-primary-light); }
table.data-table tbody tr.date-divider-row td svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-transform: capitalize; white-space: nowrap;
}
.badge .dot-sm { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending { animation: pulseSoft 2s infinite; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,16,32,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fadeIn .18s ease;
}
.modal-box {
  background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  animation: scaleIn .2s cubic-bezier(.2,.9,.3,1.2);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--c-border); }
.modal-header h3 { font-size: 16px; }
.modal-body { padding: 20px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--c-border); }
.modal-close { cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--c-text-soft); transition: all .15s ease; }
.modal-close:hover { background: var(--c-bg); color: var(--c-text); transform: rotate(90deg); }

/* ---------- Toasts ---------- */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 280px; max-width: 380px; background: var(--c-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px;
  border-left: 4px solid var(--c-primary); animation: slideInRight .25s ease;
}
.toast.toast-success { border-color: var(--c-success); }
.toast.toast-error { border-color: var(--c-danger); }
.toast.toast-warning { border-color: var(--c-warning); }
.toast .toast-msg { font-size: 13px; font-weight: 500; flex: 1; }
.toast.toast-leaving { animation: slideOutRight .2s ease forwards; }

/* ---------- Real-time notification banner (NEW_FEATURES_SPEC.md Feature C)
   Distinct from the generic top-right toast() above (used for form-save
   confirmations) - this is specifically for live event notifications
   (new request, a decision made, etc.), Telegram-style, bottom-right,
   stacking, per the spec's explicit "bottom of screen" requirement. ---------- */
#notif-banner-container { position: fixed; bottom: 20px; right: 20px; z-index: 210; display: flex; flex-direction: column-reverse; gap: 10px; max-width: 360px; }
.notif-banner {
  background: var(--c-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 14px 16px; display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  border-left: 4px solid var(--c-primary); animation: slideInUp .3s ease;
}
.notif-banner:hover { box-shadow: 0 16px 40px rgba(20, 22, 50, 0.18); }
.notif-banner .notif-banner-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-banner .notif-banner-title { font-weight: 700; font-size: 13px; }
.notif-banner .notif-banner-msg { font-size: 12.5px; color: var(--c-text-soft); margin-top: 2px; }
.notif-banner .notif-banner-close { cursor: pointer; color: var(--c-text-faint); flex-shrink: 0; }
.notif-banner.notif-banner-leaving { animation: slideOutDown .25s ease forwards; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--c-border); }
.timeline-item { position: relative; padding-bottom: 22px; animation: fadeInUp .3s ease both; }
.timeline-item::before {
  content: ''; position: absolute; left: -28px; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-primary-light); border: 2px solid var(--c-primary);
}
.timeline-item .timeline-title { font-weight: 700; font-size: 13px; }
.timeline-item .timeline-meta { font-size: 11.5px; color: var(--c-text-soft); margin: 2px 0 4px; }
.timeline-item .timeline-note { font-size: 12.5px; color: var(--c-text); background: var(--c-bg); border-radius: var(--radius-sm); padding: 8px 11px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-border); margin-bottom: 18px; }
.tab-item { padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--c-text-soft); cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s ease; }
.tab-item:hover { color: var(--c-text); }
.tab-item.active { color: var(--c-primary); border-color: var(--c-primary); }

/* ---------- Login screen ---------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand); padding: 24px; position: relative; overflow: hidden;
}
.login-screen::before, .login-screen::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08);
}
.login-screen::before { width: 500px; height: 500px; top: -200px; left: -150px; animation: float 8s ease-in-out infinite; }
.login-screen::after { width: 350px; height: 350px; bottom: -150px; right: -100px; animation: float 10s ease-in-out infinite reverse; }
.login-card {
  background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 400px; padding: 36px 32px; position: relative; z-index: 1;
  animation: scaleIn .35s cubic-bezier(.2,.9,.3,1.2);
}
.login-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; text-align: center; }
.login-logo .logo-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 22px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(99,102,241,.4); }
.login-logo h1 { font-size: 18px; }
.login-logo p { font-size: 12.5px; color: var(--c-text-soft); }
.login-role-hint { background: var(--c-bg); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 11.5px; color: var(--c-text-soft); margin-top: 16px; line-height: 1.6; }
.login-lang-switch { position: absolute; top: 20px; right: 20px; z-index: 2; }

/* ---------- Misc utility ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; }
.mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-14 { margin-bottom: 14px; } .mb-20 { margin-bottom: 20px; }
.text-soft { color: var(--c-text-soft); }
.text-faint { color: var(--c-text-faint); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-title { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.section-sub { color: var(--c-text-soft); font-size: 13px; margin-bottom: 20px; }
.divider { height: 1px; background: var(--c-border); margin: 18px 0; }
.skeleton { background: linear-gradient(90deg, #eceefa 25%, #f5f6fc 37%, #eceefa 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--c-text-faint); }
.empty-state svg { width: 52px; height: 52px; margin-bottom: 14px; opacity: .45; }
.kbd { background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 4px; padding: 1px 6px; font-size: 11px; font-family: monospace; }
.pagination { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.history-field-diff { font-size: 12px; }
.history-field-diff .old { color: var(--c-danger); text-decoration: line-through; }
.history-field-diff .new { color: var(--c-success); font-weight: 700; }

/* ---------- Responsive ---------- */
.menu-toggle { display: none; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); z-index: 80; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .coop-method-grid { grid-template-columns: 1fr; }
  .content-area { padding: 18px 14px 50px; }
  .topbar { padding: 12px 14px; }
}
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; }
.sidebar-backdrop.show { display: block; animation: fadeIn .2s ease; }

/* ---------- Loading page transition ---------- */
.page-enter { animation: fadeInUp .25s ease both; }

/* ---------- Chinese font tuning ---------- */
[lang="zh"] body, body.lang-zh { font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif; }
