/* KaiNest app design system — tokens provided by tokens.css */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
h1, h2, h3, h4, h5 { font-family: var(--font-heading, 'Fraunces', Georgia, serif); color: var(--text-bright); }
a { color: var(--teal); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ── APP SHELL ── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; min-height: 100vh;
  background: var(--ocean);
  border-right: 1px solid var(--teal-border);
  display: flex; flex-direction: column;
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--teal-border);
  margin-bottom: 1rem;
}
.sidebar-logo .logo-word { font-family: var(--font-heading, 'Fraunces', Georgia, serif); font-weight: 600; font-size: 1.3rem; color: var(--teal); }
.sidebar-logo .logo-word span { color: var(--text-bright); }
.sidebar-logo .logo-tag { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-top: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 1.5rem;
  color: var(--text); font-size: 0.9rem;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--teal-dim); color: var(--text-bright); }
.nav-item.active { background: var(--teal-dim); color: var(--teal); border-left-color: var(--teal); }
.nav-item svg { opacity: 0.7; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--teal-border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ocean);
}
.topbar h1 { font-size: 1.2rem; font-weight: 600; }
.topbar-actions { display: flex; gap: 0.75rem; align-items: center; }

.page-body { padding: 2rem; flex: 1; overflow-y: auto; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1.5rem;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text-bright); }

/* ── STATS ROW ── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-bright); font-family: var(--font-body, 'Satoshi', system-ui, sans-serif); }
.stat-value.teal { color: var(--teal); }
.stat-value.coral { color: var(--coral); }
.stat-value.success { color: var(--success); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 7px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--teal); color: #0a0f1a; }
.btn-primary:hover { opacity: 0.9; color: #0a0f1a; }
.btn-secondary { background: var(--foam); color: var(--text-bright); border: 1px solid var(--teal-border); }
.btn-secondary:hover { background: var(--teal-dim); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--teal-border); }
.btn-ghost:hover { background: var(--teal-dim); color: var(--text-bright); }
.btn-danger { background: rgba(248,113,113,0.15); color: var(--danger); border: 1px solid rgba(248,113,113,0.25); }
.btn-danger:hover { background: rgba(248,113,113,0.25); }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem; }
.form-control {
  width: 100%;
  background: var(--ocean);
  border: 1px solid var(--teal-border);
  border-radius: 7px;
  padding: 0.6rem 0.9rem;
  color: var(--text-bright);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ── MESSAGE LIST ── */
.message-list { display: flex; flex-direction: column; gap: 0.75rem; }
.message-item {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex; align-items: flex-start; gap: 1rem;
  transition: border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.message-item:hover { border-color: var(--teal); background: rgba(45,212,191,0.03); }
.message-item.unread { border-left: 3px solid var(--coral); }

.message-avatar {
  width: 38px; height: 38px;
  background: var(--foam);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; color: var(--teal);
  flex-shrink: 0;
}
.message-body { flex: 1; min-width: 0; }
.message-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.message-name { font-weight: 600; font-size: 0.9rem; color: var(--text-bright); }
.message-property { font-size: 0.75rem; color: var(--teal); }
.message-time { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }
.message-preview { font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pending { background: rgba(251,191,36,0.15); color: var(--warning); }
.badge-replied { background: rgba(45,212,191,0.15); color: var(--teal); }
.badge-reviewed { background: rgba(52,211,153,0.15); color: var(--success); }

/* ── CONVERSATION BUBBLE ── */
.conversation { display: flex; flex-direction: column; gap: 1rem; }
.bubble { max-width: 80%; padding: 0.9rem 1.1rem; border-radius: 12px; font-size: 0.9rem; line-height: 1.6; }
.bubble-guest { background: var(--foam); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble-ai {
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  white-space: pre-wrap;
}
.bubble-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.3rem; }
.bubble-guest .bubble-label { color: var(--text-muted); }
.bubble-ai .bubble-label { color: var(--teal); text-align: right; }

/* ── PROPERTY CARDS ── */
.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.property-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.15s;
}
.property-card:hover { border-color: var(--teal); }
.property-card-name { font-size: 1rem; font-weight: 600; color: var(--text-bright); margin-bottom: 0.25rem; }
.property-card-address { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.property-card-actions { display: flex; gap: 0.5rem; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--text-bright); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; max-width: 360px; margin: 0 auto 1.5rem; }

/* ── ALERTS ── */
.alert { padding: 0.75rem 1rem; border-radius: 7px; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-success { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: var(--success); }
.alert-error { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--danger); }

/* ── LOADING ── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--teal-border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TABS ── */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--teal-border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.6rem 1.25rem;
  background: none; border: none;
  color: var(--text-muted); font-size: 0.875rem;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text-bright); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ── GUEST FORM (public-facing) ── */
