/* ============================================================
   ProdHub — Global Stylesheet
   Nature-Inspired Premium Design System
   Deep Forest Dark Mode / Clean Forest Light Mode
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  background-color: #0A0F0D;
}

[data-theme="light"] {
  background-color: #F4F7F5;
}

[data-theme="dark"] {
  background-color: #0A0F0D;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
textarea,
select {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

[data-theme="dark"] :focus-visible {
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2);
}

/* ---------- Theme Variables ---------- */
:root {
  --glass-opacity: 0.10;
  --radius-multiplier: 1.0;
  --border-width: 1px;
  --border-style: solid;

  /* Sizing */
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --bottom-nav-h: 68px;
  --radius-xs: calc(6px * var(--radius-multiplier));
  --radius-sm: calc(8px * var(--radius-multiplier));
  --radius: calc(14px * var(--radius-multiplier));
  --radius-lg: calc(18px * var(--radius-multiplier));
  --radius-xl: calc(24px * var(--radius-multiplier));
  --gap: 24px;
  --gap-sm: 14px;
  --gap-lg: 32px;

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.15s;
  --dur: 0.25s;
  --dur-slow: 0.38s;

  /* Z-index */
  --z-sidebar: 250;
  --z-topbar: 90;
  --z-fab: 80;
  --z-bottom-nav: 100;
  --z-backdrop: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ===== LIGHT THEME — High-Contrast Clean Forest ===== */
[data-theme="light"],
:root {
  --accent: #1B6B4F;
  --accent-rgb: 27, 107, 79;
  --accent-soft: rgba(27, 107, 79, 0.08);
  --accent-strong: #145A42;
  --accent-glow: rgba(27, 107, 79, 0.14);

  --bg: #F4F7F5;
  --bg-elevated: rgba(255, 255, 255, var(--glass-opacity));
  --bg-sunken: rgba(235, 241, 237, var(--glass-opacity));
  --bg-hover: rgba(27, 107, 79, 0.05);
  --bg-active: #E2ECE6;

  --text: #112019;
  --text-secondary: #284437;
  --text-muted: #527364;

  --border: rgba(180, 205, 192, 0.55);
  --border-strong: rgba(130, 168, 150, 0.75);

  --shadow-sm: 0 1px 3px rgba(27, 107, 79, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow: 0 4px 18px rgba(27, 107, 79, 0.08), 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 38px rgba(27, 107, 79, 0.10), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.14), 0 8px 24px rgba(27, 107, 79, 0.08);

  --glass: rgba(255, 255, 255, var(--glass-opacity));
  --glass-border: rgba(27, 107, 79, 0.12);
  --glass-card: rgba(255, 255, 255, var(--glass-opacity));

  --success: #10B981;
  --warning: #D97706;
  --danger: #DC2626;
  --info: #2563EB;

  --hero-bg: linear-gradient(135deg, rgba(232, 245, 238, var(--glass-opacity)) 0%, rgba(240, 247, 243, var(--glass-opacity)) 100%);
  --hero-overlay: rgba(255, 255, 255, 0.3);
  --stat-gradient-1: linear-gradient(135deg, rgba(230, 247, 238, var(--glass-opacity)), rgba(209, 250, 223, var(--glass-opacity)));
  --stat-gradient-2: linear-gradient(135deg, rgba(224, 237, 255, var(--glass-opacity)), rgba(219, 234, 254, var(--glass-opacity)));
  --stat-gradient-3: linear-gradient(135deg, rgba(254, 243, 199, var(--glass-opacity)), rgba(253, 230, 138, var(--glass-opacity)));
  --stat-gradient-4: linear-gradient(135deg, rgba(237, 233, 254, var(--glass-opacity)), rgba(221, 214, 254, var(--glass-opacity)));

  --skeleton: linear-gradient(90deg, #EDF1EE 25%, #F4F7F5 37%, #EDF1EE 63%);
  color-scheme: light;
}

/* ===== DARK THEME — Deep Forest Glass ===== */
[data-theme="dark"] {
  --accent: #34D399;
  --accent-rgb: 52, 211, 153;
  --accent-soft: rgba(52, 211, 153, 0.10);
  --accent-strong: #10B981;
  --accent-glow: rgba(52, 211, 153, 0.18);

  --bg: #0A0F0D;
  --bg-elevated: rgba(17, 26, 22, var(--glass-opacity));
  --bg-sunken: rgba(10, 15, 13, var(--glass-opacity));
  --bg-hover: rgba(52, 211, 153, 0.08);
  --bg-active: rgba(26, 46, 38, var(--glass-opacity));

  --text: #F0F7F3;
  --text-secondary: #9EC0B0;
  --text-muted: #6B9481;

  --border: rgba(52, 211, 153, 0.15);
  --border-strong: rgba(52, 211, 153, 0.30);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.75), 0 10px 24px rgba(0, 0, 0, 0.55);

  --glass: rgba(17, 26, 22, var(--glass-opacity));
  --glass-border: rgba(52, 211, 153, 0.10);
  --glass-card: rgba(17, 26, 22, var(--glass-opacity));

  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --info: #60A5FA;

  --hero-bg: linear-gradient(135deg, rgba(13, 26, 20, var(--glass-opacity)) 0%, rgba(15, 32, 24, var(--glass-opacity)) 40%, rgba(10, 19, 15, var(--glass-opacity)) 100%);
  --hero-overlay: rgba(10, 15, 13, 0.4);
  --stat-gradient-1: linear-gradient(135deg, rgba(13, 40, 24, var(--glass-opacity)), rgba(15, 51, 32, var(--glass-opacity)));
  --stat-gradient-2: linear-gradient(135deg, rgba(13, 26, 46, var(--glass-opacity)), rgba(15, 34, 64, var(--glass-opacity)));
  --stat-gradient-3: linear-gradient(135deg, rgba(42, 29, 10, var(--glass-opacity)), rgba(61, 43, 15, var(--glass-opacity)));
  --stat-gradient-4: linear-gradient(135deg, rgba(26, 15, 46, var(--glass-opacity)), rgba(36, 21, 61, var(--glass-opacity)));

  --skeleton: linear-gradient(90deg, #111A16 25%, #1A2E26 37%, #111A16 63%);
  color-scheme: dark;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast */
@media (prefers-contrast: more) {
  :root {
    --border: #a0c8b0;
    --border-strong: #80b090;
  }

  [data-theme="dark"] {
    --border: #3a6a50;
    --border-strong: #4a8060;
  }
}

/* ---------- App Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  transition: grid-template-columns var(--dur) var(--ease);
}

.app.sidebar-collapsed {
  grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--glass-sidebar, var(--bg-elevated));
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: var(--z-sidebar);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  box-shadow: 0 0 0 0 transparent;
  position: relative;
}

/* Subtle nature gradient at bottom of sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(var(--accent-rgb), 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .sidebar::before {
  background: linear-gradient(to top, rgba(52, 211, 153, 0.02), transparent);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
  position: relative;
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.20), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.25);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

[data-theme="dark"] .brand-mark {
  color: #0A0F0D;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-mark:hover {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 6px 22px rgba(var(--accent-rgb), 0.4);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand-text {
  overflow: hidden;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.sidebar-collapse {
  display: grid;
  place-items: center;
  width: 36px !important;
  height: 36px;
  transition: transform var(--dur) var(--ease), opacity var(--dur);
  opacity: 0.5;
  border-radius: var(--radius-sm);
}

.sidebar-collapse svg {
  width: 18px;
  height: 18px;
}

.sidebar-collapse:hover {
  opacity: 1;
  background: var(--bg-hover);
}

.sidebar-collapsed .sidebar-collapse {
  transform: rotate(180deg);
}

.nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  position: relative;
  z-index: 1;
}

.nav::-webkit-scrollbar {
  width: 5px;
}

.nav::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  opacity: 0.7;
}

.sidebar-collapsed .nav-section-label,
.sidebar-collapsed .brand-text,
.sidebar-collapsed .nav-item-label,
.sidebar-collapsed .icon-btn span,
.sidebar-collapsed kbd,
.sidebar-collapsed .sidebar-quote-box,
.sidebar-collapsed .sidebar-user-section,
.sidebar-collapsed .theme-toggle-text {
  display: none;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar-collapsed .sidebar-footer .icon-btn {
  justify-content: center;
}

.sidebar-collapsed .sidebar-footer .icon-btn svg {
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--dur), color var(--dur), transform var(--dur-fast);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  text-align: left;
  justify-content: flex-start;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
  transform: translateX(2px);
}

.nav-item:active {
  transform: translateX(1px) scale(0.985);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* Green indicator bar for active nav */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 55%;
  background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.4));
  border-radius: 0 3px 3px 0;
  animation: navIndicatorIn var(--dur) var(--ease);
}

