/* ==========================================================================
   Design System & Theme Tokens (Light / Dark Modes)
   ========================================================================== */

/* Dark Mode (Default) */
:root, html[data-theme="dark"] {
  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-english: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Color Palette - Dark Premium Theme */
  --bg-main: #0b0f19;
  --bg-card: #151c2c;
  --bg-card-hover: #1c263c;
  --bg-element: #1e293b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Quadrant & Accent Colors */
  --q1-color: #ef4444; /* Urgent & Important - Red */
  --q1-bg: rgba(239, 68, 68, 0.08);
  --q1-border: rgba(239, 68, 68, 0.25);

  --q2-color: #6366f1; /* Important, Not Urgent - Indigo */
  --q2-bg: rgba(99, 102, 241, 0.08);
  --q2-border: rgba(99, 102, 241, 0.25);

  --q3-color: #f59e0b; /* Urgent, Not Important - Amber */
  --q3-bg: rgba(245, 158, 11, 0.08);
  --q3-border: rgba(245, 158, 11, 0.25);

  --q4-color: #8b5cf6; /* Not Urgent & Not Important - Purple */
  --q4-bg: rgba(139, 92, 246, 0.08);
  --q4-border: rgba(139, 92, 246, 0.25);

  --success-color: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Light Mode Theme */
html[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-element: #e2e8f0;
  --border-color: rgba(15, 23, 42, 0.12);
  --border-focus: #4f46e5;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --q1-color: #dc2626;
  --q1-bg: rgba(220, 38, 38, 0.06);
  --q1-border: rgba(220, 38, 38, 0.2);

  --q2-color: #4f46e5;
  --q2-bg: rgba(79, 70, 229, 0.06);
  --q2-border: rgba(79, 70, 229, 0.2);

  --q3-color: #d97706;
  --q3-bg: rgba(217, 119, 6, 0.06);
  --q3-border: rgba(217, 119, 6, 0.2);

  --q4-color: #7c3aed;
  --q4-bg: rgba(124, 58, 237, 0.06);
  --q4-border: rgba(124, 58, 237, 0.2);

  --success-color: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
}

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

body {
  font-family: var(--font-arabic);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 2rem;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

html[dir="ltr"] body {
  font-family: var(--font-english);
}

.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.control-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.nav-tabs {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 4px;
  flex-wrap: wrap;
  width: 100%;
}

@media (min-width: 900px) {
  .nav-tabs {
    width: auto;
  }
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.nav-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.tab-icon {
  width: 18px;
  height: 18px;
}

.badge {
  background: var(--q2-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.tab-view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease;
}

.tab-view.hidden, .hidden {
  display: none !important;
}

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

/* ==========================================================================
   Auth Screen Styling (NEW)
   ========================================================================== */
.auth-card {
  max-width: 480px;
  margin: 2rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.auth-icon {
  font-size: 2.5rem;
  background: var(--bg-element);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.auth-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.auth-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.95rem;
}

.auth-error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--q1-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   Account Section Styling (NEW)
   ========================================================================== */
.account-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.account-info h2 { font-size: 1.35rem; font-weight: 700; }
.account-info p { color: var(--border-focus); font-weight: 700; font-size: 0.95rem; }

.api-token-card, .change-password-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.token-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.token-header h3 { font-size: 1.05rem; font-weight: 700; }

.token-display-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.token-display-box code {
  font-family: monospace;
  font-size: 1rem;
  color: var(--success-color);
  word-break: break-all;
}

/* Eisenhower Matrix */
.matrix-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.matrix-info h2 { font-size: 1.35rem; font-weight: 700; }
.matrix-info p { color: var(--text-secondary); font-size: 0.875rem; }

.matrix-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.stat-tag { background: var(--bg-card); border: 1px solid var(--border-color); padding: 0.4rem 0.85rem; border-radius: var(--radius-md); font-size: 0.85rem; color: var(--text-secondary); }
.stat-tag strong { color: var(--text-primary); }
.stat-tag.success { border-color: rgba(16, 185, 129, 0.3); color: var(--success-color); }

.today-checklist-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.1rem 1.35rem; display: flex; flex-direction: column; gap: 0.85rem; box-shadow: var(--shadow-sm); }
.today-checklist-header { display: flex; align-items: center; gap: 0.6rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.today-checklist-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.section-hint { font-size: 0.775rem; color: var(--text-muted); }

.eisenhower-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .eisenhower-grid { grid-template-columns: repeat(2, 1fr); } }

.quadrant { background: var(--bg-card); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; border: 1px solid var(--border-color); box-shadow: var(--shadow-md); transition: border-color var(--transition-fast); }
.quadrant:hover { border-color: var(--border-focus); }
.quadrant.q1 { border-top: 4px solid var(--q1-color); }
.quadrant.q2 { border-top: 4px solid var(--q2-color); }
.quadrant.q3 { border-top: 4px solid var(--q3-color); }
.quadrant.q4 { border-top: 4px solid var(--q4-color); }

.quadrant-header { display: flex; justify-content: space-between; align-items: center; }
.quadrant-title { display: flex; align-items: center; gap: 0.5rem; }
.quadrant-title h3 { font-size: 1.05rem; font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.q1 .dot { background-color: var(--q1-color); box-shadow: 0 0 8px var(--q1-color); }
.q2 .dot { background-color: var(--q2-color); box-shadow: 0 0 8px var(--q2-color); }
.q3 .dot { background-color: var(--q3-color); box-shadow: 0 0 8px var(--q3-color); }
.q4 .dot { background-color: var(--q4-color); box-shadow: 0 0 8px var(--q4-color); }

.quadrant-badge { background: var(--bg-element); color: var(--text-secondary); font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-full); }
.quadrant-desc { font-size: 0.8rem; color: var(--text-muted); }

.task-input { flex: 1; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.6rem 0.85rem; color: var(--text-primary); font-family: inherit; font-size: 0.875rem; outline: none; transition: border-color var(--transition-fast); }
.task-input:focus { border-color: var(--border-focus); }

.btn-add { background: var(--bg-element); color: var(--text-primary); border: 1px solid var(--border-color); padding: 0 0.9rem; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.task-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; min-height: 40px; }
.task-item { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.75rem 0.85rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; transition: all var(--transition-fast); }
.task-item:hover { border-color: var(--border-focus); transform: translateY(-1px); }

.task-content { display: flex; align-items: flex-start; gap: 0.65rem; flex: 1; min-width: 0; }
.custom-checkbox { appearance: none; width: 18px; height: 18px; border: 2px solid var(--text-muted); border-radius: 4px; background: transparent; cursor: pointer; display: grid; place-content: center; margin-top: 3px; flex-shrink: 0; transition: all var(--transition-fast); }
.custom-checkbox:checked { background: var(--success-color); border-color: var(--success-color); }
.custom-checkbox:checked::before { content: "✓"; color: white; font-size: 12px; font-weight: bold; }

.task-text { font-size: 0.9rem; color: var(--text-primary); word-break: break-word; }
.task-item.done .task-text { text-decoration: line-through; color: var(--text-muted); }
.task-actions { display: flex; align-items: center; gap: 0.4rem; }
.quadrant-select { background: var(--bg-element); color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.25rem 0.4rem; font-family: inherit; font-size: 0.75rem; cursor: pointer; outline: none; }

.btn-delete { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: color var(--transition-fast), background var(--transition-fast); }
.btn-delete:hover { color: var(--q1-color); background: rgba(239, 68, 68, 0.1); }
.task-empty { color: var(--text-muted); font-size: 0.825rem; text-align: center; padding: 1rem 0; border: 1px dashed var(--border-color); border-radius: var(--radius-md); }

/* Calendar Section */
.calendar-top-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.calendar-info h2 { font-size: 1.35rem; font-weight: 700; }
.calendar-info p { color: var(--text-secondary); font-size: 0.875rem; }

.live-clock-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.6rem 1.25rem; display: flex; flex-direction: column; align-items: center; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15); border-left: 4px solid var(--border-focus); }
html[dir="ltr"] .live-clock-card { border-left: none; border-right: 4px solid var(--border-focus); }
.live-clock-time { font-family: var(--font-english); font-size: 1.4rem; font-weight: 800; color: var(--q2-color); letter-spacing: 1px; }
.live-clock-date { font-size: 0.8rem; color: var(--text-secondary); }

.calendar-controls-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 0.85rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.cal-view-selector { display: flex; background: var(--bg-main); padding: 4px; border-radius: var(--radius-md); border: 1px solid var(--border-color); gap: 4px; }
.cal-view-btn { background: transparent; border: none; color: var(--text-secondary); padding: 0.4rem 0.9rem; font-family: inherit; font-size: 0.85rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); }
.cal-view-btn.active { background: var(--bg-element); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.cal-date-nav { display: flex; align-items: center; gap: 0.5rem; }
.cal-nav-btn { background: var(--bg-element); color: var(--text-primary); border: 1px solid var(--border-color); padding: 0.4rem 0.85rem; font-family: inherit; font-size: 0.85rem; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); }
.cal-nav-btn:hover { border-color: var(--border-focus); background: var(--bg-card-hover); }
.cal-nav-btn.today-btn { background: var(--q2-color); border-color: var(--q2-color); color: white; font-weight: 700; }
.cal-current-label { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

.calendar-view-container { display: flex; flex-direction: column; gap: 1rem; }
.calendar-view-container.hidden { display: none !important; }
.month-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-weight: 700; color: var(--text-secondary); font-size: 0.875rem; padding: 0.5rem 0; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.month-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; }
.month-day-cell { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); min-height: 90px; padding: 0.6rem; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; transition: all var(--transition-fast); }
.month-day-cell:hover { border-color: var(--border-focus); transform: translateY(-2px); background: var(--bg-card-hover); }
.month-day-cell.other-month { opacity: 0.35; }
.month-day-cell.today { border-color: var(--q2-color); box-shadow: 0 0 10px rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.05); }
.month-day-number { font-family: var(--font-english); font-weight: 700; font-size: 1rem; color: var(--text-primary); display: inline-block; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; }
.today .month-day-number { background: var(--q2-color); color: white; }
.month-day-indicators { display: flex; flex-direction: column; gap: 2px; }
.day-indicator-badge { font-size: 0.7rem; padding: 2px 6px; border-radius: var(--radius-sm); background: var(--bg-element); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-indicator-badge.has-tasks { background: rgba(99, 102, 241, 0.2); color: var(--q2-color); }

.week-days-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 768px) { .week-days-grid { grid-template-columns: repeat(7, 1fr); } }
.week-day-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.6rem; min-height: 140px; cursor: pointer; transition: all var(--transition-fast); }
.week-day-card:hover { border-color: var(--border-focus); transform: translateY(-2px); background: var(--bg-card-hover); }
.week-day-card.today { border-color: var(--q2-color); background: rgba(99, 102, 241, 0.05); }
.week-day-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 0.4rem; }
.week-day-name { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); }
.week-day-date { font-family: var(--font-english); font-weight: 700; font-size: 0.9rem; }
.week-task-preview { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--text-muted); }

