* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #0a0a0a;
  --surface: #161618;
  --surface2: #1e1e21;
  --border: #252528;
  --text: #f2f2f5;
  --text2: #66667a;
  --accent: #d4f000;
  --accent-dark: #0a0a0a;
  --green: #34d365;
  --green-dim: rgba(52,211,101,0.12);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.12);
  --orange: #f97316;
  --orange-dim: rgba(249,115,22,0.12);
  --blue: #5b9cf6;
  --blue-dim: rgba(91,156,246,0.12);
  --purple: #a78bfa;
  --purple-dim: rgba(167,139,250,0.12);
  --radius: 18px;
  --nav-h: 72px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', sans-serif;
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* SCREEN CONTAINER & ROUTING */
.app-screen {
  display: none;
}
.app-screen.active {
  display: block;
}

.scroll-area { 
  padding: 0 14px calc(var(--nav-h) + 20px); 
}

/* HEADER */
.header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 16px 14px;
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.user-info { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--accent-dark);
  flex-shrink: 0;
}
.user-greeting { font-size: 12px; color: var(--text2); margin-bottom: 2px; }
.user-name { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; line-height: 1; }

.more-wrap { position: relative; }
.more-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2); font-size: 20px;
}
.dropdown {
  position: absolute; top: 46px; right: 0;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  min-width: 170px; z-index: 100;
  display: none; box-shadow: 0 12px 32px rgba(0,0,0,.6);
}
.dropdown.open { display: block; }
.drop-item { padding: 12px 16px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.drop-item:active { background: var(--border); }

/* BUTTONS */
.back-btn {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; font-size: 18px; color: var(--text2);
}
.back-btn:active { background: var(--surface2); }

.new-btn {
  height: 36px; padding: 0 14px;
  background: var(--accent); border: none; border-radius: 11px;
  font-size: 13px; font-weight: 700; color: var(--accent-dark);
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.new-btn:active { opacity: .85; transform: scale(.96); }

.add-btn {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px; color: var(--accent-dark);
  font-weight: 700; line-height: 1;
}
.add-btn:active { opacity: .85; transform: scale(.94); }

.stop-btn {
  font-size: 11px; font-weight: 700; color: var(--red);
  background: var(--red-dim); border: none; border-radius: 7px;
  padding: 4px 10px; cursor: pointer; margin-left: 10px;
  flex-shrink: 0;
}
.stop-btn:active { opacity: .7; }

.run-btn {
  width: 100%; height: 46px; margin-top: 10px;
  background: var(--accent); border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; color: var(--accent-dark);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.run-btn:active { opacity: .85; transform: scale(.98); }
.run-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.refresh-btn {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.refresh-btn svg {
  width: 16px; height: 16px; stroke: var(--text2); fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.6s ease;
}
.refresh-btn.spinning svg { transform: transform 0.8s ease; transform: rotate(360deg); }
.refresh-btn:active { background: var(--surface2); }

/* WIDGETS & HERO */
.expenses-widget {
  margin: 0 0 18px;
  background: var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  position: relative; overflow: hidden;
}
.exp-label {
  font-size: 11px; font-weight: 700; color: rgba(0,0,0,0.45);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px;
}
.exp-row { display: flex; align-items: flex-end; justify-content: space-between; }
.exp-amount {
  font-size: 38px; font-weight: 800; color: var(--accent-dark);
  letter-spacing: -1.5px; line-height: 1;
}
.exp-amount sup { font-size: 18px; vertical-align: super; font-weight: 700; }
.exp-amount .currency { font-size: 16px; font-weight: 600; margin-left: 4px; opacity: .6; }

.exp-refresh-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(0,0,0,0.12);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s;
}
.exp-refresh-btn:active { background: rgba(0,0,0,0.22); }
.exp-refresh-btn svg {
  width: 18px; height: 18px;
  stroke: rgba(0,0,0,0.55); fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .4s;
}
.exp-refresh-btn.spinning svg { transform: rotate(360deg); }

.exp-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.exp-source { font-size: 12px; color: rgba(0,0,0,0.45); }
.exp-delta { font-size: 13px; font-weight: 700; color: rgba(0,0,0,0.55); }

.exp-amount.loading { opacity: .4; }
.exp-skeleton {
  display: none;
  height: 38px; width: 180px;
  background: rgba(0,0,0,0.1);
  border-radius: 8px;
  animation: pulse .8s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: .5 } to { opacity: 1 } }
.exp-skeleton.visible { display: block; }

.hero {
  background: var(--accent);
  margin: 0;
  padding: 20px 20px 24px;
  position: relative; overflow: hidden;
}
.hero-label {
  font-size: 11px; font-weight: 700; color: rgba(0,0,0,0.45);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px;
}
.hero-amount {
  font-size: 44px; font-weight: 800; color: var(--accent-dark);
  letter-spacing: -2px; line-height: 1; margin-bottom: 8px;
}
.hero-amount sup { font-size: 22px; vertical-align: super; font-weight: 700; letter-spacing: 0; }
.hero-meta {
  display: flex; align-items: center; gap: 10px;
}
.hero-source { font-size: 13px; color: rgba(0,0,0,0.45); }
.hero-delta {
  font-size: 13px; font-weight: 700;
  background: rgba(0,0,0,0.1); padding: 3px 8px; border-radius: 7px;
  color: rgba(0,0,0,0.6);
}

/* SECTION HEADERS & TITLES */
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; margin: 0 0 12px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-more { font-size: 13px; color: var(--text2); cursor: pointer; }
.section-wrap { padding: 20px 14px 0; }
.section-count { font-size: 13px; color: var(--text2); }

/* GRID SYSTEMS */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* TOOL CARD */
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: transform .12s; position: relative; overflow: hidden;
  min-height: 110px; display: flex; flex-direction: column; justify-content: space-between;
}
.tool-card:active { transform: scale(.96); }
.tool-card.wide { grid-column: span 2; min-height: auto; flex-direction: row; align-items: center; gap: 14px; }
.tool-icon-wrap {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.tool-bottom { display: flex; flex-direction: column; gap: 2px; }
.tool-name { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.tool-sub { font-size: 12px; color: var(--text2); }
.tool-wide-body { flex: 1; min-width: 0; }
.tool-wide-body .tool-name { font-size: 16px; }
.tool-badge {
  position: absolute; top: 12px; right: 12px;
  border-radius: 8px; padding: 3px 7px;
  font-size: 11px; font-weight: 600;
}
.tb-online { background: rgba(52,211,101,0.15); color: #34d365; }
.tb-count  { background: var(--surface2); color: var(--text2); }
.tb-events { background: rgba(212,240,0,0.12); color: var(--accent); position: static; margin-left: auto; }

/* STAT CARD */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-val { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.stat-val.green { color: var(--green); }
.stat-val.orange { color: var(--orange); }
.stat-val.default { color: var(--text); }
.stat-label { font-size: 11px; color: var(--text2); font-weight: 500; }

/* TASK CARD */
.task-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.task-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; transition: transform .1s;
  position: relative; overflow: hidden;
}
.task-card:active { transform: scale(.98); }
.task-card.running { border-color: rgba(212,240,0,0.2); }
.task-card.done    { border-color: rgba(52,211,101,0.15); }
.task-card.error   { border-color: rgba(248,113,113,0.15); }

/* progress bar for running task card */
.task-card.running::before {
  content: '';
  position: absolute; bottom: 0; left: 0;
  height: 2px; background: var(--accent);
  animation: progress-bar 2.4s ease-in-out infinite;
}
@keyframes progress-bar {
  0%   { width: 15%; opacity: 1; }
  50%  { width: 75%; opacity: 1; }
  100% { width: 15%; opacity: 1; }
}

.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.task-name { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; flex: 1; }
.task-status {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px;
  flex-shrink: 0; white-space: nowrap;
}
.ts-running { background: rgba(212,240,0,0.12); color: var(--accent); }
.ts-done    { background: var(--green-dim); color: var(--green); }
.ts-error   { background: var(--red-dim); color: var(--red); }
.ts-queued  { background: var(--surface2); color: var(--text2); }

.task-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-meta-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text2);
}
.task-meta-item .dot {
  width: 3px; height: 3px; border-radius: 50%; background: var(--border);
}

.task-result {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.task-result-text { font-size: 13px; color: var(--text2); }
.task-result-count {
  font-size: 13px; font-weight: 700; color: var(--green);
  background: var(--green-dim); padding: 3px 9px; border-radius: 7px;
}
.task-result-err { font-size: 13px; color: var(--red); }

.running-detail {
  margin-top: 10px; padding: 10px 12px;
  background: var(--surface2); border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.running-text { font-size: 12px; color: var(--text2); }
.running-count { font-size: 12px; font-weight: 700; color: var(--accent); }

/* AGENT VIEWS SPECIFIC */
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.status-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  position: relative; overflow: hidden;
}
.status-card.online  { border-color: rgba(52,211,101,0.2); }
.status-card.offline { border-color: rgba(248,113,113,0.15); }
.sc-icon { font-size: 24px; margin-bottom: 8px; }
.sc-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.sc-desc { font-size: 11px; color: var(--text2); margin-bottom: 10px; line-height: 1.4; }
.sc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px;
}
.sc-badge.online  { background: var(--green-dim); color: var(--green); }
.sc-badge.offline { background: var(--red-dim);   color: var(--red); }
.sc-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sc-dot.pulse { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.input-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  margin-bottom: 12px;
}
.agent-select { display: flex; gap: 6px; margin-bottom: 12px; }
.agent-opt {
  flex: 1; padding: 8px 0; border-radius: 10px; text-align: center;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border);
  transition: all .15s;
}
.agent-opt.selected { background: rgba(212,240,0,0.1); color: var(--accent); border-color: rgba(212,240,0,0.25); }
.agent-opt:active { opacity: .7; }

.task-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  font-size: 14px; color: var(--text); outline: none;
  font-family: inherit; resize: none; min-height: 70px;
  line-height: 1.5;
}
.task-input:focus { border-color: rgba(212,240,0,0.4); }
.task-input::placeholder { color: var(--text2); }

