/* ========================================
   Goal Planner - Pure CSS Theme System
   Inspired by Siliang AIGC design tokens
   All colors in HSL, consumed via hsl(var(--xxx))
   ======================================== */

/* ---- Light Mode: Default (Blue) ---- */
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 47.4% 11.2%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 47.4% 11.2%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 47.4% 11.2%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --primary-hover: 213.1 93.9% 67.8%;
  --primary-soft: 212 100% 95.5%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --destructive-soft: 0 100% 97.1%;
  --warning: 38.6 92.1% 50.2%;
  --warning-foreground: 24 96% 20%;
  --warning-soft: 48 100% 96%;
  --success: 142.1 76.2% 36.3%;
  --success-foreground: 140 64% 20%;
  --success-soft: 138.5 76.5% 96.7%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  --radius: 0.75rem;
  --sidebar-width: 220px;
  --header-height: 56px;
}

/* ---- Dark Mode: Default ---- */
.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 217.2 91.2% 59.8%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --primary-hover: 217.2 91.2% 65%;
  --primary-soft: 217.2 32.6% 22%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --destructive-soft: 0 50% 17%;
  --warning: 42.2 87.7% 54.9%;
  --warning-foreground: 45 92% 89%;
  --warning-soft: 43 47% 19%;
  --success: 142.1 70.6% 45.3%;
  --success-foreground: 144 80% 90%;
  --success-soft: 144 35% 18%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 224.3 76.3% 94.1%;
}

/* ---- Forest Light ---- */
[data-theme="forest"] {
  --background: 120 33% 99%;
  --foreground: 154 30% 14%;
  --card: 120 28% 98%;
  --primary: 151 45% 38%;
  --primary-hover: 151 45% 46%;
  --primary-soft: 148 55% 93%;
  --secondary: 150 25% 93%;
  --muted: 138 24% 95%;
  --muted-foreground: 155 14% 40%;
  --accent: 146 30% 91%;
  --destructive: 0 74% 56%;
  --warning: 38 90% 52%;
  --success: 151 55% 38%;
  --border: 144 20% 85%;
  --input: 144 20% 85%;
  --ring: 151 45% 38%;
}

/* ---- Forest Dark ---- */
.dark[data-theme="forest"] {
  --background: 154 22% 8%;
  --foreground: 138 33% 95%;
  --card: 154 24% 10%;
  --primary: 148 42% 50%;
  --primary-hover: 148 42% 56%;
  --primary-soft: 149 25% 21%;
  --secondary: 152 19% 16%;
  --muted: 154 18% 15%;
  --muted-foreground: 146 16% 70%;
  --accent: 152 20% 19%;
  --destructive: 0 67% 48%;
  --warning: 42 88% 58%;
  --success: 148 46% 48%;
  --border: 151 18% 22%;
  --input: 151 18% 22%;
  --ring: 148 42% 50%;
}

/* ---- Sunset Light ---- */
[data-theme="sunset"] {
  --background: 28 100% 98%;
  --foreground: 18 32% 16%;
  --card: 24 100% 98%;
  --primary: 16 88% 58%;
  --primary-hover: 12 92% 64%;
  --primary-soft: 17 100% 93%;
  --secondary: 24 100% 94%;
  --muted: 26 100% 95%;
  --muted-foreground: 18 18% 44%;
  --accent: 14 92% 92%;
  --destructive: 0 76% 57%;
  --warning: 38 94% 53%;
  --success: 154 58% 38%;
  --border: 22 52% 84%;
  --input: 22 52% 84%;
  --ring: 16 88% 58%;
}

/* ---- Sunset Dark ---- */
.dark[data-theme="sunset"] {
  --background: 18 26% 9%;
  --foreground: 28 100% 96%;
  --card: 18 24% 11%;
  --primary: 18 92% 64%;
  --primary-hover: 19 95% 69%;
  --primary-soft: 18 26% 22%;
  --secondary: 18 18% 17%;
  --muted: 18 16% 15%;
  --muted-foreground: 24 19% 71%;
  --accent: 20 22% 19%;
  --destructive: 0 68% 49%;
  --warning: 40 96% 60%;
  --success: 154 52% 48%;
  --border: 18 17% 23%;
  --input: 18 17% 23%;
  --ring: 18 92% 64%;
}

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

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

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

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}