.guest-form-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem;
  background: var(--deep);
}
.guest-form-card {
  width: 100%; max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 14px;
  padding: 2.5rem;
}
.guest-form-logo { text-align: center; margin-bottom: 2rem; }
.guest-form-logo .logo-word { font-family: var(--font-heading, 'Fraunces', Georgia, serif); font-size: 1.5rem; font-weight: 600; color: var(--teal); }
.guest-form-logo .logo-word span { color: var(--text-bright); }
.guest-form-logo p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

.reply-box {
  background: var(--ocean);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  display: none;
}
.reply-box.visible { display: block; }
.reply-box-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--teal); margin-bottom: 0.5rem;
}
.reply-box-text { font-size: 0.9rem; color: var(--text); line-height: 1.6; white-space: pre-wrap; }

/* ── PRICING DASHBOARD ── */

/* Header row: property selector + impact strip */
.pricing-header-row {
  display: flex; align-items: flex-end; gap: 1.5rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.property-selector { display: flex; flex-direction: column; }

.impact-strip {
  display: flex; align-items: center; gap: 0;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  flex: 1; max-width: 480px;
}
.impact-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.impact-val {
  font-family: var(--font-body, 'Satoshi', system-ui, sans-serif);
  font-size: 1.35rem; font-weight: 700; line-height: 1.1;
}
.impact-val.positive { color: var(--success); }
.impact-val.negative { color: var(--danger); }
.impact-val.teal { color: var(--teal); }
.impact-val.warning { color: var(--warning); }
.impact-val.muted { color: var(--text-muted); }
.impact-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }
.impact-divider { width: 1px; background: var(--teal-border); height: 36px; margin: 0 0.5rem; flex-shrink: 0; }

/* Two-column layout */
.pricing-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }

/* Section header */
.pricing-section-header { margin-bottom: 1rem; }
.section-title { font-size: 1rem; font-weight: 600; color: var(--text-bright); margin: 0 0 0.2rem; }
.section-sub { font-size: 0.75rem; color: var(--text-muted); }

/* Suggestion cards */
.suggestion-list { display: flex; flex-direction: column; gap: 0.85rem; }

.suggestion-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.15s;
}
.suggestion-card.status-pending { border-left: 3px solid var(--warning); }
.suggestion-card.status-approved { border-left: 3px solid var(--success); opacity: 0.85; }
.suggestion-card.status-rejected { border-left: 3px solid var(--text-muted); opacity: 0.6; }

.suggestion-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.suggestion-dates { display: flex; align-items: center; gap: 0.6rem; }
.date-range { font-size: 0.9rem; font-weight: 600; color: var(--text-bright); }
.week-badge {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--teal-dim); color: var(--teal);
  padding: 2px 7px; border-radius: 4px;
}

.status-pill {
  font-size: 0.7rem; font-weight: 600;
  padding: 3px 9px; border-radius: 12px;
}
.status-pill.status-pending { background: rgba(251,191,36,0.12); color: var(--warning); }
.status-pill.status-approved { background: rgba(52,211,153,0.12); color: var(--success); }
.status-pill.status-rejected { background: rgba(110,140,170,0.12); color: var(--text-muted); }

/* Rate comparison block */
.rate-comparison {
  display: flex; align-items: center; gap: 1rem;
  background: var(--ocean);
  border-radius: 8px; padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}
.rate-block { display: flex; flex-direction: column; gap: 2px; }
.rate-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); }
.rate-amount {
  font-family: var(--font-body, 'Satoshi', system-ui, sans-serif);
  font-size: 1.6rem; font-weight: 700; line-height: 1;
}
.current-amount { color: var(--text); }
.suggested-amount { color: var(--teal); }

.rate-arrow-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; }
.rate-arrow {
  font-size: 1.3rem; font-weight: 700;
  transition: color 0.15s;
}
.rate-arrow.up { color: var(--success); }
.rate-arrow.down { color: var(--coral); }
.rate-arrow.flat { color: var(--text-muted); }

.rate-delta-badge {
  font-size: 0.75rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
}
.rate-delta-badge.up { background: rgba(52,211,153,0.15); color: var(--success); }
.rate-delta-badge.down { background: rgba(249,112,102,0.15); color: var(--coral); }
.rate-delta-badge.flat { background: var(--teal-dim); color: var(--text-muted); }

