
/* Invisible scrollbars (still functional) */
.dash-content,
.notes-panel,
.notes-list,
.note-editor,
.sidebar,
.task-list,
body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.dash-content::-webkit-scrollbar,
.notes-panel::-webkit-scrollbar,
.notes-list::-webkit-scrollbar,
.note-editor::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.task-list::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
/* ===== Theme Variables ===== */
:root, [data-theme="dark"] {
  --bg: #0b1326;
  --bg-elevated: #131b2e;
  --bg-card: rgba(34, 42, 61, 0.55);
  --bg-card-hover: rgba(34, 42, 61, 0.85);
  --bg-input: rgba(6, 14, 32, 0.55);
  --bg-input-focus: rgba(6, 14, 32, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-glass-top: rgba(255, 255, 255, 0.12);
  --border-glass-side: rgba(255, 255, 255, 0.05);
  --text: #dae2fd;
  --text-secondary: #c1c6d7;
  --text-muted: #8b90a0;
  --text-inverse: #0b1326;
  --blue-400: #adc6ff;
  --blue-500: #4b8eff;
  --blue-600: #3b7aef;
  --blue-700: #2a5fd4;
  --cyan-400: #7dd3fc;
  --purple-500: #c0c1ff;
  --green-500: #4ade80;
  --orange-500: #ffb595;
  --pink-500: #f0abfc;
  --red-400: #ffb4ab;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 24px rgba(173, 198, 255, 0.15);
  --navbar-bg: rgba(11, 19, 38, 0.85);
  --orb-opacity: 0.3;
  --grid-color: rgba(173, 198, 255, 0.04);
  --modal-bg: #171f33;
  --sidebar-bg: #131b2e;
  --surface-high: #222a3d;
  --primary-soft: rgba(173, 198, 255, 0.12);
}

[data-theme="light"] {
  --bg: #f0f5ff;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fbff;
  --bg-input: #eef3fb;
  --bg-input-focus: #e8eef9;
  --border: rgba(37, 99, 235, 0.12);
  --border-strong: rgba(37, 99, 235, 0.22);
  --border-glass-top: rgba(255, 255, 255, 0.9);
  --border-glass-side: rgba(37, 99, 235, 0.08);
  --text: #0c1b3a;
  --text-secondary: #3b4f73;
  --text-muted: #5b6f94;
  --text-inverse: #ffffff;
  --blue-400: #3b82f6;
  --blue-500: #2563eb;
  --blue-600: #1d4ed8;
  --blue-700: #1e3a8a;
  --cyan-400: #0ea5e9;
  --purple-500: #6366f1;
  --green-500: #059669;
  --orange-500: #ea580c;
  --pink-500: #db2777;
  --red-400: #dc2626;
  --shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  --shadow-lg: 0 16px 32px rgba(37, 99, 235, 0.12);
  --shadow-glow: 0 0 32px rgba(37, 99, 235, 0.18);
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --orb-opacity: 0.18;
  --grid-color: rgba(37, 99, 235, 0.07);
  --modal-bg: #ffffff;
  --sidebar-bg: #ffffff;
  --surface-high: #e8f0fe;
  --primary-soft: rgba(37, 99, 235, 0.1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.35s ease, color 0.35s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* Logo switching */
.logo-dark { display: block; }
.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }
.logo-icon { display: none; }
.logo-img.logo-icon { height: 36px; width: 36px; object-fit: contain; }
.sidebar-logo.logo-icon { height: 32px; width: 32px; object-fit: contain; }

/* ===== Utilities ===== */
.page { display: none; }
.page.active { display: block; }
#dashboard.page.active {
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  color: #002e69;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(173, 198, 255, 0.2);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(173, 198, 255, 0.3);
  background: linear-gradient(180deg, var(--blue-400), var(--blue-500));
}
[data-theme="light"] .btn-primary {
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-input-focus); }
.btn-ghost {
  color: var(--text-secondary);
  padding: 10px 16px;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-input); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-secondary);
}
.btn-icon:hover { background: var(--bg-input-focus); color: var(--text); }
.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red-400);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.25s;
}
.theme-toggle:hover {
  background: var(--bg-input);
  color: var(--text);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 0;
  transition: all 0.3s;
}
.navbar.scrolled {
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 38px; width: auto; }
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.25s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-input);
}
.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 4px;
}
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 20px;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-link {
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
}
.mobile-link:hover { background: var(--bg-input); color: var(--text); }
.mobile-menu-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mobile-menu-btns .btn { width: 100%; justify-content: center; }