.daily-note-panel { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; box-shadow: var(--shadow-lg); }
.daily-note-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.daily-note-title-box { display: flex; align-items: center; gap: 0.85rem; }
.calendar-icon { font-size: 2rem; }
.daily-note-title-box h3 { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); }
.note-subtitle { font-size: 0.8rem; color: var(--text-secondary); }
.btn-today-shortcut { background: var(--bg-element); color: var(--text-primary); border: 1px solid var(--border-color); padding: 0.45rem 1rem; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.btn-today-shortcut:hover { background: var(--bg-card-hover); border-color: var(--border-focus); }

.daily-note-body { display: flex; flex-direction: column; gap: 1.5rem; }
.note-section { display: flex; flex-direction: column; gap: 0.85rem; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1.1rem; }
.note-section-title { display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.sec-icon { font-size: 1.2rem; }
.note-section-title h4 { font-size: 1rem; font-weight: 700; }
.add-item-form { display: flex; gap: 0.5rem; }

.mini-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 768px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
.mini-q { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.85rem; display: flex; flex-direction: column; gap: 0.65rem; }
.mini-q.q1 { border-top: 3px solid var(--q1-color); }
.mini-q.q2 { border-top: 3px solid var(--q2-color); }
.mini-q.q3 { border-top: 3px solid var(--q3-color); }
.mini-q.q4 { border-top: 3px solid var(--q4-color); }
.mini-q-header h5 { font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; gap: 0.35rem; }
.daily-mini-form { display: flex; gap: 0.4rem; }
.daily-mini-form input { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
.daily-mini-form button { padding: 0 0.6rem; font-size: 0.8rem; }
.mini-list { min-height: 50px; }

/* Wishes Section */
.wishes-header-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.wishes-info h2 { font-size: 1.35rem; font-weight: 700; }
.wishes-info p { color: var(--text-secondary); font-size: 0.875rem; }
.wishes-stats { display: flex; gap: 0.5rem; }
.add-wish-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.wish-form-inputs { display: flex; gap: 0.75rem; }
.wishes-list-container { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem; }

/* Vocab Section & Categories & Notes */
.vocab-header-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; }
.vocab-info h2 { font-size: 1.35rem; font-weight: 700; }
.vocab-info p { color: var(--text-secondary); font-size: 0.875rem; }
.progress-container { min-width: 240px; display: flex; flex-direction: column; gap: 0.35rem; }
.progress-stats { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-secondary); }
.progress-stats strong { color: var(--success-color); font-family: var(--font-english); }
.progress-bar-bg { height: 8px; background: var(--bg-element); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #10b981 0%, #34d399 100%); border-radius: var(--radius-full); transition: width 0.4s ease; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); }

.categories-manage-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.1rem 1.35rem; display: flex; flex-direction: column; gap: 0.85rem; }
.category-card-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.85rem; }
.category-card-header h3 { font-size: 1.05rem; font-weight: 700; }
.add-category-inline-form { display: flex; gap: 0.5rem; flex: 1; max-width: 400px; }
.categories-tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.category-chip { background: var(--bg-element); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.825rem; display: flex; align-items: center; gap: 0.4rem; }
.btn-delete-chip { background: transparent; border: none; color: var(--text-muted); font-size: 1rem; font-weight: bold; cursor: pointer; line-height: 1; padding: 0 2px; }
.btn-delete-chip:hover { color: var(--q1-color); }

