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

/* ===== Theme Variables ===== */
:root {
  --bg: #09090f;
  --bg2: #0f0f18;
  --surface: #13131e;
  --surface2: #1a1a28;
  --surface3: #212133;
  --border: #27273a;
  --border2: #32324a;
  --accent: #0891b2;
  --accent-h: #06b6d4;
  --accent-soft: rgba(8,145,178,0.12);
  --accent-softer: rgba(8,145,178,0.06);
  --text: #f0f0f8;
  --text2: #9090b0;
  --text3: #55556a;
  --done: #22c55e;
  --done-soft: rgba(34,197,94,0.1);
  --failed: #f43f5e;
  --failed-soft: rgba(244,63,94,0.1);
  --inprog: #f59e0b;
  --inprog-soft: rgba(245,158,11,0.1);
  --blue: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --transition: 0.18s ease;
}

[data-theme="light"] {
  --bg: #f0f9ff;
  --bg2: #e0f2fe;
  --surface: #ffffff;
  --surface2: #f0f9ff;
  --surface3: #e0f2fe;
  --border: #bae6fd;
  --border2: #7dd3fc;
  --accent: #0891b2;
  --accent-h: #0e7490;
  --accent-soft: rgba(8,145,178,0.09);
  --accent-softer: rgba(8,145,178,0.04);
  --text: #0c1a2e;
  --text2: #1e4a6e;
  --text3: #64748b;
  --done: #16a34a;
  --done-soft: rgba(22,163,74,0.09);
  --failed: #e11d48;
  --failed-soft: rgba(225,29,72,0.09);
  --inprog: #d97706;
  --inprog-soft: rgba(217,119,6,0.09);
  --shadow: 0 4px 20px rgba(8,145,178,0.08);
  --shadow-sm: 0 2px 8px rgba(8,145,178,0.06);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  transition: background var(--transition), color var(--transition);
  font-size: 14px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ===== Layout ===== */
#app { display: flex; height: 100vh; }

/* ===== Sidebar ===== */
#sidebar {
  width: 210px; min-width: 210px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
  transition: background var(--transition), border-color var(--transition);
}

#sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  display: flex; align-items: center; gap: 8px;
}
.logo-icon {
  width: 28px; height: 28px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.logo-text { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.logo-sub { font-size: 10.5px; color: var(--text3); margin-top: 1px; padding-left: 36px; }

#sidebar-user {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.user-info .name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-info .role { font-size: 10.5px; color: var(--text3); }

#sidebar nav { flex: 1; padding: 8px 8px; }
.nav-section {
  padding: 10px 8px 4px;
  font-size: 10px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text2); font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-bottom: 1px;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-h); }
.nav-item .icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }

#sidebar-footer {
  padding: 10px 10px 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.btn-logout {
  width: 100%; padding: 7px; background: none;
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text3); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.btn-logout:hover { background: var(--failed-soft); color: var(--failed); border-color: var(--failed); }

/* Theme toggle */
.theme-toggle {
  width: 100%; padding: 7px 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text2);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--transition); font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.theme-toggle:hover { background: var(--surface3); color: var(--text); }

/* ===== Main ===== */
#main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

#topbar {
  height: 52px; min-height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
  transition: background var(--transition), border-color var(--transition);
}
#topbar-title { font-size: 15px; font-weight: 700; flex: 1; color: var(--text); }
#search-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px 7px 10px;
  color: var(--text); font-size: 13px; width: 220px;
  outline: none; transition: all var(--transition); font-family: inherit;
}
#search-box:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#search-box::placeholder { color: var(--text3); }

#content { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg); transition: background var(--transition); }

/* ===== Login ===== */
#login-screen {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  transition: background var(--transition);
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px; width: 360px;
  box-shadow: var(--shadow);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-logo .logo-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
.login-logo span { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; }
.login-card .subtitle { font-size: 13px; color: var(--text3); margin-bottom: 28px; padding-left: 46px; margin-top: -4px; }
.login-error { color: var(--failed); font-size: 12px; margin-bottom: 12px; display: none; background: var(--failed-soft); padding: 8px 12px; border-radius: var(--radius-xs); }

