/* ============================================
   OrderWaybill — Refined Industrial Design System
   A precision logistics command center interface
   ============================================ */

:root {
  /* Background Hierarchy */
  --bg-root:       #080c12;
  --bg-primary:    #0d1117;
  --bg-secondary:  #131920;
  --bg-tertiary:   #1a212b;
  --bg-elevated:   #1f2733;
  --bg-hover:      #252d38;

  /* Borders */
  --border-subtle: rgba(255,255,255,0.04);
  --border:        rgba(255,255,255,0.07);
  --border-light:  rgba(255,255,255,0.11);
  --border-focus:  rgba(210,153,29,0.35);

  /* Text */
  --text-primary:   #e8edf2;
  --text-secondary: #8d959f;
  --text-muted:     #5a626e;
  --text-placeholder: #434a54;

  /* Accent — Warm Industrial Amber */
  --accent:         #d2991d;
  --accent-hover:   #e0a82a;
  --accent-muted:   rgba(210,153,29,0.15);
  --accent-bg:      rgba(210,153,29,0.10);
  --accent-border:  rgba(210,153,29,0.25);

  /* Semantic */
  --green:          #3fb950;
  --green-bg:       rgba(63,185,80,0.12);
  --green-border:   rgba(63,185,80,0.22);
  --amber:          #d2991d;
  --amber-bg:       rgba(210,153,29,0.12);
  --amber-border:   rgba(210,153,29,0.22);
  --red:            #f85149;
  --red-bg:         rgba(248,81,73,0.12);
  --red-border:     rgba(248,81,73,0.22);
  --blue:           #58a6ff;
  --blue-bg:        rgba(88,166,255,0.12);
  --blue-border:    rgba(88,166,255,0.22);

  /* Geometry */
  --radius-sm:      6px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;

  /* Typography */
  --font-display:   'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:      'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Shadows */
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.3);
  --shadow:         0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:      0 12px 32px rgba(0,0,0,0.5);
  --shadow-glow:    0 0 20px rgba(210,153,29,0.08);

  /* Transitions */
  --transition-fast:   120ms cubic-bezier(0.2, 0, 0, 1);
  --transition-base:   200ms cubic-bezier(0.2, 0, 0, 1);
  --transition-slow:   350ms cubic-bezier(0.2, 0, 0, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   Reset & Base
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-root);
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--accent-hover); }

::selection {
  background: var(--accent-muted);
  color: var(--accent);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   Layout Shell
   ============================================ */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ----- Sidebar ----- */
.sidebar {
  width: 240px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-slow);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.sidebar-header {
  padding: 18px 16px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-header i {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 1px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}

.nav-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.sidebar-footer i { width: 16px; height: 16px; flex-shrink: 0; }

/* ----- Main Content ----- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-root);
}

/* ----- Topbar ----- */
.topbar {
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  flex-shrink: 0;
  -webkit-app-region: drag;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

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

.topbar-right .user-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ----- Page Body ----- */
.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scroll-behavior: smooth;
}

/* ============================================
   Cards → Surface Panels (卡片 → 表面面板)
   ============================================ */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition-base);
}

.card + .card { margin-top: 20px; }

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

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ============================================
   KPI Cards (Stat Cards)
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition-base), transform var(--transition-fast);
  cursor: default;
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.stat-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================
   Data Tables
   ============================================ */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

table thead th {
  text-align: left;
  padding: 11px 16px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

table tbody td {
  padding: 11px 16px;
  font-size: 0.82rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  transition: background var(--transition-fast);
}

table tbody tr {
  transition: background var(--transition-fast);
}

table tbody tr:hover td {
  background: var(--bg-hover);
}

table tbody tr:last-child td {
  border-bottom: none;
}

table td.text-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

table td.break-word {
  white-space: normal;
  word-break: break-word;
  max-width: 300px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-body);
  line-height: 1.4;
  user-select: none;
}

.btn:active { transform: scale(0.98); }

