/* Getaway — warm travel-editorial. No external assets. */
:root {
  --bg: #f7f3ec;
  --panel: #fffdf9;
  --ink: #2b2620;
  --ink-soft: #6f665a;
  --line: #e6ddd0;
  --accent: #c05b3c;      /* terracotta */
  --accent-dark: #a34a2f;
  --green: #3e7a5e;
  --gold: #b98a2f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43,38,32,.06), 0 8px 24px rgba(43,38,32,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--ink-soft); font-size: .85em; }
h1, h2, h3, .brand { font-family: ui-serif, Georgia, "Times New Roman", serif; }

/* ---------- login ---------- */
#view-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 48px 44px; max-width: 440px; width: 100%; text-align: center;
}
.brand-mark { font-size: 42px; line-height: 1; }
.brand-mark.small { font-size: 22px; }
.brand { font-size: 40px; margin: 8px 0 4px; letter-spacing: -.5px; }
.brand.small { font-size: 22px; margin: 0; }
.tagline { color: var(--ink-soft); margin: 0 0 28px; }
.google-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px;
  background: var(--ink); color: #fff; border-radius: 999px; text-decoration: none;
  font-weight: 600; transition: transform .1s ease;
}
.google-btn:hover { transform: translateY(-1px); }
.fineprint { color: var(--ink-soft); font-size: 13px; margin-top: 22px; }
.pw-form { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; text-align: left; }
.linklike { background: none; border: none; color: var(--accent-dark); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; padding: 0; }
.google-btn { margin-top: 14px; }

/* ---------- app chrome ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 5;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.pill {
  background: #f0e7d8; border: 1px solid var(--line); color: var(--ink);
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.ghost-btn {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.ghost-btn:hover { border-color: var(--ink-soft); }
.primary-btn {
  background: var(--accent); border: none; color: #fff; font-weight: 700; font-size: 15px;
  padding: 11px 22px; border-radius: 10px; cursor: pointer;
}
.primary-btn:hover { background: var(--accent-dark); }
.primary-btn:disabled { opacity: .5; cursor: default; }
.primary-btn.wide { width: 100%; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 22px; padding: 22px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } .sidebar { order: 2; } }

.sidebar-h { margin: 22px 0 8px; font-size: 14px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history li button {
  width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; color: var(--ink);
}
.history li button:hover { border-color: var(--accent); }
.history .h-status { display: block; font-size: 11.5px; margin-top: 2px; color: var(--ink-soft); }
.history .h-status.running { color: var(--gold); }
.history .h-status.error, .history .h-status.interrupted { color: #a33; }
.history .h-status.done { color: var(--green); }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}
.panel + .panel { margin-top: 22px; }
.panel-title { margin: 0 0 4px; font-size: 26px; }
.panel-sub { margin: 0 0 16px; color: var(--ink-soft); }

textarea, input[type=text], select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 12px 14px; font: inherit; color: var(--ink); resize: vertical;
}
textarea:focus, input:focus { outline: 2px solid var(--accent); border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.chip {
  background: #f0e7d8; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink);
}
.chip:hover { border-color: var(--accent); }

.search-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.depth-toggle { display: flex; gap: 18px; font-size: 14px; }
.depth-toggle label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.banner { background: #fbeae2; border: 1px solid #ecc6b5; color: #8c3b21; border-radius: 10px; padding: 10px 14px; margin-top: 14px; font-size: 14px; }
.banner.info { background: #eef3ee; border-color: #cfdccf; color: #2f5c46; }

/* ---------- progress ---------- */
.results-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.progress { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.progress li { display: flex; gap: 10px; font-size: 14px; align-items: baseline; }
.progress .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; position: relative; top: -1px; }
.progress li.k-stage-done .dot, .progress li.k-done .dot { background: var(--green); }
.progress li.k-stage-start .dot { background: var(--gold); animation: pulse 1.2s infinite; }
.progress li.k-error .dot, .progress li.k-cancelled .dot { background: #a33; }
@keyframes pulse { 50% { opacity: .35; } }
.progress .ts { color: var(--ink-soft); font-size: 12px; flex: none; width: 52px; }

.summary {
  background: #f4efe4; border-left: 4px solid var(--accent); border-radius: 8px;
  padding: 14px 16px; margin: 14px 0; font-size: 15px;
}

.results-toolbar { display: flex; gap: 18px; align-items: center; margin: 12px 0 16px; font-size: 14px; flex-wrap: wrap; }
.results-toolbar label { display: flex; gap: 8px; align-items: center; }
.results-toolbar select { width: auto; padding: 6px 10px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
  display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-img { height: 170px; background: #ece4d5 center/cover no-repeat; position: relative; }
.card-img .source {
  position: absolute; top: 10px; left: 10px; background: rgba(43,38,32,.82); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
}
.card-img .score {
  position: absolute; top: 10px; right: 10px; background: var(--green); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.card-loc { color: var(--ink-soft); font-size: 13px; }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); }
.card-price { font-size: 17px; font-weight: 800; color: var(--ink); }
.card-price .per { font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.card-why { font-size: 13px; color: var(--ink); background: #f7f2e7; border-radius: 8px; padding: 8px 10px; margin-top: 4px; }
.card-note { font-size: 12px; color: var(--ink-soft); font-style: italic; }
.card-avail.ok { font-size: 12.5px; font-weight: 700; color: var(--green); background: #eef4ee; border-radius: 8px; padding: 6px 10px; }
.card-actions { margin-top: auto; padding-top: 10px; }
.card-actions a {
  display: inline-block; color: var(--accent-dark); font-weight: 700; text-decoration: none; font-size: 14px;
}
.card-actions a:hover { text-decoration: underline; }

/* ---------- tables / account / admin ---------- */
.field { display: block; margin: 10px 0 14px; font-size: 14px; color: var(--ink-soft); }
.field input { margin-top: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0 20px; }
.table th { text-align: left; color: var(--ink-soft); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.stat { background: #f4efe4; border-radius: 10px; padding: 14px; }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .l { font-size: 12.5px; color: var(--ink-soft); }
.grant-input { width: 70px; padding: 4px 8px; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: #a33; font-weight: 700; }