/* ===== Form ===== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 9px 12px;
  color: var(--text); font-size: 13.5px; outline: none;
  transition: all var(--transition); font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.form-group input[type="color"] {
  height: 40px; padding: 3px; cursor: pointer;
}
.form-hint { font-size: 11.5px; color: var(--text3); margin-top: 5px; }

/* ===== Buttons ===== */
.btn {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: none; transition: all var(--transition);
  font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(8,145,178,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }
.btn-danger { background: transparent; color: var(--failed); border: 1px solid rgba(244,63,94,0.25); }
.btn-danger:hover { background: var(--failed); color: #fff; border-color: var(--failed); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 10px; border-radius: 6px; font-weight: 600; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: var(--radius-xs); }
.btn-icon {
  padding: 5px 7px; background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 14px; border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--surface3); color: var(--text); }
.btn-full { width: 100%; justify-content: center; }

/* ===== Cards ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  transition: background var(--transition), border-color var(--transition);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.card-actions { display: flex; gap: 6px; }

/* ===== Stats ===== */
.stats-row { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 100px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-card .s-num { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.stat-card .s-label { font-size: 11.5px; color: var(--text3); margin-top: 2px; font-weight: 500; }

/* ===== Calendar ===== */
.calendar-nav {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.calendar-nav h2 { font-size: 18px; font-weight: 800; flex: 1; letter-spacing: -0.5px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-header {
  text-align: center; padding: 8px 4px;
  font-size: 10.5px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cal-day {
  min-height: 70px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px; cursor: pointer;
  transition: all var(--transition); position: relative;
}
.cal-day:hover { border-color: var(--border2); background: var(--surface2); }
.cal-day.other-month { opacity: 0.25; cursor: default; pointer-events: none; }
.cal-day.today { border-color: var(--accent); }
.cal-day.today .day-num { color: var(--accent-h); }
.cal-day.has-tasks { background: var(--surface2); }
.cal-day.selected { border-color: var(--accent); background: var(--accent-softer); }
.cal-day .day-num { font-size: 12.5px; font-weight: 700; color: var(--text2); display: block; margin-bottom: 5px; }
.task-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.task-dot { width: 6px; height: 6px; border-radius: 50%; }
.task-dot.done { background: var(--done); }
.task-dot.failed { background: var(--failed); }
.task-dot.in_progress { background: var(--inprog); }
.task-dot.todo { background: var(--text3); }

/* ===== Year View ===== */
.year-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.year-month-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.year-month-card:hover { border-color: var(--border2); box-shadow: var(--shadow-sm); }
.year-month-card.current-month { border-color: var(--accent); }
.year-month-name {
  font-size: 11.5px; font-weight: 700; color: var(--text); margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.year-mini-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 6px;
}
.year-mini-header { font-size: 8px; text-align: center; color: var(--text3); font-weight: 600; }
.year-mini-day {
  aspect-ratio: 1; border-radius: 3px; font-size: 8px; text-align: center;
  line-height: 1; display: flex; align-items: center; justify-content: center;
  color: var(--text3); cursor: pointer; transition: background var(--transition);
  position: relative;
}
.year-mini-day:hover { background: var(--border); color: var(--text); }
.year-mini-day.other-month { opacity: 0.2; pointer-events: none; }
.year-mini-day.today { color: var(--accent-h); font-weight: 800; }
.year-mini-day.has-tasks { background: var(--surface2); color: var(--text2); }
.year-mini-day.has-tasks::after {
  content: ''; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--accent);
}
.year-mini-day.all-done::after { background: var(--done); }
.year-month-stats {
  font-size: 10px; color: var(--text3); display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.year-month-goal {
  margin-top: 4px; font-size: 10px; border-top: 1px solid var(--border);
  padding-top: 5px;
}
.year-month-goal-text {
  color: var(--text2); font-size: 10.5px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.year-month-goal-status {
  display: inline-block; font-size: 9px; font-weight: 600; padding: 1px 5px;
  border-radius: 3px; margin-bottom: 2px;
}
.goal-status-in_progress { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.goal-status-done { background: color-mix(in srgb, var(--done) 15%, transparent); color: var(--done); }
.goal-status-failed { background: color-mix(in srgb, var(--failed) 15%, transparent); color: var(--failed); }
.goal-add-btn {
  font-size: 10px; color: var(--text3); cursor: pointer; padding: 2px 0;
  display: inline-flex; align-items: center; gap: 3px;
}
.goal-add-btn:hover { color: var(--accent); }
.month-goal-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px; width: 100%;
}
.view-toggle-btn {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text2); cursor: pointer; transition: all var(--transition);
  font-weight: 600;
}
.view-toggle-btn:hover, .view-toggle-btn.active {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
}
@media (max-width: 900px) { .year-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 650px) { .year-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .year-grid { grid-template-columns: 1fr 1fr; } }

/* ===== Date Panel ===== */
#date-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px;
  background: var(--surface); border-left: 1px solid var(--border);
  z-index: 50; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow);
}
#date-panel.open { transform: translateX(0); }
#date-panel-header {
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
#date-panel-header h3 { flex: 1; font-size: 15px; font-weight: 700; }
#date-panel-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
#date-panel-footer { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ===== Tasks ===== */
.task-item {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 7px;
  display: flex; align-items: flex-start; gap: 10px;
  transition: all var(--transition);
}
.task-item:hover { border-color: var(--border2); }
.task-status-btn {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--border2); flex-shrink: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; transition: all var(--transition); margin-top: 2px; background: none;
}
.task-status-btn.done { background: var(--done); border-color: var(--done); color: #fff; }
.task-status-btn.failed { background: var(--failed); border-color: var(--failed); color: #fff; }
.task-status-btn.in_progress { background: var(--inprog); border-color: var(--inprog); color: #fff; }
.task-status-btn.todo { border-color: var(--text3); }
.task-content { flex: 1; min-width: 0; }
.task-title { font-size: 13.5px; color: var(--text); line-height: 1.4; }
.task-title.done { text-decoration: line-through; color: var(--text3); }
.task-title.failed { color: var(--failed); opacity: 0.75; }
.task-meta { display: flex; gap: 5px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.task-notes { font-size: 11.5px; color: var(--text3); }
.task-course-tag {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 99px; background: var(--accent-soft); color: var(--accent-h);
  text-transform: uppercase; letter-spacing: 0.3px;
}
.task-links { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.task-link { font-size: 11.5px; color: var(--accent-h); text-decoration: none; }
.task-link:hover { text-decoration: underline; }
.task-actions { display: flex; gap: 2px; flex-shrink: 0; }

/* Drag handle */
.drag-handle {
  display: flex; align-items: center; justify-content: center;
  width: 16px; flex-shrink: 0; cursor: grab;
  color: var(--text3); font-size: 13px; opacity: 0;
  transition: opacity var(--transition); margin-top: 2px; user-select: none;
}
.task-item:hover .drag-handle { opacity: 0.45; }
.task-item.dragging { opacity: 0.4; border-style: dashed; }
.task-item.drag-over { border-color: var(--accent); background: var(--accent-soft); }

/* Scroll-down indicator button (inside #date-panel) */
.panel-scroll-indicator {
  position: absolute; bottom: 58px; right: 14px;
  width: 30px; height: 30px;
  background: var(--accent); color: #fff; border: none; border-radius: 50%;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; z-index: 55;
  box-shadow: 0 2px 10px rgba(124,58,237,0.4);
  transition: opacity 0.2s, transform 0.15s;
  opacity: 0;
}
.panel-scroll-indicator.visible { display: flex; opacity: 1; }
.panel-scroll-indicator:hover { transform: scale(1.12); }

/* ===== Courses ===== */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.course-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; cursor: pointer;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.course-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--course-color, var(--accent));
  border-radius: 3px 0 0 3px;
}
.course-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.course-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.course-short {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  color: var(--text3); letter-spacing: 0.5px; margin-bottom: 10px;
}
.course-stats { display: flex; gap: 12px; }
.course-stat { font-size: 12px; color: var(--text3); }
.course-stat span { font-weight: 700; color: var(--text2); }

/* Course detail */
.course-detail-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px;
}
.course-color-badge {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0; letter-spacing: -0.5px;
}
.tabs { display: flex; gap: 1px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab {
  padding: 9px 14px; font-size: 13px; cursor: pointer; color: var(--text3); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--transition);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-h); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Lectures */
.lecture-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.lecture-item:last-child { border-bottom: none; }
.lecture-date { font-size: 11.5px; font-weight: 600; color: var(--text3); min-width: 92px; font-family: 'Courier New', monospace; }
.lecture-topic { font-size: 13.5px; flex: 1; }
.lecture-absent { font-size: 10px; color: var(--failed); font-weight: 700; margin-top: 2px; letter-spacing: 0.3px; }
.lecture-notes { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* Lab table */
.lab-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lab-table th { text-align: left; padding: 8px 12px; color: var(--text3); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.lab-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.lab-table tr:hover td { background: var(--surface2); }
.lab-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-h); }
.lab-launch { color: var(--inprog); font-weight: 500; }
.lab-meeting { color: var(--blue); font-weight: 500; }
.lab-submission { color: var(--done); font-weight: 500; }

/* ===== Skills ===== */
.skills-filter { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip {
  padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border2); color: var(--text3);
  background: none; transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent-h); }
.filter-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-h); }

.skill-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 5px; transition: all var(--transition);
}
.skill-item:hover { border-color: var(--border2); }
.skill-status-icon { font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.skill-content { flex: 1; min-width: 0; }
.skill-title { font-size: 13.5px; color: var(--text); }
.skill-title.done { text-decoration: line-through; color: var(--text3); }
.skill-notes { font-size: 12px; color: var(--text3); margin-top: 3px; }
.skill-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.skill-actions { display: flex; gap: 2px; }

.skills-progress { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.progress-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 16px; text-align: center; flex: 1; min-width: 80px;
}
.progress-stat .num { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.progress-stat .label { font-size: 10.5px; color: var(--text3); font-weight: 500; }

/* ===== Roadmap View ===== */
.roadmap-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  align-items: flex-start;
}

.roadmap-category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}
.roadmap-category-card:hover { transform: translateY(-2px); border-color: var(--border2); }

.roadmap-preview-card {
  height: 420px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.roadmap-expand-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--surface), transparent);
  padding: 40px 20px 15px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.roadmap-preview-card:hover .roadmap-expand-hint { opacity: 1; }