/* ===== Hero - Full Width ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--orb-opacity);
  animation: float 14s ease-in-out infinite;
}
.orb-1 {
  width: min(500px, 80vw); height: min(500px, 80vw);
  background: var(--blue-600);
  top: -15%; left: -10%;
}
.orb-2 {
  width: min(380px, 60vw); height: min(380px, 60vw);
  background: var(--purple-500);
  bottom: 5%; right: -8%;
  animation-delay: -5s;
}
.orb-3 {
  width: min(240px, 40vw); height: min(240px, 40vw);
  background: var(--cyan-400);
  top: 45%; left: 45%;
  animation-delay: -9s;
  opacity: calc(var(--orb-opacity) * 0.7);
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 10%, transparent 70%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-content { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue-400);
  margin-bottom: 24px;
}
[data-theme="light"] .hero-badge {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
}
.badge-dot {
  width: 8px; height: 8px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-family: 'Geist', 'Outfit', 'Inter', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text);
}
.title-line { display: block; }
.gradient-text {
  background: linear-gradient(135deg, var(--blue-400), var(--cyan-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-divider {
  width: 1px; height: 36px;
  background: var(--border-strong);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 400px;
}
.floating-card {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: cardFloat 6s ease-in-out infinite;
}
[data-theme="light"] .floating-card {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.card-1 { top: 8%; left: 0; animation-delay: 0s; }
.card-2 { bottom: 22%; right: 0; animation-delay: -2s; }
.card-3 {
  top: 48%; left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  text-align: center;
  padding: 20px;
  animation-delay: -4s;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.card-3 { animation-name: cardFloatCenter; }
@keyframes cardFloatCenter {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 12px)); }
}
.card-icon { font-size: 1.4rem; }
.card-text { display: flex; flex-direction: column; }
.card-text strong { font-size: 0.9rem; color: var(--text); }
.card-text span { font-size: 0.8rem; color: var(--text-muted); }
.progress-ring { position: relative; width: 68px; height: 68px; }
.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border-strong); stroke-width: 3; }
.ring-fill { fill: none; stroke: var(--blue-400); stroke-width: 3; stroke-linecap: round; }
.progress-ring span {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: var(--text);
}
.card-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

/* 3D Cube */
.hero-3d {
  position: absolute;
  bottom: 8%;
  left: 18%;
  perspective: 600px;
}
.cube {
  width: 56px; height: 56px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 20s linear infinite;
}
.face {
  position: absolute;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(37,99,235,0.1));
  border: 1px solid rgba(96,165,250,0.35);
  border-radius: 8px;
}
[data-theme="light"] .face {
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(37,99,235,0.05));
  border-color: rgba(37,99,235,0.25);
}
.face.front { transform: translateZ(28px); }
.face.back { transform: rotateY(180deg) translateZ(28px); }
.face.left { transform: rotateY(-90deg) translateZ(28px); }
.face.right { transform: rotateY(90deg) translateZ(28px); }
.face.top { transform: rotateX(90deg) translateZ(28px); }
.face.bottom { transform: rotateX(-90deg) translateZ(28px); }
@keyframes rotateCube {
  from { transform: rotateX(0) rotateY(0); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

/* ===== Features ===== */
.features {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(59,130,246,0.12);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-400);
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  transition: all 0.3s;
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59,130,246,0.3);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}
.feature-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon.blue { background: rgba(59,130,246,0.12); color: var(--blue-400); }
.feature-icon.purple { background: rgba(168,85,247,0.12); color: var(--purple-500); }
.feature-icon.cyan { background: rgba(34,211,238,0.12); color: var(--cyan-400); }
.feature-icon.green { background: rgba(34,197,94,0.12); color: var(--green-500); }
.feature-icon.orange { background: rgba(249,115,22,0.12); color: var(--orange-500); }
.feature-icon.pink { background: rgba(236,72,153,0.12); color: var(--pink-500); }
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ===== How it works ===== */
.how {
  padding: 100px 24px;
  max-width: 960px;
  margin: 0 auto;
}
.steps { display: flex; flex-direction: column; gap: 24px; }
.step {
  display: grid;
  grid-template-columns: 72px 1fr 160px;
  gap: 20px;
  align-items: center;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: all 0.3s;
}
.step:hover {
  border-color: rgba(59,130,246,0.25);
  background: var(--bg-card-hover);
}
.step-num {
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-400), var(--cyan-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.step-content h3 { font-size: 1.2rem; margin-bottom: 6px; color: var(--text); }
.step-content p { color: var(--text-secondary); font-size: 0.92rem; }
.mini-ui {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border);
}
.mini-input {
  height: 10px;
  background: var(--bg-input);
  border-radius: 4px;
  margin-bottom: 8px;
}
.mini-input:last-of-type { width: 70%; }
.mini-btn {
  height: 14px; width: 50%;
  background: var(--blue-600);
  border-radius: 4px;
  margin-top: 8px;
}
.mini-task {
  height: 12px;
  background: var(--bg-input);
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  padding-left: 20px;
}
.mini-task::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border: 2px solid var(--border-strong);
  border-radius: 3px;
}
.mini-task.checked::before {
  background: var(--green-500);
  border-color: var(--green-500);
}
.mini-progress {
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.mini-bar {
  height: 100%; width: 75%;
  background: linear-gradient(90deg, var(--blue-500), var(--cyan-400));
  border-radius: 4px;
}
.mini-check {
  width: 32px; height: 32px;
  background: rgba(34,197,94,0.15);
  color: var(--green-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto;
}

/* ===== CTA ===== */
.cta-section {
  padding: 80px 24px;
  max-width: 880px;
  margin: 0 auto;
}
.cta-card {
  text-align: center;
  padding: 56px 36px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(168,85,247,0.08));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .cta-card {
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(168,85,247,0.05));
}
.cta-card h2 {
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}
.cta-card p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 28px;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto 36px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-logo { height: 34px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; max-width: 260px; }
.footer-links { display: flex; gap: 56px; }
.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--blue-400); }
.footer-bottom {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== Auth Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  padding: 20px;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  position: relative;
  transform: scale(0.95) translateY(16px);
  transition: transform 0.3s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 10px;
  font-size: 1.4rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--bg-input); color: var(--text); }
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.25s;
}
.auth-tab.active {
  background: var(--blue-600);
  color: white;
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.25s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-group input::placeholder { color: var(--text-muted); }
.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-switch a { color: var(--blue-400); font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* ===== Dashboard ===== */
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}
.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo { height: 34px; }
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.25s;
}
.side-link:hover { background: var(--bg-input); color: var(--text); }
.side-link.active {
  background: rgba(59,130,246,0.12);
  color: var(--blue-400);
}
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}
.user-info strong { display: block; font-size: 0.9rem; color: var(--text); }
.user-info span { font-size: 0.75rem; color: var(--text-muted); }

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.dash-header h1 {
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.dash-date { color: var(--text-muted); font-size: 0.88rem; margin-top: 2px; }
.progress-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.progress-circle {
  position: relative;
  width: 46px; height: 46px;
}
.progress-circle svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.circle-bg { fill: none; stroke: var(--border-strong); stroke-width: 3; }
.circle-fill {
  fill: none;
  stroke: var(--blue-400);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}
.progress-circle span {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.68rem; color: var(--text);
}

.dashboard-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  overflow: hidden;
  min-height: 0;
}
.tasks-panel {
  padding: 20px 28px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}