.running-card {
  background: var(--surface); border: 1px solid rgba(212,240,0,0.2);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 20px; display: none;
  position: relative; overflow: hidden;
}
.running-card.visible { display: block; }
.running-card::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  height: 2px; background: var(--accent);
  animation: progress 2s ease-in-out infinite;
}
.rc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rc-label { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.rc-task { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.rc-step { font-size: 12px; color: var(--text2); }

.tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tc-name { font-size: 14px; font-weight: 600; flex: 1; line-height: 1.3; }
.tc-tags { display: flex; gap: 5px; flex-shrink: 0; }
.tc-tag {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .3px;
}
.tag-chrome { background: var(--blue-dim);   color: var(--blue); }
.tag-vps    { background: var(--purple-dim); color: var(--purple); }
.tag-done   { background: var(--green-dim);  color: var(--green); }
.tag-error  { background: var(--red-dim);    color: var(--red); }
.tc-meta { display: flex; align-items: center; justify-content: space-between; }
.tc-result { font-size: 12px; color: var(--text2); }
.tc-time   { font-size: 12px; color: var(--text2); }

.tc-expand {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  display: none;
}
.tc-expand.open { display: block; }
.result-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.result-item:last-child { border-bottom: none; }
.result-num { color: var(--text2); flex-shrink: 0; width: 18px; }
.result-text { flex: 1; line-height: 1.4; }
.result-link { font-size: 11px; color: var(--blue); margin-top: 2px; }

/* HISTORY (HOME) */
.history-list { display: flex; flex-direction: column; }
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.history-item:last-child { border-bottom: none; }
.h-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.ic-agent   { background: rgba(91,156,246,0.15); }
.ic-search  { background: rgba(167,139,250,0.15); }
.ic-summary { background: rgba(212,240,0,0.12); }
.ic-parse   { background: rgba(52,214,140,0.15); }
.ic-analyze { background: rgba(249,115,22,0.15); }
.h-body { flex: 1; min-width: 0; }
.h-top { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.h-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htag { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .5px; }
.ht-agent   { background: rgba(91,156,246,0.15);  color: #5b9cf6; }
.ht-search  { background: rgba(167,139,250,0.15); color: #a78bfa; }
.ht-summary { background: rgba(212,240,0,0.12);   color: var(--accent); }
.ht-parse   { background: rgba(52,214,140,0.15);  color: #34d365; }
.ht-analyze { background: rgba(249,115,22,0.15);  color: #f97316; }
.h-meta { font-size: 12px; color: var(--text2); }
.h-time { font-size: 12px; color: var(--text2); flex-shrink: 0; }

/* EXPENSE ITEM (EXPENSES VIEW) */
.month-tabs {
  display: flex; gap: 0;
  overflow-x: auto; padding: 14px 14px 0;
  scrollbar-width: none;
}
.month-tabs::-webkit-scrollbar { display: none; }
.month-tab {
  flex-shrink: 0; padding: 7px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border-radius: 10px; color: var(--text2);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.month-tab.active { background: var(--surface2); color: var(--text); }
.month-tab:active { opacity: .7; }

.chart-wrap { padding: 16px 14px 0; }
.chart-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 14px 10px;
}
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--text2); }
.chart-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); }
.chart-legend-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

.bars-area { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.bar { width: 100%; border-radius: 5px 5px 0 0; background: var(--surface2); transition: background .15s; min-height: 4px; }
.bar-col.active .bar { background: var(--accent); }
.bar-col:not(.active):hover .bar { background: var(--border); }
.bar-label { font-size: 10px; color: var(--text2); font-weight: 500; }
.bar-col.active .bar-label { color: var(--accent); font-weight: 700; }

.expense-list { display: flex; flex-direction: column; gap: 2px; }
.expense-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.expense-item:last-child { border-bottom: none; }
.exp-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.exp-body { flex: 1; min-width: 0; }
.exp-name { font-size: 14px; font-weight: 500; }
.exp-date { font-size: 12px; color: var(--text2); margin-top: 2px; }
.exp-amount-col { text-align: right; flex-shrink: 0; }
.exp-sum { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.exp-currency { font-size: 11px; color: var(--text2); margin-top: 1px; }

/* CALENDAR EVENTS VIEW */
.month-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 12px; }
.month-name { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.month-arrows { display: flex; gap: 6px; }
.arrow-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; color: var(--text2);
}
.arrow-btn:active { background: var(--surface2); }

.cal-grid {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 12px 10px; margin-bottom: 20px;
}
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
.weekday { text-align: center; font-size: 11px; font-weight: 700; color: var(--text2); padding: 4px 0; text-transform: uppercase; letter-spacing: .4px; }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.day-cell {
  aspect-ratio: 1; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; gap: 3px; transition: background .12s;
}
.day-cell:active { background: var(--surface2); }
.day-cell.empty { cursor: default; }
.day-cell.today .day-num {
  background: var(--accent); color: var(--accent-dark);
  width: 28px; height: 28px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.day-cell.selected:not(.today) { background: var(--surface2); }
.day-cell.other-month .day-num { color: var(--border); }
.day-num { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1; }
.day-dots { display: flex; gap: 2px; }
.day-dot { width: 4px; height: 4px; border-radius: 50%; }

.events-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.event-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; gap: 14px; align-items: flex-start;
  cursor: pointer; transition: transform .1s; position: relative; overflow: hidden;
}
.event-card:active { transform: scale(.98); }
.event-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0 2px 2px 0; }
.event-card.blue::before   { background: var(--blue); }
.event-card.green::before  { background: var(--green); }
.event-card.orange::before { background: var(--orange); }
.event-card.purple::before { background: var(--purple); }

.event-time-col { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; width: 42px; }
.event-time { font-size: 13px; font-weight: 700; letter-spacing: -0.2px; }
.event-end-time { font-size: 11px; color: var(--text2); }
.event-dot-line { width: 1px; flex: 1; min-height: 16px; background: var(--border); margin: 2px 0; }
.event-body { flex: 1; min-width: 0; }
.event-name { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; margin-bottom: 4px; }
.event-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.event-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag-blue   { background: var(--blue-dim);   color: var(--blue); }
.tag-green  { background: var(--green-dim);  color: var(--green); }
.tag-orange { background: var(--orange-dim); color: var(--orange); }
.tag-purple { background: var(--purple-dim); color: var(--purple); }

.empty-day, .empty-state { text-align: center; padding: 28px 20px; color: var(--text2); font-size: 14px; }
.empty-icon { font-size: 32px; margin-bottom: 8px; }

/* SHEETS & OVERLAYS */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 80; display: none; align-items: flex-end;
  backdrop-filter: blur(4px);
}
.sheet-overlay.open { display: flex; }
.sheet {
  width: 100%; max-width: 430px; margin: 0 auto;
  background: var(--surface2); border-radius: 24px 24px 0 0;
  padding: 12px 20px 40px;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,1,.23,1);
}
.sheet-overlay.open .sheet { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }
.sheet-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; letter-spacing: -0.3px; }