/* Primary — Amber accent */
.btn-primary {
  background: var(--accent);
  color: #1a1508;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Secondary */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Danger */
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover { opacity: 0.88; }

/* Success */
.btn-success {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-success:hover { opacity: 0.88; }

/* Sizes */
.btn-sm { padding: 4px 10px; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 10px 22px; font-size: 0.9rem; }

.btn:disabled, .btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.btn i { width: 16px; height: 16px; }
.btn-sm i { width: 14px; height: 14px; }

/* ============================================
   Badges & Status
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success  { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.badge-success::before { background: var(--green); }

.badge-warning  { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.badge-warning::before { background: var(--amber); }

.badge-danger   { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.badge-danger::before { background: var(--red); }

.badge-info     { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }
.badge-info::before { background: var(--blue); }

.badge-neutral  { background: var(--bg-tertiary); color: var(--text-muted); border-color: var(--border-light); }
.badge-neutral::before { background: var(--text-muted); }

.badge-accent   { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }
.badge-accent::before { background: var(--accent); }

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: 18px;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.form-input::placeholder { color: var(--text-placeholder); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a626e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 0.72rem;
  color: var(--red);
  margin-top: 5px;
}

/* File input styling */
input[type="file"].form-input {
  padding: 8px;
  cursor: pointer;
}
input[type="file"].form-input::file-selector-button {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  margin-right: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}
input[type="file"].form-input::file-selector-button:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ============================================
   Alerts / Notifications
   ============================================ */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: alertIn var(--transition-base);
  border: 1px solid transparent;
}

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

.alert-success { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.alert-error   { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.alert-info    { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }

/* ============================================
   Login Page
   ============================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-root);
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(210,153,29,0.04) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 30%, rgba(88,166,255,0.03) 0%, transparent 55%);
}

.login-card {
  width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  animation: cardEnter var(--transition-slow);
}

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

.login-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

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

.login-card .form-group { margin-bottom: 18px; }
.login-card .form-group:last-of-type { margin-bottom: 24px; }

.login-card .btn { width: 100%; justify-content: center; }

/* ============================================
   Pagination
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.pagination .active {
  background: var(--accent);
  color: #1a1508;
  border-color: var(--accent);
  font-weight: 600;
}

.pagination .disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================
   Toolbar / Filter Bar
   ============================================ */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  min-width: 150px;
}

.filter-bar .form-input[type="date"] {
  min-width: 140px;
}

.filter-bar .form-input.search-input {
  min-width: 220px;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.empty-state i {
  color: var(--text-muted);
  opacity: 0.25;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.82rem;
  max-width: 320px;
  margin: 0 auto 18px;
}

/* ============================================
   Detail View Grid
   ============================================ */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   Print Preview Frame
   ============================================ */

.print-preview {
  max-width: 480px;
  margin: 0 auto;
}

.print-preview-label {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-primary);
}

.print-preview-tracking {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.print-preview-tracking .label-sm {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.print-preview-tracking .value-lg {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

/* ============================================
   Code / Pre / Raw Data
   ============================================ */

pre, code.debug {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow-x: auto;
  max-height: 360px;
  line-height: 1.7;
}

/* ============================================
   Utility Classes
   ============================================ */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mr-2 { margin-right: 8px; }
.mr-4 { margin-right: 16px; }
.ml-auto { margin-left: auto; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }

.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.78rem; }
.text-base { font-size: 0.88rem; }
.text-lg { font-size: 1rem; }
.text-xl { font-size: 1.15rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    z-index: 50;
  }
  .sidebar.open { transform: translateX(0); }

  .stats-grid { grid-template-columns: 1fr; }
  .login-card { width: 90%; padding: 28px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-input { width: 100%; min-width: auto; }
  .page-body { padding: 16px; }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-bg); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.page-body > * {
  animation: slideUp var(--transition-slow) backwards;
}

.page-body > *:nth-child(1) { animation-delay: 0ms; }
.page-body > *:nth-child(2) { animation-delay: 50ms; }
.page-body > *:nth-child(3) { animation-delay: 100ms; }
.page-body > *:nth-child(4) { animation-delay: 150ms; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  animation: scaleIn 0.15s ease;
}

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

.modal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition-fast);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { }
