/* 
 * Evently Design System & Stylesheet
 * Custom Curated Dark Theme with Glassmorphism, Micro-animations, and Grid Systems
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Harmonious Color Palette (HSL Tailored) */
  --bg-primary: #050811;
  --bg-secondary: #0a0f1d;
  --bg-tertiary: #111a2e;
  --card-bg: rgba(13, 20, 38, 0.55);
  --card-border: rgba(99, 102, 241, 0.15);
  --card-border-hover: rgba(99, 102, 241, 0.35);
  
  /* Brand/Accents */
  --accent-primary: #6366f1; /* Indigo */
  --accent-primary-glow: rgba(99, 102, 241, 0.35);
  --accent-secondary: #8b5cf6; /* Violet */
  --accent-success: #10b981; /* Emerald */
  --accent-warning: #f59e0b; /* Amber */
  --accent-danger: #f43f5e; /* Rose */
  --accent-info: #0ea5e9; /* Sky Blue */

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* UI Attributes */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --blur-amount: 16px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px var(--accent-primary-glow);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Shell Layout */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(var(--blur-amount));
  border-right: 1px solid var(--card-border);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3rem;
  padding-left: 0.5rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.nav-item a i {
  font-size: 1.15rem;
  transition: var(--transition-smooth);
}

.nav-item a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(4px);
}

.nav-item.active a {
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.05);
}

.nav-item.active a i {
  color: var(--accent-primary);
  transform: scale(1.1);
}

/* User Account Area */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(var(--blur-amount));
}

.account-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-wrapper {
  position: relative;
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-primary);
  object-fit: cover;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-danger);
  position: absolute;
  bottom: 0;
  right: 0;
  border: 2px solid var(--bg-secondary);
}

.status-indicator.connected {
  background: var(--accent-success);
}

.account-details {
  display: flex;
  flex-direction: column;
  max-width: 150px;
}

.account-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-gdrive-connect {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-gdrive-connect:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-sync-now {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: var(--accent-success) !important;
}

.btn-sync-now:hover {
  background: var(--accent-success) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

/* Sound and FX settings shortcut */
.audio-shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}

.audio-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: .4s;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

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

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #fff;
}

/* Main Dashboard Canvas */
.main-canvas {
  flex-grow: 1;
  padding: 2.5rem 3rem;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Dashboard Header */
.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.header-title-container h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.header-title-container p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-primary {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--card-border-hover);
}

/* Dashboard Views (dynamic toggles) */
.view-section {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
  display: flex;
}

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

/* Dashboard Home View Cards grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Quick Stats Bar */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-smooth);
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon.blue { background: rgba(99, 102, 241, 0.1); color: var(--accent-primary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); }

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

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

/* Event List Styles (Agenda, Dashboard, Reminders) */
.event-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.no-events {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  gap: 12px;
}

.no-events i {
  font-size: 2.5rem;
  color: var(--text-dim);
}

.event-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.event-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.event-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: capitalize;
}

