/* ==========================================================================
   MINIMALIST MODERN CALENDAR - DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
  /* Color Palette - Basic, Sleek, Modern (Zinc & Slate neutrals) */
  --bg-app: #090a0f;
  --bg-surface: #12141c;
  --bg-surface-elevated: #1a1d28;
  --bg-surface-hover: #222634;
  --bg-card: rgba(26, 29, 40, 0.7);
  --bg-input: #151822;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-focus: #6366f1;

  --text-main: #f1f3f9;
  --text-muted: #8b92a5;
  --text-faint: #52586b;
  --text-inverse: #090a0f;

  --primary: #ffffff;
  --primary-hover: #e2e8f0;
  --primary-text: #090a0f;

  --accent-glow: rgba(99, 102, 241, 0.25);
  --today-bg: rgba(99, 102, 241, 0.12);
  --today-border: rgba(129, 140, 248, 0.45);
  --today-badge: #6366f1;

  /* Tag Colors - Muted Modern Hues */
  --cat-slate: #94a3b8;
  --cat-blue: #38bdf8;
  --cat-emerald: #34d399;
  --cat-violet: #a78bfa;
  --cat-amber: #fbbf24;
  --cat-rose: #fb7185;

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --success: #10b981;

  /* Layout & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.65);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-app: #f6f7fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f3f8;
  --bg-surface-hover: #e9ecf2;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-input: #f8fafc;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-focus: #4f46e5;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --text-inverse: #ffffff;

  --primary: #0f172a;
  --primary-hover: #1e293b;
  --primary-text: #ffffff;

  --accent-glow: rgba(79, 70, 229, 0.15);
  --today-bg: rgba(79, 70, 229, 0.08);
  --today-border: rgba(79, 70, 229, 0.35);
  --today-badge: #4f46e5;

  --cat-slate: #64748b;
  --cat-blue: #0284c7;
  --cat-emerald: #059669;
  --cat-violet: #7c3aed;
  --cat-amber: #d97706;
  --cat-rose: #e11d48;

  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --success: #059669;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* App Structure */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 24px 20px 24px;
  gap: 16px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  gap: 16px;
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-surface-elevated), var(--border-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.app-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
}

/* Center Navigation */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.month-selector-wrap {
  position: relative;
}

.month-display-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 14px;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.quick-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  width: 250px;
  animation: fadeIn 0.15s ease-out;
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.picker-month-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.picker-month-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

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

/* Right Header Controls */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 7px 30px 7px 32px;
  font-size: 0.82rem;
  width: 210px;
  outline: none;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--border-focus);
  width: 260px;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-tiny {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
}

.btn-tiny:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
  padding: 9px 18px;
  font-size: 0.85rem;
  gap: 6px;
  font-weight: 600;
}

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

/* Dropdown */
.menu-dropdown-wrap {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  width: 210px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.dropdown-item:hover {
  background: var(--bg-surface-hover);
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 4px 0;
}

.text-danger {
  color: var(--danger);
}
.text-danger:hover {
  background: var(--danger-bg);
}

.file-label {
  cursor: pointer;
}

/* Search Banner */
.search-results-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.search-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.search-result-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-result-pill:hover {
  border-color: var(--border-focus);
  background: var(--bg-surface-hover);
}

.search-result-date {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 0.72rem;
}

/* Calendar Main Area */
.calendar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Weekday Row */
.weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.weekday-cell {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 0;
}

.weekday-cell.weekend {
  color: var(--text-faint);
}

.wd-full {
  display: none;
}

/* Days Grid */
.days-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 1fr;
  gap: 8px;
  height: 100%;
}

/* Single Day Cell */
.day-cell {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
  user-select: none;
}

.day-cell:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.day-cell.other-month {
  opacity: 0.35;
  background: transparent;
}

.day-cell.other-month:hover {
  opacity: 0.7;
}

.day-cell.today {
  background: var(--today-bg);
  border-color: var(--today-border);
}