/* Reasoning toggle */
.reasoning-toggle {
  display: flex; align-items: center; gap: 0.4rem;
  background: none; border: none;
  color: var(--teal); font-size: 0.8rem;
  cursor: pointer; padding: 0 0 0.5rem;
  transition: opacity 0.15s;
}
.reasoning-toggle:hover { opacity: 0.75; }
.reasoning-toggle .chevron { transition: transform 0.2s; }

/* Reasoning panel */
.reasoning-panel {
  background: var(--ocean);
  border: 1px solid var(--teal-border);
  border-radius: 8px; padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.factor-row {
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.factor-icon { font-size: 0.9rem; flex-shrink: 0; margin-top: 1px; }
.factor-content { flex: 1; min-width: 0; }
.factor-name { font-size: 0.8rem; font-weight: 600; color: var(--text-bright); }
.factor-detail { font-size: 0.75rem; color: var(--text-muted); }
.factor-badge {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.strength-high, .strength-strong { background: rgba(52,211,153,0.15); color: var(--success); }
.strength-medium, .strength-moderate { background: rgba(251,191,36,0.15); color: var(--warning); }
.strength-low { background: rgba(110,140,170,0.12); color: var(--text-muted); }
.strength-neutral { background: var(--teal-dim); color: var(--teal); }
.reasoning-narrative {
  font-size: 0.82rem; color: var(--text-bright); line-height: 1.6;
  border-top: 1px solid var(--teal-border); padding-top: 0.6rem; margin-top: 0.2rem;
  font-style: italic;
}
.reasoning-summary-text {
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
  border-top: 1px solid var(--teal-border); padding-top: 0.5rem;
}

/* Action zone */
.suggestion-actions { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.5rem; }
.custom-rate-row {
  display: flex; align-items: center; gap: 0.75rem;
}
.action-btns { display: flex; gap: 0.5rem; }

.btn-approve {
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--success); font-size: 0.82rem; font-weight: 600;
  padding: 0.45rem 1rem; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 0.35rem;
  cursor: pointer; transition: all 0.15s;
}
.btn-approve:hover { background: rgba(52,211,153,0.22); }
.btn-reject-sm {
  background: transparent;
  border: 1px solid var(--teal-border);
  color: var(--text-muted); font-size: 0.82rem;
  padding: 0.45rem 0.8rem; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 0.35rem;
  cursor: pointer; transition: all 0.15s;
}
.btn-reject-sm:hover { border-color: var(--coral); color: var(--coral); }

.reviewed-note {
  font-size: 0.8rem; padding: 0.5rem 0.75rem; border-radius: 6px;
  margin-top: 0.25rem;
}
.reviewed-note.approved { background: rgba(52,211,153,0.08); color: var(--success); }
.reviewed-note.rejected { background: rgba(110,140,170,0.08); color: var(--text-muted); }

/* Settings sidebar */
.pricing-sidebar-panel { display: flex; flex-direction: column; }
.settings-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1.25rem;
}
.settings-card-hdr {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.settings-prop-name {
  font-size: 0.9rem; font-weight: 600; color: var(--teal);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--teal-border);
}
.settings-field { margin-bottom: 1rem; }
.rate-field-wrap {
  display: flex; align-items: center; gap: 0;
  position: relative;
}
.rate-prefix-icon {
  position: absolute; left: 10px;
  color: var(--text-muted); font-size: 0.875rem; pointer-events: none;
  z-index: 1;
}
.rate-field {
  padding-left: 22px !important;
}
.rate-suffix-text {
  margin-left: 0.4rem; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap;
}

.floor-ceil-row { display: flex; align-items: center; gap: 0.4rem; }
.fc-wrap { display: flex; align-items: center; gap: 0.35rem; flex: 1; }
.fc-lbl { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.fc-sep { color: var(--text-muted); flex-shrink: 0; }

/* Strategy selector */
.strategy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.strategy-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--ocean); border: 1px solid var(--teal-border);
  border-radius: 7px; padding: 0.6rem 0.3rem;
  cursor: pointer; transition: all 0.15s; text-align: center;
}
.strategy-opt:hover { border-color: var(--teal); background: var(--teal-dim); }
.strategy-opt.active { border-color: var(--teal); background: var(--teal-dim); }
.strategy-ico { font-size: 1.1rem; }
.strategy-name { font-size: 0.72rem; font-weight: 600; color: var(--text-bright); }
.strategy-desc { font-size: 0.62rem; color: var(--text-muted); line-height: 1.3; }

