:root {
  /* Core Palette */
  --bg-deep: #050508;
  --bg-surface: #0a0a0f;
  --accent: #f59e0b; /* Golden Amber */
  --accent-glow: rgba(245, 158, 11, 0.4);
  --accent-text: #000000;
  
  /* Glass Effects */
  --glass-bg: rgba(20, 20, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(24px);
  
  /* Feedback Colors */
  --success: #22c55e;
  --warning: #facc15;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Sizing */
  --sidebar-width: 320px;
  --header-height: 80px;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  
  /* Shadows */
  --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.15);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', 'Tajawal', system-ui, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Background Atmosphere */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* App Layout Shell */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Login Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-overlay.hidden {
  display: none !important;
}

.brand-text {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-muted);
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--glass-border);
}

.divider span {
  padding: 0 10px;
  font-size: 14px;
}

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

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 14px;
}

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

/* Premium Modal & Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  z-index: 10000;
  animation: fadeIn 0.4s ease;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  z-index: 10001;
  padding: 40px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  width: 600px;
  max-width: 95vw;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal::-webkit-scrollbar {
  width: 6px;
}
.modal::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

.modal-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  background: linear-gradient(to right, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: 0.2s;
}

.close-btn:hover { background: var(--danger); transform: rotate(90deg); }

.setting-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  transition: 0.3s;
}

.setting-card:hover { border-color: var(--accent); }

.status-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.success { background: rgba(34, 197, 94, 0.1); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.2); }
.status-pill.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

.calendar-grid-main {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 8px;
  margin-top: 16px;
}

.cal-cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.cal-cell.active { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); }
.cal-cell.today { border-color: var(--accent); }
.cal-cell .day-num { font-size: 12px; font-weight: 700; opacity: 0.8; }
.cal-cell.active .day-num { color: #fca5a5; opacity: 1; }
/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 32px 16px;
  border-right: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  margin-bottom: 48px;
  padding-left: 12px; /* Restored original padding */
}

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

.logo-icon {
  font-size: 24px;
  background: var(--accent);
  color: var(--accent-text);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.tab-item.active {
  background: var(--accent) !important;
  color: #000 !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.nav-item.active {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-glow);
}

.nav-spacer {
  flex: 1;
}

.sidebar-footer {
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform 0.3s ease;
}

.avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-status {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-deep) 0%, #0c0c14 100%);
}

.top-bar {
  height: var(--header-height);
  padding: 0 48px;
  padding-left: 80px; /* Space for floating toggle */
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  transition: padding-left 0.4s ease;
}

/* Shift content when sidebar is open vs closed */
.sidebar.collapsed ~ .main-content .top-bar {
  padding-left: 80px;
}

.welcome-text h1 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

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

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 280px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
}

.search-box input:focus {
  outline: none;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg-deep);
}

/* Content Viewport */
.content-viewport {
  flex: 1;
  padding: 40px 48px;
  padding-bottom: 120px; /* Fix scroll issue */
  overflow-y: auto;
}

.panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.panel.active {
  display: block;
}

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

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

/* New Dashboard Layout */
.dashboard-new-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dashboard-new-layout .top-row {
  display: flex;
  gap: 24px;
}
.kpi-half {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chart-half {
  flex: 1;
}
.full-width {
  width: 100%;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  padding-top: 30px;
}
.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 30px;
}
.bar-perc {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(to top, var(--accent), #fbbf24);
  border-radius: 4px;
  transition: height 0.5s ease;
}
.bar-label {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}
@media (max-width: 1024px) {
  .dashboard-new-layout .top-row {
    flex-direction: column;
  }
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* KPI Cards */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.kpi-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-5px);
}

.kpi-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
}

.kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Charts & Analytics */
.chart-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

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

.chart-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
}

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

.bar-fill {
  width: 32px;
  background: linear-gradient(to top, var(--accent), #fbbf24);
  border-radius: 8px;
  min-height: 4px;
  transition: height 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.bar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Task List Styling */
.task-list-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.task-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 12px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.task-item:hover {
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
}

.task-check {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.task-item.done .task-check {
  background: var(--accent);
  border-color: var(--accent);
}

.task-item.done .task-check::after {
  content: '✓';
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 800;
}

.task-info {
  flex: 1;
}

.task-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.task-item.done .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

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

.priority-pill {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.priority-urgent { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.priority-daily { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* Right Column Panels */
.focus-timer-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(0,0,0,0));
  border: 1px solid var(--glass-border);
  text-align: center;
}

.timer-display {
  font-family: 'Syne', sans-serif;
  font-size: 48px;
  font-weight: 800;
  margin: 16px 0;
  color: var(--accent);
}

/* Buttons Styling */
.btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

/* Responsive Overrides */
@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .top-bar { padding: 0 24px; }
  .content-viewport { padding: 24px; padding-bottom: 120px; }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  
  .sidebar { 
    transform: none;
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 16px;
    z-index: 100;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    justify-content: flex-start;
    align-items: stretch;
  }
  
  .sidebar-header, .sidebar-footer, .nav-spacer { display: none; }
  
  .sidebar-content {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
  }
  
  .nav-item {
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    gap: 12px;
    font-size: 13px;
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
  }
  
  .nav-item.active {
    border-top: none;
  }
  
  .nav-item.active .nav-icon { color: var(--accent); }
  .nav-icon { font-size: 18px; margin: 0; }
  
  .main-content {
    margin-bottom: 0;
  }
  
  .top-bar {
    padding: 16px;
    gap: 10px;
    height: auto;
    flex-wrap: wrap;
  }
  
  .search-box { width: 100%; }
  .content-viewport { padding: 16px; padding-bottom: 120px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  
  .welcome-text h1 { font-size: 18px; }
  .chart-card, .task-list-card, .focus-timer-card { padding: 16px; }
  .plans-grid { grid-template-columns: 1fr; }

  .sidebar-focus-timer {
    padding: 0;
    margin-top: 8px;
  }
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.plan-card {
  display: flex;
  flex-direction: column;
}

.plan-img-box {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
}

.plan-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.plan-card:hover .plan-img-box img {
  transform: scale(1.05);
}

.plan-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(4px);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-amber:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

/* AI Assistant Styles */
.ai-container {
  height: calc(100vh - 250px);
  display: flex;
  flex-direction: column;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 12px;
  margin-bottom: 24px;
}

.chat-message {
  max-width: 80%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
}

.message-user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-text);
  border-bottom-right-radius: 4px;
}

.message-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.chat-input-area input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
}

.chat-input-area input:focus {
  outline: none;
}

.online {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.online::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
}

/* Tab Styles */
.tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.tab-item {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.status-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* Settings Grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

/* Accordion and Media Grid imported from index.deploy.html */
.acc { border: 1px solid var(--glass-border); background: rgba(0,0,0,0.2); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.acc-h { cursor: pointer; background: rgba(255,255,255,0.05); justify-content: space-between; align-items: center; padding: 12px 14px; display: flex; }
.acc-h h4 { margin: 0; font-size: 15px; font-weight: 700; }
.acc-b { padding: 16px; display: none; }
.acc.open .acc-b { display: block; }
/* Dashboard Split Layout */
.dashboard-split-layout {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.kpi-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kpi-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 120px;
}
/* Weekly Schedule Wrapper & Grid */
.week-schedule-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: 10px 0;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(200px, 1fr));
  gap: 14px;
  width: 100%;
}
.day-col {
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 14px 14px 18px;
  transition: opacity 0.35s, filter 0.35s;
  position: relative;
}
.day-col.day-complete {
  opacity: 0.5;
  filter: blur(1.2px);
}
.day-col h5 {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  font-size: 13px;
}
.day-big-check {
  pointer-events: none;
  z-index: 5;
  color: var(--success);
  text-shadow: 0 0 24px #000;
  justify-content: center;
  align-items: center;
  font-size: 52px;
  font-weight: 800;
  display: none;
  position: absolute;
  inset: 0;
}
.day-col.day-complete .day-big-check {
  display: flex;
}
.task-card {
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  margin-bottom: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.35;
  transition: transform 0.12s;
  position: relative;
}
.task-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}
.task-card.sw { color: #bfdbfe; border-color: rgba(96, 165, 250, 0.4); }
.task-card.b2, .task-card.b2p, .task-card.b2s { color: #ddd6fe; border-color: rgba(167, 139, 250, 0.4); }
.task-card.bd { color: #bbf7d0; border-color: rgba(74, 222, 128, 0.4); }
.task-card.task-done {
  opacity: 0.5;
  filter: blur(1px);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.4);
  text-decoration: line-through;
}
.task-card.task-done:after {
  content: "✓";
  color: var(--success);
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-weight: 800;
}
.chart-column {
  flex: 1;
}
.full-width {
  width: 100%;
  flex: 1;
}

.pending-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--accent);
}
.p-icon {
  font-size: 14px;
}
.p-count {
  font-weight: 800;
  font-size: 18px;
}

.bar-percent {
  font-size: 10px;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 700;
}

/* Weekly Schedule Full */
.week-grid-container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}
.week-day-col {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  min-height: 200px;
  transition: 0.3s;
}
.week-day-col.day-complete {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.05);
}
.day-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}
.week-task-item {
  font-size: 11px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}
.week-task-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}
.week-task-item.task-done {
  opacity: 0.4;
  text-decoration: line-through;
  filter: grayscale(1);
}

@media (max-width: 1024px) {
  .dashboard-split-layout, .week-grid-container {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}
.media-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
@media (max-width: 900px) { .media-grid { grid-template-columns: 1fr; } }
.imgbox { border: 1px solid var(--glass-border); background: #0a0a0a; border-radius: 12px; overflow: hidden; position: relative; }
.imgbox img { object-fit: cover; width: 100%; height: 190px; display: block; }

.annotate-wrap { border: 1px solid var(--glass-border); background: #07070a; border-radius: 16px; position: relative; overflow: hidden; margin-bottom: 16px; }
.annotate-wrap img { vertical-align: middle; object-fit: contain; background: #050508; width: 100%; max-height: 620px; display: block; }
.annotate-wrap svg.anno-layer { z-index: 2; width: 100%; height: 100%; position: absolute; inset: 0; }
.anno-line { stroke: rgba(253,230,138,0.9); stroke-width: 0.42px; fill: none; filter: drop-shadow(0 0 3px rgba(0,0,0,0.5)); transition: stroke 0.2s; }
.anno-dot { fill: var(--accent); stroke: #fff; stroke-width: 0.25px; transition: r 0.2s; }
.anno-issue { pointer-events: all; cursor: crosshair; }
.anno-issue:hover .anno-line { stroke: #fff; }
.anno-issue:hover .anno-dot { r: 2.2; }
.anno-lbl text { fill: #0c0c0f; font-size: 3.1px; font-weight: 800; }
.anno-lbl .sub { fill: #3f3f46; font-size: 2.6px; font-weight: 700; }
.anno-lbl-bg { fill: rgba(255,255,255,0.98); stroke: rgba(245,158,11,0.9); stroke-width: 0.12px; }
.posture-label { color: #e4e4e7; margin-bottom: 6px; font-size: 13px; font-weight: 700; }

.b2-task-row { background: rgba(0,0,0,0.15); border-radius: 12px; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding: 12px; display: flex; }
.b2-task-row.done { opacity: 0.5; text-decoration: line-through; }



.top-bar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-btn {
  background: var(--glass-card);
  border: 1px solid var(--glass-border);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: 0.3s;
}

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

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: none;
}

/* Sidebar Focus Timer */
.sidebar-focus-timer {
  padding: 16px;
  margin-top: auto;
}

.focus-timer-card.mini {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px;
}

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

.timer-mode-toggle {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: 0.3s;
}

.timer-mode-toggle:hover {
  opacity: 1;
  transform: scale(1.1);
}

.timer-display {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin: 4px 0;
  font-family: monospace;
  color: var(--accent);
}

.timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.timer-controls .icon-btn.mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.timer-controls .icon-btn.mini:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

.timer-controls .icon-btn.mini:active {
  transform: translateY(0) scale(0.95);
}

/* Focus Hover Menu */
.timer-header {
  position: relative;
}
.timer-menu-trigger {
  cursor: pointer;
  opacity: 0.6;
  font-size: 18px;
  transition: 0.3s;
}
.timer-header:hover .timer-menu-trigger { opacity: 1; }

.timer-hover-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(15, 15, 20, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  display: none;
  z-index: 100;
  width: 160px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  animation: fadeIn 0.2s ease;
}
.timer-header:hover .timer-hover-menu { display: block; }

.menu-item {
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.08); color: var(--accent); }

/* Custom Timer Input */
.custom-timer-input {
  display: flex;
  gap: 6px;
  margin: 10px 0;
  justify-content: center;
}
.custom-timer-input input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 6px;
  width: 60px;
  text-align: center;
  font-size: 13px;
  outline: none;
}
.custom-timer-input button {
  background: var(--accent);
  border: none;
  color: #000;
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 800;
}

/* B2 Cards Grid */
.b2-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
}
.b2-icon-box {
  background: rgba(59, 130, 246, 0.1) !important;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Settings 2-column */
.settings-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .settings-2-col { grid-template-columns: 1fr; }
}

.account-card-large {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  transition: 0.3s;
}
.account-card-large:hover { border-color: var(--accent); background: rgba(255,255,255,0.05); }
.account-card-large .icon { font-size: 48px; margin-bottom: 16px; display: block; }

/* Streak View Styles */
.streak-view-container {
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.streak-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.streak-fire-big {
  font-size: 80px;
  filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.5));
  animation: pulse 2s infinite;
}

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

.streak-count-hero {
  font-size: 64px;
  font-weight: 900;
  margin-top: 12px;
}

.streak-label-hero {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.streak-hero {
  text-align: center;
  padding: 48px;
  margin-bottom: 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.1));
}

.streak-fire-big {
  font-size: 80px;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px var(--danger));
  animation: firePulse 2s infinite ease-in-out;
}

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

.streak-count-hero {
  font-size: 72px;
  font-weight: 900;
  font-family: 'Syne', sans-serif;
  line-height: 1;
}

.streak-label-hero {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-top: 8px;
}

.weekly-schedule-view {
  margin-bottom: 40px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.schedule-column {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 12px;
  min-height: 150px;
}

.day-header {
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  text-align: center;
  opacity: 0.8;
}

.mini-task {
  font-size: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
  line-height: 1.3;
  border-left: 2px solid var(--accent);
}

.mini-task.done {
  opacity: 0.4;
  text-decoration: line-through;
  border-left-color: var(--success);
}

@media (max-width: 900px) {
  .schedule-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Refined top actions */
.top-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.top-action-btn .notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 999px;
  border: 2px solid var(--bg-card);
}

.streak-action {
  transition: 0.25s ease;
}

.streak-action.muted {
  opacity: 0.65;
  filter: grayscale(0.25);
}

.streak-action.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.18);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(239, 68, 68, 0.08));
}