/* Improved Skill Picker */
.skill-picker-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  background: var(--bg2);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.skill-picker-group { margin-bottom: 14px; }
.skill-picker-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.skill-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.skill-picker-item:hover { border-color: var(--accent); background: var(--surface2); }
.skill-picker-item input { width: 16px; height: 16px; cursor: pointer; }
.skill-picker-item label { flex: 1; cursor: pointer; font-size: 13px; font-weight: 500; }
.skill-picker-item .item-status { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--surface2); color: var(--text3); }

.toast-page-view {
  min-width: 420px;
  max-width: 600px;
}

.roadmap-more-indicator {
  font-size: 10px;
  color: var(--text3);
  text-align: center;
  margin: 10px 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.roadmap-cat-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.cat-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text3);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 99px;
}

.roadmap-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

.roadmap-node {
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.node-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all var(--transition);
}

.node-info {
  flex: 1;
  padding-top: 4px;
}

.node-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.node-title.done { color: var(--text3); text-decoration: line-through; }

.node-notes {
  font-size: 11.5px;
  color: var(--text3);
  margin-top: 4px;
  line-height: 1.4;
}

.roadmap-line {
  width: 2px;
  height: 20px;
  background: var(--border2);
  margin-left: 15px;
  position: relative;
  z-index: 1;
}

.node-done .node-marker { border-color: var(--done); background: var(--done-soft); }
.node-learning .node-marker { border-color: var(--blue); background: rgba(59,130,246,0.1); }
.node-todo .node-marker { border-color: var(--text3); opacity: 0.6; }

/* ===== Admin ===== */
.user-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 6px; transition: all var(--transition);
}
.user-row:hover { border-color: var(--border2); }
.user-info-big { flex: 1; }
.user-info-big .uname { font-size: 13.5px; font-weight: 600; }
.user-info-big .umeta { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.role-badge {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.role-badge.admin { background: var(--accent-soft); color: var(--accent-h); }
.role-badge.user { background: var(--surface3); color: var(--text3); }
.public-link { font-size: 11px; color: var(--accent-h); text-decoration: none; font-family: monospace; }
.public-link:hover { text-decoration: underline; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s; backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; padding: 24px; width: 480px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow);
  animation: slideUp 0.15s;
}
.modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

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

/* ===== Profile ===== */
.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.profile-header {
  padding: 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  display: flex; align-items: center; gap: 16px;
}
.profile-avatar {
  width: 52px; height: 52px; border-radius: 12px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.profile-body { padding: 20px 24px; }
.profile-section { margin-bottom: 22px; }
.profile-section-title {
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px;
}
.slug-row {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
}
.slug-prefix { font-size: 12px; color: var(--text3); white-space: nowrap; }
.slug-input {
  flex: 1; background: none; border: none; outline: none; color: var(--accent-h);
  font-size: 13px; font-weight: 600; font-family: monospace;
  padding: 0; min-width: 0;
}
.slug-input:focus { color: var(--text); }
.slug-row.editing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== Badge / misc ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600;
}
.badge.done { background: var(--done-soft); color: var(--done); }
.badge.failed { background: var(--failed-soft); color: var(--failed); }
.badge.in_progress { background: var(--inprog-soft); color: var(--inprog); }
.badge.todo { background: var(--surface3); color: var(--text3); }
.badge.learning { background: rgba(59,130,246,0.1); color: var(--blue); }

.divider { height: 1px; background: var(--border); margin: 14px 0; }
.text-muted { color: var(--text3); font-size: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.flex { display: flex; } .flex-1 { flex: 1; }
.gap-2 { gap: 8px; } .items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== Empty states ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text3); }
.empty-state .icon { font-size: 36px; margin-bottom: 10px; opacity: 0.6; }
.empty-state p { font-size: 13.5px; }

