/* ==========================================================================
   STUDYTIMER - FULL-FLEDGED BROWSER WEB APP STYLESHEET (v2.0.0)
   Browser-Native Focus Studio & Productivity Workspace
   ========================================================================== */

:root {
  /* Standardized Typography Scale */
  --font-size-xs:      0.75rem;   /* 12px - Badges, microcopy, tags */
  --font-size-sm:      0.875rem;  /* 14px - Captions, tooltips, secondary copy */
  --font-size-base:    1rem;      /* 16px - Standard body & inputs */
  --font-size-lg:      1.125rem;  /* 18px - Subheadings, card titles */
  --font-size-xl:      1.375rem;  /* 22px - Section headers (H3) */
  --font-size-2xl:     1.75rem;   /* 28px - Main section titles (H2) */
  --font-size-3xl:     2.25rem;   /* 36px - Page titles (H1) */
  --font-size-display: 3.5rem;    /* 56px - Digital timer display */

  /* Standardized Text Colors */
  --text-primary:   #09090b;
  --text-secondary: #52525b;
  --text-muted:     #71717a;
  --text-accent:    #059669;
  --text-danger:    #dc2626;

  /* Standardized Border Radii */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 9999px;
}

[data-theme="dark"] {
  --text-primary:   #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted:     #71717a;
  --text-accent:    #10b981;
  --text-danger:    #ef4444;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

.demo-page-body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   1. TOP WEB APP HEADER (Clean & Minimal)
   ========================================================================== */
.demo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  transition: var(--transition-fast);
}

.demo-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 24px);
  padding: 12px clamp(16px, 3vw, 32px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

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

.nav-logo-img {
  width: clamp(28px, 4vw, 34px);
  height: clamp(28px, 4vw, 34px);
  border-radius: var(--radius-sm);
}

.logo-text {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.web-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  vertical-align: middle;
}

/* Header Right Actions */
.demo-nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
}

.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px clamp(8px, 1.5vw, 12px);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.sync-dot {
  display: none !important;
}

.sync-status-pill.syncing .sync-dot {
  background-color: #3b82f6;
  animation: pulse-sync 1s infinite alternate;
}

.sync-status-pill.offline .sync-dot {
  background-color: #64748b;
  box-shadow: 0 0 6px rgba(100, 116, 139, 0.6);
}

.sync-status-pill.auto-saved .sync-dot {
  background-color: #10b981;
  animation: pulse-saved 0.6s ease;
}

@keyframes pulse-saved {
  0% { transform: scale(1); }
  50% { transform: scale(1.6); box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(1); }
}

@keyframes pulse-sync {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.auth-btn-compact {
  padding: 5px clamp(8px, 1.5vw, 12px);
  font-size: 0.8rem;
  font-weight: 600;
  gap: 5px;
}

.demo-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.demo-icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.nav-leaderboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(217, 119, 6, 0.2) 100%);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-leaderboard-btn:hover {
  background: linear-gradient(135deg, #eab308 0%, #d97706 100%);
  color: #000000;
  border-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

.nav-leaderboard-btn .nav-lb-trophy-svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.nav-leaderboard-btn .live-pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

@media (max-width: 680px) {
  .nav-leaderboard-btn {
    display: none !important;
  }
  #btnBrowserFullscreen {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .auth-btn-label {
    display: none !important;
  }
  .auth-btn-compact {
    padding: 6px 8px;
    font-size: 0.76rem;
  }
  .sync-status-pill .sync-label {
    display: none !important;
  }
  .sync-status-pill {
    padding: 6px;
  }
  .demo-nav-actions {
    gap: 5px;
  }
  .demo-icon-btn {
    width: 32px;
    height: 32px;
  }
}

/* User Profile */
.auth-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.82rem;
  transition: var(--transition-fast);
}

.user-profile-btn:hover {
  border-color: var(--border-focus);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-caret {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow-hover);
  padding: 8px;
  z-index: 200;
}

.dropdown-header {
  padding: 8px 10px;
}

.dropdown-user-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0;
  color: var(--text-primary);
}

.dropdown-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  word-break: break-all;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

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

.dropdown-item svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  flex-shrink: 0 !important;
  stroke-width: 2 !important;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.dropdown-item-danger {
  color: var(--accent-red);
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--accent-red);
}

.dropdown-item-profile-cta {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(59, 130, 246, 0.06) 100%);
  color: #8b5cf6 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.dropdown-item-profile-cta svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  flex-shrink: 0 !important;
}

.dropdown-item-profile-cta:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(59, 130, 246, 0.14) 100%) !important;
}