.streak-mini-count {
  position: absolute;
  bottom: 2px;
  right: 3px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.6;
}

/* Focus widget */
.timer-state-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timer-state-chip:hover {
  background: var(--accent);
  color: #000;
}

.timer-display-box {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 30px auto 20px; /* More top margin to avoid header overlap */
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-progress-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg-circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1); /* More visible track */
  stroke-width: 8;
}

.timer-progress-circle {
  transition: stroke-dashoffset 0.4s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.3));
}

.timer-progress-circle.timer-warning {
  animation: timerPulse 0.5s infinite alternate;
}

@keyframes timerPulse {
  from { filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5)); opacity: 1; }
  to { filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.9)); opacity: 0.7; }
}

.timer-display {
  font-size: 34px;
  font-weight: 900;
  font-family: 'Inter', system-ui, sans-serif !important;
  color: #fff !important; /* Force white color as requested */
  z-index: 2;
  letter-spacing: -1px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timer-display:hover {
  transform: scale(1.1);
  /* Removed gold color on hover as requested for white numbers */
}

.focus-mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.focus-mode-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.focus-mode-btn:hover,
.focus-mode-btn.active {
  color: var(--text-primary);
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.focus-custom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.5);
}

.focus-custom-row input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}
.focus-custom-row input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