@keyframes navIndicatorIn {
  from {
    height: 0;
    opacity: 0;
  }

  to {
    height: 55%;
    opacity: 1;
  }
}

/* Leaf accent for active elements */
.nav-item.active::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B6B4F' stroke-width='2'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c1.5-3 2-6.5 2-10S13.5 2 12 2z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  opacity: 0.25;
}

[data-theme="dark"] .nav-item.active::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334D399' stroke-width='2'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c1.5-3 2-6.5 2-10S13.5 2 12 2z'/%3E%3C/svg%3E");
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--dur);
}

.nav-item:hover .nav-item-icon {
  transform: scale(1.1);
}

.nav-item.active .nav-item-icon {
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.35));
}

.nav-item-label {
  flex: 1;
  text-align: left;
}

.nav-item-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  margin-left: auto;
  flex-shrink: 0;
}

/* Sidebar Quote Box */
.sidebar-quote-box {
  background: rgba(var(--accent-rgb), 0.04);
  margin: 12px 14px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--accent-rgb), 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .sidebar-quote-box {
  background: rgba(52, 211, 153, 0.03);
  border-color: rgba(52, 211, 153, 0.06);
}

.quote-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.quote-content {
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sidebar User Section */
.sidebar-user-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 14px 8px;
  background: rgba(var(--accent-rgb), 0.04);
  border-radius: var(--radius);
  border: 1px solid rgba(var(--accent-rgb), 0.06);
  cursor: pointer;
  transition: background var(--dur);
  position: relative;
  z-index: 1;
}

.sidebar-user-section:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

[data-theme="dark"] .sidebar-user-avatar {
  color: #0A0F0D;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-status {
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-user-chevron {
  color: var(--text-muted);
}

.sidebar-user-chevron svg {
  width: 14px;
  height: 14px;
}

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.sidebar-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.15), transparent);
}

/* Sidebar Theme Toggle */
.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-sunken);
  border-radius: 999px;
  padding: 4px;
  margin: 8px 14px;
  border: 1px solid var(--border);
}

.theme-switch-slider {
  display: flex;
  position: relative;
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}

.theme-toggle-option {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 2;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--dur), background var(--dur);
}

.theme-toggle-option.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 12px;
}

.icon-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--dur), color var(--dur), transform var(--dur-fast);
  white-space: nowrap;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  transform: translateX(2px);
}

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

.icon-btn kbd {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Theme toggle icons */
[data-theme="dark"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon,
[data-theme="system"] .icon-moon {
  display: none;
}

/* ---------- Mobile Topbar ---------- */
.mobile-topbar {
  display: none;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  height: var(--topbar-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.mobile-topbar .icon-btn {
  width: auto;
  padding: 10px;
}

.mobile-topbar .icon-btn svg {
  width: 22px;
  height: 22px;
}

/* ---------- Main ---------- */
.main {
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.main::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.main::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
  border: 2px solid var(--bg);
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.10), transparent);
}

.topbar-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-sunken);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .topbar-clock {
    display: none;
  }
}

.planner-task-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.planner-task-time-chip:hover {
  background: var(--accent-soft);
}

/* Card Title Sizing */
.card-section-title,
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display, sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.card-section-title svg,
.card-title svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
  color: var(--accent);
}

/* Dashboard Pomodoro Timer Card */
.pomodoro-timer-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-pomo-modes {
  display: flex;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  gap: 4px;
}

.dash-pomo-mode-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dash-pomo-mode-btn:hover {
  color: var(--text);
}

.dash-pomo-mode-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

.dash-pomo-ring-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px 0;
}

.dash-pomo-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
}

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

.dash-pomo-ring-bg {
  stroke: var(--border);
  stroke-width: 5;
  fill: none;
}

.dash-pomo-ring-fg {
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
  transition: stroke-dashoffset 0.4s ease;
}

.dash-pomo-ring-wrap.is-running .dash-pomo-ring-fg {
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.5));
}

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

.dash-pomo-time {
  font-family: var(--font-mono, monospace);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.dash-pomo-time.is-running {
  animation: timerPulse 2s infinite ease-in-out;
}

@keyframes timerPulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }

  100% {
    opacity: 1;
  }
}

.dash-pomo-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--bg-sunken);
  color: var(--text-muted);
  margin-top: 6px;
}

.dash-pomo-badge.running {
  background: var(--accent-soft);
  color: var(--accent);
}

.dash-pomo-cycle-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.dash-pomo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s ease;
}

.dash-pomo-dot.filled {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.4);
}

.dash-pomo-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.dash-pomo-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-pomo-btn:hover {
  background: var(--bg-hover, var(--border));
  color: var(--accent);
}

.dash-pomo-btn.primary {
  flex: 1;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25);
}

.dash-pomo-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.35);
}

.dash-pomo-btn.secondary {
  min-width: 36px;
  padding: 0 10px;
}

/* Focus Music Dashboard Card */
.focus-music-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-music-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  position: relative;
  overflow: hidden;
}

.dash-music-art {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s ease;
}

.dash-music-art.is-playing {
  animation: pulseMusicArt 2s infinite ease-in-out;
  background: linear-gradient(135deg, var(--accent-soft), rgba(var(--accent-rgb), 0.25));
}

@keyframes pulseMusicArt {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.3);
  }

  50% {
    transform: scale(1.04);
    box-shadow: 0 0 12px 2px rgba(var(--accent-rgb), 0.2);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.3);
  }
}

.dash-music-eq {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 8px;
}

.dash-music-eq .eq-bar {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eqBounce 0.8s infinite ease-in-out alternate;
}

.dash-music-eq .eq-bar:nth-child(1) {
  height: 40%;
  animation-delay: 0.1s;
}

.dash-music-eq .eq-bar:nth-child(2) {
  height: 80%;
  animation-delay: 0.3s;
}

.dash-music-eq .eq-bar:nth-child(3) {
  height: 60%;
  animation-delay: 0.2s;
}

.dash-music-eq .eq-bar:nth-child(4) {
  height: 100%;
  animation-delay: 0.4s;
}

@keyframes eqBounce {
  0% {
    height: 20%;
  }

  100% {
    height: 100%;
  }
}

.dash-music-info {
  flex: 1;
  min-width: 0;
}

.dash-track-title {
  font-family: var(--font-display, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-track-artist {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.music-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.music-ctrl-btn:hover {
  background: var(--bg-hover, var(--border));
  color: var(--accent);
  transform: translateY(-1px);
}

.music-ctrl-btn.play-main {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.music-ctrl-btn.play-main:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.4);
}

.music-ctrl-btn.stop-ambient {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.music-ctrl-btn.stop-ambient:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.dash-ambient-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-ambient-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.dash-ambient-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .dash-ambient-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dash-ambient-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dash-ambient-pill:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

.dash-ambient-pill.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.35);
}

.music-ctrl-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.music-ctrl-btn.play-main svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ambient-pill-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.ambient-pill-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ambient-pill-name {
  font-size: 10px;
  white-space: nowrap;
}

.topbar-search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  width: 340px;
  gap: 10px;
  transition: border-color var(--dur), box-shadow var(--dur);
  cursor: pointer;
}

.topbar-search-wrap:hover {
  border-color: var(--border-strong);
}

.topbar-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08);
}

.topbar-search-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.topbar-search-wrap input {
  background: transparent;
  border: none;
  font-size: 13px;
  width: 100%;
  color: var(--text);
}

.topbar-search-wrap input::placeholder {
  color: var(--text-muted);
}

.search-shortcut {
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--text-muted);
  white-space: nowrap;
}

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

.topbar-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--dur), color var(--dur);
}

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

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #EF4444;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-elevated);
}

.profile-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  transition: background var(--dur);
  margin-left: 4px;
}

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

.avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

[data-theme="dark"] .avatar-circle {
  color: #0A0F0D;
}

.profile-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-dropdown svg {
  color: var(--text-muted);
}

.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-sunken);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.view-container {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn var(--dur) var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Bottom Nav (mobile) ---------- */
.bottom-nav {
  display: none;
  grid-column: 1 / -1;
  height: var(--bottom-nav-h);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  align-items: stretch;
  justify-content: space-around;
  padding: 0 6px;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: var(--z-bottom-nav);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: 10px;
  transition: color var(--dur), transform var(--dur);
  min-width: 0;
}

.bottom-nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 20px);
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.25);
  z-index: var(--z-fab);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