.add-vocab-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.add-vocab-card h3 { font-size: 1.05rem; font-weight: 700; }
.vocab-form-inputs { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: end; }
@media (min-width: 768px) { .vocab-form-inputs { grid-template-columns: 1fr 1fr 1fr auto; } }

.input-group { display: flex; flex-direction: column; gap: 0.35rem; }
.input-group label { font-size: 0.825rem; color: var(--text-secondary); }
.req { color: var(--q1-color); }
.input-group input, .input-group select { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; color: var(--text-primary); font-family: inherit; font-size: 0.9rem; outline: none; transition: border-color var(--transition-fast); }
.input-group input.ltr-input { font-family: var(--font-english); direction: ltr; text-align: left; }
.input-group input:focus, .input-group select:focus { border-color: var(--border-focus); }

.btn-primary { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); color: white; border: none; padding: 0.65rem 1.25rem; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.4rem; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); transition: all var(--transition-fast); }
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }

.vocab-controls { display: flex; flex-direction: column; gap: 0.85rem; }
@media (min-width: 768px) { .vocab-controls { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; } }
.search-box { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.5rem 0.85rem; flex: 1; min-width: 240px; }
.search-box svg { color: var(--text-muted); }
.search-box input { background: transparent; border: none; color: var(--text-primary); font-family: inherit; font-size: 0.875rem; width: 100%; outline: none; }

