:root {
  /* Sanatan Masculine Palette - Light Theme (Chandan & Kesari) */
  --bg-primary: #fcfaf7;
  --bg-surface: #f4eee5;
  --bg-card: #ffffff;
  --bg-hover: #ebe4d8;
  --bg-active: #fae4cf;
  --text-primary: #1c1917;      /* Deep iron slate */
  --text-secondary: #44403c;    /* Aged teak */
  --text-muted: #78716c;        /* Sandalwood stone */
  --border-color: #e2d8c9;      /* Raw parchment border */
  
  --primary: #c2410c;           /* Sacred Bhagwa / Deep Agni Kesari */
  --primary-hover: #9a3412;     /* Blazing Kesari */
  --primary-glow: rgba(194, 65, 12, 0.25);
  --primary-container: #ffedd5;
  --on-primary-container: #7c2d12;
  
  --gold: #b45309;              /* Surya Swarna (Solar Gold) */
  --gold-glow: rgba(180, 83, 9, 0.2);
  --star-gold: #d97706;
  
  --danger: #991b1b;            /* Raktaksha Crimson */
  --danger-bg: #fee2e2;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --success: #15803d;
  --success-bg: #dcfce7;
  
  --sidebar-width: 280px;
  --drawer-width: 400px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(41, 37, 36, 0.08);
  --shadow-md: 0 4px 16px rgba(41, 37, 36, 0.12);
  --shadow-lg: 0 8px 30px rgba(41, 37, 36, 0.16);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default to Masculine Sanatan Dark Mode (Veer Bhasma & Surya Swarna) */
body.dark-theme, body {
  --bg-primary: #0f1012;        /* Deep Obsidian / Kaal Bhairav Matte */
  --bg-surface: #15171b;        /* Armour Slate */
  --bg-card: #1c1f26;           /* Forged Metal Card */
  --bg-hover: #262a34;          /* Polished Graphite */
  --bg-active: #312117;         /* Kesari Iron */
  --text-primary: #f5f5f4;      /* Pure Ash / White Conch */
  --text-secondary: #d6d3d1;    /* Silver Steel */
  --text-muted: #a8a29e;        /* Bhasma Grey */
  --border-color: #2e333d;      /* Dark Bronze Trim */
  
  --primary: #f97316;           /* Blazing Bhagwa / Rudra Kesari */
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.35);
  --primary-container: #431407;
  --on-primary-container: #fed7aa;
  
  --gold: #f59e0b;              /* Swarna (Vedic Gold) */
  --gold-glow: rgba(245, 158, 11, 0.3);
  --star-gold: #fbbf24;
  
  --danger: #ef4444;            /* Trishul Red */
  --danger-bg: #450a0a;
  --warning: #f59e0b;
  --warning-bg: #451a03;
  --success: #22c55e;
  --success-bg: #052e16;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.85);
}

