/* ═══════════════════════════════════════════════════════════
   CORVI-COSAS — Dark Purple Theme
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --sidebar-w: 240px;

  /* Dark purple palette */
  --bg:           #131020;
  --bg2:          #1a1630;
  --sidebar-bg:   #110e1f;
  --card-bg:      rgba(255,255,255,0.06);
  --card-border:  rgba(139,92,246,0.22);
  --card-hover:   rgba(139,92,246,0.10);

  /* Accents */
  --purple:       #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dim:   #6d28d9;
  --purple-glow:  rgba(139,92,246,0.35);
  --violet:       #c4b5fd;

  /* Text */
  --text:         #e8e0ff;
  --text-muted:   #7c6f9e;
  --text-dim:     #4a4068;

  /* Status */
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --info:         #38bdf8;

  /* Misc */
  --radius:       14px;
  --radius-sm:    8px;
  --transition:   all .25s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset ─────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Subtle dot grid */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(139,92,246,.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none; z-index: 0;
}

/* ─── Flowing lines SVG ──────────────────────────────────── */
#flow-lines {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: visible;
}
.fl {
  fill: none; stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 400 1200;
  stroke-dashoffset: 0;
}
.fl1 { stroke: url(#flg1); animation: flowLine 14s linear infinite; opacity: .7; }
.fl2 { stroke: url(#flg2); animation: flowLine 18s linear infinite 3s; opacity: .5; }
.fl3 { stroke: url(#flg1); animation: flowLine 22s linear infinite 6s; opacity: .45; }
.fl4 { stroke: url(#flg3); animation: flowLine 16s linear infinite 2s; opacity: .4; }
.fl5 { stroke: url(#flg2); animation: flowLine 20s linear infinite 8s; opacity: .35; }
.fl6 { stroke: url(#flg3); animation: flowLine 12s linear infinite 4s; opacity: .6; }

@keyframes flowLine {
  0%   { stroke-dashoffset: 1600; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { stroke-dashoffset: -400; opacity: 0; }
}

/* ─── Moving background lights ───────────────────────────── */
#bg-lights {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0;
  animation: orbFade 1s ease forwards;
}
.orb1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(109,40,217,.18) 0%, transparent 65%);
  top: -15%; left: -10%;
  animation: orbFade .8s ease forwards, orb1Move 18s ease-in-out infinite 1s;
}
.orb2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,.14) 0%, transparent 65%);
  bottom: -10%; right: -5%;
  animation: orbFade .8s ease forwards, orb2Move 22s ease-in-out infinite 1s;
}
.orb3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(196,181,253,.10) 0%, transparent 65%);
  top: 40%; left: 45%;
  animation: orbFade .8s ease forwards, orb3Move 15s ease-in-out infinite 1s;
}
.orb4 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(167,139,250,.12) 0%, transparent 65%);
  top: 15%; right: 20%;
  animation: orbFade .8s ease forwards, orb4Move 25s ease-in-out infinite 2s;
}
.orb5 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(109,40,217,.15) 0%, transparent 65%);
  bottom: 25%; left: 30%;
  animation: orbFade .8s ease forwards, orb5Move 20s ease-in-out infinite 3s;
}

@keyframes orbFade { to { opacity: 1; } }

@keyframes orb1Move {
  0%,100% { transform: translate(0,0) scale(1); }
  25%      { transform: translate(80px, 60px) scale(1.08); }
  50%      { transform: translate(40px, -50px) scale(.94); }
  75%      { transform: translate(-60px, 30px) scale(1.05); }
}
@keyframes orb2Move {
  0%,100% { transform: translate(0,0) scale(1); }
  30%      { transform: translate(-70px, -40px) scale(1.1); }
  60%      { transform: translate(50px, 60px) scale(.92); }
  80%      { transform: translate(-30px, -20px) scale(1.04); }
}
@keyframes orb3Move {
  0%,100% { transform: translate(0,0) scale(1); }
  20%      { transform: translate(60px, -60px) scale(1.15); }
  50%      { transform: translate(-80px, 40px) scale(.9); }
  80%      { transform: translate(30px, 50px) scale(1.08); }
}
@keyframes orb4Move {
  0%,100% { transform: translate(0,0) scale(1); }
  35%      { transform: translate(-50px, 70px) scale(1.12); }
  65%      { transform: translate(70px, -30px) scale(.88); }
}
@keyframes orb5Move {
  0%,100% { transform: translate(0,0) scale(1); }
  40%      { transform: translate(90px, -50px) scale(1.2); }
  70%      { transform: translate(-40px, 60px) scale(.85); }
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--purple-dim); border-radius: 99px; }

/* ─── Loading overlay ────────────────────────────────────── */
#pageLoader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  transition: opacity .5s ease, visibility .5s ease;
}
#pageLoader.hidden { opacity: 0; visibility: hidden; }

.logo-loader-wrap {
  position: relative;
  width: 100px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  animation: loaderFloat 3s ease-in-out infinite;
}
.logo-spin {
  width: 72px; height: 72px;
  border-radius: 18px;
  object-fit: contain;
  animation: logoSpinAnim 3s linear infinite;
  filter: drop-shadow(0 0 18px rgba(139,92,246,.8));
  z-index: 2; position: relative;
}
.logo-glow-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  background: conic-gradient(from 0deg, var(--purple), var(--violet), transparent, var(--purple)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: ringSpinAnim 1.2s linear infinite;
}
.loader-text {
  font-size: .85rem; color: var(--purple-light); letter-spacing: 3px;
  text-transform: uppercase; animation: pulse 1.5s ease infinite;
  font-weight: 600;
}
@keyframes loaderFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes logoSpinAnim {
  0% { transform: rotateY(0deg); filter: drop-shadow(0 0 14px rgba(139,92,246,.7)); }
  50% { filter: drop-shadow(0 0 28px rgba(196,181,253,.9)); }
  100% { transform: rotateY(360deg); filter: drop-shadow(0 0 14px rgba(139,92,246,.7)); }
}
@keyframes ringSpinAnim { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ─── Sidebar ───────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-w);
  background: rgba(7,5,16,0.92);
  border-right: 1px solid rgba(139,92,246,.14);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(24px);
  box-shadow: 4px 0 32px rgba(0,0,0,.5);
}
.sidebar.hidden { transform: translateX(-100%); }

