/* ============================================
   Vaqt Boshqaruvchi - Mobile-First PWA Styles
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-input: #1e2a45;
  --text-primary: #e8e8f0;
  --text-secondary: #8b8ba3;
  --text-muted: #5a5a7a;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --critical: #e94560;
  --critical-bg: rgba(233, 69, 96, 0.15);
  --medium: #f5a623;
  --medium-bg: rgba(245, 166, 35, 0.15);
  --later: #4ecdc4;
  --later-bg: rgba(78, 205, 196, 0.15);
  --optional: #95a5a6;
  --optional-bg: rgba(149, 165, 166, 0.15);
  --success: #2ed573;
  --danger: #ff4757;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 70px;
  --header-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* Light theme */
.light-theme {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f0f2f5;
  --text-primary: #1a1a2e;
  --text-secondary: #666680;
  --text-muted: #999;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Splash Screen */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 9999;
  transition: opacity 0.5s, transform 0.5s;
}

.splash.fade-out {
  opacity: 0;
  transform: scale(1.1);
}

.splash-icon {
  font-size: 72px;
  animation: pulse 1.5s ease-in-out infinite;
}

.splash-title {
  font-size: 24px;
  font-weight: 700;
  margin-top: 16px;
  color: var(--text-primary);
}

.splash-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* App Shell */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--safe-top);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  flex-shrink: 0;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.header-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-card);
  border-radius: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.header-btn:active {
  background: var(--accent);
}

/* Notification Banner */
.notif-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--medium-bg);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--medium);
}

.btn-small {
  padding: 4px 12px;
  border: 1px solid var(--medium);
  border-radius: 8px;
  background: transparent;
  color: var(--medium);
  font-size: 12px;
  cursor: pointer;
}

/* Main Content */
.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 80px);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Progress Card */
.progress-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow);
}

.progress-ring-container {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1s ease;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-percent {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
}

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

.progress-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  min-width: 30px;
}

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

/* Streak Card */
.streak-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 165, 0, 0.15), rgba(255, 69, 0, 0.1));
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 12px;
}

.streak-fire {
  font-size: 24px;
}

.streak-text {
  font-size: 14px;
  color: var(--text-primary);
}

/* Next Task Card */
.next-task-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.next-task-card .task-time {
  font-size: 12px;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.next-task-card .task-title {
  font-size: 16px;
  font-weight: 600;
}

.next-task-card .task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.empty-text {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 8px;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.timeline-item.priority-critical::before { background: var(--critical); }
.timeline-item.priority-medium::before { background: var(--medium); }
.timeline-item.priority-later::before { background: var(--later); }
.timeline-item.priority-optional::before { background: var(--optional); }

.timeline-item.completed {
  opacity: 0.5;
}

.timeline-item.completed .timeline-title {
  text-decoration: line-through;
}

.timeline-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 50px;
  text-align: center;
}

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

.timeline-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-category {
  font-size: 11px;
  color: var(--text-muted);
}

.timeline-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s;
  background: transparent;
  color: transparent;
}

.timeline-check:active {
  transform: scale(0.9);
}

.timeline-item.completed .timeline-check {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* Pulsing animation for active/overdue tasks */
.timeline-item.alerting {
  animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px var(--critical-bg), 0 0 15px var(--critical-bg); }
}

