/* BaseCamp web app — same palette as the marketing site. */
:root {
  --paper: #f7f5ef;
  --card: #ffffff;
  --ink: #10231b;
  --muted: #5f6f67;
  --line: #e2ded2;
  --green: #1d6f42;
  --green-dark: #0f3d26;
  --green-soft: #e8f1ea;
  --orange: #ff7a3d;
  --orange-soft: #fff0e8;
  --red: #b3372c;
  --amber: #b7791f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 35, 27, .06), 0 8px 24px rgba(16, 35, 27, .06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--green-dark);
  color: #eaf3ec;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 4px 8px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--green);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-weight: 700; letter-spacing: -.02em; font-size: 16px; }
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: #9fc0ab; letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: #cfe2d5; text-decoration: none; font-weight: 500; font-size: 14px;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .13); color: #fff; }
.nav a .ico { width: 18px; text-align: center; opacity: .9; }
.nav .badge { margin-left: auto; background: var(--orange); color: #2a1305; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.who { padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.who .name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.who .email { font-size: 11px; color: #9fc0ab; overflow: hidden; text-overflow: ellipsis; }
.sidebar a.plain { color: #cfe2d5; font-size: 13px; text-decoration: none; padding: 4px 10px; }
.sidebar a.plain:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 239, .9); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 19px; }
.topbar .spacer { flex: 1; }
.view { padding: 22px; max-width: 1120px; width: 100%; }
.mobile-nav { display: none; }

/* ---------- primitives ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: #fbfaf6; border-color: #d5d0c2; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #176038; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #e7c9c5; background: #fff8f7; }
.btn.danger:hover { background: #fdeeec; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 8px; }

label.field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.field > span { color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 11px; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29, 111, 66, .13); }
textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.orange { background: var(--orange-soft); color: #a3440f; }
.pill.grey { background: #efece4; color: var(--muted); }
.pill.red { background: #fbe9e7; color: var(--red); }
.pill.amber { background: #fdf3df; color: var(--amber); }

.list { display: grid; gap: 10px; }
.item {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.item:hover { border-color: #d2ccbc; }
.item .grow { min-width: 0; flex: 1; }
.item .title { font-weight: 650; }
.item .sub { color: var(--muted); font-size: 13px; }
.item .actions { display: flex; gap: 8px; align-items: center; flex: none; flex-wrap: wrap; }

.stat { padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.stat .v { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; }
.stat .s { font-size: 12px; color: var(--muted); }

.empty { padding: 26px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); background: #fbfaf6; }
.empty strong { color: var(--ink); display: block; margin-bottom: 3px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--green-dark); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow); z-index: 50; max-width: 90vw;
}
.toast.error { background: var(--red); }

/* ---------- discover ---------- */
.resort-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.resort {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease;
}
.resort:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.resort .ph { height: 126px; background: linear-gradient(135deg, #dfe9df, #f1eee4); display: grid; place-items: center; color: #7d9487; }
.resort .ph img { width: 100%; height: 100%; object-fit: cover; }
.resort .body { padding: 12px 14px 14px; display: grid; gap: 3px; }
.resort .name { font-weight: 650; }
.resort .where { color: var(--muted); font-size: 13px; }
.resort .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 26, 19, .45); display: grid; place-items: center; padding: 18px; z-index: 40; }
.modal { background: var(--card); border-radius: 16px; width: min(680px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.modal-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 18px 20px 0; }
.modal-body { padding: 14px 20px 20px; display: grid; gap: 14px; }
.modal .x { border: 0; background: #f0ede5; width: 32px; height: 32px; border-radius: 999px; cursor: pointer; font-size: 16px; line-height: 1; }

.status-line { font-size: 13px; min-height: 18px; }
.status-line.error { color: var(--red); }
.status-line.ok { color: var(--green); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-art { background: var(--green-dark); color: #eaf3ec; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after {
  content: ""; position: absolute; inset: auto -20% -35% -20%; height: 70%;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 122, 61, .35), transparent 65%);
}
.auth-art h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; max-width: 12ch; }
.auth-art p { color: #a9c6b4; max-width: 42ch; }
.auth-panel { display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; background: #efece4; padding: 4px; border-radius: 10px; margin: 18px 0; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 650; cursor: pointer; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 17px; }
  .mobile-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; }
  .mobile-nav a { flex: none; text-decoration: none; color: var(--muted); font-weight: 650; font-size: 13px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
  .mobile-nav a.active { background: var(--green); border-color: var(--green); color: #fff; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