/* ===== Search results ===== */
.search-result-item {
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 5px; cursor: pointer; transition: all var(--transition);
}
.search-result-item:hover { border-color: var(--accent); background: var(--surface2); }
.search-result-type { font-size: 10.5px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 2px; }
.search-result-title { font-size: 13.5px; color: var(--text); }
.search-result-meta { font-size: 11.5px; color: var(--text3); margin-top: 2px; }

/* ===== Toast ===== */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column; gap: 6px;
}
.toast {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13px;
  box-shadow: var(--shadow); animation: toastIn 0.2s cubic-bezier(0.2,0,0,1);
  display: flex; align-items: center; gap: 8px; min-width: 200px; max-width: 300px;
}
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.error { border-color: rgba(244,63,94,0.3); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Hamburger button ===== */
#menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: none; border: none;
  cursor: pointer; color: var(--text2); font-size: 20px; flex-shrink: 0;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
#menu-btn:hover { background: var(--surface2); color: var(--text); }

/* Sidebar overlay backdrop */
#sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 49;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(1px);
}
#sidebar-overlay.show { display: block; }

/* Date panel overlay — transparent on desktop (click-catcher), dim on mobile */
#date-panel-overlay {
  display: none; position: fixed; inset: 0; z-index: 49;
}
#date-panel-overlay.show { display: block; }
@media (max-width: 768px) {
  #date-panel-overlay.show {
    background: rgba(0,0,0,0.45); backdrop-filter: blur(1px);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body { overflow: auto; }

  #app { height: auto; min-height: 100vh; }

  /* Sidebar slides in over content */
  #sidebar {
    position: fixed; left: -220px; top: 0; bottom: 0;
    width: 220px; min-width: 220px; z-index: 50;
    transition: left 0.22s cubic-bezier(0.4,0,0.2,1);
    box-shadow: none;
  }
  #sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }

  #main { width: 100%; min-height: 100vh; }

  #menu-btn { display: flex; }

  #topbar { padding: 0 12px; gap: 8px; }
  #topbar-title { font-size: 14px; }
  #search-box { width: 100%; max-width: 180px; font-size: 12px; padding: 6px 10px; }

  #content { padding: 14px; }

  /* Calendar cells smaller on mobile */
  .cal-day { min-height: 48px; padding: 4px; }
  .cal-day .day-num { font-size: 11px; margin-bottom: 3px; }
  .cal-header { font-size: 9px; padding: 6px 2px; }
  .task-dot { width: 5px; height: 5px; }

  /* Date panel full screen */
  #date-panel { width: 100vw; }

  /* Courses single column */
  .courses-grid { grid-template-columns: 1fr; }

  /* Stats wrap nicely */
  .stats-row { gap: 7px; }
  .stat-card { min-width: 80px; padding: 10px 12px; }
  .stat-card .s-num { font-size: 20px; }

  /* Login card full width */
  .login-card { width: calc(100vw - 32px); padding: 24px 20px; }

  /* Modal full width */
  .modal { width: calc(100vw - 24px); padding: 18px 16px; }

  /* User row on admin wraps */
  .user-row { flex-wrap: wrap; gap: 8px; }
  .user-info-big { width: 100%; }

  /* Profile */
  .profile-header { padding: 16px; }
  .profile-body { padding: 14px 16px; }

  /* Lab table scroll */
  .lab-table-wrap { overflow-x: auto; }

  /* Toast smaller */
  .toast-container { bottom: 12px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }
}

@media (max-width: 420px) {
  #search-box { max-width: 130px; }
  .cal-day { min-height: 38px; }
}

/* ===== Very small screens (≤ 375px) ===== */
@media (max-width: 375px) {
  body { font-size: 13px; }

  /* Topbar */
  #topbar { padding: 0 8px; gap: 6px; height: 46px; min-height: 46px; }
  #topbar-title { font-size: 13px; }
  #search-box { max-width: 110px; font-size: 11px; padding: 5px 8px; }
  #menu-btn { width: 30px; height: 30px; font-size: 18px; }

  /* Content */
  #content { padding: 10px; }

  /* Calendar */
  .calendar-nav { gap: 6px; margin-bottom: 10px; }
  .calendar-nav h2 { font-size: 15px; }
  .cal-grid { gap: 2px; }
  .cal-day { min-height: 34px; padding: 3px; border-radius: 5px; }
  .cal-day .day-num { font-size: 10px; margin-bottom: 2px; }
  .cal-header { font-size: 8px; padding: 4px 1px; }
  .task-dot { width: 4px; height: 4px; }

  /* Stats */
  .stats-row { gap: 5px; margin-bottom: 12px; }
  .stat-card { min-width: 68px; padding: 8px 10px; border-radius: 8px; }
  .stat-card .s-num { font-size: 17px; }
  .stat-card .s-label { font-size: 9px; }

  /* Date panel */
  #date-panel-header { padding: 12px 14px 10px; }
  #date-panel-header h3 { font-size: 13px; }
  #date-panel-body { padding: 10px 12px; }
  #date-panel-footer { padding: 10px 12px; }

  /* Tasks */
  .task-item { padding: 8px 10px; gap: 8px; }
  .task-title { font-size: 12.5px; }
  .task-notes { font-size: 10.5px; }
  .task-actions .btn-icon { padding: 3px 5px; font-size: 12px; }

  /* Modals */
  .modal { width: calc(100vw - 16px); padding: 16px 14px; border-radius: 10px; }
  .modal-title { font-size: 14px; }

  /* Buttons */
  .btn-sm { padding: 4px 9px; font-size: 11px; }
  .btn { font-size: 12px; padding: 7px 13px; }

  /* Widgets */
  .weather-widget { padding: 8px 10px 6px; }
  .weather-icon-big { font-size: 26px; }
  .weather-temp { font-size: 17px; }
  .weather-desc { font-size: 11px; }
  .weather-location { font-size: 9px; }
  .weather-detail { font-size: 10px; padding: 2px 5px; }
  .weather-city-form { display: flex; gap: 4px; margin-top: 4px; }
  .weather-city-input { font-size: 11px; padding: 4px 6px; }
  .wfc-day { flex: 1 0 38px; min-width: 38px; }
  .wfc-label { font-size: 8px; }
  .wfc-max { font-size: 10px; }
  .wfc-min { font-size: 9px; }

  .currency-widget { padding: 8px 10px; }
  .cw-title { font-size: 11px; }
  .cw-row { padding: 5px 7px; gap: 5px; }
  .cw-amt { width: 54px; font-size: 11px; }
  .cw-res { font-size: 11px; }
  .cw-lbl { font-size: 9px; }

  /* Login */
  .login-card { width: calc(100vw - 20px); padding: 20px 16px; }
  .login-card .subtitle { font-size: 11.5px; }

  /* Toast */
  .toast-container { bottom: 8px; right: 8px; left: 8px; }
  .toast { font-size: 12px; padding: 7px 11px; min-width: 0; }
}