/* Filter Tabs */
.filter-tabs, .status-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar, .status-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab, .status-tab {
  padding: 8px 14px;
  border: none;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab.active, .status-tab.active {
  background: var(--accent);
  color: white;
}

.status-tabs {
  margin-top: 8px;
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.task-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.task-card.priority-critical::before { background: var(--critical); }
.task-card.priority-medium::before { background: var(--medium); }
.task-card.priority-later::before { background: var(--later); }
.task-card.priority-optional::before { background: var(--optional); }

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

.task-card.completed .task-card-title {
  text-decoration: line-through;
}

.task-card.alerting {
  animation: alertPulse 2s ease-in-out infinite;
}

.task-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s;
  background: transparent;
  font-size: 12px;
  color: transparent;
}

.task-card.completed .task-check {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

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

.task-card-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.task-card-actions {
  display: flex;
  gap: 6px;
}

.task-card-actions .btn-icon {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.priority-badge.critical { background: var(--critical-bg); color: var(--critical); }
.priority-badge.medium { background: var(--medium-bg); color: var(--medium); }
.priority-badge.later { background: var(--later-bg); color: var(--later); }
.priority-badge.optional { background: var(--optional-bg); color: var(--optional); }

/* Schedule View */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
}

.schedule-icon {
  font-size: 24px;
  width: 40px;
  text-align: center;
}

.schedule-info {
  flex: 1;
}

.schedule-name {
  font-size: 14px;
  font-weight: 500;
}

.schedule-type {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.schedule-time {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-light);
}

.schedule-toggle {
  margin-left: 8px;
}

/* Edit Panel */
.edit-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
  max-height: 80vh;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.edit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.edit-panel-header h3 {
  font-size: 16px;
}

.edit-form .form-group {
  margin-bottom: 12px;
}

.edit-form label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edit-form input[type="time"] {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
}

/* Stats View */
.stats-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.stats-card h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  gap: 6px;
  padding-top: 8px;
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.chart-bar {
  width: 100%;
  max-width: 32px;
  background: var(--bg-input);
  border-radius: 6px 6px 0 0;
  position: relative;
  min-height: 4px;
  transition: height 0.5s ease;
}

.chart-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--accent), var(--accent-light));
  border-radius: 6px 6px 0 0;
  transition: height 0.5s ease;
}

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

.chart-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Priority Stats */
.priority-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.priority-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.priority-stat-label {
  font-size: 13px;
  min-width: 80px;
}

.priority-stat-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.priority-stat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.priority-stat-fill.critical { background: var(--critical); }
.priority-stat-fill.medium { background: var(--medium); }
.priority-stat-fill.later { background: var(--later); }
.priority-stat-fill.optional { background: var(--optional); }

.priority-stat-num {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* Heatmap */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-input);
  position: relative;
}

.heatmap-cell.level-1 { background: rgba(108, 92, 231, 0.25); }
.heatmap-cell.level-2 { background: rgba(108, 92, 231, 0.5); }
.heatmap-cell.level-3 { background: rgba(108, 92, 231, 0.75); }
.heatmap-cell.level-4 { background: var(--accent); }

.heatmap-cell::after {
  content: attr(data-date);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.heatmap-cell:active::after {
  opacity: 1;
}

/* FAB */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
  cursor: pointer;
  z-index: 50;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

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

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

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

.nav-item.active svg {
  stroke: var(--accent-light);
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--critical);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-small {
  border-radius: var(--radius);
  margin: auto 20px;
  text-align: center;
  padding: 24px;
}

.modal-small p {
  font-size: 15px;
  margin-bottom: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

/* Form Styles */
.task-form .form-group {
  margin-bottom: 16px;
}

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

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.priority-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  flex-wrap: wrap;
}

.priority-option input {
  display: none;
}

.priority-option.critical { background: var(--critical-bg); }
.priority-option.medium { background: var(--medium-bg); }
.priority-option.later { background: var(--later-bg); }
.priority-option.optional-pri { background: var(--optional-bg); }

.priority-option input:checked + .priority-label {
  font-weight: 700;
}

.priority-option input:checked ~ * {
  opacity: 1;
}

.priority-option:not(:has(input:checked)) {
  opacity: 0.5;
}

.priority-label {
  font-size: 14px;
  font-weight: 500;
}

.priority-option small {
  width: 100%;
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 24px;
}

/* Recurring Selector */
.recurring-selector {
  display: flex;
  gap: 8px;
}

.recurring-option {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.recurring-option input {
  display: none;
}

.recurring-option:has(input:checked) {
  background: var(--accent);
  color: white;
}

/* Week Days */
.week-days {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  justify-content: center;
}

.week-days label {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
}

.week-days input {
  display: none;
}

.week-days label:has(input:checked) {
  background: var(--accent);
  color: white;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-secondary);
}

.btn-danger {
  background: var(--critical-bg);
  color: var(--critical);
  border: 1px solid var(--critical);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: var(--bg-input);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.btn-icon:active {
  background: var(--accent);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Settings */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-group h3 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Swipe to delete hint */
.swipe-hint {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

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

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

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

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

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

/* Responsive tweaks */
@media (min-width: 500px) {
  .main {
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Category badges */
.category-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  background: var(--bg-input);
  color: var(--text-muted);
}

.category-badge.prayer {
  background: rgba(108, 92, 231, 0.2);
  color: var(--accent-light);
}

.category-badge.routine {
  background: rgba(78, 205, 196, 0.2);
  color: var(--later);
}
