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

:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #888;
  --border: rgba(0,0,0,0.06);
  --green: #2d7a14;
  --green-light: #e8f5e0;
  --amber: #a05c00;
  --amber-light: #fff3d6;
  --red: #cc3333;
  --blue: #2563eb;
  --blue-light: #e5f0ff;
  --purple: #7c3aed;
  --purple-light: #f3e8ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 1023px) {
  body {
    max-width: 430px;
    margin: 0 auto;
  }
}

.app { flex: 1; display: flex; flex-direction: column; padding-bottom: 90px; }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 10px; }
.logo { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.logo span { color: var(--text-muted); font-weight: 400; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d1d1d6; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #555; }
.back-btn { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.page-title { font-size: 16px; font-weight: 600; color: var(--text); }

.content { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.hero-card { margin: 0 16px; background: #1a1a1a; border-radius: 24px; padding: 22px 20px; color: white; position: relative; overflow: hidden; }
.hero-glow { position: absolute; top: -40px; right: -30px; width: 140px; height: 140px; background: rgba(255,255,255,0.04); border-radius: 50%; pointer-events: none; }
.hero-label { font-size: 11px; opacity: 0.45; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.hero-amount { font-size: 40px; font-weight: 700; letter-spacing: -2px; margin-bottom: 4px; }
.hero-change { font-size: 13px; color: #4cd964; margin-bottom: 18px; }
.hero-pills { display: flex; gap: 8px; }
.hero-pill { background: rgba(255,255,255,0.08); border-radius: 14px; padding: 10px 12px; flex: 1; }
.pill-l { font-size: 10px; opacity: 0.45; margin-bottom: 4px; }
.pill-v { font-size: 15px; font-weight: 700; }
.pill-warn { color: #ffd60a; }
.pill-danger { color: #ff6b6b; }
.pill-ok { color: #4cd964; }

.section { padding: 16px 20px 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-title { font-size: 14px; font-weight: 600; color: var(--text); }
.section-sub { font-size: 12px; color: var(--text-muted); text-decoration: none; }

.heatmap { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; padding: 0 16px 4px; }
.hcell { aspect-ratio: 1; border-radius: 3px; }
.h0 { background: #e5e5ea; }
.h1 { background: #c7e8b3; }
.h2 { background: #97d470; }
.h3 { background: #4cae2a; }
.h4 { background: #2d7a14; }
.hmap-months { display: flex; justify-content: space-between; padding: 5px 16px 0; }
.hmap-m { font-size: 10px; color: var(--text-muted); }

.cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.mini-card { background: var(--surface); border-radius: 18px; padding: 16px; }
.mc-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.mc-value { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.mc-green .mc-value { color: var(--green); }
.mc-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.flips-list { margin: 0 16px; background: var(--surface); border-radius: 20px; overflow: hidden; }
.flip-item { display: flex; align-items: center; padding: 13px 14px; border-bottom: 0.5px solid var(--border); gap: 12px; }
.flip-item:last-child { border-bottom: none; }
.flip-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ic-green { background: var(--green-light); }
.ic-amber { background: var(--amber-light); }
.ic-blue  { background: var(--blue-light); }
.ic-gray  { background: #f0f0f0; }
.flip-info { flex: 1; min-width: 0; }
.flip-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flip-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.flip-right { text-align: right; flex-shrink: 0; }
.flip-profit { font-size: 14px; font-weight: 700; }
.fp-pos { color: var(--green); }
.fp-neg { color: var(--red); }
.flip-date { font-size: 11px; color: #aaa; margin-top: 2px; }
.badge-open { font-size: 11px; background: var(--amber-light); color: var(--amber); padding: 4px 10px; border-radius: 20px; text-decoration: none; font-weight: 600; display: inline-block; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); margin: 0 16px; background: var(--surface); border-radius: 20px; }
.empty-state p { margin-bottom: 16px; font-size: 15px; }

.form-card { background: var(--surface); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 18px; margin: 8px 16px 0; }
.sell-item-name { font-size: 19px; font-weight: 700; color: var(--text); }
.sell-item-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.form-group { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.form-row { display: flex; gap: 12px; }

label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.label-hint { font-weight: 400; text-transform: none; letter-spacing: 0; }

input, select { width: 100%; padding: 13px 15px; border: 1.5px solid #e5e5ea; border-radius: 14px; font-size: 16px; background: var(--bg); color: var(--text); outline: none; -webkit-appearance: none; transition: border-color 0.15s; }
input:focus, select:focus { border-color: #aaa; }
.input-prefix { display: flex; align-items: center; background: var(--bg); border: 1.5px solid #e5e5ea; border-radius: 14px; overflow: hidden; }
.input-prefix:focus-within { border-color: #aaa; }
.input-prefix span { padding: 13px 4px 13px 15px; font-size: 16px; color: var(--text-muted); }
.input-prefix input { border: none; background: transparent; padding-left: 2px; }

.log-btn { display: block; width: 100%; background: var(--text); color: white; border: none; border-radius: 16px; padding: 16px; font-size: 16px; font-weight: 700; text-align: center; cursor: pointer; text-decoration: none; letter-spacing: -0.2px; }
.delete-btn { display: block; text-align: center; font-size: 13px; color: var(--red); padding: 8px; text-decoration: none; }

.navbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 0.5px solid rgba(0,0,0,0.08); display: flex; justify-content: space-around; padding: 10px 16px 24px; z-index: 100; }
.nb-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text-muted); font-size: 10px; font-weight: 500; padding: 4px 20px; }
.nb-item.active { color: var(--text); }
.nb-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text); margin-top: 1px; }
.nb-center svg { background: var(--text); color: white; border-radius: 50%; padding: 5px; width: 38px; height: 38px; }



/* Coming soon banner */
.coming-soon {
  margin: 0 16px;
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cs-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.cs-text { flex: 1; }
.cs-title { font-size: 13px; font-weight: 600; color: var(--text); }
.cs-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cs-badge { font-size: 11px; background: var(--amber-light); color: var(--amber); padding: 4px 10px; border-radius: 20px; font-weight: 600; flex-shrink: 0; }

/* Form spacing */
.form-group { gap: 10px; }
.form-card { gap: 22px; }

/* Date display */
.date-display {
  padding: 14px 16px;
  border: 1.5px solid #e5e5ea;
  border-radius: 14px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
}

/* Date picker sheet */
.date-picker-sheet {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
.date-picker-sheet.open { display: flex; }

.date-picker-inner {
  background: white;
  width: 100%;
  max-width: 430px;
  border-radius: 24px 24px 0 0;
  padding-bottom: 32px;
  position: relative;
}

.date-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 8px;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.dp-title { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.dp-cancel { font-size: 15px; color: #888; background: none; border: none; cursor: pointer; padding: 4px; }
.dp-done { font-size: 15px; color: #1a1a1a; font-weight: 600; background: none; border: none; cursor: pointer; padding: 4px; }

.date-columns {
  display: flex;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.date-col {
  flex: 1;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 88px 0;
  scrollbar-width: none;
}
.date-col::-webkit-scrollbar { display: none; }

.date-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #aaa;
  scroll-snap-align: center;
  cursor: pointer;
  transition: color 0.1s;
}
.date-item.selected { color: #1a1a1a; font-weight: 600; }

.date-selector-line {
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 44px;
  transform: translateY(-50%);
  border-top: 0.5px solid rgba(0,0,0,0.15);
  border-bottom: 0.5px solid rgba(0,0,0,0.15);
  pointer-events: none;
  margin-top: 32px;
}

/* Styled select */
.styled-select-wrap {
  position: relative;
}
.styled-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}
.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #888;
  pointer-events: none;
}

/* Tabs */
.tabs-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab.active {
  background: var(--text);
  color: white;
}

.tab-count {
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.2);
  padding: 1px 7px;
  border-radius: 20px;
}

.tab:not(.active) .tab-count {
  background: var(--bg);
  color: var(--text-muted);
}

/* Flip cards (open tab) */
.flip-card {
  border-bottom: 0.5px solid var(--border);
  transition: all 0.25s ease;
}

.flip-card:last-child { border-bottom: none; }

.flip-card-main {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  gap: 12px;
  cursor: pointer;
}

.flip-chevron {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.flip-chevron.rotated { transform: rotate(90deg); }

/* Expand section */
.flip-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.flip-expand.open { max-height: 600px; }

.expand-inner {
  padding: 0 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 0.5px solid var(--border);
  padding-top: 14px;
}

.expand-details-toggle {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 0;
}

.expand-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.expand-details.open { max-height: 200px; }

/* Hours tracking */
.flip-hourly {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin-top: 2px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sold card detail rows */
.sold-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
}

.sold-detail-row:last-of-type { border-bottom: none; }

.sold-detail-label {
  font-size: 12px;
  color: var(--text-muted);
}

.sold-detail-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Category suggestion */
.category-suggestion {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  animation: fadeIn 0.2s ease;
}

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

.cat-pill {
  background: var(--text);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.cat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Tax screen */
.tax-quarters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

.tax-quarter-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  border: 0.5px solid var(--border);
}

.tq-active {
  border-color: var(--text);
  border-width: 1.5px;
}

.tq-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tq-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tq-dates {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tq-badge {
  font-size: 11px;
  background: var(--text);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.tq-badge-warn {
  background: var(--amber-light);
  color: var(--amber);
}

.tq-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.tq-key {
  font-size: 13px;
  color: var(--text-muted);
}

.tq-val {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.tq-tax { color: var(--amber); font-weight: 600; }

.tq-divider {
  height: 0.5px;
  background: var(--border);
  margin: 6px 0;
}

.tax-schedule {
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  margin: 0 16px;
  border: 0.5px solid var(--border);
}

.tax-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 24px 16px;
  line-height: 1.5;
}

/* Insights */
.insight-hero {
  margin: 0 16px;
  background: var(--surface);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--text);
}

.ih-emoji { font-size: 32px; flex-shrink: 0; }

.ih-info { flex: 1; }

.ih-cat {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.ih-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ih-rate {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
}

.insight-warn {
  margin: 0 16px 8px;
  background: var(--amber-light);
  border-radius: 16px;
  padding: 14px 16px;
}

.iw-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 6px;
}

.iw-body {
  font-size: 13px;
  color: var(--amber);
  line-height: 1.5;
}

/* Overhead */
.ic-gray { background: #f0f0f0; }

/* Category chips */
.cat-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.cat-chip {
  padding: 7px 14px;
  border: 1.5px solid #e5e5ea;
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.cat-chip.selected {
  border-color: var(--text);
  background: var(--text);
  color: white;
}

/* Arrow profit indicators */
.hero-amount-pos { color: #4cd964; }
.hero-amount-neg { color: #ff6b6b; }

/* Ensure red shows everywhere for losses */
.fp-neg {
  color: var(--red) !important;
}

.fp-pos {
  color: var(--green) !important;
}

/* Log page sections - proper label-to-input spacing */
.log-section {
  padding: 16px 0;
  border-bottom: 0.5px solid var(--border);
}
.log-section:last-of-type { border-bottom: none; }

.log-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.log-input {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #e5e5ea;
  border-radius: 14px;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
}

.log-input:focus { border-color: #aaa; }

.log-input-row {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid #e5e5ea;
  border-radius: 14px;
  overflow: hidden;
}

.log-input-row:focus-within { border-color: #aaa; }

.log-prefix {
  padding: 13px 4px 13px 15px;
  font-size: 16px;
  color: var(--text-muted);
}

.log-input-prefixed {
  border: none;
  background: transparent;
  padding-left: 4px;
}

/* Mini inline calendar */
.mini-calendar {
  background: var(--surface);
  border-radius: 16px;
  border: 1.5px solid #e5e5ea;
  overflow: hidden;
  padding: 8px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 10px;
}

.cal-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cal-month-selector {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cal-month-select, .cal-year-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.cal-month-select {
  min-width: 70px;
}

.cal-year-select {
  min-width: 60px;
}

.cal-nav {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-dow {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

.cal-day {
  aspect-ratio: 1;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: background 0.1s;
}

.cal-day:hover:not(:disabled) { background: var(--bg); }
.cal-today { font-weight: 700; color: var(--text); }
.cal-selected { background: var(--text) !important; color: white !important; border-radius: 50%; }
.cal-disabled { color: #ccc; cursor: default; }

/* Category chips updated */
.cat-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-chip-more {
  border-style: dashed;
  color: var(--text-muted);
}

/* Chart card */
.chart-card {
  margin: 0 16px;
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  border: 0.5px solid var(--border);
}

/* Loss color for insight icons */
.ic-red { background: #ffe5e5; }

/* Form card in log page */
.content > form {
  background: var(--surface);
  border-radius: 24px;
  padding: 0 20px 20px;
  margin-top: 12px;
}

/* Font */
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

/* Tax hero card - light version */
.tax-hero-card {
  margin: 8px 16px 0;
  background: var(--surface);
  border-radius: 24px;
  padding: 22px 20px;
  border: 1.5px solid var(--border);
}

.tax-hero-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  font-weight: 600;
}

.tax-hero-amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 4px;
}

.tax-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Parts tracking */
.add-part-btn {
  width: 100%;
  padding: 10px;
  border: 1.5px dashed #e5e5ea;
  border-radius: 12px;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
}

.part-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* Tax hero warm gradient */
.tax-hero-card {
  margin: 8px 16px 0;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  border-radius: 24px;
  padding: 22px 20px;
  border: none;
}

.tax-hero-label {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  font-weight: 600;
}

.tax-hero-amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -2px;
  color: white;
  margin-bottom: 4px;
}

.tax-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* Select mode */
.select-mode-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.select-bar {
  background: var(--text);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

#select-count {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.select-action-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  color: white;
}

.select-delete {
  background: #cc3333;
}

.select-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  margin-right: 4px;
}

.in-select-mode .select-checkbox { display: flex; }

/* Desktop Dashboard Styles - Full Screen Locked */
@media (min-width: 1024px) {
  .dashboard {
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding: 24px;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    position: fixed;
    top: 0;
    left: 0;
  }
  
  .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 64px;
  }
  
  .sidebar-left {
    width: 320px;
    flex-shrink: 0;
    padding-top: 80px;
    overflow-y: auto;
  }
  
  .main-content {
    flex: 1;
    min-width: 0;
    padding-top: 80px;
    overflow-y: auto;
  }
  
  .sidebar-right {
    width: 300px;
    flex-shrink: 0;
    padding-top: 80px;
    overflow-y: auto;
  }
  
  .desktop-heatmap {
    transform: scale(1.4);
    transform-origin: top left;
    margin: -30px;
    padding: 30px;
  }
  
  .dashboard-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
  }
  
  .dashboard-hero {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    padding: 30px;
    position: relative;
    overflow: hidden;
  }
  
  .dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
  }
  
  .overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .overview-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--text);
  }
  
  .recent-flips-desktop {
    max-height: 400px;
    overflow-y: auto;
  }
  
  .insights-charts {
    display: grid;
    gap: 20px;
  }
  
  .chart-container {
    background: var(--surface);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
  }
  
  .quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .quick-action-btn {
    background: var(--text);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .quick-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  .active-filter {
    border-color: var(--text) !important;
    background: rgba(37, 99, 235, 0.05) !important;
  }

  /* Side Panel */
  .side-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 200;
    backdrop-filter: blur(2px);
  }

  .side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    height: 100vh;
    background: var(--bg);
    z-index: 201;
    overflow-y: auto;
    box-shadow: -4px 0 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
  }

  .side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .side-panel-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
  }

  .side-panel-close:hover {
    background: var(--border);
    color: var(--text);
  }

  .side-panel .content {
    padding-bottom: 40px;
  }

  .side-panel .navbar {
    display: none;
  }

  .side-panel .topbar {
    display: none;
  }

}

.in-select-mode .flip-card-main { cursor: default; }

.selected-item { background: #f0f8ff; }
.selected-item .select-checkbox { background: var(--text); border-color: var(--text); }