.focus-custom-row button {
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  padding: 0 12px;
  cursor: pointer;
}

/* Dashboard refresh */
.week-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.week-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
}

.week-browser-trigger {
  font-weight: 900;
  font-size: 18px;
}

.weekly-velocity-card .bar-chart {
  min-height: 220px;
}

.current-focus-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.focus-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.focus-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.focus-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
}

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

.overview-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.overview-status-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.preview-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
  font-size: 13px;
}

.overview-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.week-day-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.day-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.day-date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.day-logical-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
}

.day-col.is-current {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 20px 40px rgba(0, 0, 0, 0.24);
}

.task-card {
  position: relative;
}

/* Streak center */
.streak-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.streak-stat-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.streak-stat-card strong {
  font-size: 28px;
  font-family: 'Syne', sans-serif;
}

.streak-stat-card span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.achievements-panel {
  margin-top: 24px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.achievement-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.achievement-card.earned {
  border-color: rgba(34, 197, 94, 0.26);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.03));
}

.achievement-card.locked {
  opacity: 0.72;
}

.achievement-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  font-size: 22px;
  flex-shrink: 0;
}

.achievement-copy h4 {
  margin: 0;
  font-size: 15px;
}

.achievement-copy p {
  margin: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.achievement-copy span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Week browser */
.week-browser-modal {
  max-width: 780px;
}

.week-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.week-browser-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.week-browser-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.28);
}

.week-browser-card.completed {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

.week-browser-card.current {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
}

.week-browser-card.preview {
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.26);
}

.week-browser-card.future {
  opacity: 0.72;
}

.week-browser-card strong {
  font-size: 15px;
}

.week-browser-card span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .overview-hero-head,
  .overview-board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .streak-stats-grid {
    grid-template-columns: 1fr;
  }

  .focus-mode-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 16px;
    border-top: none;
    border-right: none;
  }

  .sidebar-content {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .sidebar-focus-timer {
    padding: 0;
    margin-top: 8px;
  }

  .nav-item {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 14px;
    padding: 12px 14px;
  }

  .nav-item.active {
    border-top: none;
    box-shadow: var(--shadow-glow);
  }

  .main-content {
    margin-bottom: 0;
  }

  .top-bar {
    padding-top: 8px;
  }

  .content-viewport {
    padding-bottom: 32px;
  }

  .focus-mode-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .focus-custom-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .focus-custom-row button {
    padding: 0 14px;
  }

  .timer-display {
    font-size: 22px;
  }
}

/* My Plans & Focus Session Refined Styles */

.focus-timer-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.focus-timer-card.mini {
  padding: 14px;
}

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

.timer-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.timer-display-box {
  text-align: center;
  padding: 10px 0;
}

.timer-display {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  color: var(--accent);
  letter-spacing: 2px;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.timer-controls .icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.timer-controls .icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.plan-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--plan-color, var(--accent));
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--plan-color, var(--accent));
  opacity: 0.7;
}

.plan-icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.05);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 4px;
}