.event-tag.work { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.event-tag.personal { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.event-tag.social { background: rgba(139, 92, 246, 0.15); color: var(--accent-secondary); }
.event-tag.health { background: rgba(244, 63, 94, 0.15); color: var(--accent-danger); }
.event-tag.finance { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }

.event-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: var(--transition-fast);
}

.event-card:hover .event-actions {
  opacity: 1;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-icon.edit:hover { color: var(--accent-primary); border-color: rgba(99, 102, 241, 0.2); }
.btn-icon.delete:hover { color: var(--accent-danger); border-color: rgba(244, 63, 94, 0.2); }

/* Unified Calendar View Elements */
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.calendar-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.calendar-nav-buttons {
  display: flex;
  gap: 8px;
}

.calendar-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 4px;
}

.calendar-tab {
  padding: 8px 16px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calendar-tab.active {
  background: var(--bg-secondary);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Month Grid view */
.month-calendar-grid {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.month-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
}

.month-cells-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, 1fr);
  flex-grow: 1;
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.calendar-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calendar-cell:hover {
  background: rgba(99, 102, 241, 0.02);
}

.cell-num {
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-end;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-cell.today .cell-num {
  background: var(--accent-primary);
  color: #fff;
  border-radius: 50%;
}

.calendar-cell.other-month {
  opacity: 0.3;
}

.cell-events-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  max-height: 70px;
}

.cell-event-dot {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.cell-event-dot.work { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.cell-event-dot.personal { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.cell-event-dot.social { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.cell-event-dot.health { background: rgba(244, 63, 94, 0.2); color: #fb7185; }
.cell-event-dot.finance { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* Week View Grid */
.week-calendar-grid {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.week-header {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 0;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-muted);
}

.week-day-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.week-day-title.today {
  color: var(--accent-primary);
}

.week-body {
  display: flex;
  flex-direction: column;
  max-height: 500px;
  overflow-y: auto;
}

.week-hour-row {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  height: 55px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.week-time-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.week-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3px;
  position: relative;
  cursor: pointer;
}

.week-cell:hover {
  background: rgba(99, 102, 241, 0.01);
}

.week-event-block {
  width: calc(100% - 6px);
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
}

.week-event-block.work { background: rgba(99, 102, 241, 0.25); color: #a5b4fc; border-left: 3px solid var(--accent-primary); }
.week-event-block.personal { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; border-left: 3px solid var(--accent-success); }
.week-event-block.social { background: rgba(139, 92, 246, 0.25); color: #c4b5fd; border-left: 3px solid var(--accent-secondary); }
.week-event-block.health { background: rgba(244, 63, 94, 0.25); color: #fca5a5; border-left: 3px solid var(--accent-danger); }
.week-event-block.finance { background: rgba(245, 158, 11, 0.25); color: #fde047; border-left: 3px solid var(--accent-warning); }

/* Day View Grid */
.day-calendar-grid {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.day-timeline {
  display: flex;
  flex-direction: column;
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.day-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  height: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.day-time-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.01);
}

.day-cell {
  position: relative;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.day-cell:hover {
  background: rgba(255, 255, 255, 0.01);
}

.day-event-block {
  width: calc(100% - 24px);
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.day-event-block.work { background: rgba(99, 102, 241, 0.25); color: #c7d2fe; border-left: 4px solid var(--accent-primary); }
.day-event-block.personal { background: rgba(16, 185, 129, 0.25); color: #a7f3d0; border-left: 4px solid var(--accent-success); }
.day-event-block.social { background: rgba(139, 92, 246, 0.25); color: #ddd6fe; border-left: 4px solid var(--accent-secondary); }
.day-event-block.health { background: rgba(244, 63, 94, 0.25); color: #fecdd3; border-left: 4px solid var(--accent-danger); }
.day-event-block.finance { background: rgba(245, 158, 11, 0.25); color: #fef08a; border-left: 4px solid var(--accent-warning); }

/* Download App tab UI elements */
.download-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 950px) {
  .download-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  background: #000;
  border: 10px solid #1c1c1e;
  border-radius: 40px;
  margin: 0 auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8), 0 0 30px rgba(99, 102, 241, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 140px;
  height: 25px;
  background: #1c1c1e;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 10;
}

.phone-screen {
  flex-grow: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  padding: 30px 16px 16px;
  overflow: hidden;
}

.download-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.qr-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: fit-content;
  align-self: center;
  box-shadow: var(--shadow-lg);
}

.qr-code-placeholder {
  width: 180px;
  height: 180px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.qr-code-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-caption {
  font-size: 0.8rem;
  color: #1e293b;
  font-weight: 600;
  text-align: center;
}

.install-guide-tabs {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 4px;
}

.install-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.install-tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-main);
}

.install-instructions {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.3s ease-out;
}

.install-instructions.active {
  display: flex;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-txt {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.step-txt strong {
  color: var(--text-main);
}

/* Modals & Dialog Boxes */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 17, 0.7);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s ease-out;
}

.modal-overlay.active {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 500px;
  max-width: 90%;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(99, 102, 241, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  color: var(--text-main);
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

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

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  width: 100%;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.04);
  box-shadow: 0 0 10px var(--accent-primary-glow);
}

.category-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.category-radio {
  display: none;
}

.category-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.03);
  text-align: center;
  transition: var(--transition-fast);
}

.category-radio:checked + .category-label.work { background: var(--accent-primary); color: #fff; box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3); }
.category-radio:checked + .category-label.personal { background: var(--accent-success); color: #fff; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
.category-radio:checked + .category-label.social { background: var(--accent-secondary); color: #fff; box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3); }
.category-radio:checked + .category-label.health { background: var(--accent-danger); color: #fff; box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3); }
.category-radio:checked + .category-label.finance { background: var(--accent-warning); color: #fff; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }

/* In-App Visual Alert Popups */
.custom-alert {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg), 0 0 25px rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1000;
  max-width: 380px;
  animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-alert.danger {
  border-color: var(--accent-danger);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(244, 63, 94, 0.15);
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.alert-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

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

.btn-close-alert {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  margin-left: auto;
}

/* Settings View UI Elements */
.settings-section-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.gdrive-setup-walkthrough {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.gdrive-setup-walkthrough h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--accent-primary);
}

.gdrive-setup-walkthrough ol {
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gdrive-setup-walkthrough a {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* Pulse animation for running/sync statuses */
.sync-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-green 1.5s infinite;
  margin-right: 6px;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ================================================================
   AUTH GATE & ONBOARDING
================================================================ */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-gate.hidden {
  display: none;
}

/* Animated ambient blobs */
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.auth-blob-1 {
  width: 520px; height: 520px;
  background: var(--accent-primary);
  top: -180px; left: -120px;
  animation-delay: 0s;
}
.auth-blob-2 {
  width: 380px; height: 380px;
  background: var(--accent-secondary);
  bottom: -100px; right: -80px;
  animation-delay: 2s;
}
.auth-blob-3 {
  width: 260px; height: 260px;
  background: var(--accent-success);
  top: 50%; left: 55%;
  animation-delay: 4s;
}

@keyframes blobFloat {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.15) translate(30px, -20px); }
}

.auth-panel {
  position: relative;
  background: rgba(10, 15, 29, 0.72);
  backdrop-filter: blur(32px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.12);
  animation: authPanelIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 92vh;
  overflow-y: auto;
}

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

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-view {
  display: none;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.3s ease-out;
}
.auth-view.active { display: flex; }

.auth-heading {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0;
}

.auth-subheading {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Google Sign-In Button */
.btn-auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px 20px;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: #1a1a1a;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-auth-google:hover {
  background: #f0f0f0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

/* Apple Sign-In Button */
.btn-auth-apple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-auth-apple i { font-size: 1.15rem; }
.btn-auth-apple:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.auth-switch-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-switch-text a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-switch-text a:hover { text-decoration: underline; }

/* Avatar upload area */
.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}
.avatar-preview {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px dashed var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-primary);
  overflow: hidden;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}
.avatar-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.avatar-preview:hover { background: rgba(99,102,241,0.08); }
.avatar-upload-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Apple Modal Overrides */
.apple-modal-overlay {
  z-index: 20000;
}
.apple-modal-content {
  border-color: rgba(255,255,255,0.1);
  background: #1a1a1a;
}
.apple-modal-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.apple-logo-big {
  font-size: 3rem;
  color: #fff;
}
.apple-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}
.apple-modal-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.apple-consent-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.apple-consent-box i.fa-shield-alt {
  color: var(--accent-success);
  font-size: 1.3rem;
  margin-top: 2px;
}
.apple-consent-box strong { display: block; margin-bottom: 6px; }
.apple-consent-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.apple-consent-box ul li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.apple-consent-box ul li i { color: var(--accent-success); font-size: 0.75rem; }

/* Google Consent Modal */
.google-modal-content {
  max-width: 440px;
}
.google-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
}
.google-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.google-consent-scopes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.consent-scope-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}
.consent-scope-item i { font-size: 1.3rem; }
.consent-scope-item div { display: flex; flex-direction: column; gap: 2px; }
.consent-scope-item strong { font-weight: 600; font-size: 0.9rem; }
.consent-scope-item span { color: var(--text-muted); }
.google-consent-disclaimer {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1rem;
  text-align: center;
}

/* ================================================================
   EVENT TYPE GRID (Google-style)
================================================================ */
.event-type-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.etype-radio { display: none; }

.etype-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
  text-align: center;
  text-transform: none;
}
.etype-label i { font-size: 1.1rem; }
.etype-label:hover {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.3);
  color: var(--text-main);
}
.etype-radio:checked + .etype-label {
  background: rgba(99,102,241,0.18);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ================================================================
   NEW EVENT TYPE CARD STYLES
================================================================ */

/* Task card */
.event-card.task-done .event-title {
  text-decoration: line-through;
  opacity: 0.5;
}
.task-check-btn {
  background: none;
  border: 2px solid var(--accent-success);
  border-radius: 50%;
  width: 22px; height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
  color: transparent;
  font-size: 0.75rem;
}
.task-check-btn.checked {
  background: var(--accent-success);
  color: #fff;
}

/* Birthday badge */
.event-tag.birthday {
  background: rgba(251, 191, 36, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(251,191,36,0.3);
}
.birthday-emoji { font-size: 1rem; margin-right: 4px; }

/* Out of Office block */
.event-card.ooo {
  background: rgba(244, 63, 94, 0.08);
  border-left-color: var(--accent-danger) !important;
}
.event-tag.ooo {
  background: rgba(244,63,94,0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(244,63,94,0.3);
}

/* Working Location banner */
.working-location-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-success);
  margin-bottom: 1rem;
}
.working-location-banner i { font-size: 1rem; }

/* Cell dot overrides for new types */
.cell-event-dot.task { border-left: 3px solid var(--accent-success); }
.cell-event-dot.birthday { border-left: 3px solid #FBBF24; }
.cell-event-dot.ooo { border-left: 3px solid var(--accent-danger); }
.cell-event-dot.workloc { border-left: 3px solid var(--accent-info); }

/* ================================================================
   SECONDARY BUTTON & LOGOUT
================================================================ */
.btn-secondary {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.07);
}

.btn-logout {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244,63,94,0.2);
  background: rgba(244,63,94,0.05);
  color: var(--accent-danger);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.btn-logout:hover {
  background: var(--accent-danger);
  color: #fff;
}

/* Stats purple variant */
.stat-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-secondary);
}

/* Settings layout */
.download-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
