/* ============================================
   TodoFlow Web App - Mobile First CSS
   ============================================ */

/* === CSS Variables === */
:root {
  /* Colors */
  --primary: #3742FA;
  --primary-light: #5C65FB;
  --primary-dark: #2C34D4;
  --success: #2ED573;
  --warning: #FF7F50;
  --danger: #FF4757;
  --info: #3742FA;
  
  /* Priority Colors */
  --p0: #FF4757;
  --p1: #FF7F50;
  --p2: #3742FA;
  --p3: #A4B0BE;
  
  /* Neutral */
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --text: #2C3E50;
  --text-secondary: #7F8C9A;
  --text-light: #A4B0BE;
  --border: #E8ECF0;
  --shadow: rgba(0, 0, 0, 0.08);
  
  /* Spacing */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 60px;
  --header-height: 56px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* === Utility Classes === */
.hidden { display: none !important; }
.page { height: 100%; }

/* === Auth Page === */
#auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.auth-logo {
  width: 72px;
  height: 72px;
  background: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary);
  font-weight: 700;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
}

.auth-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.2s;
  background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-text.btn-primary-text {
  color: var(--primary);
  font-weight: 600;
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,71,87,0.1);
  border-radius: var(--radius-sm);
}

/* === Main Page === */
#main-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

/* Top Bar */
.top-bar {
  height: var(--header-height);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.sync-dot.online { background: var(--success); }
.sync-dot.offline { background: var(--text-light); }
.sync-dot.syncing { 
  background: var(--warning);
  animation: pulse 1s infinite;
}

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

/* Page Container */
.page-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  -webkit-overflow-scrolling: touch;
}

.content-page {
  padding: 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
}

/* Date Filter Chips */
.date-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 20px 0 12px;
}

.section-header:first-child {
  margin-top: 0;
}

.star-icon { font-size: 16px; }

.count-badge {
  background: var(--bg);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Task Card */
.task-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
}

.task-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px var(--shadow);
}

.task-card.completed {
  opacity: 0.6;
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.task-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 2px;
}

.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
  font-size: 12px;
}

.task-star {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-light);
  transition: transform 0.15s;
}

.task-star.starred {
  color: #FFD700;
}

.task-star:active {
  transform: scale(1.3);
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-word;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-dot.p0 { background: var(--p0); }
.priority-dot.p1 { background: var(--p1); }
.priority-dot.p2 { background: var(--p2); }
.priority-dot.p3 { background: var(--p3); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-hint {
  font-size: 14px;
  color: var(--text-light);
}

/* === Starred Section === */
.starred-section {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 16px;
}

/* === Bottom Navigation === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 22px;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
}

/* === FAB === */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 32px;
  border: none;
  box-shadow: 0 4px 16px rgba(55, 66, 250, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 99;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(55, 66, 250, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* === Bottom Sheet === */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.sheet-content {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0 20px calcvar(--safe-bottom) + 20px);
  padding-bottom: calc(20px + var(--safe-bottom));
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto;
}

.task-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.task-detail-title {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text);
}

.task-detail-title:focus {
  outline: none;
}

.btn-star {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: transform 0.15s;
}

.btn-star.starred {
  color: #FFD700;
}

.task-detail-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-icon { font-size: 14px; }

.task-detail-section {
  margin-bottom: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.task-detail-desc {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  resize: vertical;
  background: var(--bg);
}

.task-detail-desc:focus {
  outline: none;
  border-color: var(--primary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 12px;
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 13px;
}

.task-detail-actions {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.task-detail-actions .btn-secondary {
  flex: 1;
  color: var(--danger);
  border-color: var(--danger);
}

.task-detail-actions .btn-primary {
  flex: 2;
}

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: var(--card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
}

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

.date-time-row {
  display: flex;
  gap: 12px;
}

.date-time-row input {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg);
}

.date-time-row input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Priority Selector */
.priority-selector {
  display: flex;
  gap: 8px;
}

.priority-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.priority-option.active {
  border-color: var(--primary);
  background: rgba(55, 66, 250, 0.05);
  color: var(--primary);
  font-weight: 600;
}

/* Chip Selector */
.chip-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-selector .chip {
  padding: 8px 14px;
  font-size: 13px;
}

/* Tag Selector */
.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-selector .chip {
  padding: 6px 12px;
  font-size: 12px;
}

/* === Category List Page === */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 2px 8px var(--shadow);
}

.category-card:active {
  transform: scale(0.98);
}

.category-emoji {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius);
}

.category-info {
  flex: 1;
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

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

.category-arrow {
  color: var(--text-light);
  font-size: 18px;
}

/* Category Detail */
.category-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-back {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 8px;
}

.category-detail-header h3 {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
}

/* Category Manage Modal */
.category-list-manage {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-manage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.category-manage-item .category-emoji {
  width: 40px;
  height: 40px;
  font-size: 22px;
}

.category-manage-item .category-info {
  flex: 1;
}

.category-manage-actions {
  display: flex;
  gap: 8px;
}

.category-manage-actions button {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  border: none;
}

.category-manage-actions .edit-btn {
  background: var(--primary);
  color: white;
}

.category-manage-actions .delete-btn {
  background: rgba(255,71,87,0.1);
  color: var(--danger);
}

/* === Stats Page === */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px var(--shadow);
}

.stat-card.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

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

.stat-card.primary .stat-label {
  color: rgba(255,255,255,0.8);
}

.chart-container {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px var(--shadow);
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  gap: 8px;
  padding: 0 4px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.bar {
  width: 100%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
  min-height: 4px;
}

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

/* Donut Chart */
.donut-chart {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.donut-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--p2) 0deg 120deg,
    var(--p1) 120deg 200deg,
    var(--p0) 200deg 280deg,
    var(--p3) 280deg 360deg
  );
  position: relative;
}

.donut-placeholder::after {
  content: '';
  position: absolute;
  inset: 30px;
  background: var(--card);
  border-radius: 50%;
}

.donut-legend {
  flex: 1;
  min-width: 140px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* === Profile Page === */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--shadow);
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
}

.profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.sync-status-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.menu-section {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.menu-item:active {
  background: var(--bg);
}

.menu-icon {
  font-size: 20px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
}

.menu-arrow {
  color: var(--text-light);
  font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
  width: 48px;
  height: 28px;
  background: var(--border);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch.active {
  background: var(--primary);
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-knob {
  transform: translateX(20px);
}

/* === Select === */
.select-small {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.select-small:focus {
  outline: none;
  border-color: var(--primary);
}

/* === Loading === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 300;
  animation: toastIn 0.3s ease;
  white-space: nowrap;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