.panel-header { margin-bottom: 20px; }
.add-task-form {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: stretch;
}
.add-task-form > input[type="text"] {
  flex: 1;
  min-width: 160px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s;
}
.add-task-form > input[type="text"]:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.task-meta-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.add-task-form select,
.add-task-form input[type="datetime-local"] {
  padding: 11px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  transition: all 0.25s;
}
.add-task-form input[type="datetime-local"] {
  min-width: 180px;
  color-scheme: dark;
}
[data-theme="light"] .add-task-form input[type="datetime-local"] {
  color-scheme: light;
}
.add-task-form select:focus,
.add-task-form input[type="datetime-local"]:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.add-task-form select option { background: var(--bg-elevated); color: var(--text); }
.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.task-countdown-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.task-countdown {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  transition: background 0.4s ease, color 0.4s ease, transform 0.25s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.task-countdown::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: var(--progress, 100%);
  background: currentColor;
  opacity: 0.35;
  transition: width 1s linear;
  border-radius: 0 1px 1px 0;
}
.task-countdown:hover {
  transform: scale(1.04);
  border-color: currentColor;
}
.task-countdown.ok { background: rgba(34,197,94,0.12); color: var(--green-500); }
.task-countdown.warn { background: rgba(249,115,22,0.15); color: var(--orange-500); }
.task-countdown.urgent {
  background: rgba(239,68,68,0.15);
  color: var(--red-400);
  animation: urgentPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(239,68,68,0.25);
}
.task-countdown.overdue {
  background: rgba(239,68,68,0.2);
  color: var(--red-400);
  box-shadow: 0 0 10px rgba(239,68,68,0.2);
}
@keyframes urgentPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.03); }
}
.task-edit-due-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.25s;
  flex-shrink: 0;
}
.task-item:hover .task-edit-due-btn { opacity: 1; }
.task-edit-due-btn:hover {
  background: var(--bg-input);
  color: var(--blue-400);
}
.task-due-editor {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.task-due-editor.open { display: inline-flex; }
.task-due-editor input[type="datetime-local"] {
  padding: 5px 8px;
  background: var(--bg-input);
  border: 1px solid var(--blue-500);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.78rem;
  outline: none;
  max-width: 190px;
  color-scheme: dark;
}
[data-theme="light"] .task-due-editor input[type="datetime-local"] {
  color-scheme: light;
}
.task-due-editor .btn { padding: 5px 10px; font-size: 0.75rem; }
.notes-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-body.notes-hidden {
  grid-template-columns: 1fr;
}
.dashboard-body.notes-hidden .notes-panel {
  display: none;
}
.dashboard-body.notes-hidden .tasks-panel {
  border-right: none;
}
#toggleNotesBtn .icon-show { display: none; }
#toggleNotesBtn .icon-hide { display: block; }

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}
.filter-tab {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.25s;
}
.filter-tab.active {
  background: rgba(59,130,246,0.15);
  color: var(--blue-400);
}
.filter-tab:hover:not(.active) { color: var(--text); }

.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.25s;
  animation: taskIn 0.3s ease;
}
@keyframes taskIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.task-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}
.task-item.completed { opacity: 0.55; }
.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.25s;
}
.task-check:hover { border-color: var(--blue-400); }
.task-item.completed .task-check {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}
.task-text { font-size: 0.95rem; color: var(--text); min-width: 0; word-break: break-word; }
.task-priority {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.task-priority.high { background: rgba(239,68,68,0.12); color: var(--red-400); }
.task-priority.medium { background: rgba(249,115,22,0.12); color: var(--orange-500); }
.task-priority.low { background: rgba(34,197,94,0.12); color: var(--green-500); }
.task-delete {
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.25s;
  flex-shrink: 0;
}
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { background: rgba(239,68,68,0.12); color: var(--red-400); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 2.8rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 6px; }

/* Notes Panel */
.notes-panel {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  min-height: 0;
}
.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}
.notes-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.note-card {
  padding: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
}
.note-card:hover, .note-card.active {
  border-color: rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.06);
}
.note-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.note-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  min-height: 0;
}
.note-editor input {
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}
.note-editor input:focus { border-color: var(--blue-500); }
.note-editor textarea {
  flex: 1;
  min-height: 100px;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.note-editor textarea:focus { border-color: var(--blue-500); }
.note-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  max-width: 360px;
  margin-left: auto;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3000;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(34,197,94,0.35); }