.plan-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.plan-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.plan-progress {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-percent {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: right;
}

.plan-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.plan-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.plan-count {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  font-weight: 600;
}

.my-plans-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.my-plans-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.my-plans-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.my-plans-tab.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent);
}

.overall-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  color: var(--accent);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

.plans-grid {
  .plans-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 24px;
  }
}

/* Sidebar Toggle & Floating Timer Styles */
.sidebar {
  transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, transform 0.4s ease !important;
}

.sidebar.collapsed {
  width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  border: none;
}

.floating-widget {
  position: fixed !important;
  top: 100px;
  right: 48px;
  width: 320px;
  z-index: 9999;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--accent);
  border-radius: var(--radius-lg);
  cursor: grab;
  animation: popInFloat 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.85);
}

.floating-widget:active {
  cursor: grabbing;
}

@keyframes popInFloat {
  0% { transform: scale(0.8) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.sidebar-floating-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10001;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
}

.sidebar-floating-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: scale(1.1);
}

/* Position when sidebar is open: Move to the edge of sidebar */
.app-shell:not(.sidebar-collapsed) .sidebar-floating-toggle {
  left: 270px;
}

/* Sidebar has its own internal toggle when open */
.sidebar.collapsed ~ .main-content .top-bar {
  padding-left: 80px;
}

/* Minimal HUD Mode for Floating Timer - Pure Glass & Ghost Mode */
.floating-widget.minimal-mode {
  background: rgba(255, 255, 255, 0.02) !important;
  backdrop-filter: blur(12px) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 180px !important;
  height: 180px !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.1; /* Even more transparent */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.floating-widget.minimal-mode:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4) !important;
}

/* Show controls and modes on hover in minimal mode */
.floating-widget.minimal-mode:hover .timer-controls,
.floating-widget.minimal-mode:hover .focus-mode-row {
  display: flex !important;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  gap: 12px;
}

.floating-widget.minimal-mode:hover .focus-mode-row {
  bottom: -45px;
  width: auto;
  white-space: nowrap;
}

.floating-widget.minimal-mode:hover .timer-controls {
  bottom: -95px;
}

.floating-widget.minimal-mode.alarm-active,
.floating-widget.minimal-mode.low-time-reveal {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4) !important;
}

.floating-widget.minimal-mode.alarm-active {
  background: rgba(245, 158, 11, 0.25) !important;
  animation: alarmPulse 1s infinite alternate;
}

.alarm-dismiss-btn {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: #fbbf24;
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.floating-widget.alarm-active .alarm-dismiss-btn,
.focus-timer-card.alarm-active .alarm-dismiss-btn {
  display: block;
}

.floating-widget.alarm-active .timer-display,
.focus-timer-card.alarm-active .timer-display {
  opacity: 0.2; /* Fade numbers to show button */
}

.floating-widget.minimal-mode .timer-display-box {
  width: 150px;
  height: 150px;
  margin: 0;
}

.floating-widget.minimal-mode .timer-header,
.floating-widget.minimal-mode .focus-mode-row,
.floating-widget.minimal-mode .focus-custom-row,
.floating-widget.minimal-mode .timer-controls {
  display: none !important;
}

.floating-widget.minimal-mode .timer-display {
  font-size: 32px;
  color: #fff;
}


.dragging {
  user-select: none !important;
  pointer-events: none !important;
}
/* Edit Timer Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 20000;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
}

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

.edit-timer-card {
  width: 320px;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.edit-timer-card h3 {
  margin-bottom: 25px;
  font-size: 18px;
  color: var(--text-primary);
}

.edit-inputs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.edit-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.edit-group input {
  width: 60px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.edit-group input:focus {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.edit-group label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 5px;
  font-weight: 800;
}

.edit-inputs-row .sep {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
  margin-top: -20px;
}

.edit-actions {
  display: flex;
  gap: 10px;
}

.edit-actions button {
  flex: 1;
}