.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(139,92,246,.1);
}
.sidebar-logo-img {
  width: 34px; height: 34px;
  border-radius: 8px;
  object-fit: contain;
  animation: logoGlow 3s ease-in-out infinite;
}
@keyframes logoGlow {
  0%,100% { filter: drop-shadow(0 0 6px var(--purple)); }
  50%      { filter: drop-shadow(0 0 14px var(--purple-light)); }
}
.sidebar-title {
  color: var(--violet);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.3px;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ─── Sidebar collapsible sections ───────────────────────────────────────── */
.sidebar-section { border-bottom: 1px solid rgba(139,92,246,.06); }
.sidebar-section:last-child { border-bottom: none; }

.sidebar-section-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 16px 8px;
  background: none; border: none; cursor: pointer;
  transition: background .2s;
}
.sidebar-section-btn:hover { background: rgba(139,92,246,.05); }
.sidebar-section-label {
  font-size: .62rem; font-weight: 700; letter-spacing: 1.1px;
  color: var(--text-dim); text-transform: uppercase;
}
.sidebar-chevron {
  font-size: .6rem; color: var(--text-dim);
  transition: transform .25s ease;
}
.sidebar-chevron.rotated { transform: rotate(180deg); }

.sidebar-section-body {
  overflow: hidden; max-height: 0;
  transition: max-height .3s ease;
}
.sidebar-section-body.open { max-height: 900px; }

.sidebar-body { flex: 1; overflow-y: auto; }
.sidebar-nav { list-style: none; padding: 0 10px 8px; margin: 0; }
.sidebar-nav li { margin-bottom: 1px; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; color: var(--text-muted);
  text-decoration: none; font-size: .855rem; font-weight: 500;
  border-radius: var(--radius-sm); transition: var(--transition);
  position: relative;
}
.sidebar-nav li a::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--purple); border-radius: 0 3px 3px 0;
  transform: scaleY(0); transition: transform .2s ease;
}
.sidebar-nav li a:hover { color: var(--text); background: rgba(139,92,246,.1); }
.sidebar-nav li a.active { color: var(--violet); background: rgba(139,92,246,.15); }
.sidebar-nav li a.active::before { transform: scaleY(1); }
.sidebar-nav li a i { width: 18px; text-align: center; font-size: .88rem; flex-shrink: 0; }

/* Sub-rows: link + expand button side by side */
.sidebar-sub-row {
  display: flex; align-items: center; border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-bottom: 1px;
}
.sidebar-sub-row:hover { background: rgba(139,92,246,.07); }
.sidebar-sub-main {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 8px 6px 8px 10px; color: var(--text-muted);
  text-decoration: none; font-size: .855rem; font-weight: 500;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transition: color .2s;
}
.sidebar-sub-main:hover, .sidebar-sub-main.active { color: var(--violet); }
.sidebar-sub-main i { width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-sub-toggle {
  background: none; border: none; cursor: pointer; padding: 8px 10px;
  color: var(--text-dim); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: var(--transition);
}
.sidebar-sub-toggle:hover { color: var(--violet); background: rgba(139,92,246,.12); }
.sidebar-sub-chev {
  font-size: .58rem; transition: transform .22s ease;
}
.sidebar-sub-chev.rotated { transform: rotate(90deg); }

.sidebar-sub-list {
  list-style: none; padding: 0 0 4px 28px; margin: 0;
  overflow: hidden; max-height: 0; transition: max-height .25s ease;
}
.sidebar-sub-list.open { max-height: 400px; }
.sidebar-sub-list li a {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; color: var(--text-dim);
  text-decoration: none; font-size: .8rem;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.sidebar-sub-list li a:hover { color: var(--text); background: rgba(139,92,246,.08); }
.sidebar-sub-list li a.active { color: var(--violet); }
.sidebar-sub-empty { font-size: .75rem; color: var(--text-dim); padding: 5px 8px; display: block; }

/* Footer */
.sidebar-footer {
  padding: 10px 12px; border-top: 1px solid rgba(139,92,246,.1);
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar-footer-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  color: var(--text-muted); text-decoration: none; font-size: .875rem;
  font-weight: 500; border-radius: var(--radius-sm); transition: var(--transition);
}
.sidebar-footer-link:hover { background: rgba(139,92,246,.1); color: var(--text); }
.sidebar-footer-link.active { background: rgba(139,92,246,.15); color: var(--violet); }
.sidebar-footer-danger:hover { background: rgba(239,68,68,.1); color: #f87171; }
.sidebar-footer-link i { width: 18px; text-align: center; }

/* Team badge */
.sidebar-badge-soon {
  margin-left: auto; flex-shrink: 0; font-size: .55rem; font-weight: 700;
  letter-spacing: .3px; padding: 2px 6px; border-radius: 20px;
  background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.2);
  color: var(--purple-light); text-transform: uppercase;
}

/* ─── Main content ──────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  animation: fadeInPage .35s ease both;
}
.main-content.expanded { margin-left: 0; }

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

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,6,18,.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139,92,246,.12);
  display: flex; align-items: center; gap: 12px; padding: 10px 20px;
}

/* Center search wrapper takes all remaining space */
.topbar-search-wrap {
  flex: 1; display: flex; justify-content: center; min-width: 0;
}
.topbar-search {
  display: flex; align-items: center; gap: 10px;
  background: rgba(139,92,246,.07);
  border: 1px solid rgba(139,92,246,.16);
  border-radius: 10px; padding: 8px 16px;
  color: var(--text-muted); cursor: pointer; font-size: .85rem;
  width: 100%; max-width: 560px;
  transition: var(--transition);
}
.topbar-search:hover {
  background: rgba(139,92,246,.14);
  border-color: rgba(139,92,246,.32);
  color: var(--text);
}
.topbar-search-icon { font-size: .85rem; flex-shrink: 0; }
.topbar-search-placeholder { flex: 1; text-align: left; }
.topbar-search-kbd {
  background: rgba(139,92,246,.13);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 4px; padding: 1px 6px; font-size: .65rem;
  color: var(--text-muted); flex-shrink: 0;
}

/* User area on right */
.topbar-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.topbar-user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: 24px;
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.2);
  text-decoration: none; transition: var(--transition); cursor: pointer;
}
.topbar-user-pill:hover {
  background: rgba(139,92,246,.2);
  border-color: rgba(139,92,246,.38);
}
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem; color: white; flex-shrink: 0;
}
.topbar-username {
  font-size: .83rem; font-weight: 500; color: var(--text); white-space: nowrap;
}