/* ===== Invited Task Badge ===== */
.invited-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  color: var(--accent-h);
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  vertical-align: middle;
  margin-left: 5px;
  flex-shrink: 0;
  cursor: default;
}
.invited-badge img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ===== Toggle Switch ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border2);
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(18px); }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}
.toggle-row label { font-size: 13px; color: var(--text2); cursor: pointer; flex: 1; }

/* ===== Social / Friends ===== */
.social-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: calc(100vh - 56px);
  padding: 16px;
  overflow: hidden;
}
@media (max-width: 600px) {
  .social-layout { grid-template-columns: 1fr; height: auto; overflow: auto; }
}
.friends-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.friends-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.friends-panel-header h3 { font-size: 14px; font-weight: 600; }
.friends-list { overflow-y: auto; flex: 1; }
.friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  position: relative;
}
.friend-item:hover { background: var(--surface2); }
.friend-item.active { background: var(--accent-soft); }
.friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-h);
  flex-shrink: 0;
  overflow: hidden;
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-name { font-size: 13px; font-weight: 500; }
.friend-sub { font-size: 11px; color: var(--text3); }
.friend-badge {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}
.pending-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  font-weight: 600;
}
.pending-tag.incoming { background: var(--inprog-soft); color: var(--inprog); }
.pending-tag.outgoing { background: var(--accent-softer); color: var(--text3); }

/* ===== Chat Area ===== */
.chat-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.chat-header h3 { font-size: 14px; font-weight: 600; flex: 1; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--text3);
  font-size: 13px;
}
.chat-empty .empty-icon { font-size: 40px; opacity: .4; }
.msg-bubble {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.msg-bubble.mine {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble.theirs {
  align-self: flex-start;
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.msg-time {
  font-size: 10px;
  opacity: .6;
  margin-top: 3px;
  text-align: right;
}
.msg-bubble.theirs .msg-time { text-align: left; }
.chat-input-row {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.chat-input-row input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.chat-input-row input:focus { border-color: var(--accent); }

/* ===== Task Invites ===== */
.invite-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.invite-card .invite-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.invite-card .invite-meta { font-size: 11px; color: var(--text3); margin-bottom: 8px; }
.invite-actions { display: flex; gap: 8px; }

/* ===== Add Friend Form ===== */
.add-friend-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.add-friend-bar input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text);
  font-size: 12px;
  outline: none;
  font-family: inherit;
}
.add-friend-bar input:focus { border-color: var(--accent); }
.unread-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== Emoji Picker ===== */
.emoji-picker-wrap { position: relative; flex-shrink: 0; }
.emoji-picker {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  z-index: 9999;
  box-shadow: var(--shadow);
  width: 230px;
}
.emoji-picker span {
  font-size: 18px;
  cursor: pointer;
  text-align: center;
  padding: 4px 2px;
  border-radius: 4px;
  line-height: 1.3;
}
.emoji-picker span:hover { background: var(--surface2); }

/* ===== Activity Feed ===== */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.activity-icon img { width: 100%; height: 100%; object-fit: cover; }
.activity-text { color: var(--text2); flex: 1; line-height: 1.4; }
.activity-time { color: var(--text3); font-size: 10px; white-space: nowrap; }
.activity-status {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 99px;
  font-weight: 600;
}
.activity-status.pending { background: var(--inprog-soft); color: var(--inprog); }
.activity-status.accepted { background: var(--done-soft); color: var(--done); }
.activity-status.rejected { background: var(--failed-soft); color: var(--failed); }
.activity-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; font-size: 12px; color: var(--text3); }

/* ===== Finance ===== */
.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 600px) { .finance-summary { grid-template-columns: 1fr 1fr; } }
.finance-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.finance-stat .fs-label { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.finance-stat .fs-value { font-size: 22px; font-weight: 700; }
.fs-value.income { color: var(--done); }
.fs-value.expense { color: var(--failed); }
.fs-value.balance.positive { color: var(--done); }
.fs-value.balance.negative { color: var(--failed); }
.finance-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.finance-filters .filter-btn {
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
}
.finance-filters .filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.finance-filters select {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
}
.finance-list { display: flex; flex-direction: column; gap: 0; }
.finance-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 0 4px;
}
.finance-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background var(--transition);
}
.finance-item:hover { background: var(--surface2); }
.finance-cat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.finance-cat-icon.expense { background: var(--failed-soft); }
.finance-cat-icon.income  { background: var(--done-soft); }
.finance-item-body { flex: 1; min-width: 0; }
.finance-item-title { font-size: 13px; font-weight: 600; }
.finance-item-meta  { font-size: 11px; color: var(--text3); margin-top: 1px; }
.finance-item-amount {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.finance-item-amount.income  { color: var(--done); }
.finance-item-amount.expense { color: var(--failed); }

/* ===== Widgets Row (weather + currency side by side) ===== */
.widgets-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.widgets-row > #weather-widget,
.widgets-row > #currency-widget {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .widgets-row {
    flex-direction: column;
    gap: 8px;
  }
  .widgets-row > #weather-widget,
  .widgets-row > #currency-widget {
    width: 100%;
  }
  /* Compact weather box on mobile */
  .weather-widget {
    padding: 10px 12px 8px;
  }
  .weather-icon-big { font-size: 32px; }
  .weather-temp { font-size: 20px; }
  .weather-desc { font-size: 12px; }
  .weather-location { font-size: 10px; }
  .weather-detail { font-size: 11px; padding: 2px 6px; }
  .weather-forecast { margin-top: 8px; }
  .wfc-day { flex: 1 0 44px; min-width: 44px; padding: 5px 2px; }
  .wfc-icon { font-size: 14px; }
  .wfc-max { font-size: 11px; }
  .wfc-min { font-size: 10px; }
  /* Compact currency box on mobile */
  .currency-widget {
    padding: 9px 12px;
  }
  .cw-header { margin-bottom: 7px; }
  .cw-title { font-size: 12px; }
  .cw-pairs { gap: 5px; }
  .cw-row { padding: 6px 8px; }
  .cw-flag { font-size: 14px; }
  .cw-lbl { font-size: 10px; }
}