/* ========================================
   Utility Classes
   ======================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.text-center { text-center; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: var(--radius); }

/* ========================================
   Layout: App Shell
   ======================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

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

.app-sidebar .sidebar-header .logo {
  width: 32px;
  height: 32px;
  background: hsl(var(--primary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.app-sidebar .sidebar-header .brand {
  font-weight: 600;
  font-size: 16px;
}

.app-sidebar nav {
  flex: 1;
  padding: 0.5rem;
  overflow-y: auto;
}

.app-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  color: hsl(var(--foreground));
  text-decoration: none;
  margin-bottom: 2px;
  transition: background 0.15s;
}
.app-sidebar nav a:hover {
  background: hsl(var(--muted));
  text-decoration: none;
}
.app-sidebar nav a.active {
  background: hsl(var(--primary-soft));
  color: hsl(var(--primary));
  font-weight: 500;
}
.app-sidebar nav a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.app-sidebar .sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid hsl(var(--border));
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  height: var(--header-height);
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header .header-left h2 {
  font-size: 16px;
  font-weight: 600;
}

.app-header .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-content {
  flex: 1;
  padding: 1.5rem;
  background: hsl(var(--background));
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 20px 48px hsl(var(--foreground) / 0.06);
}
.card:hover {
  box-shadow: 0 24px 80px hsl(var(--foreground) / 0.1);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: hsl(var(--card-foreground));
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.5;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.btn-primary:hover {
  background: hsl(var(--primary-hover));
  border-color: hsl(var(--primary-hover));
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}
.btn-secondary:hover {
  background: hsl(var(--muted));
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: transparent;
}
.btn-ghost:hover {
  background: hsl(var(--muted));
}

.btn-danger {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-color: hsl(var(--destructive));
}

.btn-block { width: 100%; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 16px; border-radius: 10px; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 12px; }

/* ========================================
   Forms
   ======================================== */
.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: hsl(var(--foreground));
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--input));
  border-radius: 8px;
  font-size: 14px;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}
.form-textarea { min-height: 100px; resize: vertical; }

/* ========================================
   Tags / Badges
   ======================================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
.tag-primary { background: hsl(var(--primary-soft)); color: hsl(var(--primary)); border-color: transparent; }
.tag-success { background: hsl(var(--success-soft)); color: hsl(var(--success-foreground)); border-color: transparent; }
.tag-warning { background: hsl(var(--warning-soft)); color: hsl(var(--warning-foreground)); border-color: transparent; }
.tag-error { background: hsl(var(--destructive-soft)); color: hsl(var(--destructive)); border-color: transparent; }

/* ========================================
   Progress Bar
   ======================================== */
