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

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

:root {
  --bg: #0c0e14;
  --bg-sidebar: #111420;
  --bg-card: #161928;
  --bg-card2: #1c2035;
  --bg-card-hover: #202440;
  --border: rgba(255,255,255,0.06);
  --border-em: rgba(255,255,255,0.12);
  --border-glow: rgba(55,138,221,0.3);
  --text: #eaeef6;
  --text-muted: #8a8fa8;
  --text-faint: #525670;
  --blue: #4a9eff;
  --blue-dark: #2b7de9;
  --blue-bg: rgba(74,158,255,0.10);
  --blue-glow: rgba(74,158,255,0.15);
  --amber: #f5a623;
  --amber-bg: rgba(245,166,35,0.10);
  --amber-dark: #d4891a;
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.10);
  --red: #f87171;
  --red-bg: rgba(248,113,113,0.10);
  --purple: #a78bfa;
  --purple-bg: rgba(167,139,250,0.10);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --sidebar-w: 200px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.45);
  --scrollbar-thumb: rgba(74,158,255,0.35);
  --scrollbar-thumb-hover: rgba(74,158,255,0.55);
  --scrollbar-track: transparent;
}

body.light {
  --bg: #f0f2f7;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card2: #f6f7fb;
  --bg-card-hover: #eef0f6;
  --border: rgba(0,0,0,0.07);
  --border-em: rgba(0,0,0,0.14);
  --border-glow: rgba(74,158,255,0.25);
  --text: #1a1d2e;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --blue-bg: rgba(74,158,255,0.08);
  --blue-glow: rgba(74,158,255,0.12);
  --amber-bg: rgba(245,166,35,0.08);
  --green-bg: rgba(52,211,153,0.08);
  --red-bg: rgba(248,113,113,0.08);
  --purple-bg: rgba(167,139,250,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --scrollbar-thumb: rgba(74,158,255,0.3);
  --scrollbar-thumb-hover: rgba(74,158,255,0.5);
  --scrollbar-track: transparent;
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Inter', -apple-system, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }

/* ===== SCROLLBAR ===== */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
::-webkit-scrollbar-corner { background: transparent; }

/* Show scrollbar thumb only on hover/scroll */
.slot-content::-webkit-scrollbar-thumb,
.weekly-tasks-wrap::-webkit-scrollbar-thumb,
.ticket-list::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.history-content::-webkit-scrollbar-thumb,
.sports-section::-webkit-scrollbar-thumb,
.finance-section::-webkit-scrollbar-thumb,
.today-left::-webkit-scrollbar-thumb { background: transparent; }
.slot-content:hover::-webkit-scrollbar-thumb,
.weekly-tasks-wrap:hover::-webkit-scrollbar-thumb,
.ticket-list:hover::-webkit-scrollbar-thumb,
.modal-body:hover::-webkit-scrollbar-thumb,
.history-content:hover::-webkit-scrollbar-thumb,
.sports-section:hover::-webkit-scrollbar-thumb,
.finance-section:hover::-webkit-scrollbar-thumb,
.today-left:hover::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); }

/* LAYOUT */
.layout { display: flex; height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); background: var(--bg-sidebar);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  flex-shrink: 0; padding: 24px 0;
}
.sidebar-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 800; padding: 0 20px 28px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: var(--radius-sm); border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all 0.2s; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--border); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: var(--blue-bg); color: var(--blue); box-shadow: inset 0 0 0 1px var(--border-glow); }
.nav-item svg { flex-shrink: 0; transition: transform 0.2s; }
.nav-item.active svg { transform: scale(1.1); }

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; padding: 18px 20px; gap: 16px; min-width: 0; overflow: auto; }

/* HEADER */
.header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; padding-bottom: 4px; }
.header h1 { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.date-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 12px; }
.clock { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: -0.02em; }

.badge { display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 6px 12px;
  border-radius: 20px; border: 1px solid var(--border);
  color: var(--text-muted); background: var(--bg-card);
  cursor: pointer; transition: all 0.2s; position: relative;
}
.badge:hover { border-color: var(--border-em); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.badge.zammad { color: var(--amber); border-color: rgba(245,166,35,0.25); background: var(--amber-bg); }
.badge.zammad.connected { color: var(--amber); }
.zammad-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: white;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: none; align-items: center; justify-content: center;
  padding: 0 4px;
}