.sidebar-toggle {
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: var(--radius-sm); padding: 5px 9px;
  color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.sidebar-toggle:hover {
  background: rgba(139,92,246,.25); color: var(--violet);
}

.page-content { padding: 0; flex: 1; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(139,92,246,.3);
  transition: var(--transition) !important;
  font-weight: 500 !important;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,.5) !important;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-primary {
  border-color: rgba(139,92,246,.4) !important;
  color: var(--purple-light) !important;
  transition: var(--transition) !important;
}
.btn-outline-primary:hover {
  background: rgba(139,92,246,.15) !important;
  border-color: var(--purple) !important;
  color: var(--violet) !important;
}

.btn-outline-secondary {
  border-color: rgba(255,255,255,.1) !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  transition: var(--transition) !important;
}
.btn-outline-secondary:hover {
  background: rgba(255,255,255,.07) !important;
  color: var(--text) !important;
}

.btn-outline-danger {
  border-color: rgba(239,68,68,.3) !important;
  color: #ef4444 !important;
  background: transparent !important;
  transition: var(--transition) !important;
}
.btn-outline-danger:hover {
  background: rgba(239,68,68,.12) !important;
}

/* ─── Cards ─────────────────────────────────────────────── */
.card {
  background: rgba(14,11,31,0.7) !important;
  border: 1px solid rgba(139,92,246,.18) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 4px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(139,92,246,.08);
  backdrop-filter: blur(16px);
  transition: var(--transition);
  animation: cardIn .35s ease both;
}
.card:hover {
  border-color: rgba(139,92,246,.38) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.15), inset 0 1px 0 rgba(139,92,246,.12);
  transform: translateY(-1px);
}

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

.card-header {
  background: rgba(139,92,246,.09) !important;
  border-bottom: 1px solid rgba(139,92,246,.14) !important;
  padding: 13px 18px;
  font-weight: 600; font-size: .875rem;
  color: var(--violet);
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

.card-body { color: var(--text); }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius) !important;
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid transparent !important;
  position: relative; overflow: hidden;
  z-index: 0;
  transition: var(--transition);
  cursor: default;
  animation: statIn .4s ease both;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card:hover::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.05);
}