.progress {
  height: 8px;
  background: hsl(var(--muted));
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: hsl(var(--primary));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: hsl(var(--card));
  border-radius: 20px;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal {
  transform: scale(1);
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  padding: 0.25rem;
}
.modal-close:hover { color: hsl(var(--foreground)); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ========================================
   Spin / Loading
   ======================================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 1rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-rise { animation: rise 0.3s ease-out; }

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.animate-pulse { animation: pulse-soft 2s ease-in-out infinite; }

/* ========================================
   Page-specific: Auth pages
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--background));
  padding: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card .auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-card .auth-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.auth-card .auth-header p {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: hsl(var(--border));
}
.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 14px;
}

/* ========================================
   Page-specific: Dashboard stats
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-card {
  padding: 1.25rem;
}
.stat-card .stat-icon {
  font-size: 24px;
  margin-bottom: 0.5rem;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* ========================================
   Page-specific: Goals grid
   ======================================== */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.goal-card {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.goal-card:hover {
  transform: translateY(-2px);
}
.goal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.goal-card-header h3 {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  margin-right: 0.5rem;
}
.goal-card-meta {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.75rem;
}

/* ========================================
   Page-specific: Goal detail
   ======================================== */
.goal-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.goal-detail-header h1 {
  font-size: 22px;
  font-weight: 700;
}
.goal-detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Segmented control */
.segmented {
  display: inline-flex;
  background: hsl(var(--muted));
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.segmented-btn {
  padding: 0.375rem 1rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s;
}
.segmented-btn:hover { color: hsl(var(--foreground)); }
.segmented-btn.active {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Task list */
.task-list { list-style: none; }
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
}
.task-item:last-child { border-bottom: none; }
.task-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.task-status-dot.pending { background: hsl(var(--muted-foreground)); }
.task-status-dot.in_progress { background: hsl(var(--primary)); }
.task-status-dot.completed { background: hsl(var(--success)); }
.task-info { flex: 1; }
.task-name { font-weight: 500; font-size: 14px; }
.task-desc { font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.task-dates { font-size: 12px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.task-meta { display: flex; gap: 0.5rem; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.task-actions { display: flex; gap: 0.25rem; }

/* Assignee tags */
.assignee-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: hsl(var(--primary));
  color: white;
  font-size: 12px;
  font-weight: 500;
}
.assignee-mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: hsl(var(--muted));
  font-size: 13px;
}
.assignee-mini-tag .remove {
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}
.assignee-mini-tag .remove:hover { color: hsl(var(--destructive)); }

/* ========================================
   Plan Editor Styles (待确认页面)
   ======================================== */
.pending-confirm-tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: hsl(var(--primary) / 0.1);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 14px;
  color: hsl(var(--primary));
}

.plan-phase-card {
  border: 1px solid hsl(var(--border));
}
.plan-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: hsl(var(--muted) / 0.5);
  border-bottom: 1px solid hsl(var(--border));
}
.plan-phase-title { display: flex; align-items: center; gap: 0.5rem; }
.phase-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: hsl(var(--primary));
  color: white;
  font-size: 12px;
  font-weight: 600;
}
.phase-name { font-weight: 600; font-size: 15px; }
.phase-desc {
  padding: 0.75rem 1rem;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}
.plan-phase-actions { display: flex; gap: 0.25rem; }

.plan-milestone-section {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.plan-milestone-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.milestone-marker { font-size: 16px; }
.milestone-name { font-weight: 500; font-size: 14px; }
.milestone-date {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  padding: 2px 8px;
  background: hsl(var(--muted));
  border-radius: 4px;
}
.plan-milestone-actions { display: flex; gap: 0.25rem; margin-left: auto; }

/* Modal lg variant */
.modal.modal-lg { max-width: 600px; }
.form-row {
  display: flex;
  gap: 1rem;
}
.form-row .form-group { flex: 1; }

/* Task assignee selector */
.task-assignee-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.task-assignee-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-height: 24px;
}
.dingtalk-mini-selector {
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--card));
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
}
.dingtalk-mini-tree { font-size: 13px; }
.mini-tree-node { margin-left: 0.5rem; }
.mini-tree-toggle {
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  font-size: 10px;
  margin-right: 4px;
}
.mini-tree-label {
  font-weight: 500;
  color: hsl(var(--foreground));
}
.mini-tree-member {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  margin: 2px;
  background: hsl(var(--muted));
}
.mini-tree-member:hover { background: hsl(var(--primary) / 0.2); }
.mini-tree-member.selected {
  background: hsl(var(--primary));
  color: white;
}
.mini-tree-children { margin-left: 1rem; }

/* ========================================
   Page-specific: DingTalk-style Calendar
   ======================================== */
.dingtalk-calendar {
  background: hsl(var(--card));
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  overflow: hidden;
  min-height: 600px;
}

/* ---- Toolbar ---- */
.dt-cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card));
}

.dt-cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dt-cal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dt-cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: hsl(var(--card));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: hsl(var(--foreground));
  transition: all 0.15s;
}

.dt-cal-nav-btn:hover {
  background: hsl(var(--muted));
}

.dt-cal-month-label {
  font-size: 16px;
  font-weight: 600;
  padding: 0 12px;
  min-width: 120px;
  text-align: center;
}

.dt-cal-today-btn {
  padding: 4px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: hsl(var(--card));
  cursor: pointer;
  font-size: 13px;
  color: hsl(var(--foreground));
  transition: all 0.15s;
}

.dt-cal-today-btn:hover {
  background: hsl(var(--muted));
}

.dt-cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dt-cal-search {
  position: relative;
}

.dt-cal-search-input {
  width: 200px;
  padding: 6px 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: hsl(var(--background));
  font-size: 13px;
  color: hsl(var(--foreground));
  outline: none;
  transition: border-color 0.15s;
}

.dt-cal-search-input:focus {
  border-color: hsl(var(--ring));
}

.dt-cal-search-input::placeholder {
  color: hsl(var(--muted-foreground));
}

