/* ── ayanami.folio design system ───────────────────────────────────────────── */
:root {
  --bg:         #0a0a0a;
  --bg-2:       #141414;
  --bg-3:       #1c1c1c;
  --border:     #252525;
  --border-2:   #333333;
  --text:       #ebebeb;
  --text-muted: #888888;
  --text-dim:   #444444;
  --accent:     #ebebeb;
  --danger:     #e05252;
  --danger-bg:  rgba(224,82,82,0.08);
  --success:    #52b788;
  --success-bg: rgba(82,183,136,0.08);
  --font:       'Space Grotesk','Inter',system-ui,-apple-system,sans-serif;
  --mono:       'IBM Plex Mono','JetBrains Mono',monospace;
  --radius:     10px;
  --radius-lg:  14px;
  --shadow:     0 4px 32px rgba(0,0,0,0.7);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-muted); }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); }
.pos { color: var(--success); }
.neg { color: var(--danger); }

/* ── Topbar ─────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 58px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-logo {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text); font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.01em; text-decoration: none;
}
.topbar-logo:hover { color: var(--text); }
.logo-img   { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.logo-text  { font-size: 0.95rem; letter-spacing: -0.02em; }
.logo-accent { color: var(--text-muted); }
.topbar-nav { display: flex; align-items: center; gap: 0.25rem; }

.nav-link, .nav-btn {
  display: inline-flex; align-items: center;
  padding: 0.4rem 0.7rem; border-radius: var(--radius);
  font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; font-family: var(--font);
  transition: color 0.12s, background 0.12s;
}
.nav-link:hover, .nav-btn:hover { color: var(--text); background: var(--bg-3); }
.nav-btn--cta { color: var(--text); border: 1px solid var(--border-2); }
.nav-btn--cta:hover { background: var(--bg-3); }
.nav-icon { display: inline-block; vertical-align: middle; margin-right: 0.45rem; margin-top: -1px; flex-shrink: 0; opacity: 0.7; }
.nav-link:hover .nav-icon, .nav-btn:hover .nav-icon { opacity: 1; }
.nav-label { }

/* ── Main layout ─────────────────────────────────────────────────────────────── */
.main-content {
  flex: 1; max-width: 1280px; width: 100%;
  margin: 0 auto; padding: 1.5rem 2rem 4rem;
}

/* ── Summary banner ──────────────────────────────────────────────────────────── */
.pf-summary {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 2rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
  transition: opacity 0.2s;
}
.pf-stat { display: flex; flex-direction: column; gap: 0.15rem; padding: 0 1.5rem; }
.pf-stat:first-child { padding-left: 0; }
.pf-stat--sep { width: 1px; height: 40px; background: var(--border); padding: 0; flex-shrink: 0; }
.pf-stat-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.pf-stat-value { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.pf-stat-sub   { font-size: 0.78rem; font-family: var(--mono); margin-top: -0.1rem; }

/* ── Card / section ──────────────────────────────────────────────────────────── */
.pf-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

/* ── Portfolio chart ─────────────────────────────────────────────────────────── */
.pf-chart-card { }
.pf-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.pf-chart-title-row { display: flex; align-items: center; gap: 0.75rem; }
.pf-chart-curr { font-size: 0.78rem; }
.pf-chart-wrap { position: relative; height: 220px; }
.pf-chart-loader {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,0.7); border-radius: var(--radius);
}
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border-2);
  border-top-color: var(--text-muted); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Timeframe pills ─────────────────────────────────────────────────────────── */