.stat-pending  { background: linear-gradient(135deg, #4c1d95, #7c3aed); box-shadow: 0 8px 24px rgba(109,40,217,.4); }
.stat-progress { background: linear-gradient(135deg, #92400e, #d97706); box-shadow: 0 8px 24px rgba(217,119,6,.3); }
.stat-done     { background: linear-gradient(135deg, #064e3b, #059669); box-shadow: 0 8px 24px rgba(5,150,105,.3); }
.stat-overdue  { background: linear-gradient(135deg, #7f1d1d, #dc2626); box-shadow: 0 8px 24px rgba(220,38,38,.3); }

.stat-icon { font-size: 1.8rem; color: #fff; opacity: .9; }
.stat-number {
  font-size: 2.2rem; font-weight: 700; line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.stat-label { font-size: .75rem; color: rgba(255,255,255,.9); margin-top: 3px; letter-spacing: .3px; }

@keyframes statIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .10s; }
.stat-card:nth-child(3) { animation-delay: .15s; }
.stat-card:nth-child(4) { animation-delay: .20s; }

/* ─── Task rows ──────────────────────────────────────────── */
.task-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(139,92,246,.07);
  transition: var(--transition);
  position: relative;
}
.task-row::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, rgba(139,92,246,.1), transparent);
  transition: width .25s ease;
}
.task-row:hover::before { width: 100%; }
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: transparent; }
.task-row-overdue { background: rgba(239,68,68,.04); }

.task-completed { opacity: .45; }
.task-row.swipe-hint { background: rgba(16,185,129,.12) !important; transition: background .2s; }
.task-row.swipe-hint::before { width: 100% !important; background: linear-gradient(90deg, rgba(16,185,129,.2), transparent) !important; }

.task-row-check { display:flex; align-items:center; padding-top:0; }
.btn-status-toggle {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(139,92,246,.35);
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .18s, background .18s, transform .18s;
  font-size: .9rem; color: transparent;
}
.btn-status-toggle:hover {
  border-color: #10b981;
  background: rgba(16,185,129,.15);
  transform: scale(1.08);
  color: #10b981;
}
.btn-status-toggle.is-done {
  border-color: #10b981 !important;
  background: #10b981 !important;
  color: #fff !important;
}
.btn-status-toggle.is-progress {
  border-color: #f59e0b !important;
  background: rgba(245,158,11,.15) !important;
  color: #f59e0b !important;
}
.btn-status-toggle .fa-check { font-size:.75rem; }

.task-row-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.task-title {
  font-weight: 500; color: var(--text); text-decoration: none;
  font-size: .9rem; transition: var(--transition);
}
.task-title:hover { color: var(--purple-light); }
.task-desc { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }
.task-category {
  display: inline-block; font-size: .68rem; padding: 2px 8px;
  border-radius: 20px;
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.25);
  color: var(--purple-light); font-weight: 500;
}

.task-row-meta {
  text-align: right; white-space: nowrap;
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-end; position: relative; z-index: 1;
}
.task-row-meta small { color: var(--text-muted); }
.task-row-actions { display: flex; gap: 4px; flex-shrink: 0; position: relative; z-index: 1; }

/* ─── Priority badges ────────────────────────────────────── */
.badge-priority {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}
.priority-alta   { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.priority-media  { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.priority-baja   { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }

/* ─── Form controls ──────────────────────────────────────── */
.form-control, .form-select {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(139,92,246,.2) !important;
  color: var(--text) !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition) !important;
}
.form-control:focus, .form-select:focus {
  background: rgba(139,92,246,.08) !important;
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,.15) !important;
  color: var(--text) !important;
}
.form-control::placeholder { color: var(--text-dim) !important; }
.form-label { color: var(--text-muted); font-size: .85rem; margin-bottom: 5px; }
.form-check-input {
  background-color: rgba(255,255,255,.08) !important;
  border-color: rgba(139,92,246,.3) !important;
}
.form-check-input:checked {
  background-color: var(--purple) !important;
  border-color: var(--purple) !important;
}
.form-check-label { color: var(--text-muted); font-size: .875rem; }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-content {
  background: #120f24 !important;
  border: 1px solid rgba(139,92,246,.25) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 25px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(139,92,246,.1);
}
.modal-header {
  border-bottom: 1px solid rgba(139,92,246,.12) !important;
  background: rgba(139,92,246,.06) !important;
}
.modal-footer {
  border-top: 1px solid rgba(139,92,246,.12) !important;
}
.modal-title { color: var(--violet); }
.btn-close { filter: invert(1) !important; opacity: .6 !important; }

/* Disable Bootstrap's transitionend-dependent animation — we use CSS keyframes instead */
.modal.fade .modal-dialog { transition: none !important; transform: none !important; }
/* Custom entrance animation — runs via CSS, independent of Bootstrap JS state machine */
.modal.show .modal-dialog {
  animation: modalEnter .22s cubic-bezier(.34,1.1,.64,1) both;
}
@keyframes modalEnter {
  from { opacity: 0; transform: translateY(-14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Backdrop fade */
.modal-backdrop { transition: opacity .18s ease !important; }

/* ─── Pomodoro ───────────────────────────────────────────── */
.pomodoro-display {
  font-size: 2.6rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: 3px;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 12px rgba(139,92,246,.5));
}

/* ─── Record button ──────────────────────────────────────── */
.btn-record {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: white; border: none;
  font-size: 1.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(139,92,246,.45);
  position: relative;
}
.btn-record::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(139,92,246,.3);
  animation: ringPulse 2s ease-in-out infinite;
}
.btn-record:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(139,92,246,.6);
}
.btn-record.recording {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 6px 20px rgba(239,68,68,.5);
  animation: recordPulse 1s ease-in-out infinite;
}
@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: .6; }
  50%      { transform: scale(1.1); opacity: .2; }
}
@keyframes recordPulse {
  0%,100% { box-shadow: 0 6px 20px rgba(239,68,68,.5); }
  50%      { box-shadow: 0 6px 30px rgba(239,68,68,.8); }
}

/* ─── Chat ───────────────────────────────────────────────── */
/* ─── Sessions sidebar ───────────────────────────────────── */
.session-item {
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 3px;
  transition: var(--transition);
  position: relative;
}
.session-item:hover { background: rgba(139,92,246,.12); }
.session-item.active { background: rgba(139,92,246,.2); }
.session-title {
  font-size: .72rem; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.session-date { font-size: .62rem; color: var(--text-dim); margin-top: 2px; }
.session-delete {
  position: absolute; top: 4px; right: 4px;
  background: none; border: none; padding: 2px 4px;
  color: var(--text-dim); font-size: .6rem;
  opacity: 0; transition: opacity .15s;
  cursor: pointer;
}
.session-item:hover .session-delete { opacity: 1; }
.session-delete:hover { color: var(--danger); }

.chat-card {
  display: flex; flex-direction: column;
  height: calc(100vh - 130px);
  background: var(--card-bg) !important;
}

.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 18px;
  scroll-behavior: smooth;
}

.chat-welcome {
  text-align: center; padding: 30px 20px; margin: auto 0;
}
.chat-welcome h5 { color: var(--violet); }

.chat-bubble {
  display: flex; gap: 10px; max-width: 85%;
  animation: bubbleIn .3s ease both;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-bubble-user  { flex-direction: row-reverse; align-self: flex-end; }
.chat-bubble-assistant { align-self: flex-start; }

.chat-bubble-avatar { flex-shrink: 0; }
.avatar-user, .avatar-ai {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.avatar-user {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  box-shadow: 0 0 10px rgba(139,92,246,.4);
  color: white;
}
.avatar-ai {
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.3);
  color: var(--purple-light);
}

.chat-bubble-content { display: flex; flex-direction: column; gap: 3px; }
.chat-bubble-text {
  padding: 10px 14px; border-radius: 16px; font-size: .875rem; line-height: 1.55;
}
.chat-bubble-user .chat-bubble-text {
  background: linear-gradient(135deg, rgba(109,40,217,.7), rgba(139,92,246,.6));
  border: 1px solid rgba(139,92,246,.3);
  color: white; border-bottom-right-radius: 4px;
}
.chat-bubble-assistant .chat-bubble-text {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(139,92,246,.12);
  color: var(--text); border-bottom-left-radius: 4px;
}
.chat-bubble-time { font-size: .68rem; color: var(--text-dim); padding: 0 4px; }
.chat-bubble-user .chat-bubble-time { text-align: right; }

/* Typing dots */
.typing-dots {
  display: flex; gap: 5px; padding: 13px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(139,92,246,.12);
  border-radius: 16px; border-bottom-left-radius: 4px;
}
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple-light);
  animation: typingBounce .9s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%,100% { transform: translateY(0); opacity: .5; }
  50%      { transform: translateY(-5px); opacity: 1; }
}

.chat-input-area {
  padding: 12px 16px; border-top: 1px solid rgba(139,92,246,.12);
  background: rgba(0,0,0,.2);
}
.chat-input-row { display: flex; gap: 8px; margin-top: 8px; }
.chat-input-row textarea {
  flex: 1; resize: none; border-radius: 10px;
  max-height: 120px; font-size: .875rem;
}

/* ─── Kanban ─────────────────────────────────────────────── */
.kanban-col {
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card-bg);
}
.kanban-header { padding: 10px 14px; font-weight: 600; font-size: .85rem; }
.kanban-card {
  margin: 8px; padding: 12px;
  border: 1px solid rgba(139,92,246,.12); border-radius: 10px;
  background: rgba(255,255,255,.03);
  transition: var(--transition);
}
.kanban-card:hover {
  border-color: rgba(139,92,246,.3);
  background: rgba(139,92,246,.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

/* ─── Reminders ─────────────────────────────────────────── */
.reminder-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid rgba(139,92,246,.07);
  transition: var(--transition);
}
.reminder-row:hover { background: rgba(139,92,246,.04); }
.reminder-row:last-child { border-bottom: none; }
.reminder-icon {
  width: 38px; height: 38px;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--purple-light);
  animation: bellPulse 3s ease-in-out infinite;
}
@keyframes bellPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(139,92,246,.3); }
  50%      { box-shadow: 0 0 0 6px rgba(139,92,246,0); }
}
.reminder-title { font-weight: 500; font-size: .875rem; color: var(--text); }
.reminder-meta  { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

/* ─── API status ─────────────────────────────────────────── */
.api-status-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; font-size: .85rem; color: var(--text-muted);
  border-bottom: 1px solid rgba(139,92,246,.07);
}
.api-status-row:last-child { border-bottom: none; }
.setup-item { padding: 8px 0; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  font-weight: 500 !important; letter-spacing: .2px;
}
.badge.bg-secondary { background: rgba(255,255,255,.1) !important; color: var(--text-muted) !important; }
.badge.bg-success   { background: rgba(16,185,129,.2) !important; color: #34d399 !important; border: 1px solid rgba(16,185,129,.3); }
.badge.bg-warning   { background: rgba(245,158,11,.2) !important; color: #fbbf24 !important; border: 1px solid rgba(245,158,11,.3); }
.badge.bg-danger    { background: rgba(239,68,68,.2)  !important; color: #f87171 !important; border: 1px solid rgba(239,68,68,.3); }
.badge.bg-primary   { background: rgba(139,92,246,.2) !important; color: var(--purple-light) !important; border: 1px solid rgba(139,92,246,.3); }
.badge.bg-info      { background: rgba(56,189,248,.15) !important; color: #7dd3fc !important; border: 1px solid rgba(56,189,248,.25); }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm) !important;
  border: 1px solid !important;
}
.alert-success {
  background: rgba(16,185,129,.1) !important;
  border-color: rgba(16,185,129,.25) !important;
  color: #6ee7b7 !important;
}
.alert-danger {
  background: rgba(239,68,68,.1) !important;
  border-color: rgba(239,68,68,.25) !important;
  color: #fca5a5 !important;
}
.alert-info {
  background: rgba(139,92,246,.1) !important;
  border-color: rgba(139,92,246,.25) !important;
  color: var(--purple-light) !important;
}
.alert-light {
  background: rgba(255,255,255,.04) !important;
  border-color: rgba(139,92,246,.15) !important;
  color: var(--text) !important;
}

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px; color: var(--text-dim);
}
.empty-state i { color: var(--purple-dim); }

/* ─── Input group ────────────────────────────────────────── */
.input-group-text {
  background: rgba(139,92,246,.1) !important;
  border: 1px solid rgba(139,92,246,.2) !important;
  color: var(--purple-light) !important;
}

/* ─── Suggested tasks ────────────────────────────────────── */
.suggested-task-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid rgba(139,92,246,.08);
  animation: fadeIn .2s ease both;
}
.suggested-task-item:last-child { border-bottom: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── FullCalendar dark overrides ────────────────────────── */
.fc { color: var(--text) !important; }
.fc .fc-toolbar-title { color: var(--violet) !important; font-weight: 700 !important; }
.fc .fc-button {
  background: rgba(139,92,246,.15) !important;
  border: 1px solid rgba(139,92,246,.25) !important;
  color: var(--purple-light) !important;
  font-size: .8rem !important;
  transition: var(--transition) !important;
}
.fc .fc-button:hover, .fc .fc-button-active {
  background: rgba(139,92,246,.35) !important;
  border-color: var(--purple) !important;
  color: white !important;
}
.fc .fc-daygrid-day-frame { background: transparent !important; }
.fc .fc-daygrid-day:hover .fc-daygrid-day-frame { background: rgba(139,92,246,.05) !important; }
.fc td, .fc th { border-color: rgba(139,92,246,.1) !important; }
.fc .fc-col-header-cell { background: rgba(139,92,246,.06) !important; }
.fc .fc-col-header-cell-cushion { color: var(--purple-light) !important; font-weight: 600 !important; font-size: .8rem !important; }
.fc .fc-daygrid-day-number { color: var(--text-muted) !important; }
.fc .fc-day-today { background: rgba(139,92,246,.07) !important; }
.fc .fc-day-today .fc-daygrid-day-number { color: var(--violet) !important; font-weight: 700 !important; }
.fc .fc-list-day-cushion { background: rgba(139,92,246,.1) !important; }
.fc .fc-list-event:hover td { background: rgba(139,92,246,.06) !important; }
.fc .fc-list-event-title a { color: var(--text) !important; }

/* ─── Loading spinner inline ─────────────────────────────── */
.spinner-inline {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(139,92,246,.3);
  border-top-color: var(--purple-light);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle; margin-right: 6px;
}

/* ─── Blink ──────────────────────────────────────────────── */
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ─── HR ─────────────────────────────────────────────────── */
hr { border-color: rgba(139,92,246,.12) !important; }

/* ─── Text utils ─────────────────────────────────────────── */
.text-muted  { color: var(--text-muted) !important; }
.text-danger { color: #f87171 !important; }
.text-success { color: #34d399 !important; }
.text-warning { color: #fbbf24 !important; }
a { color: var(--purple-light); }
a:hover { color: var(--violet); }
code {
  background: rgba(139,92,246,.12);
  color: var(--purple-light);
  padding: 1px 6px; border-radius: 4px; font-size: .8em;
}

/* ─── Mobile sidebar overlay ─────────────────────────────── */
#sidebarOverlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99;
  backdrop-filter: blur(2px);
}
#sidebarOverlay.active { display: block; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .chat-card { height: calc(100vh - 100px); }
  .task-row-actions { display: none; }
  .stat-number { font-size: 1.7rem; }
}

/* ─── Page transitions ───────────────────────────────────── */
.page-content > * {
  animation: pageContentIn .35s ease both;
}
@keyframes pageContentIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Elena floating bubble ─────────────────────────────── */
#elenaBubble {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  cursor: pointer;
  animation: elenaFloat 3s ease-in-out infinite;
}
.elena-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(12, 8, 28, 0.75);
  box-shadow: 0 0 0 3px rgba(139,92,246,.45), 0 8px 24px rgba(109,40,217,.5);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.elena-avatar img {
  width: 90%; height: 90%;
  object-fit: contain;
}
#elenaBubble:hover .elena-avatar {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(196,181,253,.6), 0 12px 32px rgba(109,40,217,.7);
}
.elena-msg {
  background: rgba(109,40,217,.85);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: .78rem; font-weight: 500;
  padding: 7px 13px;
  border-radius: 14px 14px 4px 14px;
  border: 1px solid rgba(196,181,253,.3);
  box-shadow: 0 4px 16px rgba(109,40,217,.3);
  white-space: nowrap;
  animation: msgPop .4s cubic-bezier(.34,1.56,.64,1) forwards;
  opacity: 0;
}
@keyframes elenaFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes msgPop {
  to { opacity: 1; transform: scale(1); }
  from { opacity: 0; transform: scale(.8); }
}

/* ─── Global Search Modal ────────────────────────────────── */
.search-modal-content {
  background: #12102a !important;
  border: 1px solid rgba(139,92,246,.3) !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
}
.search-modal-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(139,92,246,.12);
}
.search-modal-icon { color: var(--text-muted); font-size: 1rem; }
.search-modal-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 1rem;
}
.search-modal-input::placeholder { color: var(--text-dim); }
.search-esc-hint {
  background: rgba(139,92,246,.12); color: var(--text-muted);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: 4px; padding: 2px 7px; font-size: .7rem; font-family: monospace;
}
.search-results { max-height: 380px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; text-decoration: none;
  color: var(--text); transition: var(--transition);
  border-bottom: 1px solid rgba(139,92,246,.06);
}
.search-result-item:hover { background: rgba(139,92,246,.1); color: var(--text); }
.search-result-title { font-size: .9rem; font-weight: 500; }
.search-no-results { padding: 24px; text-align: center; color: var(--text-muted); }

