/* ═══════════════════════════════════════════════════════════════
   "會員專頁" — Member Portal
   Design: Refined Editorial · Taiwanese Modernist Warmth
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;600&family=Noto+Serif+TC:wght@400;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --ink: #1C2333;
  --ink-light: #2D3648;
  --cream: #FAF8F5;
  --cream-dark: #F0EDE8;
  --surface: #FFFFFF;
  --copper: #B8783B;
  --copper-light: #D4A35D;
  --copper-pale: #FDF5EB;
  --gold: #C8963E;
  --sage: #7A8B6F;
  --sage-light: #EFF3EC;
  --slate: #6B7280;
  --slate-light: #F3F4F6;
  --text: #2C2416;
  --text-muted: #8B8581;
  --border: #E8E3DC;
  --border-light: #F0EDE8;
  --danger: #C44536;
  --danger-light: #FDF2F0;
  --success: #5B8C5A;
  --success-light: #F0F7EF;
  --info: #6B8DB5;
  --info-light: #F0F5FA;
  --warning: #D4952A;
  --warning-light: #FEF9F0;

  --font-display: 'Noto Serif TC', 'Source Han Serif TC', 'Microsoft JhengHei', serif;
  --font-body: 'Noto Sans TC', 'Source Han Sans TC', 'Microsoft JhengHei', sans-serif;

  --shadow-xs: 0 1px 2px rgba(28,35,51,0.04);
  --shadow-sm: 0 2px 8px rgba(28,35,51,0.06);
  --shadow-md: 0 8px 30px rgba(28,35,51,0.08);
  --shadow-lg: 0 16px 48px rgba(28,35,51,0.10);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition: 180ms cubic-bezier(0.33, 1, 0.68, 1);
  --transition-slow: 350ms cubic-bezier(0.33, 1, 0.68, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img, svg { max-width: 100%; display: block; }

/* ── Container (centered layout fix) ──────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.navbar-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand i {
  color: var(--copper);
  font-size: 1.35rem;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-nav.ms-auto { margin-left: auto; }

.nav-item { position: relative; }
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--slate);
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--ink);
  background: var(--cream-dark);
}
.nav-link.active {
  color: var(--copper);
  background: var(--copper-pale);
  font-weight: 600;
}
.navbar .nav-item span.nav-link {
  color: var(--text-muted);
  cursor: default;
}
.navbar .nav-item span.nav-link:hover {
  background: none;
  color: var(--text-muted);
}
.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.25rem;
}

/* ── Main Content ─────────────────────────────────────────── */
main.container {
  flex: 1;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* ── Breadcrumbs ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--slate);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--copper); }
.breadcrumb .sep { color: var(--border); }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.page-title i { color: var(--copper); }
.page-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-body { padding: 1.75rem; }
.card-header {
  padding: 1rem 1.75rem;
  background: var(--cream-dark);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.card-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border-light);
  background: transparent;
}

/* PDF compact list on member dashboard */
.pdf-list { list-style: none; padding: 0; margin: 0; }
.pdf-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.pdf-list-item:hover { background: var(--cream-dark); }
.pdf-list-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.pdf-list-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); border-bottom: none; }
.pdf-list-item:only-child { border-radius: var(--radius-md); border-bottom: none; }
.pdf-list-item .pl-icon {
  width: 40px; height: 40px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.pdf-list-item .pl-info { flex: 1; min-width: 0; }
.pdf-list-item .pl-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-list-item .pl-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdf-list-item .pl-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pdf-list-item .pl-meta .badge { font-size: 0.72rem; }
.pdf-list-item .pl-arrow {
  color: var(--border);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
}
.pdf-list-item:hover .pl-arrow { color: var(--copper); transform: translateX(3px); }

/* Stat cards — compact on admin dashboard */
.stat-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  flex: 1;
  min-width: 160px;
  transition: box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.stat-pill:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--copper);
}
.stat-pill .sp-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.stat-pill .sp-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-pill .sp-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Action cards on dashboard */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.action-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}
.action-panel h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.action-panel h4 i { color: var(--copper); }
.action-panel .btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.action-panel .panel-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.action-panel .panel-link:hover { color: var(--copper-light); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-light); border-color: var(--ink-light); box-shadow: var(--shadow-sm); }

.btn-accent {
  background: var(--copper);
  color: white;
  border-color: var(--copper);
}
.btn-accent:hover { background: var(--copper-light); border-color: var(--copper-light); box-shadow: var(--shadow-sm); }

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.btn-success:hover { background: #4A7A49; border-color: #4A7A49; }

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn-danger:hover { background: #A83B2F; border-color: #A83B2F; }

.btn-warning {
  background: var(--warning);
  color: white;
  border-color: var(--warning);
}
.btn-outline-primary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline-primary:hover { background: var(--slate-light); border-color: var(--slate); color: var(--ink); }

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-light);
}
.btn-outline-danger:hover { background: var(--danger-light); border-color: var(--danger); }

.btn-outline-success {
  background: transparent;
  color: var(--success);
  border-color: var(--success-light);
}
.btn-outline-success:hover { background: var(--success-light); border-color: var(--success); }

.btn-outline-warning {
  background: transparent;
  color: var(--warning);
  border-color: var(--warning-light);
}
.btn-outline-warning:hover { background: var(--warning-light); border-color: var(--warning); }