.filter-buttons, .category-filter-bar { display: flex; gap: 0.4rem; background: var(--bg-card); padding: 4px; border-radius: var(--radius-md); border: 1px solid var(--border-color); flex-wrap: wrap; }
.filter-btn, .cat-filter-btn { background: transparent; border: none; color: var(--text-secondary); padding: 0.4rem 0.85rem; font-family: inherit; font-size: 0.825rem; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); }
.filter-btn.active, .cat-filter-btn.active { background: var(--bg-element); color: var(--text-primary); }

.vocab-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 640px) { .vocab-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .vocab-grid { grid-template-columns: repeat(3, 1fr); } }

.vocab-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.85rem; transition: all var(--transition-fast); }
.vocab-card:hover { border-color: var(--border-focus); transform: translateY(-2px); }
.vocab-card.learned { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.03); }

.vocab-main { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.vocab-text-box { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.vocab-english { font-family: var(--font-english); direction: ltr; text-align: left; font-size: 1.05rem; font-weight: 700; color: var(--text-primary); word-break: break-word; }
.vocab-meaning { font-size: 0.85rem; color: var(--text-secondary); }
.vocab-card.learned .vocab-english { text-decoration: line-through; color: var(--text-muted); }

.vocab-category-tag { display: inline-block; background: var(--bg-element); color: var(--border-focus); font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-sm); margin-top: 2px; width: fit-content; }
.vocab-actions-col { display: flex; align-items: center; gap: 0.4rem; }
.vocab-category-select-inline { background: var(--bg-main); color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.2rem 0.4rem; font-size: 0.75rem; outline: none; }

.empty-state { background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: var(--radius-lg); padding: 3rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.empty-icon { font-size: 3rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-primary); }
.empty-state p { font-size: 0.875rem; color: var(--text-secondary); max-width: 400px; }

.vocab-notes-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.vocab-notes-header { display: flex; align-items: center; gap: 0.6rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.6rem; }
.vocab-notes-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.add-vocab-note-form { display: flex; flex-direction: column; gap: 0.65rem; }
.note-textarea { resize: vertical; min-height: 80px; }
.vocab-notes-grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 768px) { .vocab-notes-grid { grid-template-columns: repeat(2, 1fr); } }
.vocab-note-item { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; transition: all var(--transition-fast); }
.vocab-note-item:hover { border-color: var(--border-focus); }
.vocab-note-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.vocab-note-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.vocab-note-text { font-size: 0.875rem; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.5; }

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