.pf-tf-group { display: flex; gap: 0.2rem; }
.pf-tf {
  padding: 0.2rem 0.55rem; border-radius: 6px; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: none; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer; font-family: var(--font);
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.pf-tf:hover { color: var(--text); background: var(--bg-3); }
.pf-tf--active { color: var(--text); border-color: var(--border-2); background: var(--bg-3); }

/* ── Category breakdown ──────────────────────────────────────────────────────── */
.pf-breakdown {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.pf-bk-item {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
}
.pf-bk-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.pf-bk-label  { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.pf-bk-value  { font-size: 0.9rem; font-weight: 600; }
.pf-bk-bar    { height: 3px; background: var(--bg-3); border-radius: 999px; margin-bottom: 0.4rem; }
.pf-bk-fill   { height: 100%; background: var(--text); border-radius: 999px; transition: width 0.4s ease; }
.pf-bk-meta   { display: flex; justify-content: space-between; }

/* ── Holdings section ────────────────────────────────────────────────────────── */
.pf-section {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden;
}
.pf-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border);
}
.pf-section-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.pf-section-meta  { display: flex; align-items: center; gap: 0.75rem; }
.pf-table-wrap { overflow-x: auto; }
.pf-table {
  width: 100%; border-collapse: collapse; font-size: 0.87rem;
}
.pf-table thead tr { border-bottom: 1px solid var(--border); }
.pf-table th {
  padding: 0.6rem 0.75rem; text-align: right;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim); white-space: nowrap;
}
.pf-table th:first-child, .pf-table th:nth-child(2) { text-align: left; }
.pf-row {
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: background 0.1s;
}
.pf-row:last-child { border-bottom: none; }
.pf-row:hover { background: var(--bg-3); }
.pf-table td { padding: 0.65rem 0.75rem; vertical-align: middle; }
.td-thumb   { width: 46px; padding-right: 0; }
.td-name    { text-align: left; }
.td-num     { text-align: right; white-space: nowrap; }
.td-day     { }
.td-actions { text-align: right; white-space: nowrap; }
.row-thumb  { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: var(--bg-3); }
.row-thumb-placeholder {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.02em;
}
.row-name   { display: block; font-weight: 500; line-height: 1.3; }
.row-ticker { display: block; font-size: 0.75rem; }
.pf-pct     { font-size: 0.75em; opacity: 0.85; }
.target-badge { font-size: 0.7em; }

.icon-btn {
  padding: 0.3rem; border-radius: 6px; background: none; border: none;
  color: var(--text-dim); cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.icon-btn:hover { color: var(--text); background: var(--bg-3); }
.icon-btn--danger:hover { color: var(--danger); background: var(--danger-bg); }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.pf-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1rem; padding: 5rem 2rem;
  color: var(--text-muted); text-align: center;
}

/* ── Modal overlay ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem;
}
.modal--wide { max-width: 720px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-title-row { display: flex; align-items: center; gap: 0.75rem; }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-sub   { font-size: 0.8rem; margin-top: 0.1rem; }
.modal-close {
  padding: 0.35rem; border-radius: 6px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; transition: color 0.12s, background 0.12s; flex-shrink: 0;
}
.modal-close:hover { color: var(--text); background: var(--bg-3); }
.modal-thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: var(--bg-3); }
.modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; padding-top: 0.5rem; border-top: 1px solid var(--border); }

/* Asset chart stats row */
.pf-stat-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ac-stat {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.05rem; flex: 1; min-width: 90px;
}
.ac-stat--notes { flex-basis: 100%; }
.ac-stat-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ac-stat-val   { font-size: 0.85rem; font-weight: 500; white-space: nowrap; }