/* ---- Week View ---- */
.dt-cal-week-view {
  display: flex;
  flex-direction: column;
}

.dt-cal-time-gutter {
  width: 60px;
  flex-shrink: 0;
  border-right: 1px solid hsl(var(--border));
}

.dt-cal-time-gutter-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
  font-weight: 500;
}

.dt-cal-time-slot {
  height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
}

.dt-cal-days-header {
  display: flex;
  margin-left: 60px;
  border-bottom: 1px solid hsl(var(--border));
}

.dt-cal-day-header {
  flex: 1;
  padding: 8px 4px;
  text-align: center;
  border-right: 1px solid hsl(var(--border));
}

.dt-cal-day-header:last-child {
  border-right: none;
}

.dt-cal-day-header.today {
  background: hsl(var(--primary-soft));
}

.dt-cal-day-header.today .dt-cal-day-num {
  background: hsl(var(--primary));
  color: white;
}

.dt-cal-day-name {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2px;
}

.dt-cal-day-num {
  font-size: 14px;
  font-weight: 600;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.dt-cal-week-grid {
  display: flex;
  margin-left: 60px;
  min-height: 500px;
}

.dt-cal-day-column {
  flex: 1;
  border-right: 1px solid hsl(var(--border));
  padding: 8px 4px;
  min-height: 480px;
  position: relative;
}

.dt-cal-day-column:last-child {
  border-right: none;
}

.dt-cal-day-column.today-col {
  background: hsl(var(--primary-soft));
}

.dt-cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dt-cal-empty-day {
  min-height: 40px;
}

.dt-cal-event-bar {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dt-cal-event-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dt-cal-event-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  width: fit-content;
}

.dt-cal-event-text {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dt-cal-event-assignees {
  font-size: 11px;
  opacity: 0.8;
}

/* ---- Month View ---- */
.dt-cal-month-view {
  display: flex;
  flex-direction: column;
}

.dt-cal-month-header {
  display: flex;
  border-bottom: 1px solid hsl(var(--border));
}

.dt-cal-month-day-name {
  flex: 1;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.dt-cal-month-grid {
  display: flex;
  flex-direction: column;
}

.dt-cal-month-row {
  display: flex;
  border-bottom: 1px solid hsl(var(--border));
  min-height: 100px;
}

.dt-cal-month-row:last-child {
  border-bottom: none;
}

.dt-cal-month-cell {
  flex: 1;
  border-right: 1px solid hsl(var(--border));
  padding: 4px 6px;
  position: relative;
}

.dt-cal-month-cell:last-child {
  border-right: none;
}

.dt-cal-month-cell.other-month {
  background: hsl(var(--muted));
  opacity: 0.6;
}

.dt-cal-month-cell.today-cell .dt-cal-month-day-num {
  background: hsl(var(--primary));
  color: white;
}

.dt-cal-month-day-num {
  font-size: 13px;
  font-weight: 500;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 4px;
}

.dt-cal-month-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dt-cal-month-event {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.dt-cal-month-event:hover {
  opacity: 0.8;
}

.dt-cal-month-more {
  font-size: 11px;
  color: hsl(var(--primary));
  padding: 2px 6px;
  cursor: pointer;
}

/* ---- List View ---- */
.dt-cal-list-view {
  padding: 16px;
}

.dt-cal-list-empty {
  text-align: center;
  padding: 40px;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.dt-cal-list-day {
  margin-bottom: 16px;
}

.dt-cal-list-day-header {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 8px;
}

.dt-cal-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}

.dt-cal-list-item:hover {
  background: hsl(var(--muted));
}

.dt-cal-list-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dt-cal-list-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.dt-cal-list-title {
  font-size: 14px;
  font-weight: 500;
}

.dt-cal-list-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dt-cal-list-assignees {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.dt-cal-list-date {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

/* ---- Event Popup ---- */
.dt-cal-event-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 500;
}

.dt-cal-event-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-height: 80vh;
  background: hsl(var(--card));
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  z-index: 501;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dt-cal-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid hsl(var(--border));
}

.dt-cal-popup-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  margin-right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dt-cal-popup-body {
  padding: 16px 20px;
  overflow-y: auto;
}

.dt-cal-popup-desc {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 12px;
  line-height: 1.5;
}

.dt-cal-popup-time,
.dt-cal-popup-goal,
.dt-cal-popup-milestone,
.dt-cal-popup-status,
.dt-cal-popup-priority {
  font-size: 13px;
  padding: 6px 0;
  color: hsl(var(--foreground));
}

.dt-cal-popup-label {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.dt-cal-popup-avatars {
  display: flex;
  gap: 8px;
}

.dt-cal-popup-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--primary-soft));
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* Dark mode adjustments */
.dark .dt-cal-event-popup {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .dt-cal-event-popup {
    width: 90%;
  }

  .dt-cal-toolbar {
    flex-direction: column;
    gap: 8px;
  }

  .dt-cal-search-input {
    width: 100%;
  }

  .dt-cal-week-grid {
    margin-left: 0;
  }

  .dt-cal-time-gutter {
    display: none;
  }

  .dt-cal-days-header {
    margin-left: 0;
  }
}

/* ========================================
   Page-specific: Settings
   ======================================== */
.settings-section {
  max-width: 520px;
}

/* ========================================
   Page-specific: Goal Create (大气版)
   ======================================== */
.goal-create-page {
  max-width: 960px;
  margin: 0 auto;
}
.goal-create-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  margin-bottom: 2rem;
}
.goal-create-hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-hover)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.goal-create-hero p {
  font-size: 16px;
  color: hsl(var(--muted-foreground));
  max-width: 560px;
  margin: 0 auto;
}
.goal-create-card {
  padding: 2.5rem;
  border-radius: 20px;
}
.goal-create-card .form-group {
  margin-bottom: 1.5rem;
}
.goal-create-card .form-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.goal-create-card .form-input,
.goal-create-card .form-textarea,
.goal-create-card .form-select {
  padding: 0.75rem 1rem;
  font-size: 15px;
  border-radius: 10px;
}
.goal-create-card .form-textarea {
  min-height: 120px;
}
.goal-create-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.goal-create-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}
.goal-create-actions .btn {
  padding: 0.75rem 2rem;
  font-size: 15px;
  border-radius: 10px;
}