/* ===== Weather Widget ===== */
#weather-widget { margin-bottom: 12px; }

.weather-widget {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
  overflow: hidden;
}

.weather-current {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.weather-icon-big {
  font-size: 42px;
  line-height: 1;
  flex-shrink: 0;
}

.weather-info { display: flex; flex-direction: column; gap: 2px; }
.weather-temp { font-size: 26px; font-weight: 800; line-height: 1; color: var(--text); }
.weather-desc { font-size: 13px; color: var(--text2); font-weight: 500; }
.weather-location { font-size: 11px; color: var(--text3); margin-top: 2px; }

.weather-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.weather-detail {
  font-size: 12px;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  white-space: nowrap;
}

.weather-city-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.weather-city-input {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  width: 100px;
  min-width: 60px;
  outline: none;
  transition: border-color var(--transition);
}
.weather-city-input:focus { border-color: var(--accent); }

/* 7-day forecast strip */
.weather-forecast {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.weather-forecast::-webkit-scrollbar { height: 3px; }

.wfc-day {
  flex: 1 0 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 56px;
}

.wfc-label { font-size: 10px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.wfc-icon  { font-size: 18px; line-height: 1; }
.wfc-temps { display: flex; gap: 4px; align-items: center; }
.wfc-max   { font-size: 12px; font-weight: 700; color: var(--text); }
.wfc-min   { font-size: 11px; color: var(--text3); }
.wfc-chevron { font-size: 13px; color: var(--text3); margin-top: 2px; transition: transform var(--transition); }

.wfc-day { cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.wfc-day:hover { background: var(--surface2); border-color: var(--border2); }
.wfc-day.active { background: var(--accent-soft); border-color: var(--accent); }
.wfc-day.active .wfc-chevron { transform: rotate(90deg); color: var(--accent); }

/* Hourly panel */
.wfc-hourly-panel {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  animation: slideDown 0.18s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wfh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.wfh-title { font-size: 12px; font-weight: 600; color: var(--text2); }

.wfh-legend {
  display: grid;
  grid-template-columns: 48px 26px 1fr 90px 64px 60px 80px;
  gap: 4px;
  padding: 4px 10px;
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

.wfh-rows {
  max-height: 260px;
  overflow-y: auto;
}
.wfh-rows::-webkit-scrollbar { width: 3px; }

.wfh-row {
  display: grid;
  grid-template-columns: 48px 26px 1fr 90px 64px 60px 80px;
  gap: 4px;
  align-items: center;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  transition: background var(--transition);
}
.wfh-row:last-child { border-bottom: none; }
.wfh-row:hover { background: var(--surface2); }

.wfh-hour  { font-weight: 600; color: var(--text2); font-size: 11px; }
.wfh-icon  { font-size: 15px; text-align: center; }
.wfh-desc  { color: var(--text2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfh-temp  { font-weight: 700; color: var(--text); }
.wfh-feels { font-weight: 400; color: var(--text3); }
.wfh-meta  { color: var(--text3); font-size: 11px; }

.wfh-precip-col {
  display: flex;
  align-items: center;
  gap: 5px;
}
.wfh-precip-bar {
  flex: 1;
  height: 4px;
  background: var(--surface3);
  border-radius: 99px;
  overflow: hidden;
}
.wfh-precip-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.wfh-precip-val { font-size: 10px; color: var(--text3); white-space: nowrap; }

/* Weather banner in date panel */
.weather-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-softer);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.wb-icon { font-size: 22px; flex-shrink: 0; }
.wb-info { font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.wb-sub  { font-size: 11px; color: var(--text3); }

/* ===== Currency Widget ===== */
#currency-widget { margin-bottom: 12px; }

.currency-widget {
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.cw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cw-title { font-size: 13px; font-weight: 700; color: var(--text); }

.cw-pairs { display: flex; flex-direction: column; gap: 6px; }

/* Compact single-line rows */
.cw-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.cw-row-custom { flex-wrap: wrap; }

.cw-flag { font-size: 16px; flex-shrink: 0; }
.cw-lbl  { font-size: 11px; font-weight: 600; color: var(--text3); white-space: nowrap; flex-shrink: 0; }

.cw-amt {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  width: 58px;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.cw-amt:focus { border-color: var(--accent); }

/* Inline result */
.cw-res {
  flex: 1;
  background: var(--done-soft);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  color: var(--done);
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
  word-break: break-all;
}

.cw-select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xs);
  padding: 5px 6px;
  color: var(--text);
  font-size: 11px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition);
}
.cw-select:focus { border-color: var(--accent); }

.cw-arrow { color: var(--text3); font-size: 13px; flex-shrink: 0; }
.cw-code  { font-size: 10px; font-weight: 700; color: var(--text3); opacity: 0.8; }
.cw-rate-hint { font-size: 10px; color: var(--text3); }

/* ===== Task Attachments & Photo Slider ===== */
.task-attachments { margin-top: 8px; }

/* Photo slider */
.attachment-slider { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface2); margin-bottom: 6px; }
.slider-track { display: flex; }
.slide { display: none; position: relative; width: 100%; flex-shrink: 0; }
.slide.active { display: block; }
.slide img { width: 100%; max-height: 220px; object-fit: contain; cursor: zoom-in; background: var(--bg); display: block; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 22px; padding: 4px 10px; cursor: pointer; z-index: 2; border-radius: 4px; }
.slider-btn.prev { left: 4px; }
.slider-btn.next { right: 4px; }
.slider-dots { display: flex; justify-content: center; gap: 5px; padding: 5px 0; background: var(--surface2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border2); cursor: pointer; transition: background .15s; }
.dot.active { background: var(--accent); }

/* Non-image file chips */
.attachment-files { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.attachment-file-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; font-size: 12px; color: var(--text); text-decoration: none; max-width: 240px; }
.attachment-file-chip:hover { border-color: var(--accent); }
.att-size { color: var(--text3); font-size: 10px; }
.att-del-btn { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 11px; padding: 0 2px; line-height: 1; }
.att-del-btn:hover { color: var(--failed); }
.att-upload-btn { display: inline-flex; align-items: center; cursor: pointer; font-size: 13px; color: var(--text3); padding: 3px 6px; border-radius: var(--radius-xs); transition: color .15s; }
.att-upload-btn:hover { color: var(--accent); }
.modal-attach-btn { display: inline-flex; align-items: center; cursor: pointer; font-size: 13px; color: var(--accent); background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: var(--radius-xs); padding: 6px 12px; transition: background .15s; }
.modal-attach-btn:hover { background: rgba(8,145,178,0.2); }

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; display: flex; align-items: center; }
.lb-img { max-width: 85vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius-sm); }
.lb-close { position: absolute; top: -36px; right: 0; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 30px; padding: 6px 14px; cursor: pointer; border-radius: 4px; }
.lb-nav.lb-prev { left: -50px; }
.lb-nav.lb-next { right: -50px; }
.lb-counter { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 13px; }

/* Due time badge */
.due-time-badge { font-size: 11px; color: var(--text3); }
.due-time-badge.overdue { color: var(--failed); }

/* Subtasks */
.subtasks-list { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.subtask-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text2); }
.subtask-item.done .subtask-title { text-decoration: line-through; color: var(--text3); }
.subtask-check { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 11px; padding: 0; }
.subtask-check:hover { color: var(--accent-h); }
.subtask-delete { background: none; border: none; cursor: pointer; color: transparent; font-size: 10px; padding: 0; margin-left: auto; line-height: 1; opacity: 0; transition: opacity 0.15s; }
.subtask-item:hover .subtask-delete { opacity: 1; color: var(--failed); }
.add-subtask-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.add-subtask-input { flex: 1; background: none; border: none; border-bottom: 1px dashed var(--border2); color: var(--text); font-size: 11.5px; padding: 2px 0; outline: none; font-family: inherit; }
.add-subtask-input::placeholder { color: var(--text3); }
.add-subtask-btn { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 14px; padding: 0; line-height: 1; }
.add-subtask-btn:hover { color: var(--accent-h); }

/* Bulk actions */
.bulk-bar {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px;
  background: var(--accent-soft); border-bottom: 1px solid var(--accent);
  position: sticky; top: 0; z-index: 5;
}
.bulk-bar button { font-size: 11px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); cursor: pointer; }
.bulk-bar button:hover { border-color: var(--accent); color: var(--accent-h); }
.task-item.bulk-selected { border-color: var(--accent); background: var(--accent-soft); }
.task-check {
  width: 15px; height: 15px; border: 1.5px solid var(--border2); border-radius: 3px;
  background: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--accent); flex-shrink: 0;
}
.task-check.checked { background: var(--accent); border-color: var(--accent); color: white; }

/* Streak + heatmap */
#dashboard-stats { width: fit-content; }
.dashboard-stats { margin-top: 20px; }
.streak-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 0; }
.heatmap-section {
  margin-top: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  width: fit-content;
}
.heatmap-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; cursor: pointer; user-select: none;
  background: var(--surface2); white-space: nowrap;
}
.heatmap-toggle:hover { background: var(--surface3); }
.heatmap-toggle-label { font-size: 11px; font-weight: 600; color: var(--text2); }
.heatmap-toggle-arrow { font-size: 9px; color: var(--text3); transition: transform 0.2s; }
.heatmap-toggle-arrow.open { transform: rotate(180deg); }
.heatmap-body { padding: 8px 10px 10px; display: none; }
.heatmap-body.open { display: block; }
.heatmap-grid { display: grid; grid-template-columns: repeat(53, 7px); gap: 1px; margin-top: 4px; overflow-x: auto; }
.heatmap-cell { width: 7px; height: 7px; border-radius: 1px; background: var(--border); cursor: default; transition: transform 0.1s; }
.heatmap-cell:hover { transform: scale(1.4); }
.heatmap-label { font-size: 9px; color: var(--text3); margin-bottom: 2px; }