/* ── Category tabs ───────────────────────────────────────────────────────────── */
.cat-tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; flex-wrap: wrap; }
.cat-tab {
  padding: 0.35rem 0.8rem; border-radius: 6px; font-size: 0.75rem;
  font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  background: none; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer; font-family: var(--font);
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.cat-tab:hover { color: var(--text); background: var(--bg-3); }
.cat-tab--active { color: var(--text); border-color: var(--border-2); background: var(--bg-3); }

/* ── Form fields ─────────────────────────────────────────────────────────────── */
.field-group  { display: flex; flex-direction: column; gap: 0.35rem; }
.field-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field-label  { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.field-input  {
  background: var(--bg-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 0.55rem 0.75rem;
  color: var(--text); font-family: var(--font); font-size: 0.88rem;
  transition: border-color 0.12s; width: 100%;
}
.field-input:focus { outline: none; border-color: var(--text-muted); }
.field-input::placeholder { color: var(--text-dim); }
.field-textarea { resize: vertical; min-height: 60px; }

/* ── Symbol search dropdown ──────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); max-height: 280px; overflow-y: auto;
}
.dd-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.9rem; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: var(--bg-3); }
.dd-item--cs2 { padding: 0.5rem 0.9rem; }
.dd-ticker { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); min-width: 80px; }
.dd-name   { font-size: 0.87rem; flex: 1; }
.dd-type   { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.dd-cs2-img  { width: 48px; height: 36px; object-fit: contain; flex-shrink: 0; }
.dd-cs2-info { display: flex; flex-direction: column; }

/* ── Symbol preview ──────────────────────────────────────────────────────────── */
.symbol-preview {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.65rem 0.9rem;
}
.symbol-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; }
.symbol-name  { font-weight: 500; font-size: 0.9rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; font-family: var(--font); border: none;
  background: var(--text); color: var(--bg);
  transition: opacity 0.12s, background 0.12s;
}
.btn:hover    { opacity: 0.88; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--ghost   { background: none; color: var(--text); border: 1px solid var(--border-2); }
.btn--ghost:hover { background: var(--bg-3); opacity: 1; }
.btn--danger  { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(224,82,82,0.2); }
.btn--danger:hover { opacity: 0.85; }
.btn--sm      { padding: 0.4rem 0.85rem; font-size: 0.76rem; }
.btn--xs      { padding: 0.3rem 0.65rem; font-size: 0.72rem; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-muted);
}
.footer-left { display: flex; align-items: center; gap: 0.75rem; }
.footer-wordmark { font-weight: 600; color: var(--text); font-size: 0.82rem; }
.footer-accent { color: var(--text-muted); }
.footer-copy { color: var(--text-muted); }

/* ── Smart Price panel ───────────────────────────────────────────────────────── */
.sp-panel {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.sp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.9rem; cursor: pointer; user-select: none;
  transition: background 0.1s;
}
.sp-header:hover { background: rgba(255,255,255,0.03); }
.sp-title-row { display: flex; align-items: center; gap: 0.5rem; }
.sp-title { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.sp-chevron { color: var(--text-muted); transition: transform 0.18s; flex-shrink: 0; }
.sp-active-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.1rem 0.45rem; border-radius: 999px;
  background: rgba(235,235,235,0.1); color: var(--text); border: 1px solid var(--border-2);
}
.sp-body {
  border-top: 1px solid var(--border); padding: 0.85rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.sp-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.sp-desc em { color: var(--text); font-style: normal; }
.sp-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.sp-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 110px; }
.sp-ratio-field { max-width: 130px; }
.sp-mkt-price { font-family: var(--mono); font-size: 0.88rem; padding: 0.55rem 0; color: var(--text-muted); }
.sp-ratio { font-size: 0.9rem; font-weight: 600; padding: 0.55rem 0; }
.sp-actions { display: flex; gap: 0.5rem; }
.sp-hint { font-size: 0.76rem; line-height: 1.4; }
.sp-tag {
  display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 0.05rem 0.35rem; border-radius: 4px;
  background: rgba(235,235,235,0.1); border: 1px solid var(--border-2);
  vertical-align: middle; margin-left: 0.25rem;
}

/* ── After-fee / VWL panels ──────────────────────────────────────────────────── */
.af-panel, .vlw-panel {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 0.9rem;
}
.af-panel.hidden, .vlw-panel.hidden { display: none; }
.af-header {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.1rem;
}
.af-title { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.af-label { font-size: 0.72rem; margin-left: auto; text-align: right; }

/* ── Row inline badges / icons ───────────────────────────────────────────────── */
.smart-icon {
  display: inline-block; vertical-align: middle;
  margin-left: 0.3rem; color: var(--text-muted); flex-shrink: 0;
}
.target-icon {
  display: inline-block; vertical-align: middle;
  margin-left: 0.25rem; color: var(--success); flex-shrink: 0;
}
.vlw-badge {
  display: inline-block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 0.05rem 0.3rem; border-radius: 4px;
  background: rgba(82,183,136,0.12); color: var(--success); border: 1px solid rgba(82,183,136,0.25);
  vertical-align: middle; margin-left: 0.3rem;
}

/* ── ac-stat extras ──────────────────────────────────────────────────────────── */
.ac-stat--full { flex-basis: 100%; }
.ac-stat--target { border-color: rgba(82,183,136,0.3); }
.ac-stat-sub { font-size: 0.74em; color: var(--text-muted); font-family: var(--mono); }

/* ── VWL / sell fields in modal ──────────────────────────────────────────────── */
.field-section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-muted); padding-top: 0.25rem; padding-bottom: 0.1rem;
  border-top: 1px solid var(--border); margin-top: 0.25rem;
}
.field-hint { font-size: 0.74rem; line-height: 1.45; padding-top: 0.15rem; }
.vlw-form { display: flex; flex-direction: column; gap: 0.6rem; }
.toggle-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; cursor: pointer; user-select: none; color: var(--text);
}
.toggle-label input[type=checkbox] { accent-color: var(--text); width: 14px; height: 14px; flex-shrink: 0; }