/* Impact card bottom numbers */
.impact-big-num {
  font-family: var(--font-body, 'Satoshi', system-ui, sans-serif);
  font-size: 2rem; font-weight: 700; margin: 0.5rem 0 0.2rem;
}
.impact-big-num.positive { color: var(--success); }
.impact-big-num.negative { color: var(--danger); }
.impact-desc-text { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.impact-breakdown-list { display: flex; flex-direction: column; gap: 0.35rem; border-top: 1px solid var(--teal-border); padding-top: 0.6rem; }
.bd-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text); }
.bd-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bd-dot.approved-dot { background: var(--success); }
.bd-dot.pending-dot { background: var(--warning); }
.bd-dot.rejected-dot { background: var(--text-muted); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 12px; padding: 1.75rem;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text-bright); margin-bottom: 0.3rem; }
.modal-sub { font-size: 0.82rem; color: var(--text-muted); }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

/* Responsive */
@media (max-width: 900px) {
  .pricing-layout { grid-template-columns: 1fr; }
  .pricing-sidebar-panel { order: -1; }
}
@media (max-width: 560px) {
  .impact-strip { max-width: 100%; }
  .strategy-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .sidebar { width: 200px; }
  .page-body { padding: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; min-height: auto; flex-direction: row; flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════════════════════
   COMPLIANCE DASHBOARD
   ══════════════════════════════════════════════════════════════ */

/* Live badge in topbar */
.compliance-live-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 20px;
}
.live-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.compliance-alert-badge {
  background: var(--coral) !important;
}

/* ── COUNTDOWN BANNER ─────────────────────────────────────── */
.countdown-banner {
  display: flex; gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.countdown-item {
  flex: 1; min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.countdown-item::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.countdown-critical::before { background: var(--coral); }
.countdown-warning::before { background: var(--warning); }
.countdown-moderate::before { background: var(--teal); }
.countdown-critical { border-color: rgba(249,112,102,0.4); background: rgba(249,112,102,0.05); }
.countdown-warning { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.04); }

.zero-tolerance-banner {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1.5px;
  color: var(--coral); text-transform: uppercase;
  background: rgba(249,112,102,0.12);
  border: 1px solid rgba(249,112,102,0.3);
  border-radius: 4px;
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.countdown-property {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}
.countdown-desc {
  font-size: 0.875rem; color: var(--text-bright); font-weight: 500;
  margin-bottom: 0.75rem;
}
.countdown-timer-row {
  display: flex; align-items: baseline; gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.countdown-number {
  font-family: var(--font-body, 'Satoshi', system-ui, sans-serif);
  font-size: 3.5rem; font-weight: 700; line-height: 1;
}
.countdown-critical .countdown-number { color: var(--coral); }
.countdown-warning .countdown-number { color: var(--warning); }
.countdown-moderate .countdown-number { color: var(--teal); }
.countdown-unit {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); line-height: 1.3;
}
.countdown-date {
  font-size: 0.8rem; color: var(--text-muted);
}
/* Pulsing ring on critical items */
.urgency-pulse {
  position: absolute; top: 1rem; right: 1rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--coral);
  animation: urgency-ring 1.5s ease infinite;
}
@keyframes urgency-ring {
  0% { box-shadow: 0 0 0 0 rgba(249,112,102,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(249,112,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(249,112,102,0); }
}

/* ── COMPLIANCE LAYOUT ────────────────────────────────────── */
.compliance-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .compliance-layout { grid-template-columns: 1fr; }
  .compliance-sidebar-panel { order: -1; }
}

/* ── PROPERTY COMPLIANCE CARDS ───────────────────────────── */
.section-header-row {
  display: flex; align-items: baseline; gap: 0.75rem;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 0.8rem; color: var(--text-muted);
}
.compliance-card-list {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.compliance-property-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.compliance-property-card:hover { border-color: rgba(45,212,191,0.4); }
.compliance-property-card.selected { border-color: var(--teal); }

.property-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}
.property-card-left {
  display: flex; align-items: center; gap: 0.75rem;
  flex: 1; min-width: 0;
}
.property-card-name {
  font-size: 0.95rem; font-weight: 600; color: var(--text-bright);
  margin-bottom: 0.15rem;
}
.property-card-sub {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap;
}
.property-card-right {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}

/* compliance score dots */
.compliance-score-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.score-green { background: var(--success); box-shadow: 0 0 6px rgba(52,211,153,0.5); }
.score-yellow { background: var(--warning); box-shadow: 0 0 6px rgba(251,191,36,0.5); }
.score-red { background: var(--coral); box-shadow: 0 0 6px rgba(249,112,102,0.5); animation: urgency-ring 1.5s ease infinite; }
.score-gray { background: var(--text-muted); }

/* score badges */
.score-badge {
  font-size: 0.7rem; font-weight: 600;
  padding: 2px 8px; border-radius: 12px;
  letter-spacing: 0.3px;
}
.score-badge-green { background: rgba(52,211,153,0.15); color: var(--success); }
.score-badge-yellow { background: rgba(251,191,36,0.15); color: var(--warning); }
.score-badge-red { background: rgba(249,112,102,0.15); color: var(--coral); }
.score-badge-gray { background: rgba(110,140,170,0.15); color: var(--text-muted); }

/* county badges */
.county-badge {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 10px;
}
.county-kauai { background: rgba(16,185,129,0.15); color: #10b981; }
.county-hawaii { background: rgba(245,158,11,0.15); color: #f59e0b; }
.county-honolulu { background: rgba(99,102,241,0.15); color: #6366f1; }
.county-maui { background: rgba(236,72,153,0.15); color: #ec4899; }
.county-unknown { background: rgba(110,140,170,0.1); color: var(--text-muted); }

.permit-snippet {
  font-size: 0.75rem; color: var(--text-muted);
}
.no-profile-hint {
  font-size: 0.75rem; color: var(--teal); font-style: italic;
}

/* next deadline chip (compact) */
.next-deadline-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  background: rgba(45,212,191,0.1); color: var(--teal);
}
.next-deadline-chip.warning { background: rgba(251,191,36,0.15); color: var(--warning); }
.next-deadline-chip.critical { background: rgba(249,112,102,0.15); color: var(--coral); }

/* expand chevron */
.expand-chevron { color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }

/* card body */
.property-card-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--teal-border);
  margin-top: 0;
}
.profile-setup-prompt {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 0;
  color: var(--text-muted); font-size: 0.875rem;
}
.profile-setup-prompt svg { flex-shrink: 0; color: var(--teal); margin-top: 2px; }
.profile-chip-row {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.9rem 0 0.75rem;
}
.profile-chip {
  background: var(--ocean);
  border: 1px solid var(--teal-border);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  display: flex; flex-direction: column; gap: 1px;
}
.chip-lbl { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.chip-val { color: var(--text-bright); font-weight: 500; }

/* Deadline mini-list inside card */
.deadline-mini-list { margin-bottom: 0.75rem; }
.mini-list-hdr { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 0.5rem; }
.deadline-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.deadline-row:last-child { border-bottom: none; }
.deadline-row-left { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.deadline-row-desc { font-size: 0.83rem; color: var(--text); }
.deadline-row-right { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

/* Deadline type dots */
.deadline-type-dot, .deadline-row .deadline-type-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dt-permit_renewal { background: #6366f1; }
.dt-tax_filing { background: #f59e0b; }
.dt-registration { background: #10b981; }

/* Days chip */
.deadline-days-chip {
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}
.deadline-days-chip.urgency-ok { background: rgba(45,212,191,0.1); color: var(--teal); }
.deadline-days-chip.urgency-warning { background: rgba(251,191,36,0.15); color: var(--warning); }
.deadline-days-chip.urgency-critical { background: rgba(249,112,102,0.15); color: var(--coral); }

/* Action buttons inside cards */
.btn-mark-met, .btn-mark-missed {
  font-size: 0.72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
  border: none; cursor: pointer;
  transition: all 0.15s;
}
.btn-mark-met { background: rgba(52,211,153,0.15); color: var(--success); }
.btn-mark-met:hover { background: rgba(52,211,153,0.25); }
.btn-mark-missed { background: rgba(249,112,102,0.12); color: var(--coral); }
.btn-mark-missed:hover { background: rgba(249,112,102,0.22); }
.btn-xs { font-size: 0.68rem; padding: 2px 6px; }
.btn-sm { font-size: 0.74rem; padding: 2px 8px; }

.deadline-more-link { margin-top: 0.4rem; font-size: 0.8rem; }

/* card action row */
.card-action-row {
  display: flex; gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ── ISLAND SUMMARY SIDEBAR ──────────────────────────────── */
.island-summary-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 12px;
  overflow: hidden;
}
.island-card-hdr {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--teal-border);
}
.island-accordion { border-bottom: 1px solid rgba(255,255,255,0.05); }
.island-accordion:last-child { border-bottom: none; }
.island-accordion-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem;
  cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.island-accordion-hdr:hover { background: var(--teal-dim); }
.island-hdr-left { display: flex; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; }
.island-flag { font-size: 1.1rem; flex-shrink: 0; }
.island-name { font-size: 0.875rem; font-weight: 600; color: var(--text-bright); }
.island-headline { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.island-hdr-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.island-chevron { color: var(--text-muted); transition: transform 0.2s; }

/* Island urgency badge */
.island-urgency-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.8px;
  padding: 2px 6px; border-radius: 8px;
  text-transform: uppercase;
}
.urgency-critical { background: rgba(249,112,102,0.15); color: var(--coral); }
.urgency-urgent { background: rgba(251,191,36,0.15); color: var(--warning); }
.urgency-watch { background: rgba(99,102,241,0.15); color: #818cf8; }
.urgency-monitor { background: rgba(45,212,191,0.1); color: var(--teal); }

/* Island accordion body */
.island-accordion-body {
  padding: 0.75rem 1.1rem 1rem;
  background: rgba(0,0,0,0.1);
}
.island-rules-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.island-rule { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; color: var(--text); }
.island-rule-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

.island-tax-rate {
  font-size: 0.78rem;
  background: rgba(45,212,191,0.07);
  border: 1px solid var(--teal-border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
}
.tax-lbl { color: var(--text-muted); margin-right: 0.35rem; }
.tax-val { color: var(--teal); font-weight: 600; }

.island-mistake {
  display: flex; align-items: flex-start; gap: 0.4rem;
  font-size: 0.78rem; color: var(--text-muted);
  padding: 0.4rem 0;
}
.island-mistake svg { flex-shrink: 0; margin-top: 1px; }

/* Statewide template rows */
.template-deadline-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.template-deadline-row:last-child { border-bottom: none; }
.template-row-left { flex: 1; min-width: 0; margin-right: 0.75rem; }
.template-type-badge {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px; border-radius: 4px;
  display: inline-block; margin-bottom: 2px;
}
.dt-permit_renewal { background: rgba(99,102,241,0.15); color: #818cf8; }
.dt-tax_filing { background: rgba(245,158,11,0.15); color: #f59e0b; }
.dt-registration { background: rgba(16,185,129,0.15); color: #10b981; }
.template-desc { font-size: 0.8rem; color: var(--text); }

/* ── PROPERTY DETAIL SECTION ──────────────────────────────── */
.property-detail-section {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 12px;
  padding: 1.5rem;
}
.detail-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.deadline-full-list { display: flex; flex-direction: column; gap: 0; }
.full-deadline-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.full-deadline-row:last-child { border-bottom: none; }
.full-dl-left { display: flex; align-items: flex-start; gap: 0.75rem; flex: 1; }
.full-dl-desc { font-size: 0.875rem; color: var(--text-bright); margin-bottom: 2px; }
.full-dl-date { font-size: 0.78rem; color: var(--text-muted); }
.full-dl-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.dl-status-pill {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 2px 7px; border-radius: 10px;
}
.pill-upcoming { background: rgba(251,191,36,0.12); color: var(--warning); }
.pill-met { background: rgba(52,211,153,0.12); color: var(--success); }
.pill-missed { background: rgba(249,112,102,0.12); color: var(--coral); }
.pill-waived { background: rgba(110,140,170,0.12); color: var(--text-muted); }

/* Event log */
.event-log-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--teal-border);
  padding-top: 1.25rem;
}
.event-log-hdr {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); margin-bottom: 0.75rem;
}
.event-log-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.event-log-row:last-child { border-bottom: none; }
.event-type-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.event-deadline_created { background: var(--teal); }
.event-deadline_met { background: var(--success); }
.event-deadline_missed { background: var(--coral); }
.event-deadline_waived { background: var(--text-muted); }
.event-alert_sent { background: var(--warning); }
.event-profile_updated { background: #6366f1; }
.event-log-type { color: var(--text); flex: 1; }
.event-log-date { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }

/* ── PROFILE MODAL ────────────────────────────────────────── */
.modal-lg { max-width: 560px; width: 100%; }
.form-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 540px) { .form-row-2 { grid-template-columns: 1fr; } }
.settings-field { margin-bottom: 0; }
.required-star { color: var(--coral); }
.county-deadline-notice {
  background: rgba(45,212,191,0.07);
  border: 1px solid var(--teal-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text);
  margin: 0.75rem 0 0;
}
.form-error {
  background: rgba(249,112,102,0.1);
  border: 1px solid rgba(249,112,102,0.25);
  border-radius: 7px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  color: var(--coral);
  margin-top: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   TAX FILING DASHBOARD
   ══════════════════════════════════════════════════════════════ */

/* Period selector bar */
.tax-period-bar {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
}
.period-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); white-space: nowrap; }
.period-selector-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.period-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem; font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 20px;
  color: var(--text-muted);
  transition: all 0.15s;
  text-decoration: none;
}
.period-chip:hover { background: var(--teal-dim); color: var(--text-bright); }
.period-chip.active { background: var(--teal-dim); color: var(--teal); border-color: var(--teal); }
.period-year { opacity: 0.65; font-size: 0.7rem; }

/* Summary strip */
.tax-summary-strip {
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  gap: 0;
  flex-wrap: wrap;
}
.tax-sum-item { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 90px; }
.tax-sum-val {
  font-family: var(--font-body, 'Satoshi', system-ui, sans-serif);
  font-size: 1.4rem; font-weight: 700; color: var(--text-bright); line-height: 1.1;
}
.tax-sum-val.teal    { color: var(--teal); }
.tax-sum-val.success { color: var(--success); }
.tax-sum-val.filed   { color: #60a5fa; }
.tax-sum-val.danger  { color: var(--danger); }
.tax-sum-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }
.tax-sum-divider { width: 1px; background: var(--teal-border); height: 36px; margin: 0 0.75rem; flex-shrink: 0; }

/* Two-column layout */
.tax-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }
.section-header-row { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1rem; }

/* Tax table */
.tax-table-wrap { overflow-x: auto; }
.tax-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem;
}
.tax-table th {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); font-weight: 600;
  padding: 0.5rem 0.75rem; text-align: left;
  border-bottom: 1px solid var(--teal-border);
}
.tax-table th.num { text-align: right; }
.tax-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(45,212,191,0.07);
  vertical-align: middle;
}
.tax-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tax-table td.dim { color: var(--text-muted); }
.tax-table td.total-col { color: var(--text-bright); font-weight: 600; }
.tax-row:hover td { background: rgba(45,212,191,0.03); }
.tax-row.row-selected td { background: rgba(45,212,191,0.06); }
.tax-totals-row td {
  border-top: 1px solid var(--teal-border); border-bottom: none;
  padding-top: 0.75rem; font-size: 0.85rem; color: var(--text-bright);
}
.tax-totals-row td.total-col { color: var(--teal); }

.prop-name { font-weight: 500; color: var(--text-bright); }
.prop-county { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }
.property-link { text-decoration: none; color: inherit; }
.property-link:hover .prop-name { color: var(--teal); }

/* Filing status */
.filing-status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.filing-status-dot.status-pending  { background: var(--warning); }
.filing-status-dot.status-approved { background: var(--success); }
.filing-status-dot.status-filed    { background: #60a5fa; }
.filing-status-dot.status-overdue  { background: var(--danger); }
.filing-status-label { font-size: 0.78rem; text-transform: capitalize; color: var(--text-muted); }

/* Actions column */
.actions-col { white-space: nowrap; }
.btn-xs { padding: 0.2rem 0.55rem; font-size: 0.75rem; border-radius: 5px; }
.btn-file { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.btn-file:hover { background: rgba(96,165,250,0.25); color: #60a5fa; }
.filed-check { font-size: 0.8rem; color: #60a5fa; }

/* Empty notice */
.tax-empty-notice {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--teal-border); border-radius: 10px;
  padding: 1.5rem;
  color: var(--text-muted); font-size: 0.875rem;
}
.tax-empty-notice svg { color: var(--text-muted); flex-shrink: 0; }
.code-hint {
  display: block;
  font-family: 'Courier New', monospace; font-size: 0.78rem;
  background: var(--ocean); border: 1px solid var(--teal-border);
  border-radius: 5px; padding: 0.4rem 0.7rem; color: var(--teal);
  margin-top: 0.25rem; word-break: break-all;
}

/* Right sidebar */
.tax-sidebar-panel { display: flex; flex-direction: column; }
.hto-guide-card {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  overflow: hidden;
}
.hto-card-hdr {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.78rem; font-weight: 600; color: var(--text-bright);
  text-transform: uppercase; letter-spacing: 0.8px;
  background: var(--ocean); border-bottom: 1px solid var(--teal-border);
}
.hto-guide-body { padding: 1rem; font-size: 0.82rem; }
.hto-subtitle { color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.5; }

.hto-step-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.hto-step { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; color: var(--text); }
.hto-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal-dim); border: 1px solid var(--teal-border);
  font-size: 0.65rem; font-weight: 700; color: var(--teal);
  flex-shrink: 0; margin-top: 1px;
}

.hto-deadlines { margin-bottom: 0.75rem; }
.hto-dl-hdr { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.4rem; }
.hto-dl-row { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0; font-size: 0.78rem; color: var(--text-muted); }
.hto-dl-row.current-q { color: var(--teal); font-weight: 600; }
.hto-due { font-weight: 500; }

.hto-tax-rates { border-top: 1px solid var(--teal-border); padding-top: 0.75rem; }
.hto-rates-hdr { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.4rem; }
.hto-rate-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); padding: 0.2rem 0; }
.rate-val { font-weight: 600; color: var(--teal); }

/* Quick-calculate panel */
.calc-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.calc-result {
  padding: 0.5rem 0.7rem;
  border-radius: 7px; font-size: 0.8rem; line-height: 1.5;
  border: 1px solid var(--teal-border); background: var(--ocean);
  color: var(--text);
}
.calc-result.success { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.3); color: var(--success); }
.calc-result.error   { background: rgba(249,112,102,0.08); border-color: rgba(249,112,102,0.25); color: var(--coral); }
.calc-result.loading { color: var(--text-muted); }

/* Property detail section */
.tax-detail-section { margin-top: 2rem; }
.detail-section-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tax-profile-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; align-items: center; }

.tax-history-list { display: flex; flex-direction: column; gap: 0.75rem; }
.tax-history-row {
  background: var(--surface);
  border: 1px solid var(--teal-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: grid; grid-template-columns: 80px 1fr 120px; gap: 1rem;
  align-items: start;
}
.tax-history-row.current-period { border-color: rgba(45,212,191,0.4); }
.tax-history-row.status-filed   { opacity: 0.8; }
.tax-hist-period { font-family: var(--font-body, 'Satoshi', system-ui, sans-serif); font-weight: 600; font-size: 0.9rem; color: var(--text-bright); }
.current-badge { font-size: 0.65rem; background: var(--teal-dim); color: var(--teal); padding: 1px 6px; border-radius: 10px; margin-top: 3px; display: inline-block; }
.tax-hist-breakdown { display: flex; flex-direction: column; gap: 0.25rem; }
.hist-line { display: flex; justify-content: space-between; font-size: 0.8rem; }
.hist-lbl { color: var(--text-muted); }
.hist-val { font-variant-numeric: tabular-nums; color: var(--text); }
.hist-val.teal { color: var(--teal); }
.total-line { border-top: 1px solid var(--teal-border); margin-top: 0.25rem; padding-top: 0.25rem; }
.tax-hist-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.hist-notes { font-size: 0.72rem; color: var(--text-muted); font-style: italic; margin-top: 0.25rem; text-align: right; }

/* Approve modal */
.modal-card { max-width: 480px !important; }
.modal-tax-summary {
  margin-top: 1rem;
  background: var(--ocean);
  border: 1px solid var(--teal-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.tax-detail-grid { display: flex; flex-direction: column; gap: 0.3rem; }
.td-row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 0.2rem 0; }
.td-lbl { color: var(--text-muted); }
.td-val { color: var(--text-bright); font-variant-numeric: tabular-nums; }
.td-val.teal { color: var(--teal); }
.td-row.separator { border-top: 1px solid var(--teal-border); margin-top: 0.25rem; padding-top: 0.5rem; }
.td-row.total-row { border-top: 1px solid var(--teal-border); margin-top: 0.25rem; padding-top: 0.5rem; }

/* File modal */
.file-summary-card {
  background: var(--ocean); border: 1px solid var(--teal-border);
  border-radius: 10px; padding: 1.25rem; margin-top: 1rem; text-align: center;
}
.file-detail-inner { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.file-prop { font-weight: 600; color: var(--text-bright); font-size: 0.9rem; }
.file-period { font-size: 0.78rem; color: var(--text-muted); }
.file-amount { font-family: var(--font-body, 'Satoshi', system-ui, sans-serif); font-size: 2rem; font-weight: 700; color: var(--teal); margin-top: 0.25rem; }
.file-amount-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.hto-filing-steps { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }

/* Responsive */
@media (max-width: 960px) {
  .tax-layout { grid-template-columns: 1fr; }
  .tax-sidebar-panel { order: -1; flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .hto-guide-card { flex: 1; min-width: 260px; }
}
@media (max-width: 640px) {
  .tax-history-row { grid-template-columns: 1fr; }
  .tax-hist-right { align-items: flex-start; }
  .tax-table th:nth-child(3), .tax-table th:nth-child(4),
  .tax-table td:nth-child(3), .tax-table td:nth-child(4) { display: none; }
}