/* ─── Projects ───────────────────────────────────────────── */
.project-card {
  transition: var(--transition);
  border: 1px solid var(--card-border) !important;
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(139,92,246,.35) !important; }
.project-emoji { font-size: 1.6rem; }
.project-progress {
  height: 6px; border-radius: 99px;
  background: rgba(255,255,255,.08);
}
.project-progress .progress-bar { border-radius: 99px; transition: width .6s ease; }
/* ─── Emoji Picker ───────────────────────────────────────── */
.emoji-picker-wrap { position: relative; display: inline-block; }
.emoji-trigger {
  font-size: 1.4rem; padding: 5px 10px; line-height: 1;
  display: flex; align-items: center; gap: 5px;
  background: rgba(139,92,246,.08);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 8px; cursor: pointer; transition: var(--transition);
}
.emoji-trigger:hover { background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.5); }
.emoji-grid {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #1a1530;
  border: 1px solid rgba(139,92,246,.35);
  border-radius: 12px; padding: 8px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  z-index: 9999; width: 268px;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.emoji-option {
  background: none; border: none; font-size: 1.3rem;
  padding: 4px; border-radius: 6px; cursor: pointer;
  line-height: 1; transition: background .12s;
}
.emoji-option:hover { background: rgba(139,92,246,.25); }

.color-picker-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.color-dot-label { cursor: pointer; }
.color-dot {
  display: block; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid transparent; transition: var(--transition); cursor: pointer;
}
.color-dot.selected, .color-dot:hover { border-color: white; transform: scale(1.2); }
.task-tag { font-size: .65rem; padding: 2px 7px; }
.btn-icon {
  background: none; border: none; padding: 4px 8px;
  border-radius: 6px; cursor: pointer; transition: var(--transition);
  color: var(--text-muted);
}
.btn-icon:hover { background: rgba(139,92,246,.12); color: var(--purple-light); }

/* ─── Habits ─────────────────────────────────────────────── */
.habit-card { transition: var(--transition); }
.habit-card:hover { transform: translateY(-2px); }
.habit-emoji { font-size: 1.5rem; }
.streak-badge {
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid; font-size: .8rem; font-weight: 600;
  white-space: nowrap;
}
.habit-week-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.habit-day {
  aspect-ratio: 1; border-radius: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(139,92,246,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: var(--text-dim); font-weight: 600;
  transition: var(--transition);
}
.habit-day.done { color: white; }
.habit-toggle-btn { font-size: .85rem; transition: var(--transition) !important; }

/* ─── Notes ──────────────────────────────────────────────── */
.note-card {
  border-radius: var(--radius); padding: 16px;
  border: 1px solid rgba(139,92,246,.15);
  cursor: pointer; transition: var(--transition);
  min-height: 120px; display: flex; flex-direction: column;
  position: relative;
}
.note-card:hover { transform: translateY(-3px); border-color: rgba(139,92,246,.4) !important; }
.note-pin {
  position: absolute; top: 10px; right: 10px;
  color: #f59e0b; font-size: .75rem;
}
.note-title { font-weight: 600; color: var(--text); margin-bottom: 8px; font-size: .9rem; }
.note-preview { flex: 1; font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
.note-footer { display: flex; align-items: center; margin-top: 12px; }
.note-textarea {
  width: 100%; min-height: 320px; background: transparent;
  border: none; outline: none; color: var(--text);
  font-size: .9rem; line-height: 1.7; padding: 20px;
  resize: vertical; font-family: 'Inter', sans-serif;
}
.note-modal-title { box-shadow: none !important; }

/* ─── Profile / User in sidebar ─────────────────────────── */
.sidebar-user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  text-decoration: none; transition: var(--transition);
  margin-bottom: 6px;
}
.sidebar-user-row:hover { background: rgba(139,92,246,.1); }
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: white; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(139,92,246,.3);
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: .82rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-email { font-size: .68rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Profile page ───────────────────────────────────────── */
.profile-avatar-big {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: white;
  box-shadow: 0 0 0 4px rgba(139,92,246,.3), 0 8px 24px rgba(0,0,0,.3);
}

/* ─── Dashboard greeting ─────────────────────────────────── */
.dashboard-greeting { padding: 4px 0 8px; }
.greeting-title { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.greeting-sub { font-size: .88rem; margin-bottom: 0; }

/* ─── Team pages ─────────────────────────────────────────── */
.team-coming-soon {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 32px; text-align: center;
}
.team-coming-soon .team-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(139,92,246,.12);
  border: 2px solid rgba(139,92,246,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 24px;
  box-shadow: 0 0 32px rgba(139,92,246,.2);
}
.team-invite-card {
  background: rgba(139,92,246,.06);
  border: 1px solid rgba(139,92,246,.18);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-width: 480px; width: 100%;
  margin: 0 auto;
}

/* ─── Project Detail Page ────────────────────────────────────────────────── */
.project-detail-header {
  padding: 20px 28px 0;
  border-bottom: 1px solid rgba(139,92,246,.1);
  background: rgba(8,6,18,.4);
}
.project-detail-back { color: var(--text-muted); text-decoration: none; font-size: .82rem; }
.project-detail-back:hover { color: var(--violet); }
.project-detail-emoji { font-size: 2rem; line-height: 1; }

/* Member avatars stack */
.member-stack { display: flex; align-items: center; cursor: pointer; }
.member-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .78rem; color: white;
  border: 2px solid var(--bg);
  margin-left: -8px; transition: transform .2s;
}
.member-stack .member-avatar:first-child { margin-left: 0; }
.member-stack:hover .member-avatar { transform: translateY(-2px); }
.member-avatar-more {
  background: rgba(139,92,246,.3); color: var(--purple-light);
  font-size: .72rem;
}

/* Project tabs */
.project-tabs { display: flex; gap: 4px; margin-top: 16px; }
.project-tab {
  padding: 9px 18px; border-radius: 8px 8px 0 0;
  color: var(--text-muted); text-decoration: none; font-size: .85rem;
  font-weight: 500; transition: var(--transition);
  border: 1px solid transparent; border-bottom: none;
  position: relative;
}
.project-tab:hover { color: var(--text); background: rgba(139,92,246,.07); }
.project-tab.active {
  color: var(--violet); background: rgba(139,92,246,.12);
  border-color: rgba(139,92,246,.18);
}

/* Kanban board */
.kanban-board { padding: 24px; overflow-x: auto; }
.kanban-columns { display: flex; gap: 16px; min-width: max-content; }
.kanban-column { width: 280px; flex-shrink: 0; }
.kanban-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; font-weight: 600; font-size: .82rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(139,92,246,.07);
  border: 1px solid rgba(139,92,246,.14); border-bottom: none;
}
.kanban-col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kanban-col-count {
  margin-left: auto; background: rgba(139,92,246,.15);
  color: var(--purple-light); font-size: .68rem; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
}
.kanban-col-body {
  background: rgba(139,92,246,.03); border: 1px solid rgba(139,92,246,.1);
  border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-height: 200px; padding: 8px;
}
.kanban-card {
  display: block; padding: 12px; margin-bottom: 8px;
  background: rgba(14,11,31,.7); border: 1px solid rgba(139,92,246,.14);
  border-radius: var(--radius-sm); text-decoration: none;
  transition: var(--transition); cursor: pointer;
}
.kanban-card:hover {
  border-color: rgba(139,92,246,.35); transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.kanban-card-title { font-size: .855rem; font-weight: 500; color: var(--text); margin: 6px 0 4px; }
.kanban-card-desc { font-size: .75rem; color: var(--text-muted); line-height: 1.4; }
.kanban-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .72rem; color: var(--text-dim); }
.kanban-add-btn {
  display: flex; align-items: center; gap: 6px;
  width: 100%; padding: 8px 10px; margin-top: 4px;
  background: none; border: 1px dashed rgba(139,92,246,.2);
  border-radius: var(--radius-sm); color: var(--text-dim);
  font-size: .8rem; cursor: pointer; transition: var(--transition);
}
.kanban-add-btn:hover { border-color: rgba(139,92,246,.4); color: var(--purple-light); background: rgba(139,92,246,.06); }

/* Members view */
.member-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid rgba(139,92,246,.07);
}
.member-card:last-child { border-bottom: none; }
.member-card-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: white; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(139,92,246,.3);
}
.member-role-badge {
  font-size: .65rem; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .3px;
}
.role-owner { background: rgba(139,92,246,.2); color: var(--purple-light); border: 1px solid rgba(139,92,246,.3); }
.role-member { background: rgba(255,255,255,.07); color: var(--text-muted); border: 1px solid rgba(255,255,255,.1); }