.dropdown-badge-pill {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: #8b5cf6;
  color: #ffffff;
}

.guest-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.guest-banner-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 clamp(16px, 3vw, 32px);
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

.guest-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.banner-icon {
  width: 16px;
  height: 16px;
  color: #f59e0b;
  flex-shrink: 0;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.76rem;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   2. MAIN WORKSPACE GRID LAYOUT (FULL-FLEDGED WEB APP)
   ========================================================================== */
.demo-workspace-main {
  flex: 1;
  padding: clamp(16px, 2.5vw, 36px) clamp(16px, 3vw, 32px);
  width: 100%;
  display: flex;
  justify-content: center;
}

.demo-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 2.5vw, 32px);
  align-items: start;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

@media (min-width: 980px) {
  .demo-grid-layout {
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: start;
  }
  .productivity-hub {
    width: 420px;
    max-width: 420px;
    min-width: 420px;
    height: 700px;
    max-height: 700px;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    position: sticky;
    top: 24px;
  }
}

@media (min-width: 1280px) {
  .demo-grid-layout {
    grid-template-columns: minmax(0, 1fr) 460px;
  }
  .productivity-hub {
    width: 460px;
    max-width: 460px;
    min-width: 460px;
    height: 720px;
    max-height: 720px;
    min-height: 720px;
  }
}

/* ==========================================================================
   3. FOCUS TIMER STUDIO (LEFT / MAIN COLUMN)
   ========================================================================== */
.focus-timer-studio {
  width: 100%;
  display: flex;
  justify-content: center;
}

.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: clamp(18px, 2.5vw, 28px);
  box-shadow: var(--card-shadow-hover);
  padding: clamp(20px, 3vw, 36px);
  position: relative;
  overflow: visible;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Studio Header Bar with clean grouping */
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  width: 100%;
}

.studio-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-heading-text {
  font-size: var(--font-size-base, 1rem);
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

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

.timer-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.timer-tool-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.timer-tool-btn svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 600px) {
  .tool-btn-label {
    display: none;
  }
  .timer-tool-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }
}

.active-mode-badge {
  font-size: clamp(0.78rem, 2vw, 0.88rem);
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Timer Mode Tabs */
.timer-mode-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: clamp(0.76rem, 1.8vw, 0.84rem);
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-align: center;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-btn .mode-svg-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 2;
}

.mode-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mode-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mode-btn:active {
  transform: scale(0.97);
}

/* Signature Monochrome Active Mode Tab */
[data-theme="dark"] .mode-btn.active,
:root:not([data-theme="light"]) .mode-btn.active {
  background: #ffffff !important;
  color: #09090b !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(255, 255, 255, 0.18) !important;
}

[data-theme="light"] .mode-btn.active {
  background: #09090b !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   SUBJECT SELECTOR DROPDOWN (PREMIUM & COMPACT)
   ========================================================================== */
.subject-dropdown-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 18px;
  z-index: 50;
}

.subject-menu-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.subject-menu-trigger-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.subject-menu-trigger-btn .dropdown-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.subject-menu-trigger-btn:hover .dropdown-chevron {
  color: var(--text-primary);
  transform: translateY(1px);
}

/* Locked Subject State during Active Session (Cannot change mid-session) */
.subject-dropdown-wrapper.session-running .dropdown-chevron,
.timer-subject-locked .subject-inline-chevron {
  display: none !important;
}

.subject-dropdown-wrapper.session-running .subject-menu-trigger-btn,
.timer-subject-locked {
  pointer-events: none !important;
  cursor: default !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.85;
}

/* Floating Dropdown Menu Panel */
.subject-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  padding: 8px;
  z-index: 100;
  overflow: visible !important;
  scrollbar-width: none;
  animation: dropdown-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-dropdown-menu::-webkit-scrollbar {
  display: none;
}

@keyframes dropdown-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.subject-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}

.subject-menu-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subject-menu-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.subject-menu-add-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-blue);
}

.subject-menu-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subject-menu-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
}

.subject-menu-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.subject-menu-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 190px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  padding-right: 2px;
}

.subject-menu-items::-webkit-scrollbar {
  width: 3.5px;
}

.subject-menu-items::-webkit-scrollbar-track {
  background: transparent;
}

.subject-menu-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
}

.subject-menu-items::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

