/* ============================================
   JARVIS-Yooha Design System
   아이언맨 자비스 테마 — Dark Command Center
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Core palette */
  --bg-primary: #f3efe0;
  --bg-secondary: #e9b6b4;
  --bg-card: rgba(255, 255, 255, 0.6);
  --bg-card-hover: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(243, 239, 224, 0.7);
  --border-glass: rgba(144, 96, 94, 0.2);
  --border-glass-hover: rgba(144, 96, 94, 0.4);

  /* Accent colors */
  --cyan: #3e5168;
  --cyan-dim: rgba(62, 81, 104, 0.15);
  --cyan-glow: rgba(62, 81, 104, 0.2);
  --gold: #90605e;
  --gold-dim: rgba(144, 96, 94, 0.15);
  --gold-glow: rgba(144, 96, 94, 0.2);
  --magenta: #633533;
  --magenta-dim: rgba(99, 53, 51, 0.15);
  --green: #8fb7b0;
  --green-dim: rgba(143, 183, 176, 0.2);
  --red: #310906;
  --red-dim: rgba(49, 9, 6, 0.1);
  --orange: #633533;
  --purple: #222e50;
  --purple-dim: rgba(34, 46, 80, 0.15);

  /* Text */
  --text-primary: #310906;
  --text-secondary: #633533;
  --text-muted: #597380;
  --text-accent: var(--cyan);

  /* Typography */
  --font-en: 'Outfit', sans-serif;
  --font-kr: 'Noto Sans Korean', 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 20px rgba(49, 9, 6, 0.08);
  --shadow-glow-cyan: 0 0 15px rgba(62, 81, 104, 0.2);
  --shadow-glow-gold: 0 0 15px rgba(144, 96, 94, 0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 72px;
  --sidebar-expanded: 240px;
  --content-max-width: 1400px;
}

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

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

body {
  font-family: var(--font-kr);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(144, 96, 94, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(62, 81, 104, 0.06), transparent),
    radial-gradient(ellipse 50% 30% at 10% 60%, rgba(143, 183, 176, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Grid-pattern overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(49, 9, 6, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 9, 6, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim);
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23633533' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

/* ---------- App Shell ---------- */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar Navigation ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0;
  z-index: 100;
  transition: width var(--transition-slow);
  overflow: hidden;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  margin-bottom: var(--space-xl);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.sidebar-logo::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  z-index: -1;
  opacity: 0.4;
  filter: blur(8px);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
  width: 100%;
  padding: 0 var(--space-md);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
}

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

.nav-item.active {
  background: var(--cyan-dim);
  color: var(--cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--cyan);
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar:hover {
  width: var(--sidebar-expanded);
}

.sidebar:hover .nav-label {
  opacity: 1;
}

.sidebar-bottom {
  padding: 0 var(--space-md);
  width: 100%;
  border-top: 1px solid var(--border-glass);
  padding-top: var(--space-md);
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-lg) var(--space-xl);
  max-width: calc(var(--content-max-width) + var(--sidebar-width));
  transition: margin-left var(--transition-slow);
}

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.page-title {
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ---------- Glass Card ---------- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
  animation: fadeInUp 0.5s ease both;
}

.card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-title .icon {
  font-size: 20px;
}

.card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* ---------- Stat Cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  animation: fadeInUp 0.5s ease both;
}

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

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

.stat-card.cyan::before { background: linear-gradient(90deg, var(--cyan), transparent); }
.stat-card.gold::before { background: linear-gradient(90deg, var(--gold), transparent); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), transparent); }
.stat-card.magenta::before { background: linear-gradient(90deg, var(--magenta), transparent); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), transparent); }

.stat-icon {
  font-size: 28px;
  margin-bottom: var(--space-sm);
}

.stat-value {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(49, 9, 6, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  filter: blur(4px);
  animation: progressShine 2s ease-in-out infinite;
}

/* ---------- D-Day Counter ---------- */
.dday-container {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.dday-number {
  font-family: var(--font-en);
  font-size: 64px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.dday-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.dday-target {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding: var(--space-lg) 0;
}

.timeline-track {
  position: relative;
  height: 4px;
  background: rgba(49, 9, 6, 0.06);
  border-radius: 2px;
  margin: var(--space-2xl) 0 var(--space-lg);
}

.timeline-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 2px;
  transition: width 1s ease;
}

.timeline-nodes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
}

.timeline-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  cursor: pointer;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--text-muted);
  transform: translateY(-6px);
  transition: all var(--transition-base);
  z-index: 1;
}