[data-theme="dark"] .fab {
  color: #0A0F0D;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.3);
}

.fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.35);
}

.fab:active {
  transform: translateY(0) scale(0.96);
}

.fab svg {
  width: 22px;
  height: 22px;
}

/* ---------- Sidebar Backdrop ---------- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-backdrop);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--dur);
}

.sidebar-backdrop:not([hidden]) {
  opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-h) 1fr var(--bottom-nav-h);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

  .app.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-collapse {
    display: none;
  }

  .mobile-topbar {
    display: flex;
  }

  .bottom-nav {
    display: flex;
  }

  .view-container {
    padding: 20px 18px calc(var(--bottom-nav-h) + 28px);
  }

  .topbar {
    padding: 14px 18px;
    position: relative;
    background: transparent;
    backdrop-filter: none;
    border: none;
  }

  .topbar-search-wrap {
    display: none;
  }

  .profile-name {
    display: inline-block;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
  }

  .profile-dropdown svg {
    display: none;
  }

  .profile-dropdown {
    padding: 4px 8px 4px 4px;
    margin-left: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .page-title {
    font-size: 20px;
  }

  .clock {
    display: none;
  }

  .fab {
    bottom: calc(var(--bottom-nav-h) + 16px);
    right: 16px;
  }
}

@media (max-width: 600px) {
  :root {
    --topbar-h: 56px;
    --bottom-nav-h: 60px;
  }

  .view-container {
    padding: 14px 12px calc(var(--bottom-nav-h) + 20px);
  }

  .topbar {
    padding: 10px 12px;
  }

  .page-title {
    font-size: 18px;
  }

  /* Make the first load tour modal compact and centered on mobile */
  #firstLoadTourModal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    position: fixed !important;
    inset: 0 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
  }

  #firstLoadTourModal .modal {
    min-height: auto !important;
    max-height: 75vh !important;
    max-height: 75dvh !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-modal) !important;
    width: 90% !important;
    max-width: 440px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #firstLoadTourModal .modal-body {
    overflow-y: auto !important;
    flex: 1 !important;
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur), transform var(--dur), border-color var(--dur);
  position: relative;
  overflow: hidden;
}

/* Subtle glow on card hover */
.card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.03), transparent 70%);
  pointer-events: none;
  transition: opacity var(--dur);
  opacity: 0;
}

.card:hover::after {
  opacity: 1;
}

.card.hoverable:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.card-pad-sm {
  padding: 16px;
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--gap-sm);
}

.gap {
  gap: var(--gap);
}

.flex-1 {
  flex: 1;
}

.wrap {
  flex-wrap: wrap;
}

.mt-sm {
  margin-top: 10px;
}

.mt {
  margin-top: 18px;
}

.mt-lg {
  margin-top: 28px;
}

.mb-sm {
  margin-bottom: 10px;
}

.mb {
  margin-bottom: 18px;
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

.text-center {
  text-align: center;
}

.fw-700 {
  font-weight: 700;
}

.fw-600 {
  font-weight: 600;
}

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

@media (max-width: 700px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-auto {
    grid-template-columns: 1fr;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-sunken);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background var(--dur), border-color var(--dur), transform var(--dur-fast), box-shadow var(--dur);
  white-space: nowrap;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.2);
}

[data-theme="dark"] .btn-primary {
  color: #0A0F0D;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.3);
  border-color: transparent;
  filter: brightness(1.05);
}

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

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

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: transparent;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--danger);
  opacity: 0.95;
  filter: brightness(1.05);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: transparent;
}

.btn-success:hover {
  background: var(--success);
  opacity: 0.95;
  filter: brightness(1.05);
}

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

.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

.btn-icon {
  padding: 10px;
  aspect-ratio: 1;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-lg svg {
  width: 20px;
  height: 20px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Forms ---------- */
.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}

select option {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08);
}

[data-theme="dark"] .input:focus,
[data-theme="dark"] .textarea:focus,
[data-theme="dark"] .select:focus {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.field {
  margin-bottom: 18px;
}

.hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Toggle switch */
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 13px;
}

.switch-row input {
  display: none;
}

.switch-row>span:first-child {
  flex: 1;
}

.switch {
  width: 40px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 11px;
  position: relative;
  transition: background var(--dur);
  flex-shrink: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--dur) var(--ease);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.switch-row input:checked~.switch {
  background: var(--accent);
}

.switch-row input:checked~.switch::after {
  transform: translateX(18px);
}

/* ---------- Badges & Chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
}

.badge-success {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.12);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.08);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.12);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.08);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.12);
}

.badge-info {
  background: rgba(96, 165, 250, 0.08);
  color: var(--info);
  border: 1px solid rgba(96, 165, 250, 0.12);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur);
}

.chip:hover {
  background: var(--bg-hover);
}

.chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.2);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 13, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur);
}

.modal-overlay:not([hidden]) {
  opacity: 1;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  opacity: 0;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur);
}

.modal-overlay:not([hidden]) .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal.modal-search {
  max-width: 640px;
}

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

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
}

.modal-header .icon-btn {
  width: auto;
  padding: 8px;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 600px) {
  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    min-height: 100vh;
  }
}

/* ---------- Search Modal ---------- */
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
}

.search-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur);
}

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

.search-input-wrap kbd {
  font-size: 10px;
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .search-input-wrap kbd {
    display: none;
  }
}

.search-results {
  padding: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.search-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.search-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 12px 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur);
  font-size: 13px;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item .sr-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.search-result-item .sr-icon svg {
  width: 16px;
  height: 16px;
}

.search-result-item .sr-content {
  flex: 1;
  min-width: 0;
}

.search-result-item .sr-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .sr-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn var(--dur) var(--ease-out);
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.info {
  border-left: 3px solid var(--info);
}

.toast.removing {
  animation: toastOut var(--dur) var(--ease) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* ---------- Loading Skeleton ---------- */
.loading-skeleton {
  padding: 10px 0;
}

.sk-line {
  height: 14px;
  background: var(--skeleton);
  background-size: 400% 100%;
  border-radius: 8px;
  margin-bottom: 12px;
  animation: shimmer 1.8s infinite;
  width: 60%;
}

.sk-line.short {
  width: 30%;
}

.sk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.sk-card {
  height: 140px;
  background: var(--skeleton);
  background-size: 400% 100%;
  border-radius: var(--radius-lg);
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  margin: 0 auto;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.10);
}

.empty-state-icon svg {
  width: 28px;
  height: 28px;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state-text {
  font-size: 13px;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Scrollbar ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

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

/* ---------- Selection ---------- */
::selection {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text);
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.spacer {
  flex: 1;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
  border: none;
}

.progress-bar {
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 3px;
  transition: width var(--dur-slow) var(--ease);
}

/* ---------- Drag & Drop ---------- */
.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.drop-target {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
}

/* ---------- Animations ---------- */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1.2s linear infinite;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp var(--dur) var(--ease-out);
}

/* ============================================================
   DASHBOARD — Matching Reference Image Layout
   ============================================================ */

.mockup-dash-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mockup-dash-row {
  display: grid;
  gap: 20px;
}

.mockup-dash-row.r1 {
  grid-template-columns: 1fr;
}

.mockup-dash-row.r-stats {
  grid-template-columns: repeat(4, 1fr);
}

.mockup-dash-row.r2 {
  grid-template-columns: 1.2fr 1fr;
}

.mockup-dash-row.r3 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

@media (max-width: 1200px) {
  .mockup-dash-row.r-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .mockup-dash-row.r2 {
    grid-template-columns: 1fr;
  }

  .mockup-dash-row.r3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .mockup-dash-row.r-stats {
    grid-template-columns: 1fr 1fr;
  }

  .mockup-dash-row.r3 {
    grid-template-columns: 1fr;
  }
}

/* ---- PRODHUB HERO CENTERPIECE ---- */
.dash-hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 1px rgb(0 0 0 / 5%);
  margin-bottom: 18px;
  height: 40vw;
  min-height: 280px;
  max-height: 380px;
}

.dash-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  z-index: 1;
  pointer-events: none;
  transition: background var(--dur), opacity var(--dur);
  opacity: calc((var(--glass-opacity) - 0.10) / 0.85);
}

.prodhub-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 2;
  max-width: 500px;
  width: 90%;
}

.prodhub-greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
}