[data-theme="light"] .subject-menu-items {
  scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

[data-theme="light"] .subject-menu-items::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

.subject-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.subject-menu-item:hover {
  background: var(--bg-subtle);
}

.subject-menu-item.active {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.subject-menu-item.holding {
  transform: scale(0.96);
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.5s ease;
}

.subject-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subject-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.subject-item-delete-btn {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subject-menu-item:hover .subject-item-delete-btn,
.subject-menu-item:focus-within .subject-item-delete-btn {
  opacity: 1;
}

.subject-item-delete-btn:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

.subject-dropdown-hint {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding: 8px 10px 4px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-style: italic;
}

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

.subject-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.subject-check-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-blue);
}

/* Break Mode Subject Separation */
.subject-dropdown-wrapper.is-break-mode {
  display: none !important;
}

.timer-current-subject-btn.is-break-mode {
  pointer-events: none !important;
  cursor: default !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: var(--accent-emerald) !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transform: none !important;
}

.timer-current-subject-btn.is-break-mode .subject-color-dot,
.timer-current-subject-btn.is-break-mode .subject-inline-chevron {
  display: none !important;
}

/* Inner Timer Current Subject Button */
.timer-current-subject-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(0.78rem, 2vw, 0.86rem);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  pointer-events: auto;
  transition: all var(--transition-fast);
  max-width: 180px;
}