/* Keyboard shortcut badge */
.kbd { display: inline-block; padding: 1px 5px; border: 1px solid var(--border2); border-radius: 4px; font-size: 10px; font-family: monospace; color: var(--text3); background: var(--surface2); }

/* Week view */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.week-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.week-col-header { font-size: 11px; font-weight: 700; color: var(--text2); margin-bottom: 8px; text-align: center; }
.week-col-header.today { color: var(--accent-h); }
.week-task-item { font-size: 12px; color: var(--text); padding: 4px 6px; border-radius: 4px; margin-bottom: 3px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.week-task-item:hover { background: var(--surface2); }

/* Undo toast */
.toast-undo-btn { margin-left: 8px; color: var(--accent-h) !important; font-weight: 700 !important; background: none; border: none; cursor: pointer; font-size: 12px; text-decoration: underline; }

/* ===== Priority Badges ===== */
.priority-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; padding: 1px 7px;
  border-radius: 99px; vertical-align: middle;
}
.priority-urgent { background: rgba(244,63,94,0.15); color: #f43f5e; }
.priority-high    { background: rgba(249,115,22,0.15); color: #f97316; }
.priority-medium  { background: rgba(234,179,8,0.15);  color: #ca8a04; }
.priority-low     { background: rgba(59,130,246,0.15);  color: #3b82f6; }

/* ===== Kanban Board ===== */
.kanban-board {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 8px; align-items: flex-start;
}
.kanban-col {
  display: flex; flex-direction: column;
  min-width: 220px; width: 220px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  flex-shrink: 0;
}
.kanban-col-header {
  font-weight: 700; font-size: 13px; color: var(--text2);
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.kanban-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 99px; font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; color: var(--text3); margin-left: auto;
}
.kanban-cards { display: flex; flex-direction: column; gap: 7px; min-height: 40px; }
.kanban-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  cursor: pointer; transition: all var(--transition);
}
.kanban-card:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.kanban-card.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.kanban-card.dragging { opacity: 0.4; border-style: dashed; }

/* ===== Habits Table ===== */
.habits-page {}
.habits-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.habits-grid-wrapper { overflow-x: auto; }
.habits-table {
  border-collapse: collapse; width: 100%; font-size: 12px;
}
.habits-table th, .habits-table td {
  padding: 8px 10px; border: 1px solid var(--border);
  font-size: 12px; text-align: left;
}
.habits-table th {
  background: var(--surface2); font-weight: 600;
  color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.4px; font-size: 10px;
}
.habits-table tr:hover td { background: var(--surface2); }
.habit-cell-btn {
  width: 22px; height: 22px; border-radius: 4px;
  cursor: pointer; border: 1px solid var(--border2);
  background: none; color: var(--text3);
  font-size: 11px; display: flex; align-items: center;
  justify-content: center; margin: 0 auto;
  transition: all var(--transition);
}
.habit-cell-btn.done {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

/* ===== Grades Table ===== */
.grades-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.grades-table th {
  text-align: left; padding: 8px 12px; color: var(--text3);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
}
.grades-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.grades-table tr:hover td { background: var(--surface2); }
.grade-high { color: var(--done); }
.grade-mid  { color: var(--inprog); }
.grade-low  { color: var(--failed); }

/* ===== Pomodoro Widget ===== */
#pomo-widget {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 16px;
  z-index: 200; min-width: 220px;
  box-shadow: 0 4px 24px rgba(8,145,178,0.10), var(--shadow);
  animation: slideUp 0.15s;
}
#pomo-header {
  font-size: 13px; font-weight: 700; margin-bottom: 10px;
  color: var(--text); overflow: hidden; display: flex;
  align-items: center; justify-content: space-between;
}
#pomo-display {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  text-align: center; color: var(--accent-h); font-family: monospace;
  margin-bottom: 4px;
}
#pomo-mode {
  font-size: 10px; color: var(--accent); text-align: center;
  text-transform: uppercase; letter-spacing: 2px; font-weight: 600;
  margin-bottom: 12px;
}
#pomo-controls {
  display: flex; gap: 8px; justify-content: center;
}
#pomo-controls button {
  padding: 7px 16px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text); font-family: inherit; transition: all var(--transition);
}
#pomo-controls button:first-child { background: var(--accent); color: #fff; border-color: var(--accent); }
#pomo-controls button:first-child:hover { background: var(--accent-h); border-color: var(--accent-h); }
#pomo-controls button:last-child:hover { background: var(--surface3); }
#pomo-task-select {
  margin-top: 10px; width: 100%;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 6px 8px;
  color: var(--text); font-family: inherit; font-size: 12px;
  outline: none; cursor: pointer; transition: border-color var(--transition);
}
#pomo-task-select:focus { border-color: var(--accent); }
#pomo-task-select option { background: var(--surface2); color: var(--text); }