/* ── Payouts panel ───────────────────────────────────────────────────────────── */
.payout-panel {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.payout-list { display: flex; flex-direction: column; gap: 0.25rem; }
.payout-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.4rem; border-radius: 6px;
  transition: background 0.1s;
}
.payout-row:hover { background: rgba(255,255,255,0.03); }
.payout-type-badge {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.1rem 0.4rem; border-radius: 4px;
}
.payout-type-badge--dividend         { background: rgba(82,183,136,0.12); color: #52b788; border: 1px solid rgba(82,183,136,0.2); }
.payout-type-badge--coupon           { background: rgba(100,149,237,0.12); color: #6495ed; border: 1px solid rgba(100,149,237,0.2); }
.payout-type-badge--return_of_capital{ background: rgba(244,162,97,0.12);  color: #f4a261; border: 1px solid rgba(244,162,97,0.2); }
.payout-type-badge--other            { background: var(--bg-3); color: var(--text-muted); border: 1px solid var(--border); }
.payout-total-row {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.4rem 0.4rem; border-top: 1px solid var(--border); margin-top: 0.1rem;
}
.payout-add-form {
  display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center;
  border-top: 1px solid var(--border); padding-top: 0.5rem;
}
.payout-date   { flex: 1; min-width: 120px; }
.payout-type-sel { flex: 1; min-width: 130px; }
.payout-amount { flex: 1; min-width: 100px; }
.payout-notes  { flex: 2; min-width: 140px; }

/* ── Plan wizard ─────────────────────────────────────────────────────────────── */
.plan-wizard {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.plan-wizard-header {
  display: flex; align-items: center; justify-content: space-between;
}
.plan-wizard-bulk {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.plan-schedule-header, .plan-schedule-row {
  display: flex; gap: 0.4rem; align-items: center;
}
.plan-schedule-header { padding-bottom: 0.15rem; }
.plan-schedule-rows {
  max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.3rem;
  border: 1px solid var(--border); border-radius: 6px; padding: 0.4rem;
}
.plan-wizard-footer {
  display: flex; gap: 0.5rem; justify-content: flex-end; padding-top: 0.1rem;
}

/* ── Lot rows ────────────────────────────────────────────────────────────────── */
.lot-header {
  display: flex; gap: 0.4rem; align-items: center;
  padding: 0 0 0.3rem;
}
.lot-row {
  display: flex; gap: 0.4rem; align-items: center;
  margin-bottom: 0.35rem;
}
.lot-date  { flex: 1.2; min-width: 0; }
.lot-qty   { flex: 1;   min-width: 0; }
.lot-price { flex: 1;   min-width: 0; }
.lot-remove-btn { flex-shrink: 0; }
.invisible { visibility: hidden; pointer-events: none; }
.lots-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding-top: 0.2rem; flex-wrap: wrap;
}
.lots-summary { font-size: 0.76rem; }

/* ── Login page ──────────────────────────────────────────────────────────────── */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
}
.login-wrap {
  width: 100%; max-width: 380px; padding: 1.5rem;
}
.login-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 2rem 2.25rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.login-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em;
}
.login-logo-img { width: 26px; height: 26px; object-fit: contain; border-radius: 5px; }
.login-logo-text { font-size: 1rem; }
.login-sub { font-size: 0.83rem; margin-top: -0.35rem; }
.login-error {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--danger-bg); border: 1px solid rgba(224,82,82,0.25);
  border-radius: var(--radius); padding: 0.6rem 0.85rem;
  font-size: 0.82rem; color: var(--danger);
}
.login-form { display: flex; flex-direction: column; gap: 0.85rem; }
.login-btn  { width: 100%; justify-content: center; padding: 0.65rem; font-size: 0.85rem; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-content { padding: 1rem 1rem 3rem; }
  .topbar { padding: 0 1rem; }
  .pf-summary { padding: 1rem; gap: 0.5rem; }
  .pf-stat { padding: 0 0.75rem; }
  .pf-stat-value { font-size: 1rem; }
  .pf-table th:nth-child(n+7), .pf-table td:nth-child(n+7) { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 0.25rem; text-align: center; }
}
@media (max-width: 600px) {
  .pf-stat--sep { display: none; }
  .pf-summary { gap: 0.75rem; }
  .pf-stat { padding: 0; flex: 1; min-width: 120px; }
  .ac-stat { min-width: 80px; }
  .pf-table th:nth-child(n+5), .pf-table td:nth-child(n+5) { display: none; }
  .pf-table th:nth-child(4), .pf-table td:nth-child(4) { display: none; }
}