.prodhub-greeting-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.prodhub-clock-big {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 4px 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.prodhub-clock-ampm {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-left: 4px;
}

.prodhub-date-str {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.prodhub-quote-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  line-height: 1.4;
  max-width: 420px;
}

.prodhub-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--bg-elevated) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.prodhub-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.prodhub-pill-btn svg {
  width: 13px;
  height: 13px;
}

.prodhub-pill-btn:hover {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  transform: scale(1.05);
}

[data-theme="dark"] .prodhub-pill-btn:hover {
  color: var(--accent);
}

.clock-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.clock-quote-box {
  display: flex;
  flex-direction: column;
}

.clock-quote-icon {
  color: var(--accent);
  opacity: 0.4;
  margin-bottom: 6px;
}

.clock-quote {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.clock-quote-author {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
}

/* ---- Compact Stats Cards ---- */
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--dur), box-shadow var(--dur);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-icon.emerald {
  background: var(--stat-gradient-1);
  color: var(--success);
}

.stat-icon.blue {
  background: var(--stat-gradient-2);
  color: var(--info);
}

.stat-icon.amber {
  background: var(--stat-gradient-3);
  color: var(--warning);
}

.stat-icon.violet {
  background: var(--stat-gradient-4);
  color: #8B5CF6;
}

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

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-top: 1px;
}

.stat-value span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Card Header Actions ---- */
.card-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-section-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.header-action-link {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--dur);
}

.header-action-link:hover {
  opacity: 0.8;
}

/* ---- Tasks Card ---- */
.tasks-list-card {
  padding: 22px;
}

.tasks-mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.task-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  transition: transform var(--dur-fast), border-color var(--dur);
}

.task-mini-row:hover {
  transform: translateX(2px);
  border-color: rgba(var(--accent-rgb), 0.15);
}

.task-mini-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: transparent;
  cursor: pointer;
  transition: all var(--dur);
  flex-shrink: 0;
}

.task-mini-checkbox.checked {
  background: var(--success);
  border-color: transparent;
  color: #fff;
}

[data-theme="dark"] .task-mini-checkbox.checked {
  color: #0A0F0D;
}

.task-mini-checkbox svg {
  width: 12px;
  height: 12px;
}

.task-mini-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.task-mini-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-mini-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-mini-meta svg {
  width: 10px;
  height: 10px;
}

.task-priority-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: capitalize;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.task-priority-badge.high {
  background: rgba(248, 113, 113, 0.1);
  color: #F87171;
}

.task-priority-badge.medium {
  background: rgba(251, 191, 36, 0.1);
  color: #FBBF24;
}

.task-priority-badge.low {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
}

.task-mini-options-btn {
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: background var(--dur);
}

.task-mini-options-btn:hover {
  background: var(--bg-hover);
}

.add-task-inline-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  cursor: pointer;
  transition: all var(--dur);
}

.add-task-inline-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---- Calendar Events Card ---- */
.calendar-events-card {
  padding: 22px;
}

.cal-events-combo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 700px) {
  .cal-events-combo-layout {
    grid-template-columns: 1fr;
  }
}

.combo-events-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.combo-event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.combo-event-row:last-child {
  border-bottom: none;
}

.combo-event-time {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}

.combo-event-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.combo-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mini Calendar */
.combo-calendar-column {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.cal-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-mini-month {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.cal-mini-nav-btns {
  display: flex;
  gap: 4px;
}

.cal-mini-nav-btn {
  padding: 3px;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur);
}

.cal-mini-nav-btn:hover {
  background: var(--bg-hover);
}

.cal-mini-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cal-mini-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-mini-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.cal-mini-day {
  font-size: 11px;
  font-weight: 500;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background var(--dur);
}

.cal-mini-day:hover:not(.active) {
  background: var(--bg-hover);
}

.cal-mini-day.active {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

[data-theme="dark"] .cal-mini-day.active {
  color: #0A0F0D;
}

/* ---- Pomodoro Timer Card ---- */
.pomodoro-timer-card {
  padding: 22px;
}

.pomo-settings-btn {
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-xs);
}

.pomo-settings-btn:hover {
  background: var(--bg-hover);
}

.pomo-tabs-bar {
  display: flex;
  gap: 2px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.pomo-tab-btn {
  flex: 1;
  padding: 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  transition: all var(--dur);
}

.pomo-tab-btn.active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.pomo-ring-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pomo-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

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

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

.pomo-ring-time {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.pomo-ring-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: 0.05em;
}

.pomo-stats-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pomo-sessions-count {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.pomo-sessions-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.pomo-sessions-val span {
  color: var(--text-muted);
  font-weight: 500;
}

.pomo-start-focus-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.2);
  transition: box-shadow var(--dur), transform var(--dur-fast);
}

.pomo-start-focus-btn:hover {
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

[data-theme="dark"] .pomo-start-focus-btn {
  color: #0A0F0D;
}

.start-btn-icon {
  font-size: 12px;
}

/* ---- Quick Notes Card ---- */
.quick-notes-list-card {
  padding: 22px;
}

.quick-notes-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-stick-card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform var(--dur-fast);
}

.note-stick-card:hover {
  transform: translateY(-1px);
}

.note-stick-card.color-yellow {
  background: #FEF9C3;
  border-color: #FEF08A;
  color: #713F12;
}

.note-stick-card.color-green {
  background: #DCFCE7;
  border-color: #BBF7D0;
  color: #14532D;
}

[data-theme="dark"] .note-stick-card.color-yellow {
  background: #1C1A08;
  border-color: #332D0A;
  color: #FEF08A;
}

[data-theme="dark"] .note-stick-card.color-green {
  background: #081F12;
  border-color: #0D3320;
  color: #BBF7D0;
}

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

.note-stick-title {
  font-weight: 700;
  font-size: 12px;
}

.note-stick-pin {
  font-size: 11px;
  opacity: 0.5;
}

.note-stick-excerpt {
  font-size: 11px;
  line-height: 1.5;
  opacity: 0.8;
}

.note-stick-date {
  font-size: 10px;
  opacity: 0.5;
}

/* ---- Focus Music Card ---- */
.focus-music-card {
  padding: 22px;
}

.music-settings-btn {
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-xs);
}

.music-player-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.music-track-art {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.music-player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.track-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-title-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.music-playback-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-control-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: background var(--dur), color var(--dur);
}

.music-control-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.music-control-btn svg {
  width: 16px;
  height: 16px;
}

.music-control-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
  transition: transform var(--dur-fast);
}

.music-control-play-btn:hover {
  transform: scale(1.08);
}

[data-theme="dark"] .music-control-play-btn {
  color: #0A0F0D;
}

.music-slider-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.music-slider-progress-bar {
  height: 3px;
  background: var(--bg-sunken);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.music-slider-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.music-slider-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ---- Quick Tools Card ---- */
.quick-tools-card {
  padding: 22px;
}

.quick-tools-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-tool-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--dur-fast), border-color var(--dur), background var(--dur);
}

.quick-tool-tile:hover {
  transform: translateX(2px);
  border-color: rgba(var(--accent-rgb), 0.2);
  background: var(--bg-hover);
}

.quick-tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quick-tool-icon svg {
  width: 18px;
  height: 18px;
}