body.light-theme {
  --bg-primary: #fcfaf7;
  --bg-surface: #f4eee5;
  --bg-card: #ffffff;
  --bg-hover: #ebe4d8;
  --bg-active: #fae4cf;
  --text-primary: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --border-color: #e2d8c9;
  --primary: #c2410c;
  --primary-hover: #9a3412;
  --primary-glow: rgba(194, 65, 12, 0.25);
  --primary-container: #ffedd5;
  --on-primary-container: #7c2d12;
  --gold: #b45309;
  --star-gold: #d97706;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(41, 37, 36, 0.08);
  --shadow-md: 0 4px 16px rgba(41, 37, 36, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Rajdhani', 'Roboto', -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
.app-header {
  height: var(--header-height);
  background-color: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-emblem {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-left: 2px;
}

.header-center {
  flex: 1;
  max-width: 650px;
  margin: 0 20px;
}

.search-box {
  background-color: var(--bg-hover);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 8px 16px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.search-box:focus-within {
  background-color: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.search-icon {
  color: var(--gold);
  font-size: 22px;
  margin-right: 10px;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  margin-left: 8px;
  cursor: pointer;
  border: 1px solid var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Buttons */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background-color: var(--bg-hover);
  color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.icon-btn.mini {
  width: 30px;
  height: 30px;
}

.text-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.text-btn:hover {
  background-color: var(--bg-card);
  border-color: var(--gold);
  color: var(--gold);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #c2410c 100%);
  color: #ffffff;
  border: 1px solid var(--gold);
  cursor: pointer;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #fb923c 0%, var(--primary) 100%);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

/* Layout */
.main-layout {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-primary);
  border-right: 1.5px solid var(--border-color);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  margin-right: calc(-1 * var(--sidebar-width));
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 4px 12px;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  padding: 0 12px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.nav-item.active {
  background-color: var(--bg-active);
  color: var(--primary);
  font-weight: 700;
  border-left: 3px solid var(--primary);
  border-color: var(--primary) transparent var(--primary) var(--primary);
}

.nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.badge-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.sync-icon {
  font-size: 18px;
  color: var(--gold);
}

/* Tasks Container */
.tasks-container {
  flex: 1;
  padding: 24px 32px;
  max-width: 880px;
  margin: 0 auto;
  overflow-y: auto;
  min-height: calc(100vh - var(--header-height));
  transition: var(--transition);
}

.tasks-header {
  margin-bottom: 24px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

#current-list-title {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  text-transform: uppercase;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 4px;
  display: inline-block;
}

.sort-dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 170px;
  padding: 6px 0;
  z-index: 30;
}

.menu-item {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.menu-item:hover {
  background-color: var(--bg-hover);
  color: var(--primary);
}

.menu-item.active {
  color: var(--primary);
  background-color: var(--bg-active);
}

/* Quick Add Task Card */
.quick-add-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.quick-add-card:focus-within {
  box-shadow: 0 0 14px var(--primary-glow);
  border-color: var(--primary);
}

.add-icon-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-add-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#quick-add-title {
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  width: 100%;
}

.quick-add-extras {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

#quick-add-notes {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--text-secondary);
  resize: none;
}

.quick-add-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-add-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-input {
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  outline: none;
}

.quick-add-actions {
  display: flex;
  gap: 8px;
}

/* Tasks List */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-item {
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  user-select: none;
}

.task-item:hover {
  background-color: var(--bg-hover);
  border-color: var(--gold);
  transform: translateX(2px);
}

.task-item.selected {
  background-color: var(--bg-active);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Sanatan Circular Checkbox */
.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.task-item:hover .custom-checkbox {
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
}

.custom-checkbox.checked {
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  border-color: var(--primary);
}

.custom-checkbox.checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.task-content-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.task-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-notes-preview {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-meta-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.chip-icon {
  font-size: 14px;
}

.chip-overdue {
  background-color: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
  font-weight: 700;
}

.chip-today {
  background-color: var(--primary-container);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 8px var(--primary-glow);
}

.chip-phase {
  background-color: var(--bg-hover);
  border-color: var(--gold);
  color: var(--gold);
}

.task-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.task-item:hover .task-star-btn,
.task-star-btn.starred {
  opacity: 1;
}

.task-star-btn.starred {
  color: var(--star-gold);
  filter: drop-shadow(0 0 4px var(--gold-glow));
}

/* Completed Section */
.completed-section {
  margin-top: 28px;
  border-top: 1.5px solid var(--border-color);
  padding-top: 16px;
}

.completed-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  user-select: none;
  transition: var(--transition);
}

.completed-toggle:hover {
  background-color: var(--bg-hover);
  color: var(--gold);
}

.expand-arrow {
  transition: transform 0.2s ease;
}

.expand-arrow.collapsed {
  transform: rotate(-90deg);
}

.completed-list.collapsed {
  display: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 56px;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px var(--gold-glow));
}

.empty-state h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* Detail Drawer (Slide-Over) */
.detail-drawer {
  width: var(--drawer-width);
  background-color: var(--bg-card);
  border-left: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 40;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  flex-shrink: 0;
  animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.detail-drawer.hidden {
  display: none;
}

.drawer-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
}

.drawer-header-actions {
  display: flex;
  gap: 6px;
}

.text-danger {
  color: var(--danger) !important;
}

.drawer-content {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-title-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.drawer-title {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  resize: none;
  line-height: 1.4;
}

.drawer-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-field.field-textarea {
  align-items: flex-start;
}

.field-icon {
  color: var(--gold);
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.drawer-select,
.drawer-input {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.date-field-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-field textarea {
  flex: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  resize: vertical;
}

.drawer-meta-section {
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-label {
  color: var(--gold);
  font-weight: 700;
}

.meta-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Subtasks */
.drawer-subtasks-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.subtasks-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtask-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subtask-checkbox.checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.subtask-text {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.subtask-text.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.add-subtask-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  color: var(--text-muted);
}

.add-subtask-row input {
  border: none;
  background: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gold);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
}

.modal-input {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.modal-input:focus {
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-card);
  border: 1px solid var(--gold);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  z-index: 200;
  transition: opacity 0.3s ease;
}

.toast.hidden {
  display: none;
  opacity: 0;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 60;
    box-shadow: var(--shadow-lg);
  }
  
  .detail-drawer {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    z-index: 70;
  }
  
  .tasks-container {
    padding: 16px;
  }
}


/* Dashboard KPI Banner */
.kpi-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.kpi-number {
  font-family: 'Cinzel', serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.kpi-card.highlight-week .kpi-number {
  color: var(--gold);
}

.kpi-card.highlight-overdue {
  border-color: var(--danger);
  background-color: rgba(69, 10, 10, 0.35);
}

.kpi-card.highlight-overdue .kpi-number {
  color: var(--danger);
}

.kpi-card.highlight-completed .kpi-number {
  color: var(--success);
}

@media (max-width: 768px) {
  .kpi-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Live Sync Pill */
.live-sync-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 4px 10px 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  margin-right: 6px;
}

.live-sync-pill:hover {
  border-color: var(--gold);
  background-color: var(--bg-card);
  box-shadow: 0 0 8px var(--gold-glow);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulseGreen 2s infinite ease-in-out;
}

.pulse-dot.syncing {
  background-color: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseGold 0.8s infinite ease-in-out;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes pulseGold {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.sync-status-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.sync-spin-icon {
  font-size: 18px;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.sync-spin-icon.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* ShashuCross Category Styling */
.shashucross-section {
  background-color: rgba(28, 31, 38, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  margin: 4px 0;
}

.shashucross-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shashucross-badge-icon {
  font-size: 16px;
  color: var(--gold);
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.shashucross-title {
  font-family: 'Cinzel', serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 2px !important;
  color: var(--gold) !important;
  text-shadow: 0 0 8px var(--gold-glow);
}

.tuc-brand-icon {
  color: var(--primary);
  font-size: 20px;
}

.font-bold {
  font-weight: 700 !important;
  letter-spacing: 0.8px;
}

.tuc-direct-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-right: 4px;
}

.tuc-direct-link span {
  font-size: 16px;
}

.tuc-direct-link:hover {
  color: var(--gold);
  background-color: var(--bg-hover);
  transform: scale(1.15);
}