.day-cell.today .day-number {
  background: var(--today-badge);
  color: #ffffff;
  border-radius: var(--radius-full);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.day-cell.has-priority {
  border-left: 3px solid var(--cat-rose);
}

/* Day Header inside Cell */
.day-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-number {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  transition: color var(--transition-fast);
}

.cell-actions-count {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.cell-quick-add-btn {
  opacity: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.day-cell:hover .cell-quick-add-btn {
  opacity: 1;
}

/* Day Tasks Preview list inside Cell */
.day-tasks-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  flex: 1;
}

.task-preview-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2.5px solid var(--chip-color, var(--cat-slate));
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.task-preview-chip.completed {
  opacity: 0.45;
  text-decoration: line-through;
}

.task-chip-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.task-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-preview-more {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  padding-left: 4px;
  margin-top: 1px;
}

/* App Footer */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-hint kbd {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-main);
}

.stats-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   MODAL - DAY ACTIONS EDITOR
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.18s ease-out;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-date-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Add Action Form */
.action-add-form {
  padding: 16px 22px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-main-row {
  display: flex;
  gap: 8px;
}

.input-main-row input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-main-row input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.meta-field input[type="time"] {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  outline: none;
}

.btn-clear-time {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0 2px;
}

.btn-clear-time:hover {
  color: var(--text-main);
}

.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.meta-field select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.78rem;
  outline: none;
  cursor: pointer;
}

.meta-field select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

.priority-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  transition: all var(--transition-fast);
}

.priority-checkbox-label input {
  display: none;
}

.priority-custom-box {
  color: var(--text-faint);
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.priority-checkbox-label input:checked + .priority-custom-box {
  color: var(--cat-rose);
}

.priority-checkbox-label:hover {
  border-color: var(--border-strong);
}

/* Modal Body */
.modal-body {
  padding: 16px 22px;
  overflow-y: auto;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.actions-heading {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.actions-filters {
  display: flex;
  gap: 4px;
}

.filter-chip {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  padding: 2px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip.active {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-main);
  font-weight: 600;
}

/* Action Items */
.actions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.action-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.action-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--text-faint);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.action-checkbox:checked {
  background-color: var(--text-muted);
  border-color: var(--text-muted);
}

.action-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--bg-surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.action-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.action-text {
  font-size: 0.88rem;
  color: var(--text-main);
  word-break: break-word;
  transition: all var(--transition-fast);
}

.action-item.completed .action-text {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}

.action-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.action-badge-time {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.action-badge-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.05);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.action-badge-priority {
  color: var(--cat-rose);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Edit Mode inside Action Item */
.action-inline-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.action-edit-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
}

.action-edit-time {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  outline: none;
}

.action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.action-item:hover .action-btns {
  opacity: 1;
}

.btn-action-tool {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-tool:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.btn-action-tool.delete:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  margin-bottom: 12px;
  color: var(--text-faint);
}

.empty-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.empty-desc {
  font-size: 0.78rem;
  margin-top: 4px;
  color: var(--text-muted);
}

/* Modal Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.footer-status {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: slideUp 0.2s ease-out;
}

.toast.hidden {
  display: none;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

/* Responsive adjustments */
@media (max-width: 900px) {
  .app-layout {
    padding: 10px;
    gap: 10px;
  }
  .app-header {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .header-left {
    order: 1;
  }
  .header-right {
    order: 2;
  }
  .header-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .search-box input {
    width: 150px;
  }
  .search-box input:focus {
    width: 180px;
  }
  .wd-short {
    display: inline;
  }
  .wd-full {
    display: none;
  }
}

@media (min-width: 1100px) {
  .wd-short {
    display: none;
  }
  .wd-full {
    display: inline;
  }
}

@media (max-width: 600px) {
  .calendar-container {
    padding: 8px;
  }
  .days-grid {
    gap: 4px;
  }
  .day-cell {
    padding: 4px 6px;
    min-height: 60px;
  }
  .task-preview-chip {
    display: none;
  }
  .cell-actions-count {
    display: inline-block;
  }
}