.timeline-node.completed .timeline-dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.timeline-node.current .timeline-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
  animation: pulse 2s ease infinite;
}

.timeline-node-label {
  margin-top: var(--space-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-node.current .timeline-node-label {
  color: var(--gold);
  font-weight: 600;
}

.timeline-node.completed .timeline-node-label {
  color: var(--cyan);
}

/* Hover affordance — makes it obvious nodes are clickable */
.timeline-node:hover .timeline-dot {
  transform: translateY(-6px) scale(1.45);
  box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.2), 0 0 14px var(--cyan-glow);
  border-color: var(--cyan);
}
.timeline-node:hover .timeline-node-label {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Table ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(62, 81, 104, 0.05);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(49, 9, 6, 0.05);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(62, 81, 104, 0.03);
}

.data-table .empty-row td {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-2xl);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  box-shadow: 0 2px 12px rgba(62, 81, 104, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(62, 81, 104, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--border-glass-hover);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(99, 53, 51, 0.2);
}

.btn-danger:hover {
  background: rgba(99, 53, 51, 0.25);
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-base);
}

.btn-icon:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- Tags / Chips ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.tag-cyan { background: var(--cyan-dim); color: var(--cyan); }
.tag-gold { background: var(--gold-dim); color: var(--gold); }
.tag-green { background: var(--green-dim); color: var(--green); }
.tag-red { background: var(--red-dim); color: var(--red); }
.tag-purple { background: var(--purple-dim); color: var(--purple); }
.tag-magenta { background: var(--magenta-dim); color: var(--magenta); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(243, 239, 224, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border-glass);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 18px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--red-dim);
  color: var(--red);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* ---------- Form ---------- */
.form-group {
  margin-bottom: var(--space-md);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-input {
  width: 100%;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state-message {
  font-size: 15px;
  margin-bottom: var(--space-lg);
}

/* ---------- Tab Navigation ---------- */
.tab-nav {
  display: flex;
  gap: var(--space-xs);
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-item {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.tab-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-item.active {
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* ---------- Activity Feed ---------- */
.feed-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  margin-top: 6px;
  flex-shrink: 0;
}

.feed-content {
  flex: 1;
}

.feed-text {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.feed-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Data Export/Import Bar ---------- */
.data-bar {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-glass);
  margin-bottom: var(--space-lg);
  align-items: center;
  flex-wrap: wrap;
}

.data-bar-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: auto;
}

/* ---------- Grade Badge ---------- */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 16px;
}

.grade-1 { background: var(--cyan-dim); color: var(--cyan); }
.grade-2 { background: var(--green-dim); color: var(--green); }
.grade-3 { background: var(--gold-dim); color: var(--gold); }
.grade-4 { background: var(--red-dim); color: var(--orange); }
.grade-5, .grade-6, .grade-7, .grade-8, .grade-9 { background: var(--red-dim); color: var(--red); }

/* ---------- Tooltip ---------- */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.tooltip:hover::after {
  opacity: 1;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--gold-glow); }
  50% { box-shadow: 0 0 20px var(--gold-glow); }
}

@keyframes progressShine {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Staggered animation delays */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0 var(--space-sm);
    border-right: none;
    border-top: 1px solid var(--border-glass);
  }

  .sidebar:hover {
    width: 100%;
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    justify-content: space-around;
    padding: 0;
    gap: 0;
  }

  .nav-item {
    flex-direction: column;
    padding: 8px;
    gap: 2px;
  }

  .nav-item.active::before {
    display: none;
  }

  .nav-label {
    opacity: 1;
    font-size: 10px;
  }

  .sidebar-bottom {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: var(--space-md);
    padding-bottom: 80px;
  }

  .page-title {
    font-size: 22px;
  }

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

  .dday-number {
    font-size: 48px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    margin: var(--space-md);
    max-height: 90vh;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th, .data-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .stat-card {
    padding: var(--space-md);
  }

  .stat-value {
    font-size: 24px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-cyan { color: var(--cyan); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.fw-600 { font-weight: 600; }
.font-en { font-family: var(--font-en); }
.font-mono { font-family: var(--font-mono); }