.toast.error { border-color: rgba(239,68,68,0.35); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-content { max-width: 100%; margin: 0 auto; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual {
    height: 280px;
    max-width: 400px;
    margin: 0 auto;
  }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 56px 1fr; }
  .step-visual { display: none; }
  .dashboard-body { grid-template-columns: 1fr; }
  .notes-panel {
    border-top: 1px solid var(--border);
    border-right: none;
    max-height: 380px;
  }
  .tasks-panel { border-right: none; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-actions { display: flex; }
  .mobile-menu-btn { display: flex; }
  .logo-img.logo-full { display: none !important; }
  .logo-img.logo-icon { display: block !important; height: 36px; width: 36px; }
  .sidebar-logo.logo-full { display: none !important; }
  .sidebar-logo.logo-icon { display: block !important; }

  .hero {
    padding: 88px 0 48px;
    min-height: auto;
  }
  .hero-inner { padding: 0 16px; gap: 32px; }
  .hero-title { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero-subtitle { font-size: 1rem; margin-bottom: 24px; }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 32px;
  }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats {
    flex-wrap: wrap;
    gap: 16px 24px;
    justify-content: center;
  }
  .stat-divider { display: none; }
  .hero-visual {
    height: 240px;
    max-width: 320px;
  }
  .floating-card { padding: 10px 14px; }
  .card-1 { top: 0; left: 0; }
  .card-2 { bottom: 10%; right: 0; }
  .hero-3d { bottom: 0; left: 10%; }

  .features { padding: 64px 16px; }
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { padding: 22px 20px; }
  .section-header { margin-bottom: 36px; }

  .how { padding: 64px 16px; }
  .step {
    grid-template-columns: 48px 1fr;
    padding: 20px;
    gap: 14px;
  }
  .step-num { font-size: 1.6rem; }

  .cta-section { padding: 48px 16px; }
  .cta-card { padding: 36px 20px; }

  .footer { padding: 40px 16px 24px; }
  .footer-content { flex-direction: column; gap: 28px; }
  .footer-links { gap: 36px; }

  .sidebar { width: 64px; }
  .sidebar-header { padding: 14px 10px; display: flex; justify-content: center; }
  .sidebar-logo { height: 28px; }
  .side-link {
    justify-content: center;
    padding: 14px;
    font-size: 0;
    gap: 0;
  }
  .user-info { justify-content: center; }
  .user-info div:not(.avatar) { display: none; }
  .sidebar-footer .btn { display: none; }
  .sidebar-footer { padding: 12px 8px; }

  .dash-header { padding: 14px 16px; }
  .dash-header h1 { font-size: 1.2rem; }
  .progress-summary span:last-child { display: none; }

  .tasks-panel { padding: 16px; }
  .add-task-form { flex-direction: column; }
  .add-task-form > input[type="text"],
  .add-task-form .btn { width: 100%; }
  .task-meta-inputs { width: 100%; }
  .task-meta-inputs select,
  .task-meta-inputs input[type="datetime-local"] { flex: 1; min-width: 0; }
  .filter-tabs { width: 100%; }
  .filter-tab { flex: 1; text-align: center; }
  .panel-header-row { flex-direction: column; align-items: stretch; }
  .notes-header-actions .btn-primary span,
  .notes-header-actions .btn-primary { font-size: 0.8rem; }
  .task-countdown { font-size: 0.7rem; }

  .task-item { padding: 12px; gap: 10px; }
  .task-delete { opacity: 1; }
  .task-edit-due-btn { opacity: 1; }
  .task-countdown { font-size: 0.7rem; padding: 3px 7px; }
  .task-due-editor input[type="datetime-local"] { max-width: 150px; }

  .notes-panel {
    max-height: 320px;
    padding: 16px;
  }
  .dashboard-body {
    display: flex;
    flex-direction: column;
  }
  .tasks-panel { flex: 1; min-height: 0; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.85rem; }
  .hero-badge { font-size: 0.8rem; }
  .stat-num { font-size: 1.2rem; }
  .modal { padding: 24px 18px; }
  .toast { left: 12px; right: 12px; bottom: 16px; }
}


/* ===== Design system: glass + summary ===== */
.glass-panel {
  background: rgba(34, 42, 61, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
[data-theme="light"] .glass-panel {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-top: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.07);
}
[data-theme="light"] .glass-panel:hover {
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.22);
}
[data-theme="light"] .task-item {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.12);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.05);
}
[data-theme="light"] .task-item:hover {
  background: #f8fbff;
  border-color: rgba(37, 99, 235, 0.25);
}
[data-theme="light"] .sidebar {
  border-right-color: rgba(37, 99, 235, 0.12);
  box-shadow: 2px 0 16px rgba(37, 99, 235, 0.05);
}
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .side-link.active {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}
[data-theme="light"] .stat-card,
[data-theme="light"] .home-panel,
[data-theme="light"] .project-card {
  background: #ffffff;
}
[data-theme="light"] .stat-icon {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}
[data-theme="light"] .wysiwyg {
  background: #f8fbff;
  border-color: rgba(37, 99, 235, 0.15);
}
[data-theme="light"] .wysiwyg-toolbar {
  background: rgba(37, 99, 235, 0.05);
}
[data-theme="light"] .btn-secondary {
  background: #eef3fb;
  border-color: rgba(37, 99, 235, 0.18);
  color: #1e3a8a;
}
[data-theme="light"] .filter-tab.active {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}
[data-theme="light"] .notes-panel {
  background: #ffffff;
  border-left-color: rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .pd-members {
  background: #f0f5ff;
  border-color: rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .member-chip {
  background: #ffffff;
}
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .section-header p {
  color: #3b4f73;
}
[data-theme="light"] .feature-card {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .feature-card:hover {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .modal {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.12);
}
[data-theme="light"] .form-group input {
  background: #eef3fb;
  border-color: rgba(37, 99, 235, 0.15);
  color: #0c1b3a;
}
[data-theme="light"] .create-menu {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.15);
}
[data-theme="light"] .task-project-tag {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.glass-panel:hover {
  box-shadow: 0 12px 24px rgba(173, 198, 255, 0.08);
}

.dash-greeting {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 500;
}
.dash-header h1 {
  letter-spacing: -0.01em;
}

.dash-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 28px 0;
}
.summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  cursor: default;
}
.summary-card:hover {
  transform: translateY(-4px) rotateX(2deg);
}
.summary-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.summary-icon.blue { background: rgba(173, 198, 255, 0.15); color: var(--blue-400); }
.summary-icon.green { background: rgba(74, 222, 128, 0.12); color: var(--green-500); }
.summary-icon.orange { background: rgba(255, 181, 149, 0.15); color: var(--orange-500); }
.summary-icon.purple { background: rgba(192, 193, 255, 0.15); color: var(--purple-500); }
.summary-value {
  display: block;
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
.summary-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.task-item {
  border-radius: 14px !important;
}
.task-item:hover {
  transform: translateY(-1px);
}

.side-link.active {
  border-right: 3px solid var(--blue-400);
  border-radius: 10px 0 0 10px;
}

.sidebar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Feature cards 3D tilt */
.feature-card {
  border-radius: 16px;
  transform-style: preserve-3d;
}
.feature-card:hover {
  transform: translateY(-8px) rotateX(3deg) rotateY(-2deg);
}

/* Sunken inputs */
.add-task-form > input[type="text"],
.add-task-form select,
.add-task-form input[type="datetime-local"],
.form-group input,
.note-editor input,
.note-editor textarea {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {
  .dash-summary { grid-template-columns: repeat(2, 1fr); padding: 16px 20px 0; }
}
@media (max-width: 768px) {
  .dash-summary { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 16px 0; }
  .summary-card { padding: 14px; gap: 10px; }
  .summary-value { font-size: 1.25rem; }
  .summary-icon { width: 38px; height: 38px; }
  .dash-greeting { font-size: 0.8rem; }
}

@supports (padding: max(0px)) {
  .navbar .nav-container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .hero-inner {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}


/* ===== Redesigned Dashboard (match screen) ===== */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: contain;
}
.sidebar-brand-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-400);
  line-height: 1.2;
}
.sidebar-brand-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.btn-eazy-ai {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 12px;
}
.side-link span { white-space: nowrap; }
.side-link.active {
  background: rgba(173, 198, 255, 0.1);
  color: var(--blue-400);
  border-right: 3px solid var(--blue-400);
  border-radius: 10px 0 0 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 19, 38, 0.7);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
[data-theme="light"] .topbar { background: rgba(248, 250, 252, 0.85); }
.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 420px;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
}
.topbar-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }

.dash-content-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.dash-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 28px 48px;
  min-width: 0;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dash-content-wrap.notes-hidden .dash-content {
  padding-right: 56px;
}
.view-panel { display: none; }
.view-panel.active { display: block; }

.home-hero { margin-bottom: 28px; }
.home-title {
  font-family: 'Geist', 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}
.home-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.home-sub .accent { color: var(--blue-400); font-weight: 600; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  padding: 20px;
  border-radius: 16px;
}
.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.stat-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.stat-chip.today { color: var(--blue-400); }
.stat-chip.priority { color: var(--orange-500); }
.stat-chip.ongoing { color: var(--purple-500); }
.stat-chip.spent { color: var(--red-400); }
.stat-num {
  font-family: 'Geist', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}
.home-panel {
  border-radius: 16px;
  padding: 20px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title-row h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.link-btn {
  font-size: 0.8rem;
  color: var(--blue-400);
  font-weight: 500;
}
.link-btn:hover { text-decoration: underline; }
.timeline-range {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 8px;
}

.priority-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.priority-item {
  padding: 12px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.priority-item:hover { border-color: rgba(173,198,255,0.25); }
.priority-item.done { opacity: 0.5; }
.priority-item.done .priority-title { text-decoration: line-through; }
.priority-title { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.priority-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.priority-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.priority-badge.high { background: rgba(239,68,68,0.15); color: var(--red-400); }
.priority-badge.medium { background: rgba(249,115,22,0.15); color: var(--orange-500); }
.priority-badge.low { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.priority-due { font-size: 0.75rem; color: var(--text-muted); }

.add-dashed {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.add-dashed:hover {
  border-color: var(--blue-400);
  color: var(--blue-400);
  background: rgba(173,198,255,0.05);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 16px;
  flex: 1;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 2px;
  background: rgba(255,255,255,0.08);
}
.timeline-item {
  position: relative;
  padding: 0 0 16px 16px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -14px; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--blue-400);
}
.timeline-item.past::before { border-color: var(--text-muted); }
.timeline-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.timeline-card {
  padding: 10px 12px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.timeline-card strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 2px;
}
.timeline-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-mini-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.project-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.project-mini-head strong {
  font-size: 0.9rem;
  color: var(--text);
}
.project-mini-head span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.project-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.project-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
}
.project-bar.alt > i {
  background: linear-gradient(90deg, var(--orange-500), #ff8a5b);
}
.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Notes in new layout */
.dash-content-wrap .notes-panel {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  border-right: none;
  max-height: none;
  height: 100%;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}
.dash-content-wrap .notes-panel .notes-list,
.dash-content-wrap .notes-panel .note-editor {
  overflow-y: auto;
}
.dash-content-wrap.notes-hidden .notes-panel {
  display: none;
}
.notes-rail {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 10px;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  color: #002e69;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border-radius: 12px 0 0 12px;
  border: 1px solid rgba(173, 198, 255, 0.35);
  border-right: none;
  box-shadow: -4px 0 20px rgba(173, 198, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notes-rail svg {
  transform: rotate(90deg);
  flex-shrink: 0;
}
.notes-rail:hover {
  transform: translateY(-50%) translateX(-2px);
  box-shadow: -6px 0 24px rgba(173, 198, 255, 0.35);
}
.dash-content-wrap.notes-hidden .notes-rail {
  display: flex;
}
[data-theme="light"] .notes-rail {
  color: white;
}

/* Create New dropdown */
.create-dropdown {
  position: relative;
}
.create-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}
.create-dropdown.open .create-menu {
  display: block;
}
.create-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s;
}
.create-menu button:hover {
  background: var(--bg-input);
  color: var(--blue-400);
}
#createNewBtn {
  gap: 6px;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.view-header h2 {
  font-family: 'Geist', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.project-card {
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.project-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text);
}
.project-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.reminders-list, .meetings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reminder-item, .meeting-item {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.meeting-item input, .project-card input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
}

@media (max-width: 1200px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
  .home-grid .home-panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-content-wrap .notes-panel { width: 280px; }
}
@media (max-width: 768px) {
  .topbar { padding: 10px 14px; }
  .topbar-search { max-width: none; }
  .topbar-search span, .topbar-search svg { display: none; }
  .dash-content { padding: 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-grid { grid-template-columns: 1fr; }
  .dash-content-wrap .notes-panel {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: min(320px, 90vw);
    z-index: 50;
    box-shadow: -8px 0 30px rgba(0,0,0,0.4);
  }
  .dash-content-wrap.notes-hidden .dash-content {
    padding-right: 48px;
  }
  .notes-rail {
    padding: 14px 8px;
    font-size: 0.75rem;
  }
  .sidebar-brand-text { display: none; }
  .btn-eazy-ai { display: none; }
}


/* Full task editor */
.task-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.task-item {
  flex-direction: column;
  align-items: stretch !important;
  gap: 0 !important;
}
.task-item .task-row-main {
  padding: 0;
}
.task-editor {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.task-item.editing .task-editor {
  display: flex;
}
.task-item.editing .task-body,
.task-item.editing .task-actions {
  display: none;
}
.task-editor-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: 10px;
}
.task-editor-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}
.task-editor-grid input,
.task-editor-grid select {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.task-editor-grid input:focus,
.task-editor-grid select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(75, 142, 255, 0.15);
}
.task-editor-grid input[type="datetime-local"] {
  color-scheme: dark;
}
[data-theme="light"] .task-editor-grid input[type="datetime-local"] {
  color-scheme: light;
}
.task-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.task-edit-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
  flex-shrink: 0;
}
.task-item:hover .task-edit-btn { opacity: 1; }
.task-edit-btn:hover {
  background: var(--bg-input);
  color: var(--blue-400);
}

/* Account theme switch */
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.account-theme-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  text-align: left;
}
.account-theme-btn:hover {
  background: var(--bg-input);
  color: var(--text);
}
.account-theme-btn .icon-sun { display: none; }
.account-theme-btn .icon-moon { display: block; }
.account-theme-btn .theme-label-light { display: none; }
.account-theme-btn .theme-label-dark { display: inline; }
[data-theme="light"] .account-theme-btn .icon-sun { display: block; }
[data-theme="light"] .account-theme-btn .icon-moon { display: none; }
[data-theme="light"] .account-theme-btn .theme-label-light { display: inline; }
[data-theme="light"] .account-theme-btn .theme-label-dark { display: none; }

@media (max-width: 768px) {
  .task-editor-grid { grid-template-columns: 1fr; }
  .task-edit-btn { opacity: 1; }
  .account-theme-btn span { display: none !important; }
  .account-theme-btn { justify-content: center; padding: 10px; }
}


/* Visible Hide Notes button */
.notes-hide-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 12px !important;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12) !important;
  color: var(--red-400) !important;
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid rgba(239, 68, 68, 0.25);
  opacity: 1 !important;
  visibility: visible !important;
}
.notes-hide-btn:hover {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fecaca !important;
}
.notes-hide-btn span { display: inline; }