.clipboard-theme {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.calc-theme {
  background: rgba(96, 165, 250, 0.1);
  color: #60A5FA;
}

.math-theme {
  background: rgba(168, 85, 247, 0.1);
  color: #A855F7;
}

.quick-tool-info {
  flex: 1;
  min-width: 0;
}

.quick-tool-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.quick-tool-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.quick-tool-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.quick-tool-arrow svg {
  width: 16px;
  height: 16px;
}

.quick-tools-footer {
  margin-top: 10px;
  text-align: center;
}

.quick-tools-footer a {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   MODULE: Todo / Tasks (shared utilities)
   ============================================================ */
.todo-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.todo-toolbar .input {
  max-width: 260px;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todo-priority-bar {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
}

.priority-high {
  background: linear-gradient(145deg, #F87171, #EF4444);
}

.priority-medium {
  background: linear-gradient(145deg, #FBBF24, #F59E0B);
}

.priority-low {
  background: linear-gradient(145deg, #34D399, #10B981);
}

/* ============================================================
   MODULE: Timer (Pomodoro / Stopwatch / Countdown)
   ============================================================ */
.timer-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: 999px;
  margin-bottom: 20px;
  width: fit-content;
}

.timer-tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--dur-fast);
  cursor: pointer;
  border: none;
  background: none;
}

.timer-tab.active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.timer-tab:hover:not(.active) {
  color: var(--text);
}

.timer-pomodoro {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.timer-pomo-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 28px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.timer-pomo-modes {
  display: flex;
  gap: 4px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: 999px;
}

.timer-pomo-mode {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--dur);
  cursor: pointer;
  border: none;
  background: none;
}

.timer-pomo-mode.active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.timer-pomo-ring {
  position: relative;
  width: 260px;
  height: 260px;
}

.timer-pomo-ring svg {
  transform: rotate(-90deg);
}

.timer-pomo-ring-bg {
  fill: none;
  stroke: var(--bg-sunken);
  stroke-width: 8;
}

.timer-pomo-ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-pomo-time {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.timer-pomo-phase {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
  font-family: var(--font);
  font-weight: 600;
}

.timer-pomo-controls {
  display: flex;
  gap: 12px;
}

.timer-pomo-controls .btn {
  min-width: 100px;
  padding: 12px 20px;
}

.timer-pomo-sessions {
  display: flex;
  gap: 6px;
}

.timer-pomo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}

.timer-pomo-dot.filled {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.2);
}

.timer-pomo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

.timer-pomo-stat {
  background: var(--bg-sunken);
  padding: 14px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}

.timer-pomo-stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
}

.timer-pomo-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.timer-sw-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 28px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.timer-sw-display {
  font-family: var(--font-mono);
  font-size: 60px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.timer-sw-ms {
  font-size: 30px;
  color: var(--accent);
}

.timer-sw-controls {
  display: flex;
  gap: 14px;
}

.timer-sw-laps {
  width: 100%;
  max-width: 400px;
}

.timer-sw-lap {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
}

.timer-sw-lap-best {
  color: var(--success);
  font-weight: 700;
}

.timer-sw-lap-worst {
  color: var(--danger);
  font-weight: 700;
}

.timer-cd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.timer-cd-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: transform var(--dur);
}

.timer-cd-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.timer-cd-display {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 14px 0;
  font-variant-numeric: tabular-nums;
}

.timer-cd-display.finished {
  color: var(--danger);
  animation: pulse 1s infinite;
}

@media (max-width: 900px) {
  .timer-pomodoro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .timer-pomo-ring {
    width: 200px;
    height: 200px;
  }

  .timer-pomo-time {
    font-size: 40px;
  }

  .timer-sw-display {
    font-size: 40px;
  }
}

/* ============================================================
   MODULE: Habits
   ============================================================ */
.habit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.habit-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow var(--dur), border-color var(--dur);
  position: relative;
  overflow: hidden;
}

.habit-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(var(--accent-rgb), 0.15);
}

.habit-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.habit-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.habit-icon svg {
  width: 20px;
  height: 20px;
}

.habit-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
}

.habit-streak-pill {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.habit-streak-pill svg {
  width: 12px;
  height: 12px;
}

.habit-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.habit-day {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur);
  position: relative;
}

.habit-day.done {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

[data-theme="dark"] .habit-day.done {
  color: #0A0F0D;
}

.habit-day.today {
  border-color: var(--accent);
  border-width: 2px;
}

.habit-day:hover {
  transform: scale(1.06);
}

.habit-progress-bar {
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.habit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 2px;
}

.habit-stats {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.heatmap {
  display: grid;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--bg-sunken);
  transition: transform var(--dur);
}

.heatmap-cell:hover {
  transform: scale(1.3);
}

.heatmap-cell.l1 {
  background: rgba(var(--accent-rgb), 0.15);
}

.heatmap-cell.l2 {
  background: rgba(var(--accent-rgb), 0.3);
}

.heatmap-cell.l3 {
  background: rgba(var(--accent-rgb), 0.5);
}

.heatmap-cell.l4 {
  background: var(--accent);
}

.habit-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.habit-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-sunken);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--dur);
  border: 2px solid transparent;
}

.habit-dot svg {
  width: 16px;
  height: 16px;
}

.habit-dot.done {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

[data-theme="dark"] .habit-dot.done {
  color: #0A0F0D;
}

.habit-dot:hover {
  border-color: var(--accent);
}

.habit-info {
  flex: 1;
  min-width: 0;
}

/* ============================================================
   MODULE: Calendar
   ============================================================ */
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-nav h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  min-width: 200px;
  text-align: center;
}

.calendar-views {
  display: flex;
  gap: 3px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: var(--radius);
}

.calendar-view-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--dur);
}

.calendar-view-btn.active {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--border);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-weekday {
  background: var(--bg-sunken);
  padding: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-day {
  background: var(--bg-elevated);
  min-height: 110px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background var(--dur);
}

.calendar-day:hover {
  background: var(--bg-hover);
}

.calendar-day.other-month {
  background: var(--bg-sunken);
  opacity: 0.5;
}

.calendar-day.today {
  background: rgba(var(--accent-rgb), 0.04);
}

.calendar-day-num {
  font-size: 12px;
  font-weight: 600;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.calendar-day.today .calendar-day-num {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

[data-theme="dark"] .calendar-day.today .calendar-day-num {
  color: #0A0F0D;
}

.calendar-event {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg-sunken);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 3px solid var(--accent);
}

.calendar-event.cat-work {
  background: rgba(96, 165, 250, 0.08);
  color: var(--info);
  border-color: var(--info);
}

.calendar-event.cat-personal {
  background: rgba(52, 211, 153, 0.08);
  color: var(--success);
  border-color: var(--success);
}

.calendar-event.cat-health {
  background: rgba(248, 113, 113, 0.08);
  color: var(--danger);
  border-color: var(--danger);
}

.calendar-event.cat-social {
  background: rgba(251, 191, 36, 0.08);
  color: var(--warning);
  border-color: var(--warning);
}

.calendar-event.cat-other {
  background: rgba(168, 85, 247, 0.08);
  color: #A855F7;
  border-color: #A855F7;
}

.calendar-week-view,
.calendar-day-view {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-week-view {
  grid-template-columns: 60px repeat(7, 1fr);
}

.calendar-day-view {
  grid-template-columns: 60px 1fr;
}

.calendar-time-col {
  background: var(--bg-elevated);
}

.calendar-time-slot {
  height: 56px;
  padding: 4px 8px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  border-top: 1px solid var(--border);
}

.calendar-day-col {
  background: var(--bg-elevated);
  position: relative;
  min-height: 600px;
}

.calendar-hour-slot {
  height: 56px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur);
}

.calendar-hour-slot:hover {
  background: var(--bg-hover);
}

.calendar-event-block {
  position: absolute;
  left: 4px;
  right: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid;
}

@media (max-width: 700px) {
  .calendar-day {
    min-height: 80px;
    padding: 4px;
  }

  .calendar-event {
    font-size: 9px;
    padding: 2px 4px;
  }
}

/* ============================================================
   MODULE: Notes
   ============================================================ */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.notes-grid .empty-state {
  grid-column: 1 / -1;
}

.note-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform var(--dur), box-shadow var(--dur);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.note-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.note-card.pinned {
  order: -1;
}

.note-pin {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity var(--dur);
  display: grid;
  place-items: center;
}

.note-pin svg {
  width: 15px;
  height: 15px;
}

.note-card.pinned .note-pin,
.note-card:hover .note-pin {
  opacity: 1;
}

.note-pin.active {
  opacity: 1;
  color: var(--accent);
}

.note-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.note-body {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  line-height: 1.6;
  max-height: 100px;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.note-color-yellow {
  background: #fef3c7;
  color: #422006;
}

.note-color-green {
  background: #d1fae5;
  color: #064e3b;
}

.note-color-blue {
  background: #dbeafe;
  color: #1e3a8a;
}

.note-color-pink {
  background: #fce7f3;
  color: #831843;
}

.note-color-purple {
  background: #ede9fe;
  color: #4c1d95;
}

.note-color-orange {
  background: #fed7aa;
  color: #7c2d12;
}

.note-color-white {
  background: var(--bg-elevated);
  color: var(--text);
}

.note-color-forest {
  background: #d4edda;
  color: #155724;
}

[data-theme="dark"] .note-color-yellow {
  background: #1C1A08;
  color: #fef3c7;
}

[data-theme="dark"] .note-color-green {
  background: #081F12;
  color: #a7f3d0;
}

[data-theme="dark"] .note-color-blue {
  background: #0D1A2E;
  color: #93c5fd;
}

[data-theme="dark"] .note-color-pink {
  background: #2A0F1C;
  color: #fce7f3;
}

[data-theme="dark"] .note-color-purple {
  background: #1A0F2E;
  color: #ede9fe;
}

[data-theme="dark"] .note-color-orange {
  background: #2A1608;
  color: #fed7aa;
}

[data-theme="dark"] .note-color-forest {
  background: #081F12;
  color: #a7f3d0;
}

.note-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-editor-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--bg-sunken);
  border-radius: var(--radius);
}

.note-editor-toolbar button {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--dur);
}