.timer-current-subject-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.subject-inline-chevron {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

/* Central Circular Timer Ring */
.timer-ring-container {
  position: relative;
  width: clamp(210px, 58vw, 320px);
  height: clamp(210px, 58vw, 320px);
  max-width: 100%;
  margin: 10px auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.timer-track {
  fill: none;
  stroke: var(--bg-subtle);
  stroke-width: 12;
}

[data-theme="dark"] .timer-track {
  stroke: rgba(255, 255, 255, 0.06);
}

.timer-indicator {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 867.08; /* 2 * PI * 138 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.35));
}

.timer-center-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25), 0 8px 32px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
}

[data-theme="light"] .timer-center-content {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.4), 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* Minimalist Pure Typographic State Indicator Inside Ring (Zero Clunky Boxes) */
.timer-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.82rem, 2vw, 0.94rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 2px 0 4px;
  user-select: none;
  transition: opacity 0.25s ease;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.zen-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.95rem, 2.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 4px 0 8px;
  user-select: none;
  transition: opacity 0.25s ease;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .timer-state-badge,
[data-theme="light"] .zen-state-badge {
  color: #0f172a !important;
  text-shadow: none;
}

/* Floating Break Text with Breathing Animation (Above Main Timer Dial) */
.break-ongoing-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 14px;
  padding: 6px 16px;
  user-select: none;
  transition: all 0.3s ease;
  z-index: 5;
}

.break-ongoing-banner.hidden {
  display: none !important;
}

.break-banner-text {
  font-size: clamp(1.2rem, 3.4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap !important;
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75), 0 0 20px rgba(255, 255, 255, 0.4);
}

.break-ongoing-banner.is-breathing .break-banner-text {
  animation: break-text-breathe 2.8s ease-in-out infinite;
}

[data-theme="light"] .break-banner-text {
  color: #0f172a !important;
  text-shadow: none;
}

@keyframes break-text-breathe {
  0%, 100% {
    opacity: 0.75;
    transform: scale(0.97);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 255, 255, 0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 255, 255, 0.85);
  }
}

.timer-digital-display {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 9vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  color: #ffffff !important;
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.28), 0 4px 16px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .timer-digital-display {
  color: #09090b !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.timer-current-subject {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(0.82rem, 2vw, 0.9rem);
  font-weight: 700;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

[data-theme="light"] .timer-current-subject {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  text-shadow: none;
}

.subject-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* Timer Controls Area */
.timer-controls-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* Signature High-Contrast Frosted Glass Primary CTA Action Button */
.btn-timer-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(290px, 88%);
  padding: 13px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28);
  user-select: none;
  -webkit-user-select: none;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #ffffff !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  transition: opacity 0.25s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-timer-primary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.015) translateZ(0);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 255, 255, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.btn-timer-primary:active {
  transform: translateY(0px) scale(0.98) translateZ(0);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Light Theme: Adaptive Contrast Smoked Translucent Primary Button */
[data-theme="light"] .btn-timer-primary {
  background: rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  text-shadow: none;
}

[data-theme="light"] .btn-timer-primary:hover {
  background: rgba(15, 23, 42, 0.14);
  border-color: rgba(15, 23, 42, 0.35);
  color: #000000 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Active / Running State (Pause Action) - Pure Translucent Frosted Glass */
.btn-timer-primary.running {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.45) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.btn-timer-primary.running:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-2px) scale(1.015) translateZ(0) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .btn-timer-primary.running {
  background: rgba(15, 23, 42, 0.12) !important;
  border-color: rgba(15, 23, 42, 0.28) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
  text-shadow: none !important;
}

[data-theme="light"] .btn-timer-primary.running:hover {
  background: rgba(15, 23, 42, 0.18) !important;
  border-color: rgba(15, 23, 42, 0.45) !important;
  color: #000000 !important;
}

.btn-ctrl-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.timer-secondary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

/* Secondary Action Buttons (High-Clarity Frosted Glass) */
.btn-timer-subtle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  user-select: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  transition: opacity 0.25s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-timer-subtle:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff !important;
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.btn-timer-subtle:active {
  transform: translateY(0px) scale(0.97) translateZ(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-timer-subtle {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #0f172a !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-shadow: none;
}

[data-theme="light"] .btn-timer-subtle:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.28);
  color: #000000 !important;
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.btn-timer-subtle svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Finish & Save Session Button (Pure Translucent Frosted Glass Pill) */
.btn-finish-session {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

[data-theme="light"] .btn-finish-session {
  background: rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  text-shadow: none !important;
}

.btn-finish-session:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

[data-theme="light"] .btn-finish-session:hover {
  background: rgba(15, 23, 42, 0.1) !important;
  border-color: rgba(15, 23, 42, 0.3) !important;
  color: #000000 !important;
}

/* Saved Success State (Active for 1 minute - vibrant green) */
.btn-finish-session.saved-success,
.btn-zen-save.saved-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border-color: rgba(16, 185, 129, 0.7) !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45) !important;
  animation: saved-pop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes saved-pop {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   4. PRODUCTIVITY HUB & LIVE ANALYTICS (RIGHT COLUMN)
   ========================================================================== */
.productivity-hub {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-fast);
}

.hub-card:hover {
  border-color: var(--border-focus);
}

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

.hub-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.hub-icon-badge svg {
  width: 17px;
  height: 17px;
}

.hub-icon-target {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.hub-icon-pie {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.hub-icon-grid {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.hub-icon-history {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.hub-icon-trophy {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.hub-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.streak-badge-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: #d97706;
}

.streak-fire-svg {
  width: 15px;
  height: 15px;
  color: #f59e0b;
  flex-shrink: 0;
}

[data-theme="dark"] .streak-badge-hub {
  color: #fbbf24;
}

.btn-link-action {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-blue);
  cursor: pointer;
  padding: 0;
}

.btn-link-action:hover {
  text-decoration: underline;
}

.stat-label-with-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.stat-val-with-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-edit-target-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  min-width: 44px;
  padding: 3px 8px;
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-edit-target-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-edit-target-pill:focus-visible {
  outline: 2px solid var(--accent-emerald);
  outline-offset: 2px;
}

.btn-edit-target-pill .edit-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.btn-link-action-mini {
  background: transparent;
  border: none;
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  color: var(--accent-blue);
  cursor: pointer;
  padding: 2px 4px;
}

.btn-link-action-mini:hover {
  text-decoration: underline;
}

/* Daily Target Progress */
.target-stat-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .target-stat-numbers {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.target-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-remaining-val {
  color: #f59e0b;
}

.text-accent {
  color: var(--accent-emerald) !important;
}

.progress-bar-large {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald) 0%, #34d399 100%);
  border-radius: 5px;
  transition: width 0.4s ease;
}

/* ==========================================================================
   4. PRODUCTIVITY & INSIGHTS HUB (3-TAB ARCHITECTURE & ANALYTICS SUITE)
   ========================================================================== */

/* Mobile Bottom Sheet Drawer Header */
.drawer-mobile-header {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
}

.drawer-drag-handle {
  width: 42px;
  height: 4px;
  background: var(--border-focus);
  border-radius: 2px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.drawer-mobile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.drawer-mobile-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-close-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* 3-Tab Pill Switcher Navbar (Matches InsightsPillNavBar.kt) */
.insights-pill-navbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
  width: 100%;
  flex-shrink: 0;
}

.insights-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.insights-tab-btn .tab-icon {
  width: 15px;
  height: 15px;
  transition: transform var(--transition-fast);
}

.insights-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.insights-tab-btn.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-weight: 700;
}

[data-theme="dark"] .insights-tab-btn.active {
  background: #1e293b;
  color: #60a5fa;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Tab Panels Visibility & Fixed Scrollable Container */
.insights-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
  padding-bottom: 18px;
  animation: panel-fade-in 0.15s ease-out;
}

.insights-tab-panel::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari/Opera */
  width: 0;
  height: 0;
}

.insights-tab-panel.hidden {
  display: none !important;
}

@keyframes panel-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