.theme-toggle {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; font-size: 16px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.theme-toggle:hover { border-color: var(--border-em); transform: rotate(20deg) scale(1.1); box-shadow: var(--shadow-sm); }

.logout-btn {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; font-size: 16px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.logout-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); transform: scale(1.1); }

/* PAGES */
.page { display: none; flex-direction: column; flex: 1; min-height: 0; }
.page.active { display: flex; }

/* WEEK GRID */
.week-grid { display: flex; gap: 14px; overflow-x: auto; flex: 1; min-height: 0; }
.week-grid-inner { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 1fr; gap: 14px; flex: 0 0 100%; min-width: 0; min-height: 0; align-items: stretch; height: 100%; }
.monthly-col { flex: 0 0 320px; }
.pending-col { flex: 0 0 280px; }

/* DAY COLUMN */
.day-col {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 0; overflow: hidden; transition: all 0.25s;
}
.day-col:hover { border-color: var(--border-em); }
.day-col.today { border-color: var(--border-glow); background: linear-gradient(180deg, var(--blue-glow), var(--bg-card) 40%); box-shadow: 0 0 0 1px var(--border-glow), var(--shadow-sm); }

.day-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.day-name { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.day-num { font-family: 'Outfit', sans-serif; font-size: 32px; font-weight: 800; line-height: 1; color: var(--text); letter-spacing: -0.03em; }
.day-col.today .day-name { color: var(--blue); font-weight: 800; }
.day-col.today .day-num { color: var(--blue); }
.today-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 6px; box-shadow: 0 0 10px var(--blue); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* SLOTS */
.slot-wrap { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.slot-header { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 6px 8px; border-bottom: 1px dashed var(--border); margin-bottom: 2px; }
.slot-label { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.slot-hint { font-size: 9px; color: var(--text-faint); font-weight: 500; }
.slot-divider { height: 1px; background: var(--border); margin: 8px 0; flex-shrink: 0; }

/* TASKS */
.slot-content { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; flex: 1; min-height: 0; }
.slot-content::-webkit-scrollbar { width: 4px; }
.slot-content::-webkit-scrollbar-thumb { background: var(--border-em); border-radius: 4px; }

.task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px;
  min-height: 42px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
  position: relative;
  overflow: hidden;
}
.task-item::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.02));
  pointer-events: none;
}
.task-item:hover {
  border-color: var(--border-em);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.task-item:last-child { margin-bottom: 0; }

.task-check {
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid var(--text-faint);
  cursor: pointer; background: transparent; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.task-check:hover { border-color: var(--green); background: var(--green-bg); }
.task-check.done { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(52,211,153,0.3); }
.task-check.done::after {
  content: ''; display: block; width: 10px; height: 6px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}
.task-text {
  font-size: 13px; font-weight: 500; color: var(--text);
  line-height: 1.45; flex: 1; word-break: break-word;
  font-family: 'Inter', sans-serif;
}
.task-text.done { text-decoration: line-through; color: var(--text-faint); }
.task-del {
  opacity: 0; font-size: 18px; color: var(--text-faint);
  cursor: pointer; padding: 0 4px; transition: all 0.2s;
  line-height: 1; border-radius: 4px;
}
.task-item:hover .task-del { opacity: 0.6; }
.task-del:hover { opacity: 1 !important; color: var(--red); background: var(--red-bg); }

.task-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 9px;
  font-weight: 700; color: white; cursor: pointer; flex-shrink: 0;
  transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.task-avatar:hover { transform: scale(1.15); }

.empty-msg {
  font-size: 11px; color: var(--text-faint); font-style: italic;
  padding: 8px 0; display: flex; align-items: center; gap: 6px;
}
.empty-msg::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); opacity: 0.4; }

/* TICKET PILL */
.ticket-pill {
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 11px; display: flex; flex-direction: column; gap: 3px;
  cursor: pointer; transition: all 0.25s;
  border: 1px solid rgba(245,166,35,0.15);
  position: relative; flex-shrink: 0; min-height: 65px;
}
.ticket-pill::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(245,166,35,0.05));
  pointer-events: none;
}
.ticket-pill:hover {
  border-color: rgba(245,166,35,0.3);
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.ticket-pill .tk-id { font-size: 10px; opacity: 0.6; font-weight: 600; }
.ticket-pill .tk-title { font-weight: 600; font-size: 12px; word-break: break-word; line-height: 1.3; }
.ticket-pill .tk-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; word-break: break-word; }
.ticket-pill .tk-assignee { font-size: 10px; opacity: 0.7; color: var(--text-muted); font-weight: 500; }