/* Project cards with member avatars */
.project-card-members { display: flex; align-items: center; gap: 4px; }
.project-card-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .6rem; color: white;
  border: 1.5px solid var(--bg); margin-left: -6px;
}
.project-card-avatar:first-child { margin-left: 0; }

/* ─── Dashboard greeting carousel ───────────────────────── */
.dash-greeting-wrap {
  font-size: 2rem; font-weight: 800;
  line-height: 1.2;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0;
  overflow: hidden;
}
.dash-greet-static {
  background: linear-gradient(135deg, #ffffff, #ddd6fe);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: inherit; font-weight: inherit;
}
.dash-greet-name {
  background: linear-gradient(135deg, #ffffff, #ddd6fe);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dash-greeting-text {
  background: linear-gradient(135deg, var(--violet), var(--purple-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .28s;
}
.dash-greeting-text.greet-out {
  transform: translateY(60%);
  opacity: 0;
}
.dash-greeting-text.greet-in {
  animation: greetIn .32s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes greetIn {
  from { transform: translateY(-40%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ─── Plus+ Avatar Arc ───────────────────────────────────── */
.topbar-avatar-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.topbar-avatar-wrap.is-plus::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    #f59e0b 0deg, #fbbf24 60deg, #fde68a 120deg,
    #f59e0b 180deg, #d97706 240deg, transparent 270deg, transparent 360deg
  );
  animation: plusArcSpin 4s linear infinite;
  z-index: 0;
}
.topbar-avatar-wrap.is-plus::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  z-index: 1;
}
.topbar-avatar-wrap .topbar-avatar { position: relative; z-index: 2; }
@keyframes plusArcSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* Admin ring – subtle red arc */
.topbar-avatar-wrap.is-admin::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    #ef4444 0deg, #f87171 60deg, #fca5a5 120deg,
    #ef4444 180deg, #b91c1c 240deg, transparent 270deg, transparent 360deg
  );
  animation: adminArcSpin 6s linear infinite;
  z-index: 0;
}
.topbar-avatar-wrap.is-admin::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  z-index: 1;
}
@keyframes adminArcSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* ─── Plus+ Upsell Modal ─────────────────────────────────── */
#plusUpsellModal { opacity: 0; transition: opacity .22s ease; }
#plusUpsellModal.visible { opacity: 1; }
.plus-upsell-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.plus-upsell-card {
  position: relative; z-index: 1;
  background: #16122a;
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 22px;
  padding: 0;
  max-width: 360px; width: 92%;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0,0,0,.6);
  animation: upsellIn .28s cubic-bezier(.34,1.1,.64,1) both;
}
@keyframes upsellIn {
  from { transform: scale(.9) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.plus-upsell-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  background: rgba(255,255,255,.07); border: none;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--text-muted); font-size: .75rem;
  cursor: pointer; transition: background .15s, color .15s;
  display: flex; align-items: center; justify-content: center;
}
.plus-upsell-close:hover { background: rgba(255,255,255,.14); color: var(--text); }
.plus-upsell-top {
  background: linear-gradient(160deg, #2a1f4e 0%, #1a1035 100%);
  padding: 32px 24px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(139,92,246,.15);
}
.plus-upsell-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid rgba(196,181,253,.3);
  box-shadow: 0 0 24px rgba(139,92,246,.4);
  object-fit: contain; background: rgba(139,92,246,.1);
}
.plus-upsell-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .8px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #000; padding: 3px 10px; border-radius: 20px;
}
.plus-upsell-title {
  font-size: 1.15rem; font-weight: 700; color: var(--text);
  margin: 20px 24px 6px; text-align: center;
}
.plus-upsell-desc {
  font-size: .8rem; color: var(--text-muted);
  line-height: 1.55; margin: 0 24px 16px; text-align: center;
}
.plus-upsell-perks {
  margin: 0 24px 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.plus-perk {
  font-size: .76rem; color: var(--text);
  display: flex; align-items: center; gap: 7px;
  background: rgba(139,92,246,.07);
  border: 1px solid rgba(139,92,246,.12);
  border-radius: 8px; padding: 8px 10px;
}
.plus-perk i { color: var(--purple-light); font-size: .72rem; flex-shrink: 0; }
.plus-upsell-btn {
  display: block; margin: 0 24px 10px;
  padding: 12px; border-radius: 11px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #000; font-weight: 700; font-size: .9rem;
  text-decoration: none; text-align: center;
  box-shadow: 0 6px 20px rgba(245,158,11,.35);
  transition: transform .15s, box-shadow .15s;
}
.plus-upsell-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(245,158,11,.5); color: #000; }
.plus-upsell-price-inline {
  font-weight: 400; font-size: .75rem; opacity: .75; margin-left: 6px;
}
.plus-upsell-skip {
  display: block; width: 100%; background: none; border: none;
  color: var(--text-dim); font-size: .75rem;
  padding: 10px; cursor: pointer; transition: color .15s;
}
.plus-upsell-skip:hover { color: var(--text-muted); }

.plus-indicator {
  position: absolute;
  top: -2px; right: -2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1.5px solid var(--bg);
  color: #fff;
  font-size: .55rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  box-shadow: 0 0 6px rgba(245,158,11,.5);
}

/* ─── Topbar streak ─────────────────────────────────────── */
.topbar-streak {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.15);
  text-decoration: none;
  transition: background .2s;
  margin-right: 6px;
}
.topbar-streak:hover { background: rgba(239,68,68,.15); }
.topbar-streak-label {
  font-size: .72rem; font-weight: 400;
  color: rgba(255,255,255,.35);
  letter-spacing: .2px;
  margin-right: 2px;
}
.topbar-streak-fire { font-size: .85rem; line-height: 1; }
.topbar-streak-count {
  font-size: .78rem; font-weight: 700;
  color: #f87171;
  line-height: 1;
}