.input-group { margin-bottom: 14px; }
.input-label { font-size: 12px; color: var(--text2); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.input-field {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  font-size: 15px; color: var(--text); outline: none; font-family: inherit;
}
.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: var(--text2); }

.source-opt {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px;
  font-size: 13px; cursor: pointer; text-align: center;
  transition: border-color .15s;
}
.source-opt.selected { border-color: var(--accent); color: var(--accent); }
.source-opt:active { background: var(--surface); }

.color-row { display: flex; gap: 10px; }
.color-opt {
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s;
}
.color-opt.selected { border-color: var(--text); }

.sheet-submit {
  width: 100%; height: 50px; margin-top: 6px;
  background: var(--accent); border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; color: var(--accent-dark); cursor: pointer;
}
.sheet-submit:active { opacity: .85; }

/* BOTTOM NAVIGATION BAR */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: var(--nav-h);
  background: rgba(10,10,10,.95); backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 10px 10px; z-index: 50;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; cursor: pointer; padding: 6px 0; opacity: .4;
  color: var(--text); text-decoration: none;
}
.nav-item.active { opacity: 1; }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 600; }
.nav-item.active .nav-label { color: var(--accent); }
.nav-center {
  width: 52px; height: 52px; border-radius: 17px;
  background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-bottom: 8px;
}
.nav-center svg { width: 24px; height: 24px; stroke: #0a0a0a; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