/* ADD TASK */
.add-task-row { display: flex; gap: 6px; padding-top: 10px; flex-shrink: 0; margin-top: auto; }
.add-task-row button {
  width: 100%; padding: 10px; border: 1px dashed var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 12px; font-weight: 600; border-radius: var(--radius-sm);
  transition: all 0.2s; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.add-task-row button:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.add-task-row button::before { content: '+'; font-size: 16px; font-weight: 300; }

/* SMOOTH TRANSITIONS */
.task-item, .today-task, .today-ticket, .recess-task {
  animation: task-fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: min-content;
}
.task-item.removing, .today-task.removing, .today-ticket.removing, .recess-task.removing {
  animation: task-fadeOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}
@keyframes task-fadeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes task-fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(8px); animation: fade-in 0.2s;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card); border: 1px solid var(--border-em);
  border-radius: var(--radius); width: 680px; max-width: 95vw;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: modal-slide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-slide { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-sm { width: 480px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
.modal-header span { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 16px; }
.modal-close {
  background: none; border: none; color: var(--text-muted); font-size: 20px;
  cursor: pointer; padding: 4px; border-radius: 6px; transition: all 0.2s;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-filters { display: flex; gap: 10px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.modal-filters input, .modal-filters select {
  font-size: 13px; padding: 8px 12px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-card2); color: var(--text); outline: none;
  font-family: 'Inter', sans-serif; transition: border-color 0.2s;
}
.modal-filters input:focus, .modal-filters select:focus { border-color: var(--blue); }

.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }

.ticket-list { overflow-y: auto; padding: 14px 24px; display: flex; flex-direction: column; gap: 8px; }
.loading { color: var(--text-muted); font-size: 13px; padding: 24px 0; text-align: center; }
.error-msg { color: var(--red); font-size: 13px; padding: 12px; background: var(--red-bg); border-radius: var(--radius-sm); }

.ticket-row {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: all 0.2s;
}
.ticket-row:hover { border-color: var(--amber); transform: translateX(2px); }
.ticket-row .tk-body { flex: 1; }
.ticket-row .tk-body .title { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.ticket-row .tk-body .meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.ticket-row .state-badge { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; }
.state-open { background: var(--blue-bg); color: var(--blue); }
.state-pending { background: var(--amber-bg); color: var(--amber); }
.state-other { background: var(--border); color: var(--text-muted); }

.add-to-day-btn {
  font-size: 11px; padding: 5px 10px; border-radius: var(--radius-xs);
  border: 1px solid var(--amber); color: var(--amber); background: transparent;
  cursor: pointer; white-space: nowrap; transition: all 0.2s; font-weight: 600;
}
.add-to-day-btn:hover { background: var(--amber-bg); }
.add-to-day-select {
  font-size: 11px; padding: 5px 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-card2); color: var(--text);
}

/* ASSIGN MENU */
.assign-menu {
  position: fixed; z-index: 200; background: var(--bg-card);
  border: 1px solid var(--border-em); border-radius: var(--radius-sm);
  padding: 6px; min-width: 180px; box-shadow: var(--shadow-lg);
  animation: menu-pop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes menu-pop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.assign-menu-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-xs); cursor: pointer; font-size: 13px; color: var(--text);
  transition: all 0.15s; font-weight: 500;
}
.assign-menu-item:hover { background: var(--bg-card2); }
.assign-menu-item .av {
  width: 22px; height: 22px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 9px;
  font-weight: 700; color: white; flex-shrink: 0;
}

/* HISTORY */
.history-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.htab {
  padding: 8px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.htab:hover { color: var(--text); border-color: var(--border-em); }
.htab.active { background: var(--blue-bg); color: var(--blue); border-color: var(--border-glow); }

.history-content { flex: 1; overflow-y: auto; }
.history-row {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.history-row:hover { background: var(--bg-card2); margin: 0 -12px; padding: 14px 12px; border-radius: var(--radius-xs); }
.hr-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.hr-body { flex: 1; }
.hr-title { font-weight: 600; font-size: 13px; margin-bottom: 6px; line-height: 1.4; }
.hr-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 16px; }
.hr-user { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); flex-shrink: 0; }
.av-sm {
  width: 24px; height: 24px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 9px;
  font-weight: 700; color: white; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* USERS PAGE */
.users-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.users-toolbar h2 { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; }
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.user-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; display: flex;
  flex-direction: column; align-items: center; gap: 14px;
  transition: all 0.25s;
}
.user-card:hover { border-color: var(--border-em); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.user-avatar {
  width: 52px; height: 52px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 20px;
  font-weight: 700; color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.user-info { text-align: center; }
.user-name { font-weight: 700; font-size: 15px; font-family: 'Outfit', sans-serif; }
.user-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.user-actions { display: flex; gap: 8px; }
.btn-icon {
  font-size: 11px; padding: 6px 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-weight: 600;
}
.btn-icon:hover { border-color: var(--border-em); color: var(--text); background: var(--bg-card2); }
.btn-icon.danger { color: var(--red); border-color: rgba(248,113,113,0.25); }
.btn-icon.danger:hover { background: var(--red-bg); }

/* FORM */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.form-group input[type="text"] {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-card2);
  color: var(--text); font-size: 13px; outline: none; font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.form-group input[type="text"]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.form-group textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-card2);
  color: var(--text); font-size: 13px; outline: none; font-family: 'Inter', sans-serif;
  transition: all 0.2s; resize: vertical;
}
.form-group textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.form-group select {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-card2);
  color: var(--text); font-size: 13px; outline: none; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: all 0.2s;
}
.form-group select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }

.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: all 0.2s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: white; box-shadow: 0 0 0 2px var(--blue), var(--shadow-sm); }

/* CONFIRM MODAL */
.confirm-modal { max-width: 380px; text-align: center; }
.confirm-message { font-size: 14px; color: var(--text); margin-bottom: 6px; line-height: 1.5; }
.confirm-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.btn-danger {
  padding: 10px 20px; border-radius: var(--radius-xs); border: none;
  background: var(--red); color: white; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(248,113,113,0.4); }

/* BUTTONS */
.btn-primary {
  padding: 10px 20px; border-radius: var(--radius-xs); border: none;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  padding: 10px 20px; border-radius: var(--radius-xs); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.btn-secondary:hover { border-color: var(--border-em); color: var(--text); background: var(--bg-card2); }

.hidden { display: none !important; }

/* DRAG & DROP */
.task-item.dragging { opacity: 0.4; border-style: dashed; transform: scale(0.95); }
.ticket-pill.dragging { opacity: 0.4; border-style: dashed; transform: scale(0.95); }
.drop-zone.drag-over { background: var(--blue-bg); border-radius: var(--radius-sm); outline: 2px dashed var(--blue); outline-offset: -4px; }
.task-item:hover { cursor: grab; }
.task-item:active { cursor: grabbing; }

/* TODAY PAGE */
.today-layout { display: grid; grid-template-columns: 70% 1fr; gap: 18px; flex: 1; min-height: 0; }
.today-left { display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.today-right { display: flex; flex-direction: column; gap: 18px; min-height: 0; }

.today-quote {
  text-align: center; padding: 14px 0; color: var(--text-faint);
  font-style: italic; font-size: 13px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px; font-family: 'Inter', sans-serif;
}

.today-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; transition: all 0.2s;
}
.today-section:hover { border-color: var(--border-em); }
.today-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 700; color: var(--text-muted);
  margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between;
}
.today-refresh { cursor: pointer; font-size: 16px; color: var(--text-faint); transition: color 0.2s; }
.today-refresh:hover { color: var(--blue); }