/* Datetime input */
.form-input[type="datetime-local"] {
  padding: 0.75rem 1rem;
}

/* DingTalk member selector */
.dingtalk-selector {
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  background: hsl(var(--card));
}
.dingtalk-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  cursor: pointer;
  transition: background 0.15s;
}
.dingtalk-selector-header:hover {
  background: hsl(var(--muted));
}
.dingtalk-selector-header .label {
  font-size: 14px;
  font-weight: 500;
}
.dingtalk-selector-header .arrow {
  transition: transform 0.2s;
}
.dingtalk-selector.open .dingtalk-selector-header .arrow {
  transform: rotate(180deg);
}
.dingtalk-selector-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.dingtalk-selector.open .dingtalk-selector-body {
  max-height: 480px;
  overflow-y: auto;
}
.dingtalk-org-tree {
  padding: 0.75rem;
}
.dingtalk-org-tree .tree-node {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
}
.dingtalk-org-tree .tree-node:hover {
  background: hsl(var(--muted));
}
.dingtalk-org-tree .tree-node.selected {
  background: hsl(var(--primary-soft));
  color: hsl(var(--primary));
}
.dingtalk-org-tree .tree-children {
  margin-left: 1.25rem;
  border-left: 1px solid hsl(var(--border));
  padding-left: 0.5rem;
}
.dingtalk-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 44px;
}
.dingtalk-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  background: hsl(var(--primary-soft));
  color: hsl(var(--primary));
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}
.dingtalk-selected-tag .remove {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.dingtalk-selected-tag .remove:hover {
  opacity: 1;
}
.dingtalk-member-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s;
  cursor: pointer;
}
.dingtalk-member-card:hover {
  background: hsl(var(--muted));
}
.dingtalk-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(var(--primary-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: hsl(var(--primary));
  flex-shrink: 0;
}
.dingtalk-member-info {
  flex: 1;
  min-width: 0;
}
.dingtalk-member-name {
  font-weight: 500;
  font-size: 14px;
}
.dingtalk-member-dept {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.dingtalk-member-title {
  font-size: 12px;
  color: hsl(var(--primary));
}
.dingtalk-ability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.375rem;
}
.dingtalk-ability-tag {
  padding: 0.125rem 0.5rem;
  background: hsl(var(--success-soft));
  color: hsl(var(--success-foreground));
  border-radius: 4px;
  font-size: 11px;
}

/* ========================================
   Page-specific: Notification drawer
   ======================================== */
.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  box-shadow: -10px 0 40px rgba(0,0,0,0.1);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.notification-drawer.open { transform: translateX(0); }
.notification-drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notification-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}
.notification-item {
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.notification-item:hover { background: hsl(var(--muted)); }
.notification-item.unread { background: hsl(var(--primary-soft)); }
.notification-item .notif-title { font-size: 13px; font-weight: 500; }
.notification-item .notif-time { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }

.notification-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.notification-backdrop.open { opacity: 1; visibility: visible; }

/* ========================================
   Page-specific: Gantt chart container
   ======================================== */
.gantt-container {
  width: 100%;
  min-height: 400px;
  overflow: auto;
}

/* ========================================
   Kanban View
   ======================================== */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.kanban-column {
  min-width: 320px;
  max-width: 360px;
  flex: 1;
  background: hsl(var(--muted) / 0.3);
  border-radius: 12px;
  padding: 0.75rem;
}
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 14px;
}
.kanban-status {
  margin-bottom: 1rem;
}
.kanban-status-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.5rem;
}
.kanban-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.kanban-card.critical {
  border-color: hsl(var(--destructive));
  border-left: 3px solid hsl(var(--destructive));
}
.kanban-card-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.kanban-card-desc {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}