.note-editor-toolbar button:hover {
  background: var(--bg-elevated);
  color: var(--accent);
}

.note-editor-toolbar button.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.note-content-edit {
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg-elevated);
}

.note-content-edit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.color-picker {
  display: flex;
  gap: 6px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--dur);
}

.color-swatch.active {
  border-color: var(--accent);
  transform: scale(1.15);
}

.color-swatch:hover {
  transform: scale(1.1);
}

/* ============================================================
   MODULE: Kanban
   ============================================================ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  height: calc(100vh - 220px);
  min-height: 480px;
}

.kanban-column {
  background: var(--bg-sunken);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 10px;
  border-bottom: 1px solid var(--border);
}

.kanban-column-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kanban-column-count {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.kanban-cards {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
  min-height: 60px;
}

.kanban-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: grab;
  transition: all var(--dur);
  border-left: 3px solid var(--accent);
  position: relative;
}

.kanban-card:hover {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.1), var(--shadow);
  border-color: rgba(var(--accent-rgb), 0.15);
}

.kanban-card.dragging {
  opacity: 0.4;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.kanban-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.kanban-card-labels {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.kanban-card-label {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.kanban-card-due {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kanban-card-due svg {
  width: 12px;
  height: 12px;
}

.kanban-card-due.overdue {
  color: var(--danger);
}

.kanban-add-btn {
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--dur);
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.kanban-add-btn svg {
  width: 14px;
  height: 14px;
}

.kanban-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 900px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }
}

@media (max-width: 600px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MODULE: Whiteboard
   ============================================================ */
.whiteboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.whiteboard-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  align-items: center;
}

.whiteboard-tool {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all var(--dur);
}

.whiteboard-tool svg {
  width: 20px;
  height: 20px;
}

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

.whiteboard-tool.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.whiteboard-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

.whiteboard-colors {
  display: flex;
  gap: 4px;
}

.whiteboard-color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--dur);
}

.whiteboard-color.active {
  border-color: var(--accent);
  transform: scale(1.15);
}

.whiteboard-canvas-wrap {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

#whiteboardCanvas {
  display: block;
  cursor: crosshair;
  touch-action: none;
  background: var(--bg-elevated);
}

.whiteboard-size-input {
  width: 60px;
  padding: 5px 8px;
  font-size: 12px;
}

/* ============================================================
   MODULE: Calculator
   ============================================================ */
.calc-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.calc-display {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  text-align: right;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}

.calc-history {
  font-size: 12px;
  color: var(--text-muted);
  min-height: 16px;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-current {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

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

.calc-btn {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: all var(--dur-fast);
  font-family: var(--font-mono);
}

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

.calc-btn:active {
  transform: scale(0.95);
}

.calc-btn.op {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.1);
}

.calc-btn.op:hover {
  background: rgba(var(--accent-rgb), 0.15);
}

.calc-btn.eq {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
}

[data-theme="dark"] .calc-btn.eq {
  color: #0A0F0D;
}

.calc-btn.fn {
  background: var(--bg-sunken);
  color: var(--text-secondary);
}

.calc-btn.fn:hover {
  color: var(--danger);
}

.calc-scientific-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.calc-history-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  max-height: 400px;
  overflow-y: auto;
}

.calc-history-item {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur);
}

.calc-history-item:hover {
  background: var(--bg-hover);
}

.calc-history-expr {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.calc-history-result {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
}

@media (max-width: 700px) {
  .calc-wrap {
    grid-template-columns: 1fr;
  }

  .calc-scientific-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   MODULE: Music
   ============================================================ */
.music-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}

.music-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px 24px;
}

.music-art {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

[data-theme="dark"] .music-art {
  color: rgba(0, 0, 0, 0.3);
}

.music-art svg {
  width: 56px;
  height: 56px;
  opacity: 0.5;
}

.music-info {
  text-align: center;
  margin-bottom: 20px;
  width: 100%;
  min-width: 0;
}

.music-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 3px;
}

.music-artist {
  font-size: 13px;
  color: var(--text-muted);
}

.music-progress {
  width: 100%;
  height: 5px;
  background: var(--bg-sunken);
  border-radius: 3px;
  margin-bottom: 8px;
  cursor: pointer;
  position: relative;
}

.music-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

.music-time {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 20px;
  width: 100%;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.music-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-sunken);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: all var(--dur);
  border: 1px solid transparent;
}

.music-btn svg {
  width: 18px;
  height: 18px;
}

.music-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.music-btn.play {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.25);
  border: none;
}

[data-theme="dark"] .music-btn.play {
  color: #0A0F0D;
}

.music-btn.play svg {
  width: 22px;
  height: 22px;
}

.music-btn.play:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.35);
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 260px;
}

.music-volume svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.music-volume input[type=range] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-sunken);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.music-volume input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.music-volume input[type=range]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-elevated);
}

.music-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.music-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.music-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.music-section-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.ambient-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.ambient-row::-webkit-scrollbar {
  display: none;
}

.ambient-btn {
  flex: 0 0 auto;
  min-width: 90px;
  padding: 14px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--dur);
  position: relative;
  overflow: hidden;
}

.ambient-btn:hover {
  border-color: var(--accent);
}

.ambient-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.ambient-btn svg {
  width: 22px;
  height: 22px;
}

.ambient-btn span {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.music-playlist {
  display: flex;
  flex-direction: column;
}

.music-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur);
  border: 1px solid transparent;
}

.music-playlist-item:hover {
  background: var(--bg-hover);
}

.music-playlist-item.active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}

.music-playlist-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-sunken);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.music-playlist-icon svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.music-playlist-item.active .music-playlist-icon {
  background: rgba(var(--accent-rgb), 0.12);
}

.music-playlist-item.active .music-playlist-icon svg {
  color: var(--accent);
}

.music-playlist-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
}

.music-empty-icon {
  margin-bottom: 8px;
}

.music-empty-icon svg {
  width: 32px;
  height: 32px;
  opacity: 0.3;
}

/* ============================================================
   MODULE: Clipboard
   ============================================================ */
.clip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.clip-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clip-count {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.clip-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
}

.clip-status-badge.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.clip-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clip-search {
  width: 200px;
}

.clip-perm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.clip-perm-text {
  font-size: 13px;
  line-height: 1.6;
}

.clip-perm-text .text-muted {
  display: block;
  margin-top: 4px;
}

.clip-perm-text kbd {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

.clip-tip {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.clip-tip kbd {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.clip-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--dur);
  display: flex;
  flex-direction: column;
}

.clip-card:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.clip-card.pinned {
  border-left: 3px solid var(--accent);
}

.clip-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-muted);
}

.clip-type-badge svg {
  width: 12px;
  height: 12px;
}

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

.clip-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.clip-pin-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-right: 4px;
}

.clip-action-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur);
}

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

.clip-action-btn.clip-delete:hover {
  color: var(--danger);
}

.clip-action-btn svg {
  width: 14px;
  height: 14px;
}

.clip-card-body {
  flex: 1;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  padding: 10px 12px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 72px;
  overflow: hidden;
  line-height: 1.5;
}

.clip-card-body:hover {
  background: var(--bg-hover);
}

.clip-thumb {
  max-width: 100%;
  max-height: 72px;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.clip-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
}

.clip-detail-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.clip-detail-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--dur);
}

.clip-detail-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

[data-theme="dark"] .clip-detail-tab.active {
  color: #0A0F0D;
}

.clip-detail-pane {
  max-height: 340px;
  overflow: auto;
}

.clip-detail-pane pre {
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-sunken);
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.clip-detail-text {
  font-size: 13px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-sunken);
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 340px;
  overflow: auto;
}

.clip-grid .clip-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 45vh;
  margin: 0 auto;
}

.clip-empty-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.clip-empty-sub {
  font-size: 13px;
  max-width: 320px;
  line-height: 1.6;
}

/* ============================================================
   MODULE: Daily Planner
   ============================================================ */
.planner-date-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.planner-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.planner-date-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.planner-date-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.planner-date-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.planner-slider-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
}

.planner-slider-arrow {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0;
}

.planner-slider {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1;
  padding: 4px 0;
}

.planner-slider::-webkit-scrollbar {
  display: none;
}

.planner-chip {
  flex: 0 0 48px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--dur);
  color: var(--text-muted);
}

.planner-chip:hover {
  background: var(--bg-hover);
}