/* ─── Streak pill in sidebar ────────────────────────────── */
.streak-pill {
  margin-left: auto;
  font-size: .65rem; font-weight: 700;
  background: rgba(239,68,68,.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 20px;
  padding: 1px 6px;
}

/* ─── Rewards page ───────────────────────────────────────── */
.rewards-hero {
  background: linear-gradient(135deg, rgba(139,92,246,.15) 0%, rgba(245,158,11,.08) 100%);
  border: 1px solid rgba(139,92,246,.2);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}
.xp-level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dim));
  font-size: 1.8rem; font-weight: 900; color: #fff;
  box-shadow: 0 0 24px rgba(139,92,246,.4);
  margin-bottom: 12px;
}
.xp-bar-wrap {
  background: rgba(255,255,255,.06); border-radius: 20px;
  height: 10px; overflow: hidden; margin: 8px 0 4px;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--purple-light));
  border-radius: 20px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.streak-counter {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-size: 3rem; font-weight: 900;
  color: #f87171;
  text-shadow: 0 0 20px rgba(239,68,68,.4);
}
.streak-fire { font-size: 2.8rem; animation: firePulse 1s ease-in-out infinite alternate; }
@keyframes firePulse {
  from { transform: scale(1);    filter: brightness(1); }
  to   { transform: scale(1.12); filter: brightness(1.2); }
}
.badge-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 18px 14px; text-align: center;
  transition: var(--transition);
}
.badge-card:hover { background: var(--card-hover); transform: translateY(-2px); }
.badge-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }
.badge-name { font-size: .8rem; font-weight: 700; color: var(--violet); }
.badge-desc { font-size: .7rem; color: var(--text-muted); }