.btn-outline-info {
  background: transparent;
  color: var(--info);
  border-color: var(--info-light);
}
.btn-outline-info:hover { background: var(--info-light); border-color: var(--info); }

.btn-outline-secondary {
  background: transparent;
  color: var(--slate);
  border-color: var(--border);
}
.btn-outline-secondary:hover { background: var(--slate-light); color: var(--ink); }

.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; border-radius: var(--radius-xs); }

.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ── Forms ────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(184,120,59,0.12);
}
.form-control:disabled {
  background: var(--cream-dark);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-control-plaintext {
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text);
}
.form-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.form-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form-check-input {
  width: 44px;
  height: 24px;
  appearance: none;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}
.form-check-input::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}
.form-check-input:checked { background: var(--success); }
.form-check-input:checked::after { transform: translateX(20px); }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238B8581'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.5rem; }

.input-group {
  display: flex;
  gap: 0;
}
.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
}
.input-group .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── Table ────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--surface);
}
table.table thead { background: var(--cream-dark); }
table.table th a {
  color: var(--slate);
  text-decoration: none;
  transition: color var(--transition);
}
table.table th a:hover { color: var(--copper); }
table.table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
table.table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
table.table tbody tr { transition: background var(--transition); }
table.table tbody tr:hover { background: var(--cream); }
table.table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--slate-light); color: var(--slate); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid transparent;
  animation: fadeIn 0.3s ease;
}
.alert-danger { background: var(--danger-light); border-color: #F5D5D0; color: var(--danger); }
.alert-success { background: var(--success-light); border-color: #D5E8D4; color: var(--success); }
.alert-warning { background: var(--warning-light); border-color: #FCE8CD; color: var(--warning); }
.alert-info { background: var(--info-light); border-color: #D5E3F0; color: var(--info); }
.alert .btn-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.5; font-size: 1.1rem; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  justify-content: center;
  margin-top: 1.5rem;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
  text-decoration: none;
}
.page-link:hover { background: var(--cream-dark); border-color: var(--slate); }
.page-item.active .page-link {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.page-item.disabled .page-link {
  color: var(--border);
  pointer-events: none;
}

/* ── Login Pages ──────────────────────────────────────────── */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 3rem);
  padding: 2rem;
}
.login-wrapper.login-split {
  justify-content: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.login-container {
  width: 100%;
  max-width: 420px;
}
.login-guide-image {
  flex-shrink: 0;
  width: 460px;
  max-width: 100%;
}
.login-guide-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
@media (max-width: 900px) {
  .login-wrapper.login-split {
    flex-direction: column;
    gap: 1.5rem;
  }
  .login-guide-image {
    width: 100%;
    max-width: 420px;
  }
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--copper), var(--gold));
}
.login-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  margin-bottom: 0.3rem;
}
.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}
.login-card .form-control {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}
.login-card .form-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.login-card .btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}
.login-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.login-footer a { color: var(--copper); font-weight: 500; }
.login-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.5rem;
  background: var(--copper-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--copper);
}

/* ── PDF Viewer ───────────────────────────────────────────── */
.pdf-viewer-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.pdf-viewer-container iframe {
  width: 100%;
  height: calc(100vh - 280px);
  min-height: 500px;
  border: none;
}
.pdf-toolbar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.4rem;
  box-shadow: var(--shadow-sm);
}
.pdf-viewer-container.fullscreen-active {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
  border-radius: 0;
  border: none;
  background: #000;
}
.pdf-viewer-container.fullscreen-active .pdf-toolbar {
  background: rgba(255,255,255,0.9);
}
.pdf-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.pdf-meta span { display: flex; align-items: center; gap: 0.3rem; }
.pdf-footer-note {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
}
.empty-state i {
  font-size: 3.5rem;
  color: var(--border);
  display: block;
  margin-bottom: 1rem;
}
.empty-state h4 { color: var(--text-muted); font-weight: 500; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Footer ───────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background: var(--surface);
  margin-top: auto;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }
.slide-up { animation: slideUp 0.5s ease forwards; }
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ── Search bar ───────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
}
.search-bar .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  max-width: 360px;
}

/* ── Section header ───────────────────────────────────────── */
.section-header {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--copper-pale);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-header i { color: var(--copper); }

/* ── Import guide card ────────────────────────────────────── */
.guide-card {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.guide-card h5 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--ink); }
.guide-card code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  color: var(--copper);
}

/* ── Upload zone ──────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.upload-zone:hover { border-color: var(--copper); background: var(--copper-pale); }
.upload-zone i { font-size: 2.5rem; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .login-card { padding: 1.75rem; }
  .stat-card { padding: 1.25rem 0.75rem; }
  .stat-card .stat-value { font-size: 1.75rem; }
  table.table th, table.table td { padding: 0.6rem 0.75rem; font-size: 0.8rem; }
  .container { padding: 0 1rem; }
  .navbar-nav { gap: 0; }
  .nav-link { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
  .page-actions .btn-lg { padding: 0.6rem 1.25rem; font-size: 0.9rem; }
  main.container { padding-top: 1.5rem; padding-bottom: 2.5rem; }
  .stat-card { padding: 1.5rem 1rem; }
}

@media (max-width: 576px) {
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; justify-content: center; }
  .page-actions .btn-lg { font-size: 0.85rem; }
}