/* Today tasks */
.today-slot-group { margin-bottom: 18px; }
.today-slot-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px; font-weight: 700; color: var(--text-faint);
  margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.08em;
}
.today-task {
  padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all 0.25s;
  position: relative; overflow: hidden;
}
.today-task::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.02));
  pointer-events: none;
}
.today-task:hover { border-color: var(--border-em); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.today-task:last-child { margin-bottom: 0; }
.today-task-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.today-task-text { font-size: 13px; font-weight: 600; flex: 1; }
.today-task-close-btn {
  opacity: 0; font-size: 14px; color: var(--text-faint); cursor: pointer;
  padding: 4px; border-radius: 4px; transition: all 0.2s;
}
.today-task:hover .today-task-close-btn { opacity: 1; }
.today-task-close-btn:hover { background: var(--bg-card2); color: var(--text); }
.today-task-desc { font-size: 12px; color: var(--text-muted); margin: 6px 0 0 26px; font-style: italic; line-height: 1.5; }
.today-task-empty { font-size: 12px; color: var(--text-faint); font-style: italic; }

/* Today pinned tickets */
.today-ticket {
  padding: 14px 16px; margin-bottom: 10px;
  border-radius: var(--radius-sm); transition: all 0.25s;
  border: 1px solid; position: relative; overflow: hidden;
}
.today-ticket:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.today-ticket:last-child { margin-bottom: 0; }
.today-ticket-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.today-ticket-id { font-size: 11px; font-weight: 700; }
.today-ticket-title { font-size: 13px; font-weight: 600; flex: 1; }
.today-ticket-body { font-size: 12px; color: var(--text-muted); margin: 8px 0 0 0; line-height: 1.5; max-height: 60px; overflow: hidden; }

/* Sports */
.sports-section { flex: 3; overflow-y: auto; }
.sports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sport-card {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; transition: all 0.2s;
}
.sport-card:hover { border-color: var(--border-em); }
.sport-card.sport-priority {
  border-color: rgba(245,166,35,0.35);
  background: linear-gradient(135deg, var(--bg-card2), rgba(245,166,35,0.06));
  box-shadow: 0 0 0 1px rgba(245,166,35,0.15), var(--shadow-sm);
}
.sport-card.sport-priority:hover {
  border-color: rgba(245,166,35,0.5);
  box-shadow: 0 0 0 1px rgba(245,166,35,0.25), var(--shadow-md);
}
.priority-badge {
  font-size: 9px; font-weight: 800; padding: 2px 8px;
  border-radius: 4px; display: inline-block; margin-right: 4px;
  background: rgba(245,166,35,0.15); color: var(--amber);
}
.priority-badge.live { background: rgba(248,113,113,0.15); color: var(--red); animation: pulse-badge 2s infinite; }
@keyframes pulse-badge { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.sport-league { font-size: 10px; color: var(--text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.sport-match { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sport-team { display: flex; align-items: center; gap: 8px; flex: 1; }
.sport-team.away { flex-direction: row-reverse; text-align: right; }
.sport-logo { width: 28px; height: 28px; flex-shrink: 0; }
.sport-team-name { font-size: 12px; font-weight: 600; }
.sport-score { font-size: 20px; font-weight: 800; color: var(--text); min-width: 24px; text-align: center; font-family: 'Outfit', sans-serif; }
.sport-status { text-align: center; font-size: 10px; color: var(--text-muted); margin-top: 8px; font-weight: 600; }
.sport-status.live { color: var(--red); font-weight: 700; }
.sport-no-events { grid-column: 1 / -1; text-align: center; color: var(--text-faint); padding: 40px 0; font-size: 13px; }
.sport-section-header { margin: 14px 0 10px; }
.sport-section-header:first-child { margin-top: 0; }
.sport-section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.f1-card { background: linear-gradient(135deg, var(--bg-card2), rgba(248,113,113,0.06)); border-color: rgba(248,113,113,0.2); }

/* Finance */
.finance-section { flex: 1; overflow-y: auto; }
.finance-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.ftab {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 11px; font-weight: 600; transition: all 0.2s;
}
.ftab:hover { color: var(--text); border-color: var(--border-em); }
.ftab.active { background: var(--blue-bg); color: var(--blue); border-color: var(--border-glow); }
.finance-table { width: 100%; }
.finance-row { display: grid; grid-template-columns: 30px 1fr 70px 80px; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: center; font-size: 12px; }
.finance-row:last-child { border-bottom: none; }
.finance-symbol { font-weight: 700; font-size: 11px; color: var(--text-muted); }
.finance-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finance-price { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.finance-change { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.finance-change.up { color: var(--green); }
.finance-change.down { color: var(--red); }

/* Task Modal */
#task-modal .modal-body select {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--bg-card2); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 13px; cursor: pointer;
}

.finance-empty { text-align: center; color: var(--text-faint); padding: 24px 0; font-size: 12px; }

/* SHOPPING PAGE */
.shopping-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.shopping-toolbar h2 { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; }

.shopping-stats { display: flex; gap: 14px; margin-bottom: 18px; }
.shopping-stat {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; text-align: center;
  transition: all 0.2s;
}
.shopping-stat:hover { border-color: var(--border-em); transform: translateY(-1px); }
.shopping-stat-value { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; }
.shopping-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.shopping-stat.pending .shopping-stat-value { color: var(--amber); }
.shopping-stat.purchased .shopping-stat-value { color: var(--green); }
.shopping-stat.total .shopping-stat-value { color: var(--blue); }

.shopping-list { display: flex; flex-direction: column; gap: 10px; }
.shopping-item {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all 0.25s;
}
.shopping-item:hover { border-color: var(--border-em); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.shopping-item.purchased { opacity: 0.6; }
.shopping-item.purchased .shopping-item-name { text-decoration: line-through; color: var(--text-faint); }

.shopping-priority { width: 4px; height: 40px; border-radius: 2px; flex-shrink: 0; }
.shopping-priority.high { background: var(--red); }
.shopping-priority.medium { background: var(--amber); }
.shopping-priority.low { background: var(--green); }

.shopping-item-info { flex: 1; min-width: 0; }
.shopping-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; font-family: 'Inter', sans-serif; }
.shopping-item-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.shopping-item-category { background: var(--bg-card2); padding: 3px 10px; border-radius: 4px; font-weight: 600; }
.shopping-item-notes { font-size: 11px; color: var(--text-faint); margin-top: 6px; font-style: italic; }

.shopping-item-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.shopping-buy-btn {
  padding: 7px 16px; border-radius: var(--radius-xs); border: 1px solid var(--green);
  background: var(--green-bg); color: var(--green); cursor: pointer;
  font-size: 11px; font-weight: 700; transition: all 0.2s;
}
.shopping-buy-btn:hover { background: var(--green); color: white; box-shadow: 0 2px 8px rgba(52,211,153,0.3); }
.shopping-unbuy-btn {
  padding: 7px 16px; border-radius: var(--radius-xs); border: 1px solid var(--text-faint);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 11px; font-weight: 600; transition: all 0.2s;
}
.shopping-unbuy-btn:hover { border-color: var(--amber); color: var(--amber); }

.shopping-stores { display: flex; gap: 6px; margin-top: 8px; }
.store-link {
  font-size: 10px; padding: 4px 10px; border-radius: 4px;
  background: var(--bg-card2); color: var(--text-muted); text-decoration: none;
  border: 1px solid var(--border); transition: all 0.2s; font-weight: 600;
}
.store-link:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }

.shopping-empty { text-align: center; padding: 48px; color: var(--text-faint); }

/* RECESOS PAGE */
.recessos-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.recessos-header h2 { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; }
.recessos-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.rtab {
  padding: 9px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.rtab:hover { border-color: var(--border-em); color: var(--text); }
.rtab.active { background: var(--blue-bg); color: var(--blue); border-color: var(--border-glow); box-shadow: 0 2px 8px var(--blue-bg); }
.recess-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.recess-col {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; transition: all 0.2s;
}
.recess-col:hover { border-color: var(--border-em); }
.recess-col-header {
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.recess-slot { margin-bottom: 14px; }
.recess-slot.drag-over { background: var(--blue-bg); border-radius: var(--radius-sm); outline: 2px dashed var(--blue); outline-offset: -4px; }
.recess-slot-label { font-size: 11px; font-weight: 700; color: var(--text-faint); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.recess-task {
  padding: 10px 12px; margin-bottom: 8px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; display: flex;
  align-items: center; gap: 10px; cursor: grab; transition: all 0.2s;
}
.recess-task:hover { border-color: var(--border-em); transform: translateX(2px); }
.recess-task:active { cursor: grabbing; }
.recess-task.dragging { opacity: 0.5; }
.recess-task:last-child { margin-bottom: 0; }
.recess-task-text { flex: 1; font-weight: 500; }
.recess-empty { font-size: 11px; color: var(--text-faint); font-style: italic; }

/* Weekly tasks page */
.weekly-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.weekly-header h2 { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; }
.weekly-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; flex: 1; min-height: 0; }
.weekly-col {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 8px; min-height: 0;
}
.weekly-col-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.weekly-col-name { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.weekly-tasks-wrap { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow-y: auto; }
.weekly-task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; min-height: 38px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 12px; cursor: pointer;
  transition: all 0.2s;
}
.weekly-task-item:hover { border-color: var(--border-em); }
.weekly-task-item:hover .task-del { opacity: 0.6; }
.weekly-task-item .wt-text { flex: 1; font-weight: 500; }
.weekly-task-item .wt-check { width: 16px; height: 16px; border-radius: 3px; border: 2px solid var(--text-faint); cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.weekly-task-item.completed { opacity: 0.4; }
.weekly-task-item.completed .wt-check { background: var(--green); border-color: var(--green); }
.weekly-add-btn { padding: 8px; border: 1px dashed var(--border); background: transparent; color: var(--text-muted); cursor: pointer; font-size: 11px; border-radius: var(--radius-sm); width: 100%; margin-top: auto; }

/* Monthly column in week grid */
.monthly-col { background: linear-gradient(180deg, var(--purple-bg), var(--bg-card) 50%); border-color: rgba(167,139,250,0.2); }
.monthly-col .day-header { background: transparent; border-bottom: 1px solid rgba(167,139,250,0.15); }

/* ===== MOBILE RESPONSIVE ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .layout { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 900px) {
  /* Layout: full column */
  .layout { flex-direction: column; }

  /* ===== GLASS MORPHISM BOTTOM NAV ===== */
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    width: 100% !important;
    flex-direction: row !important;
    padding: 4px 0 !important;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)) !important;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(17,20,32,0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    justify-content: center;
    gap: 0 !important;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
  }
  body.light .sidebar {
    background: rgba(255,255,255,0.78);
    border-top-color: rgba(0,0,0,0.06);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  }
  .sidebar-logo { display: none; }
  .sidebar-nav {
    flex-direction: row !important;
    gap: 0 !important;
    width: 100%;
    max-width: 100%;
    justify-content: space-evenly;
  }
  .nav-item {
    padding: 6px 4px !important;
    flex-direction: column !important;
    gap: 2px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-item span {
    display: block !important;
    font-size: 9px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-item svg { width: 20px !important; height: 20px !important; }
  .nav-item:hover {
    background: rgba(255,255,255,0.06) !important;
    transform: none !important;
  }
  .nav-item.active {
    background: rgba(74,158,255,0.12) !important;
    color: var(--blue) !important;
    box-shadow: none !important;
  }
  .nav-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 2px;
    background: var(--blue);
    border-radius: 0 0 2px 2px;
  }

  .main {
    padding: 14px 10px !important;
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* HEADER */
  .header { flex-wrap: wrap; gap: 8px; }
  .header h1 { font-size: 16px !important; }
  .header-left { flex: 1; min-width: 0; }
  .header-right { display: flex; gap: 6px !important; }
  .clock { font-size: 16px !important; }
  .theme-toggle, .logout-btn { width: 36px; height: 36px; min-width: 36px; }

  .week-grid {
    flex-direction: column !important;
    overflow: visible !important;
    scroll-snap-type: none;
    gap: 14px;
  }
  .week-grid-inner {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    width: 100% !important;
    flex: none !important;
    align-items: stretch;
    padding-bottom: 8px;
  }
  .day-col {
    flex: 0 0 88vw !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 280px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
  }
  .day-num { font-size: 28px !important; }
  .day-name { font-size: 11px !important; }

  /* Hide monthly/pending columns from scroll row */
  .week-grid > .monthly-col,
  .week-grid > .pending-col {
    display: none !important;
  }

  .week-mobile-tabs {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    width: 100%;
  }
  .week-mobile-tab {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    text-align: center;
  }
  .week-mobile-tab:hover {
    border-color: var(--border-em);
    color: var(--text);
  }
  .week-mobile-tab.active {
    background: var(--blue-bg);
    color: var(--blue);
    border-color: var(--border-glow);
  }
  .week-mobile-panel {
    min-height: 300px;
    max-height: none;
    overflow-y: auto;
    width: 100%;
    flex-shrink: 0;
  }
  .week-mobile-panel .day-col {
    flex: none !important;
    width: 100% !important;
    max-height: none !important;
    min-height: auto;
  }
  .week-mobile-panel .monthly-col,
  .week-mobile-panel .pending-col {
    display: flex !important;
    flex-direction: column;
    flex: none !important;
    width: 100% !important;
  }
  .week-mobile-panel .monthly-col { background: linear-gradient(180deg, rgba(167,139,250,0.08), var(--bg-card)) !important; }
  .week-mobile-panel .pending-col { background: linear-gradient(180deg, rgba(245,166,35,0.08), var(--bg-card)) !important; }
  .week-mobile-panel-content { display: block; }

  /* Slot styling */
  .slot-header { padding: 4px 6px 6px !important; }
  .slot-label { font-size: 10px !important; }
  .slot-content { gap: 6px !important; padding: 4px !important; }

  /* Ticket pill */
  .ticket-pill { padding: 8px 10px !important; }
  .ticket-pill .tk-title { font-size: 11px !important; }
  .ticket-pill .tk-id { font-size: 9px !important; }

  /* Task item */
  .task-item { padding: 10px !important; }
  .task-text { font-size: 12px !important; }
  .task-avatar { width: 20px !important; height: 20px !important; }
  .task-del { opacity: 0.4; }

  /* Add task button */
  .add-task-row button { padding: 10px !important; font-size: 11px !important; }

  /* Today page */
  .today-layout { grid-template-columns: 1fr !important; gap: 12px !important; }
  .today-section { padding: 14px !important; }
  .today-section-title { font-size: 13px !important; }
  .today-quote { font-size: 11px !important; padding: 10px !important; }

  /* Sports & Finance */
  .sports-section, .finance-section { min-height: auto; }
  .sports-grid { grid-template-columns: 1fr !important; }

  /* History */
  .history-tabs { flex-wrap: wrap; gap: 6px !important; }
  .htab { padding: 8px 12px !important; font-size: 12px !important; }
  .history-row { padding: 10px !important; }
  .hr-title { font-size: 12px !important; }
  .hr-meta { font-size: 10px !important; }

  /* Users */
  .users-toolbar { flex-direction: column; gap: 10px !important; align-items: stretch; }
  .users-grid { grid-template-columns: 1fr !important; }
  .user-card { padding: 14px !important; }
  .user-avatar { width: 44px !important; height: 44px !important; font-size: 16px !important; }
  .user-name { font-size: 14px !important; }

  /* Shopping */
  .shopping-toolbar { flex-direction: column; gap: 10px !important; }
  .shopping-stats { flex-wrap: wrap; }
  .shopping-stat { min-width: 80px; padding: 10px !important; }
  .shopping-stat-value { font-size: 18px !important; }
  .shopping-item { flex-direction: column; align-items: flex-start !important; gap: 8px !important; }
  .shopping-item-actions { width: 100%; justify-content: flex-end; }

  /* Recess */
  .recessos-header { flex-direction: column; gap: 10px !important; }
  .recessos-tabs { flex-wrap: wrap; }
  .rtab { padding: 8px 14px !important; font-size: 12px !important; }
  .recess-grid { grid-template-columns: 1fr !important; }

  /* ===== MODALS - iOS-style bottom sheet on mobile ===== */
  .modal-overlay {
    align-items: flex-end !important;
  }
  .modal {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 92vh !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    margin: 0 !important;
    animation: sheet-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-em);
    margin: 8px auto 4px;
    flex-shrink: 0;
  }
  .modal-header { padding: 10px 16px 12px !important; }
  .modal-body { padding: 12px 16px !important; }
  .modal-footer { padding: 12px 16px !important; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; }

  @keyframes sheet-slide-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Form elements - bigger touch targets */
  .form-group { margin-bottom: 14px !important; }
  .form-group input, .form-group select, .form-group textarea {
    padding: 12px 14px !important; font-size: 16px !important;
    min-height: 48px;
  }
  .form-group label { font-size: 11px !important; }

  /* Buttons - bigger touch targets */
  .btn-primary, .btn-secondary {
    padding: 12px 20px !important;
    font-size: 14px !important;
    min-height: 48px;
  }

  /* Zammad badge */
  .zammad-count {
    min-width: 14px !important; height: 14px !important;
    font-size: 8px !important; top: -6px !important; right: -6px !important;
  }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 480px) {
  .main { padding: 10px 6px !important; }
  .day-col { padding: 10px !important; }
  .day-num { font-size: 20px !important; }
  .header h1 { font-size: 14px !important; }
  .clock { font-size: 14px !important; }
  .modal { padding: 0 !important; }
  .shopping-stat-value { font-size: 16px !important; }

  /* Nav items even more compact */
  .nav-item { padding: 6px 0 !important; }
  .nav-item span { font-size: 9px !important; }
  .nav-item svg { width: 18px !important; height: 18px !important; }
}