/* ===== Quick Add Bar ===== */
#quick-add-bar {
  display: flex; gap: 6px; padding: 8px 12px 4px;
  border-top: 1px solid var(--border);
}
#quick-add-input {
  flex: 1; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 7px 10px;
  color: var(--text); font-family: inherit; font-size: 13px;
  outline: none; transition: all var(--transition);
}
#quick-add-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#quick-add-input::placeholder { color: var(--text3); }
#quick-add-btn {
  padding: 5px 11px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all var(--transition);
  font-family: inherit;
}
#quick-add-btn:hover { background: var(--accent-h); }

/* ===== Color Swatches ===== */
.color-swatch-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 0; }
.color-swatch {
  width: 20px; height: 20px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--text3);
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--text); transform: scale(1.2); }

/* ===== Focus Mode ===== */
.focus-view { padding: 40px; max-width: 600px; margin: 0 auto; }
.focus-tasks-list { display: flex; flex-direction: column; gap: 10px; }
.focus-task-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all var(--transition);
}
.focus-task-item:hover { border-color: var(--border2); }
.focus-status-btn {
  width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid var(--border2); cursor: pointer;
  background: none; font-size: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.focus-status-btn.done { background: var(--done); border-color: var(--done); color: #fff; }
.focus-status-btn.failed { background: var(--failed); border-color: var(--failed); color: #fff; }
.focus-status-btn.in_progress { background: var(--inprog); border-color: var(--inprog); color: #fff; }
.focus-task-title { font-size: 16px; color: var(--text); flex: 1; }
.focus-task-title.done { text-decoration: line-through; color: var(--text3); }

/* ===== Dashboard Stats Enhancements ===== */
.prod-ring-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.prod-ring {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.prod-ring-inner {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 800;
  color: var(--text);
}
.prod-ring-label { font-size: 10px; color: var(--text3); text-align: center; }

.due-soon-card {
  background: var(--inprog-soft); border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm); padding: 10px 14px; flex: 1; min-width: 160px;
}
.due-soon-title { font-size: 11px; font-weight: 700; color: var(--inprog); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.due-soon-item { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.due-soon-time { font-size: 11px; font-weight: 700; color: var(--inprog); min-width: 38px; }
.due-soon-task { font-size: 12px; color: var(--text2); }

.course-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.course-bar-tag { font-size: 11px; font-weight: 600; color: var(--text2); min-width: 80px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-bar-track { flex: 1; height: 6px; background: var(--surface3); border-radius: 99px; overflow: hidden; }
.course-bar-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s ease; }
.course-bar-count { font-size: 10px; color: var(--text3); white-space: nowrap; min-width: 36px; text-align: right; }