/* ─── Plus+ page ─────────────────────────────────────────── */
.plus-hero {
  background: linear-gradient(135deg, rgba(245,158,11,.12) 0%, rgba(139,92,246,.1) 100%);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: var(--radius); padding: 36px; text-align: center; margin-bottom: 28px;
}
.plus-title { font-size: 2rem; font-weight: 900; color: #f59e0b; }
.plan-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: var(--transition); cursor: pointer; position: relative;
}
.plan-card:hover { border-color: var(--purple); background: var(--card-hover); transform: translateY(-3px); }
.plan-card.popular {
  border-color: rgba(245,158,11,.5);
  box-shadow: 0 0 20px rgba(245,158,11,.15);
}
.plan-badge-popular {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #fff; font-size: .65rem; font-weight: 700;
  padding: 3px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}
.plan-price { font-size: 2.2rem; font-weight: 900; color: var(--violet); }
.plan-period { font-size: .8rem; color: var(--text-muted); }
.plan-features { list-style: none; margin: 16px 0; text-align: left; }
.plan-features li { padding: 5px 0; font-size: .85rem; color: var(--text); }
.plan-features li::before { content: '✓ '; color: #10b981; font-weight: 700; }

/* ── NOTIFICATION BELL ─────────────────────────────────────── */
.notif-bell-wrap { position: relative; }
.notif-bell-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.1rem; padding: 6px 10px;
  border-radius: 8px; transition: color .2s, background .2s; position: relative;
}
.notif-bell-btn:hover { color: var(--violet); background: rgba(139,92,246,.1); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: #ef4444; color: #fff;
  font-size: .58rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 320px; max-height: 440px;
  background: var(--bg2); border: 1px solid rgba(139,92,246,.2);
  border-radius: 14px; box-shadow: 0 24px 48px rgba(0,0,0,.5);
  z-index: 1500; overflow: hidden;
}
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(139,92,246,.1);
}
.notif-panel-title { font-weight: 600; font-size: .88rem; color: var(--text); }
.notif-read-all { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: .72rem; }
.notif-read-all:hover { color: var(--violet); }
.notif-list { overflow-y: auto; max-height: 370px; }
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer; transition: background .15s; position: relative;
}
.notif-item:hover { background: rgba(139,92,246,.08); }
.notif-item.notif-read { opacity: .55; }
.notif-item-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: .8rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.notif-item-sub { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }
.notif-item-time { font-size: .68rem; color: var(--text-muted); margin-top: 3px; }
.notif-dot { width: 8px; height: 8px; background: var(--purple); border-radius: 50%; flex-shrink: 0; margin-top: 4px; }

/* ── KANBAN DRAG ──────────────────────────────────────────── */
.kanban-ghost { opacity: .35 !important; background: rgba(139,92,246,.12) !important; border: 2px dashed var(--purple) !important; }

/* ── PROFILE TABS ─────────────────────────────────────────── */
.profile-tab-nav { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-tab-btn {
  background: rgba(255,255,255,.04); border: 1px solid rgba(139,92,246,.12);
  color: var(--text-muted); border-radius: 8px; padding: 7px 16px; font-size: .82rem;
  cursor: pointer; transition: all .2s;
}
.profile-tab-btn.active { background: rgba(139,92,246,.15); color: var(--violet); border-color: rgba(139,92,246,.3); }
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }
.avatar-upload-wrap { position: relative; width: 80px; height: 80px; }
.avatar-upload-wrap img, .avatar-upload-wrap .avatar-letter {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
}
.avatar-letter { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #fff; }
.avatar-upload-btn {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--purple); border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .7rem; color: #fff;
}

/* ── TIME TRACKING ────────────────────────────────────────── */
.timer-active { animation: timerPulse 1.5s infinite; }
@keyframes timerPulse { 0%,100% { opacity:1 } 50% { opacity:.6 } }
.bg-purple { background: var(--purple) !important; }
.btn-xs { padding: 2px 8px; font-size: .72rem; border-radius: 5px; }

/* ── PROJECT COLOR DOT ────────────────────────────────────── */
.project-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; flex-shrink:0; }

/* ── THEME LIGHT ──────────────────────────────────────────── */
body.theme-light {
  --bg: #f0eeff; --bg2: #e8e2ff; --sidebar-bg: #e0d8ff;
  --card-bg: rgba(0,0,0,.04); --text: #1a1040; --text-muted: #6b5fa8;
  --violet: #7c3aed; --purple: #7c3aed; --purple-light: #6d28d9;
}
body.theme-light .sidebar { background: var(--sidebar-bg); }
body.theme-light .topbar { background: rgba(240,238,255,.9); border-color: rgba(139,92,246,.15); }
body.theme-light .card { background: #fff; border-color: rgba(139,92,246,.12); }
body.theme-light .form-control, body.theme-light .form-select {
  background: #fff; color: var(--text); border-color: rgba(139,92,246,.25);
}