/* Project detail */
.project-detail {
  padding: 24px;
  border-radius: 16px;
  max-width: 900px;
}
.pd-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-top: 16px;
}
.pd-label:first-child { margin-top: 0; }
.pd-title-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  outline: none;
}
.pd-title-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(75, 142, 255, 0.15);
}
.pd-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.pd-bar { height: 8px; margin-bottom: 8px; }

/* WYSIWYG */
.wysiwyg {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-input);
}
.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.wysiwyg-toolbar button {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  min-width: 32px;
}
.wysiwyg-toolbar button:hover {
  background: var(--bg-card);
  color: var(--text);
}
.wysiwyg-editor {
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
}
.wysiwyg-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
.pd-tasks-header {
  margin-top: 28px;
  margin-bottom: 12px;
}
.pd-tasks-header h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 4px;
}
.pd-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pd-task-form { margin: 12px 0 16px; }

.task-project-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(173, 198, 255, 0.12);
  color: var(--blue-400);
  vertical-align: middle;
}

@media (max-width: 768px) {
  .project-detail { padding: 16px; }
  .notes-hide-btn span { display: none; }
}


/* Project roles & members */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.role-badge.admin {
  background: rgba(75, 142, 255, 0.18);
  color: var(--blue-400);
}
.role-badge.member {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.pd-members {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border);
}
.members-assign {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}
.members-assign input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  outline: none;
}
.members-assign input:focus {
  border-color: var(--blue-500);
}
.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.member-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.member-info strong {
  font-size: 0.88rem;
  color: var(--text);
}
.member-info small {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.member-remove {
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
}
.member-remove:hover {
  background: rgba(239,68,68,0.15);
  color: var(--red-400);
}


/* Task body structure */
.task-row-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.task-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-body .task-text {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.task-body .task-project-tag {
  display: inline-block;
  width: fit-content;
  margin: 0;
}
.task-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.task-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Mobile to-do list layout */
@media (max-width: 768px) {
  .task-item {
    padding: 12px !important;
  }
  .task-row-main {
    gap: 10px;
  }
  .task-body .task-text {
    font-size: 0.92rem;
    line-height: 1.35;
  }
  .task-meta-line {
    gap: 6px;
  }
  .task-countdown {
    font-size: 0.68rem !important;
    padding: 3px 7px !important;
  }
  .task-actions .task-edit-btn,
  .task-actions .task-delete {
    opacity: 1;
    width: 32px;
    height: 32px;
  }
}


/* ===== My Finances ===== */
.finance-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.fin-hero-balance {
  padding: 18px 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(99,102,241,0.08));
  border: 1px solid rgba(37,99,235,0.25);
}
.fin-hero-val {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  word-break: break-word;
  line-height: 1.15;
}
.fin-hero-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.fin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fin-stat {
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fin-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.fin-stat-val {
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.fin-stat-val.positive { color: var(--green-500); }
.fin-stat-val.negative { color: var(--red-400); }

.finance-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  background: var(--bg-input);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.finance-tabs::-webkit-scrollbar { display: none; }
.finance-tab {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.finance-tab:hover { color: var(--text); }
.finance-tab.active {
  background: var(--bg-elevated);
  color: var(--blue-400);
  box-shadow: var(--shadow);
}

.finance-pane { display: none; }
.finance-pane.active { display: block; }
.finance-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.finance-pane-head h3 {
  font-size: 1.05rem;
  color: var(--text);
}

.account-form {
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.finance-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.finance-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.finance-form-grid label.full { grid-column: 1 / -1; }
.finance-form-grid input,
.finance-form-grid select {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.finance-form-grid input:focus,
.finance-form-grid select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.finance-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.account-card {
  padding: 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.account-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.account-icon { font-size: 1.4rem; }
.account-card strong { font-size: 1rem; color: var(--text); }
.account-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.account-balance {
  margin-top: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-400);
}

.finance-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}
.finance-row.done { opacity: 0.55; }
.finance-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.finance-row-main strong { font-size: 1.05rem; }
.finance-row-main strong.positive { color: var(--green-500); }
.finance-row-main strong.negative { color: var(--red-400); }
.finance-row-main span { color: var(--text); font-size: 0.9rem; }
.finance-row-main small { color: var(--text-muted); font-size: 0.78rem; }
.finance-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.finance-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 20px 0;
}

[data-theme="light"] .finance-tabs {
  background: #eef3fb;
}
[data-theme="light"] .finance-row {
  background: #ffffff;
}

@media (max-width: 768px) {
  .finance-form-grid { grid-template-columns: 1fr; }
  .finance-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .finance-tab { white-space: nowrap; }
}


/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.settings-card {
  padding: 20px;
  border-radius: 16px;
}
.settings-card h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 6px;
}
.settings-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.settings-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 10px;
}
.theme-choice-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.theme-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.theme-choice:hover { border-color: var(--blue-400); }
.theme-choice.active {
  border-color: var(--blue-500);
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.theme-choice-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
}
.theme-choice-swatch.light {
  background: linear-gradient(135deg, #ffffff, #dbeafe);
}
.theme-choice-swatch.dark {
  background: linear-gradient(135deg, #0b1326, #1e3a8a);
}
[data-theme="light"] .settings-card {
  background: #ffffff;
}

.custom-currency-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}


/* Reports */
.report-builder {
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.report-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.report-dates {
  margin-bottom: 4px;
}
.report-preview {
  padding: 18px;
  border-radius: 14px;
}
.report-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.report-preview-head h3 {
  font-size: 1.05rem;
  color: var(--text);
}
.report-preview-head span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.report-table-wrap {
  overflow-x: auto;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.report-table th,
.report-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}
.report-table th {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.report-table tfoot td {
  font-weight: 700;
  background: var(--bg-input);
}
.report-table .positive { color: var(--green-500); }
.report-table .negative { color: var(--red-400); }

.stat-link {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue-400);
  text-align: left;
  padding: 0;
}
.stat-link:hover { text-decoration: underline; }

[data-theme="light"] .report-table th {
  background: #eef3fb;
}


/* Loans & Goals */
.loan-total-bar {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
}
.loan-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.loan-totals > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.loan-totals span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.loan-totals strong {
  font-size: 1.1rem;
  color: var(--text);
}
.loan-progress {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.loan-progress span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.loan-details {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.loan-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--blue-400);
}
.loan-pay-list {
  margin: 8px 0 0 16px;
  list-style: disc;
}
.loan-pay-list .muted { color: var(--text-muted); list-style: none; margin-left: -16px; }
.loan-pay-form {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.goal-card {
  padding: 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.goal-card.completed {
  border-color: rgba(34, 197, 94, 0.35);
}
.goal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.goal-card-top h4 {
  font-size: 1.05rem;
  color: var(--text);
}
.goal-pct {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--blue-400);
}
.goal-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.goal-bar { height: 8px; margin: 4px 0; }
.goal-plan {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.goal-add-form {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
}
.goal-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  width: 100%;
}
.goal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 0;
}
.goal-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.9rem;
}
.goal-add-btn {
  height: 42px;
  white-space: nowrap;
  padding: 0 16px;
}
.goal-card {
  overflow: hidden;
}
@media (max-width: 560px) {
  .goal-add-row {
    grid-template-columns: 1fr;
  }
  .goal-add-btn {
    width: 100%;
  }
}
.goal-done {
  font-weight: 700;
  color: var(--green-500);
  margin-top: 6px;
}


/* ===== Mobile polish (app-wide + finances) ===== */
@media (max-width: 768px) {
  .fin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .fin-stat {
    padding: 10px 12px;
  }
  .fin-hero-balance {
    padding: 16px;
  }
  .finance-pane-head {
    flex-wrap: wrap;
  }
  .finance-row {
    flex-direction: column;
    align-items: stretch;
  }
  .finance-row-actions {
    width: 100%;
  }
  .finance-row-actions .btn {
    flex: 1;
  }
  .goals-grid {
    grid-template-columns: 1fr;
  }
  .accounts-grid {
    grid-template-columns: 1fr;
  }
  .loan-totals {
    flex-direction: column;
    gap: 10px;
  }
  .report-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .report-presets .btn {
    width: 100%;
  }
  .report-table {
    font-size: 0.78rem;
  }
  .report-table th,
  .report-table td {
    padding: 8px;
  }

  /* Dashboard */
  .stat-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .stat-card {
    padding: 14px !important;
  }
  .stat-num {
    font-size: 1.35rem !important;
    word-break: break-word;
  }
  .home-title {
    font-size: 1.5rem !important;
  }
  .topbar {
    gap: 8px;
    padding: 10px 12px !important;
  }
  .topbar-search {
    padding: 8px 12px;
  }
  .topbar-search input {
    font-size: 0.85rem;
  }
  .create-dropdown .btn span,
  #createNewBtn {
    font-size: 0.8rem;
  }
  .dash-content {
    padding: 14px 12px 32px !important;
  }
  .sidebar {
    width: 72px !important;
  }
  .side-link span,
  .sidebar-brand-text,
  .user-info > div:not(.avatar),
  .btn-eazy-ai,
  .account-theme-btn span {
    display: none !important;
  }
  .side-link {
    justify-content: center;
    padding: 12px !important;
  }
  .side-link.active {
    border-right-width: 0;
    border-radius: 10px;
  }
  .sidebar-footer {
    align-items: center;
  }
  .user-info {
    justify-content: center;
  }
  .notes-rail {
    padding: 12px 7px;
    font-size: 0.7rem;
  }
  .view-header h2 {
    font-size: 1.25rem;
  }
  .add-task-form {
    flex-direction: column;
  }
  .add-task-form > input[type="text"],
  .add-task-form .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .fin-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-row {
    grid-template-columns: 1fr !important;
  }
  .home-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Clickable summary cards */
.clickable-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.clickable-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}
.clickable-card:active {
  transform: translateY(0);
}

/* Sidebar collapse + hidden scrollbar */
.sidebar {
  transition: width 0.25s ease;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.sidebar-toggle:hover {
  background: var(--bg-input);
  color: var(--blue-400);
}
.sidebar-toggle .icon-expand { display: none; }
.sidebar-toggle .icon-collapse { display: block; }

.sidebar-nav,
.sidebar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar-nav::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.sidebar-nav {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.sidebar.collapsed {
  width: 78px;
}
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .side-link span,
.sidebar.collapsed .btn-eazy-ai,
.sidebar.collapsed .user-info > div:not(.avatar),
.sidebar.collapsed .account-theme-btn span,
.sidebar.collapsed .account-actions .btn-ghost {
  display: none !important;
}
.sidebar.collapsed .side-link {
  justify-content: center;
  padding: 12px;
  border-radius: 10px;
  border-right: none;
}
.sidebar.collapsed .side-link.active {
  border-right: none;
  background: rgba(173, 198, 255, 0.12);
}
.sidebar.collapsed .sidebar-header {
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}
.sidebar.collapsed .sidebar-brand {
  justify-content: center;
}
.sidebar.collapsed .sidebar-toggle .icon-collapse { display: none; }
.sidebar.collapsed .sidebar-toggle .icon-expand { display: block; }
.sidebar.collapsed .user-info {
  justify-content: center;
}
.sidebar.collapsed .sidebar-footer {
  align-items: center;
}
.sidebar.collapsed .account-actions {
  align-items: center;
}
.sidebar.collapsed .account-theme-btn {
  justify-content: center;
  padding: 10px;
}

@media (max-width: 768px) {
  .sidebar-toggle {
    /* On mobile sidebar is already compact; still allow expand when user wants labels if we expand width */
  }
  .sidebar:not(.collapsed) {
    width: 200px !important;
  }
  .sidebar:not(.collapsed) .side-link span,
  .sidebar:not(.collapsed) .sidebar-brand-text {
    display: inline !important;
  }
  .sidebar:not(.collapsed) .side-link {
    justify-content: flex-start;
    padding: 12px 14px !important;
    gap: 10px;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.footer-powered {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-powered a {
  color: var(--blue-400);
  font-weight: 600;
  text-decoration: none;
}
.footer-powered a:hover {
  text-decoration: underline;
}


/* Contacts */
.contacts-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.contacts-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.contacts-search {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
}
.contacts-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contacts-letter {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-400);
  letter-spacing: 0.06em;
  margin: 10px 0 2px 4px;
  text-transform: uppercase;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
}
.contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-500), var(--purple-500));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-info strong {
  color: var(--text);
  font-size: 0.95rem;
}
.contact-info small {
  color: var(--text-muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-notes {
  font-style: italic;
}
.contact-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.contacts-upload-btn {
  cursor: pointer;
  margin: 0;
}
@media (max-width: 768px) {
  .contact-row {
    flex-wrap: wrap;
  }
  .contact-actions {
    width: 100%;
  }
  .contact-actions .btn {
    flex: 1;
  }
  .contacts-header-actions {
    width: 100%;
  }
}


.contacts-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.contacts-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.contact-check {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.contact-row.selected {
  border-color: rgba(37, 99, 235, 0.4);
  background: rgba(37, 99, 235, 0.06);
}
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.contact-modal {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: 16px;
  position: relative;
}
.contact-view-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.contact-avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
  border-radius: 16px;
}
.contact-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.contact-view-grid .full { grid-column: 1 / -1; }
.contact-view-grid span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.contact-view-grid strong {
  color: var(--text);
  font-size: 0.95rem;
  word-break: break-word;
}
.contact-view-grid a { color: var(--blue-400); }
.contact-events-title {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 8px;
}
.contact-event-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.contact-event-list li {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.reminder-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(37,99,235,0.15);
  color: var(--blue-400);
  vertical-align: middle;
}
@media (max-width: 768px) {
  .contact-view-grid { grid-template-columns: 1fr; }
  .contacts-bulk-actions { width: 100%; }
}


/* Eazy AI */
.eazy-ai-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.eazy-ai-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.55);
}
.eazy-ai-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: min(400px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 110px));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  z-index: 2501;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}
.eazy-ai-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.eazy-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(124,58,237,0.1));
}
.eazy-ai-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eazy-ai-orb {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 1rem;
}
.eazy-ai-title strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}
.eazy-ai-title small {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.eazy-ai-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1;
}
.eazy-ai-close:hover { background: var(--bg-input); color: var(--text); }
.eazy-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.eazy-ai-quick button {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.eazy-ai-quick button:hover {
  border-color: var(--blue-400);
  color: var(--blue-400);
}
.eazy-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}
.eazy-ai-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.eazy-ai-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.eazy-ai-msg.ai {
  align-self: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.eazy-ai-msg.ai strong { color: var(--blue-400); }
.eazy-ai-msg.user strong { color: #fff; }
.eazy-ai-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.eazy-ai-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.9rem;
}
.eazy-ai-input input:focus {
  outline: none;
  border-color: var(--blue-400);
}
@media (max-width: 768px) {
  .eazy-ai-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 76px;
    height: min(70vh, 520px);
  }
  .eazy-ai-fab {
    right: 14px;
    bottom: 14px;
  }
}

.eazy-ai-msg .eazy-h { display: block; margin-top: 8px; color: var(--blue-400); }
.eazy-ai-quick {
  max-height: 88px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
.eazy-ai-quick::-webkit-scrollbar { display: none; }
.eazy-ai-quick button { flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.google-btn-wrap {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 8px;
}
.auth-hint {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}
.auth-hint a { color: var(--blue-400); }