/* ========================================
   Burndown Chart
   ======================================== */
.burndown-chart-container {
  padding: 1rem;
}
.burndown-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  justify-content: center;
}
.burndown-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.burndown-legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ========================================
   Resource Summary View
   ======================================== */
.resource-summary {
  max-width: 960px;
}
.resource-summary-header {
  margin-bottom: 1.5rem;
}
.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.resource-table th {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid hsl(var(--border));
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.resource-table td {
  padding: 0.75rem;
  border-bottom: 1px solid hsl(var(--border));
}
.resource-table tr:hover {
  background: hsl(var(--muted) / 0.5);
}

/* ========================================
   Gantt Chart Custom Styles
   ======================================== */
.gantt-milestone {
  background: hsl(var(--warning)) !important;
}
.gantt-phase {
  background: hsl(var(--primary) / 0.3) !important;
}
.gantt-critical {
  background: hsl(var(--destructive) / 0.7) !important;
}
.gantt-completed {
  background: hsl(var(--success)) !important;
}
.gantt-overdue {
  background: hsl(var(--destructive)) !important;
}

/* ========================================
   Review Report
   ======================================== */
.review-report {
  max-width: 960px;
}
.review-section {
  margin-bottom: 2rem;
}
.review-section h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
}
.duration-variance-positive {
  color: hsl(var(--destructive));
}
.duration-variance-negative {
  color: hsl(var(--success));
}

/* ========================================
   Collaboration
   ======================================== */
.collaboration-share-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.task-comments {
  margin-top: 1rem;
}
.task-comment {
  padding: 0.75rem;
  border-left: 3px solid hsl(var(--primary));
  background: hsl(var(--muted) / 0.3);
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.75rem;
}
.task-comment .comment-author {
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--primary));
}
.task-comment .comment-time {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-left: 0.5rem;
}
.task-comment .comment-content {
  margin-top: 0.5rem;
  font-size: 13px;
}

/* ========================================
   Toast / Message
   ======================================== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: rise 0.3s ease-out;
  max-width: 320px;
}
.toast-success { background: hsl(var(--success-soft)); color: hsl(var(--success-foreground)); border: 1px solid hsl(var(--success)); }
.toast-error { background: hsl(var(--destructive-soft)); color: hsl(var(--destructive)); border: 1px solid hsl(var(--destructive)); }
.toast-warning { background: hsl(var(--warning-soft)); color: hsl(var(--warning-foreground)); border: 1px solid hsl(var(--warning)); }
.toast-info { background: hsl(var(--primary-soft)); color: hsl(var(--primary)); border: 1px solid hsl(var(--primary)); }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .goals-grid { grid-template-columns: 1fr; }
  .notification-drawer { width: 100%; }
}

/* ========================================
   Dark mode adjustments
   ======================================== */
.dark .card { box-shadow: 0 20px 48px hsl(var(--foreground) / 0.2); }
.dark .modal { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.dark .notification-drawer { box-shadow: -10px 0 40px rgba(0,0,0,0.3); }