.planner-chip.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.2);
}

[data-theme="dark"] .planner-chip.selected {
  color: #0A0F0D;
  font-weight: 700;
}

.planner-chip.today:not(.selected) {
  border-color: var(--accent);
  color: var(--accent);
}

.planner-chip-weekday {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.planner-chip-day {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.planner-chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  margin-top: 2px;
}

.planner-month-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.planner-month-row .icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.planner-month-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 140px;
  text-align: center;
}

.planner-calendar {
  margin-top: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  animation: fadeIn var(--dur) var(--ease);
}

.planner-cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.planner-cal-header .icon-btn {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0;
}

.planner-cal-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.planner-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.planner-cal-wd {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

.planner-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.planner-cal-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  transition: all var(--dur);
}

.planner-cal-cell:hover {
  background: var(--bg-hover);
}

.planner-cal-cell.empty {
  cursor: default;
}

.planner-cal-cell.today:not(.selected) {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.planner-cal-cell.selected {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

[data-theme="dark"] .planner-cal-cell.selected {
  color: #0A0F0D;
}

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

.planner-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.planner-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.planner-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.planner-section-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.planner-section-icon svg {
  width: 16px;
  height: 16px;
}

.planner-section-icon.morning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
}

.planner-section-icon.afternoon {
  background: rgba(96, 165, 250, 0.12);
  color: var(--info);
}

.planner-section-icon.evening {
  background: rgba(168, 85, 247, 0.12);
  color: #A855F7;
}

.planner-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.planner-task:last-child {
  border-bottom: none;
}

.planner-task .checkbox-mini {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  transition: all var(--dur);
  font-size: 11px;
}

.planner-task .checkbox-mini svg {
  width: 11px;
  height: 11px;
}

.planner-task .checkbox-mini.checked {
  background: var(--accent);
  border-color: transparent;
}

[data-theme="dark"] .planner-task .checkbox-mini.checked {
  color: #0A0F0D;
}

.planner-task.done .checkbox-mini {
  background: var(--accent);
  border-color: transparent;
}

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

.planner-task-text {
  flex: 1;
  font-size: 13px;
  cursor: pointer;
}

.planner-add {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.planner-add .input {
  font-size: 12px;
  padding: 8px 10px;
}

.planner-goals {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 18px;
}

.planner-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-mini {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all var(--dur);
  color: #fff;
}

.checkbox-mini svg {
  width: 11px;
  height: 11px;
}

.checkbox-mini.checked {
  background: var(--accent);
  border-color: transparent;
}

[data-theme="dark"] .checkbox-mini.checked {
  color: #0A0F0D;
}

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

@media (max-width: 600px) {
  .planner-date-section {
    padding: 16px;
  }

  .planner-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Settings ---------- */
.settings-section {
  margin-bottom: 24px;
}

.settings-section h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.theme-options {
  display: flex;
  gap: 8px;
}

.theme-opt {
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--dur);
  background: var(--bg-sunken);
}

.theme-opt:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-opt.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

[data-theme="dark"] .theme-opt.active {
  color: #0A0F0D;
}

.accent-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.accent-opt {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform var(--dur), border-color var(--dur);
}

.accent-opt:hover {
  transform: scale(1.1);
}

.accent-opt.active {
  border-color: var(--text);
  transform: scale(1.15);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.shortcut-list kbd {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--dur);
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Module Header ---------- */
.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

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

/* ---------- Misc Dashboard Legacy ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.dash-hero {
  background: var(--hero-bg);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  position: relative;
  overflow: hidden;
}

.dash-time {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dash-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 500;
}

.dash-greeting {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-top: 14px;
}

.dash-quote {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
  max-width: 80%;
  line-height: 1.6;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.dash-stat {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border);
}

.dash-stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

.dash-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.dash-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dash-section-title h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.dash-section-title a {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.mini-todo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mini-todo:last-child {
  border-bottom: none;
}

.mini-todo .checkbox-mini.checked {
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.15);
}

.mini-todo.done .mini-todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.mini-todo-text {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-todo-priority {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

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

  .dash-time {
    font-size: 36px;
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Score Card (dashboard) */
.score-summary-card {
  padding: 22px;
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
  align-items: center;
}

.score-ring-wrap {
  position: relative;
  width: 90px;
  height: 90px;
}

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

.score-svg-bg {
  fill: none;
  stroke: var(--bg-sunken);
  stroke-width: 3.5;
}

.score-svg-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  transform: translateY(-6px);
}

.score-caption {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
}

.score-details-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-detail-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
}

.score-detail-icon svg {
  width: 13px;
  height: 13px;
}

.check-box-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.clock-box-icon {
  background: rgba(96, 165, 250, 0.1);
  color: #60A5FA;
}

.habit-box-icon {
  background: rgba(251, 191, 36, 0.1);
  color: #FBBF24;
}

.score-detail-text {
  display: flex;
  flex-direction: column;
}

.score-detail-title {
  font-size: 10px;
  color: var(--text-muted);
}

.score-detail-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Nature placeholder image */
.nature-placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-sunken);
}

.nature-placeholder-icon {
  position: relative;
  z-index: 3;
  color: var(--accent);
  opacity: 0.4;
}

.nature-placeholder-icon svg {
  width: 44px;
  height: 44px;
}

/* ---------- Drag helper ---------- */
.checked-task .task-mini-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ============================================================
   SPOTIFY-STYLE MUSIC STREAMING APP CSS
   ============================================================ */
.sp-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  min-height: calc(100vh - 160px);
  position: relative;
  padding-bottom: 90px;
}

@media (max-width: 992px) {
  .sp-layout {
    grid-template-columns: 1fr;
  }

  .sp-sidebar {
    display: none;
  }
}

.sp-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.sp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.sp-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-nav-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 12px;
}

.sp-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: all var(--dur) ease;
}

.sp-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sp-nav-item.active {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.sp-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sp-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.sp-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sp-search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 480px;
}

.sp-search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  transition: border-color var(--dur);
}

.sp-search-wrap input:focus {
  border-color: var(--accent);
  outline: none;
}

.sp-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.sp-genre-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.sp-genre-chips::-webkit-scrollbar {
  display: none;
}

.sp-chip {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur) ease;
}

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

.sp-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.sp-hero-banner {
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.25) 0%, rgba(16, 185, 129, 0.08) 100%), var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.sp-hero-cover {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.sp-hero-cover svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  color: #fff !important;
  opacity: 0.95;
}

.sp-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.sp-hero-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.sp-hero-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.sp-hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 540px;
}

.sp-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.sp-play-big-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.4);
  transition: transform var(--dur), box-shadow var(--dur);
}

[data-theme="dark"] .sp-play-big-btn {
  color: #0A0F0D;
}

.sp-play-big-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.5);
}

.sp-play-big-btn svg {
  width: 22px;
  height: 22px;
}

.sp-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.sp-playlist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.sp-playlist-card:hover {
  background: var(--bg-hover);
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.sp-card-cover-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.sp-card-cover-wrap svg {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  color: #fff !important;
  opacity: 0.95;
}

.sp-card-play-hover {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.sp-card-play-hover svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  color: #fff !important;
}

[data-theme="dark"] .sp-card-play-hover {
  color: #0A0F0D;
}

.sp-playlist-card:hover .sp-card-play-hover {
  opacity: 1;
  transform: translateY(0);
}

.sp-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-direct-tracks-card svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

.sp-direct-play-btn svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.sp-tracklist-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.sp-track-row {
  display: grid;
  grid-template-columns: 36px 1fr 110px 100px 60px 40px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  transition: background var(--dur);
  cursor: pointer;
}

/* Waveform Preview in Tracklist */
.sp-waveform-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}

.sp-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}

.sp-waveform span {
  width: 3px;
  background: var(--text-muted);
  border-radius: 2px;
  opacity: 0.4;
  transition: height 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.sp-waveform span:nth-child(1) {
  height: 35%;
}

.sp-waveform span:nth-child(2) {
  height: 75%;
}

.sp-waveform span:nth-child(3) {
  height: 45%;
}

.sp-waveform span:nth-child(4) {
  height: 90%;
}

.sp-waveform span:nth-child(5) {
  height: 60%;
}

.sp-waveform span:nth-child(6) {
  height: 30%;
}

.sp-waveform span:nth-child(7) {
  height: 80%;
}

.sp-waveform span:nth-child(8) {
  height: 100%;
}

.sp-waveform span:nth-child(9) {
  height: 50%;
}

.sp-waveform span:nth-child(10) {
  height: 70%;
}

.sp-waveform span:nth-child(11) {
  height: 40%;
}

.sp-waveform span:nth-child(12) {
  height: 85%;
}

.sp-waveform.playing span {
  background: var(--accent);
  opacity: 1;
  animation: waveAnim 1.2s infinite ease-in-out alternate;
}

.sp-waveform.playing span:nth-child(1) {
  animation-delay: 0.1s;
}

.sp-waveform.playing span:nth-child(2) {
  animation-delay: 0.3s;
}

.sp-waveform.playing span:nth-child(3) {
  animation-delay: 0.2s;
}

.sp-waveform.playing span:nth-child(4) {
  animation-delay: 0.4s;
}

.sp-waveform.playing span:nth-child(5) {
  animation-delay: 0.15s;
}

.sp-waveform.playing span:nth-child(6) {
  animation-delay: 0.35s;
}

.sp-waveform.playing span:nth-child(7) {
  animation-delay: 0.25s;
}

.sp-waveform.playing span:nth-child(8) {
  animation-delay: 0.45s;
}

.sp-waveform.playing span:nth-child(9) {
  animation-delay: 0.05s;
}

.sp-waveform.playing span:nth-child(10) {
  animation-delay: 0.5s;
}

.sp-waveform.playing span:nth-child(11) {
  animation-delay: 0.2s;
}

.sp-waveform.playing span:nth-child(12) {
  animation-delay: 0.4s;
}

@keyframes waveAnim {
  0% {
    height: 15%;
  }

  50% {
    height: 100%;
  }

  100% {
    height: 30%;
  }
}

.sp-track-row:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sp-track-row.playing {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.sp-track-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.sp-track-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sp-track-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-track-artist {
  font-size: 11px;
  color: var(--text-muted);
}

.sp-track-like-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color var(--dur);
}

.sp-track-like-btn.liked {
  color: #EF4444;
}

.sp-player-bar {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w, 240px);
  right: 0;
  width: calc(100vw - var(--sidebar-w, 240px));
  height: 72px;
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  z-index: 9999;
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
  transition: left var(--dur) var(--ease), width var(--dur) var(--ease);
}

.sidebar-collapsed .sp-player-bar,
.app.sidebar-collapsed .sp-player-bar {
  left: var(--sidebar-w-collapsed, 72px);
  width: calc(100vw - var(--sidebar-w-collapsed, 72px));
}

@media (max-width: 768px) {
  .sp-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: calc(var(--bottom-nav-h, 60px) + 70px);
  }

  .sp-sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 12px;
    overflow-x: auto;
    position: relative;
    top: 0;
    width: 100%;
    gap: 8px;
    scrollbar-width: none;
  }

  .sp-sidebar::-webkit-scrollbar {
    display: none;
  }

  .sp-nav-group {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .sp-nav-title {
    display: none;
  }

  .sp-brand {
    display: none;
  }

  .sp-hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    gap: 14px;
  }

  .sp-hero-cover {
    width: 80px;
    height: 80px;
    font-size: 32px;
    border-radius: var(--radius);
  }

  .sp-hero-title {
    font-size: 20px;
  }

  .sp-hero-desc {
    font-size: 12px;
  }

  .sp-hero-actions {
    justify-content: center;
  }

  .sp-tracklist-container {
    padding: 14px 10px;
  }

  .sp-track-row {
    grid-template-columns: 24px 1fr 32px;
    gap: 8px;
    padding: 8px;
  }

  .sp-track-row>div:nth-child(3),
  .sp-track-row>div:nth-child(4),
  .sp-track-row>div:nth-child(5) {
    display: none;
  }

  .sp-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .sp-playlist-card {
    padding: 10px;
  }

  /* FLAWLESS UNBREAKABLE MOBILE PLAYER BAR (STACKED ABOVE BOTTOM NAV) */
  .sp-player-bar,
  .sidebar-collapsed .sp-player-bar,
  .app.sidebar-collapsed .sp-player-bar {
    position: fixed !important;
    bottom: var(--bottom-nav-h, 60px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 56px !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    border-left: none !important;
    border-right: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 12px !important;
    margin: 0 !important;
    z-index: 9990 !important;
    background: var(--bg-elevated) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.3) !important;
  }

  .sp-player-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .sp-player-art {
    width: 34px !important;
    height: 34px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .sp-player-art svg {
    width: 16px !important;
    height: 16px !important;
  }

  .sp-player-info {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .sp-player-track-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .sp-player-artist-name {
    font-size: 10px !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .sp-player-center {
    display: flex !important;
    max-width: none !important;
    margin: 0 !important;
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .sp-progress-wrap {
    display: none !important;
  }

  .sp-ctrl-btns {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .sp-ctrl-btn:not(.sp-play-main-btn):not([title="Next"]) {
    display: none !important;
  }

  .sp-play-main-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
  }

  .sp-play-main-btn svg {
    width: 14px !important;
    height: 14px !important;
  }

  .sp-ctrl-btn[title="Next"] {
    width: 32px !important;
    height: 32px !important;
    display: grid !important;
    place-items: center !important;
  }

  .sp-ctrl-btn[title="Next"] svg {
    width: 16px !important;
    height: 16px !important;
  }

  .sp-player-right {
    display: none !important;
  }
}

.sp-player-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sp-player-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-sunken);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.sp-player-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sp-player-track-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-player-artist-name {
  font-size: 11px;
  color: var(--text-muted);
}

.sp-player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.sp-ctrl-btns {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sp-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all var(--dur) ease;
}

.sp-ctrl-btn:hover {
  color: var(--text);
  transform: scale(1.08);
}

.sp-ctrl-btn.active {
  color: var(--accent);
}

.sp-play-main-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--dur);
}

.sp-play-main-btn:hover {
  transform: scale(1.1);
}

.sp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sp-time-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
}

.sp-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}

.sp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  width: 0%;
  transition: width 0.1s linear;
}

.sp-player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.sp-volume-bar {
  width: 90px;
  height: 4px;
  accent-color: var(--accent);
}

.eq-bars-anim {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bars-anim span {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eqBounce 1s infinite ease-in-out alternate;
}

.eq-bars-anim span:nth-child(1) {
  animation-delay: 0.1s;
  height: 60%;
}

.eq-bars-anim span:nth-child(2) {
  animation-delay: 0.3s;
  height: 100%;
}

.eq-bars-anim span:nth-child(3) {
  animation-delay: 0.2s;
  height: 40%;
}

.eq-bars-anim span:nth-child(4) {
  animation-delay: 0.4s;
  height: 80%;
}

@keyframes eqBounce {
  0% {
    height: 20%;
  }

  100% {
    height: 100%;
  }
}

/* ---- CUSTOM THEME BUILDER STYLES ---- */
@media (max-width: 900px) {
  .theme-split-layout {
    grid-template-columns: 1fr !important;
  }
}
.active-preset-card {
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.25) !important;
  border-color: var(--accent) !important;
}

/* Dynamic global border width & style overrides */
.card, .modal, .dialog, .input, .note-card, .sp-panel, .dash-hero-section {
  border-width: var(--border-width, 1px) !important;
  border-style: var(--border-style, solid) !important;
}
#sidebar {
  border-right-width: var(--border-width, 1px) !important;
  border-right-style: var(--border-style, solid) !important;
}
.topbar {
  border-bottom-width: var(--border-width, 1px) !important;
  border-bottom-style: var(--border-style, solid) !important;
}
.bottom-nav {
  border-top-width: var(--border-width, 1px) !important;
  border-top-style: var(--border-style, solid) !important;
}

/* ---- ICON PACK STYLES ---- */
/* 1. Solid Icon Pack */
[data-icon-pack="solid"] svg:not(.no-solid) path,
[data-icon-pack="solid"] svg:not(.no-solid) circle,
[data-icon-pack="solid"] svg:not(.no-solid) rect,
[data-icon-pack="solid"] svg:not(.no-solid) polygon,
[data-icon-pack="solid"] svg:not(.no-solid) ellipse {
  fill: currentColor !important;
}
[data-icon-pack="solid"] svg:not(.no-solid) line,
[data-icon-pack="solid"] svg:not(.no-solid) polyline {
  stroke-width: 3px !important;
}

/* 2. Minimalist Icon Pack */
[data-icon-pack="minimalist"] svg {
  stroke-width: 1.2px !important;
  transform: scale(0.92);
}

/* 3. Hand-drawn / Sketchy Icon Pack */
[data-icon-pack="handdrawn"] svg {
  stroke-width: 2.2px !important;
  filter: url(#sketchy-filter);
}