:root {
  --green: #1a7a4a;
  --green-dark: #145c38;
  --green-tint: #eaf4ee;
  --ink: #1c1f1d;
  --muted: #6b746f;
  --line: #e2e6e3;
  --bg: #f7f8f7;
  --card: #ffffff;
  --danger: #b4453a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

code, .mono, .num { font-family: "DM Mono", ui-monospace, monospace; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: .6rem 1rem;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s, opacity .15s;
}
button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--muted); padding: .4rem .6rem; }
.btn-ghost:hover { color: var(--danger); }

input, select {
  font-family: inherit;
  font-size: .92rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card {
  width: 100%; max-width: 360px; background: var(--card);
  padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow);
}
.brand { font-family: "DM Mono", monospace; font-size: 1.4rem; font-weight: 500; letter-spacing: -.02em; }
.brand .dot { color: var(--green); }
.login-card h1 { font-size: 1.05rem; margin: 1.2rem 0 .25rem; }
.login-card p.sub { color: var(--muted); font-size: .85rem; margin: 0 0 1.4rem; }
.field { margin-bottom: .9rem; }
.msg { font-size: .82rem; margin-top: .8rem; min-height: 1rem; }
.msg.error { color: var(--danger); }
.forgot-link {
  display: block; width: 100%; margin-top: .9rem;
  background: none; border: none; padding: 0;
  font-size: .82rem; color: var(--muted); text-align: center; cursor: pointer;
}
.forgot-link:hover { color: var(--green); }
.login-wrap { align-items: start; padding-top: 10vh; }
.login-wrap .login-card + .login-card { margin-top: 1rem; }

/* ---------- Change password ---------- */
#change-pw-form { padding: .4rem .5rem .2rem; }
.chpw-field { margin-bottom: .45rem; }
.chpw-field input { font-size: .8rem; padding: .45rem .6rem; }
.chpw-save { flex: 1; font-size: .82rem; padding: .45rem; margin-top: .1rem; }
.chpw-cancel {
  margin-top: .1rem; padding: .45rem .6rem; font-size: .82rem;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.chpw-cancel:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--card); border-right: 1px solid var(--line);
  padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: .2rem;
}
.sidebar .brand { padding: 0 .6rem 1.2rem; }
.nav-item {
  display: block; width: 100%; text-align: left; background: transparent;
  color: var(--ink); padding: .55rem .6rem; border-radius: 8px; font-weight: 500;
}
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--green-tint); color: var(--green-dark); }
.nav-sub { padding-left: 1.4rem; font-size: .85rem; color: var(--muted); }
.nav-sub.active { color: var(--green-dark); }
.sidebar .spacer { flex: 1; }
.user-row { font-size: .78rem; color: var(--muted); padding: 0 .6rem .5rem; word-break: break-all; }

.main { padding: 2rem 2.4rem; max-width: 900px; }
.view-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.4rem; }
.view-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -.01em; }
.view-head .eyebrow { font-family: "DM Mono", monospace; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--green); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1.2rem; }
.card h3 { margin: 0 0 1rem; font-size: 1rem; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .9rem; }

.summary { display: flex; gap: 1.6rem; margin: 1.2rem 0; padding: 1rem 1.2rem; background: var(--green-tint); border-radius: var(--radius); }
.summary div span { display: block; }
.summary .k { font-size: .72rem; color: var(--green-dark); text-transform: uppercase; letter-spacing: .06em; }
.summary .v { font-family: "DM Mono", monospace; font-size: 1.5rem; font-weight: 500; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-family: "DM Mono", monospace; }
tr:last-child td { border-bottom: none; }

.empty { text-align: center; color: var(--muted); padding: 2.4rem 1rem; font-size: .9rem; }
.edit-form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.p-form-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.p-job-count { font-family: "DM Mono", monospace; font-size: .78rem; color: var(--muted); }
.coming { display: inline-block; font-family: "DM Mono", monospace; font-size: .72rem; color: var(--green); border: 1px solid var(--green); border-radius: 6px; padding: .15rem .5rem; }
.section-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .6rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .7rem; margin-bottom: .6rem; }
.stat-box { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; }
.stat-k { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.stat-v { font-family: "DM Mono", monospace; font-size: 1.4rem; font-weight: 500; }

/* ---------- Stock Levels ---------- */
.stock-summary-bar {
  display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.stock-summary-pill {
  display: flex; flex-direction: column; align-items: center;
  padding: .7rem 1.4rem; border-radius: 12px; min-width: 100px;
  border: 1px solid transparent;
}
.pill-num  { font-family: "DM Mono", monospace; font-size: 1.8rem; font-weight: 500; line-height: 1; }
.pill-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; margin-top: .3rem; opacity: .8; }
.stock-pill-red     { background: #fde8e8; color: #c0392b; border-color: #f5c0bc; }
.stock-pill-orange  { background: #fff3e0; color: #d35400; border-color: #ffd8a8; }
.stock-pill-green   { background: #eaf4ee; color: var(--green-dark); border-color: #b8dfc7; }
.stock-pill-neutral { background: var(--card); color: var(--ink); border-color: var(--line); }

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.stock-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.stock-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.09); }
.stock-card.stock-zero { border-color: #f5c0bc; }
.stock-card.stock-low  { border-color: #ffd8a8; }

.stock-card-photo { position: relative; height: 160px; background: var(--bg); overflow: hidden; }
.stock-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stock-no-photo { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; opacity: .3; }

.stock-card-body { padding: .85rem; }
.stock-card-name { font-weight: 600; font-size: .9rem; margin-bottom: .45rem; line-height: 1.3; }
.stock-card-badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem; }
.stock-badge { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: .15rem .45rem; border-radius: 4px; }
.badge-green  { background: var(--green-tint); color: var(--green-dark); }
.badge-muted  { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge-etsy   { background: #fff0f6; color: #c2185b; }
.stock-card-price { font-family: "DM Mono", monospace; font-size: .9rem; color: var(--muted); margin-bottom: .7rem; }

.stock-meter-wrap { margin-bottom: .5rem; }
.stock-meter-bar  { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.stock-meter-fill { height: 100%; border-radius: 3px; transition: width .3s; }

.stock-count-row {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .45rem .6rem; border-radius: 7px; margin-top: .2rem;
}
.stock-count-num   { font-family: "DM Mono", monospace; font-size: 1.6rem; font-weight: 500; line-height: 1; }
.stock-count-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Trip cards ---------- */
.trip-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 1rem;
  box-shadow: var(--shadow); overflow: hidden;
}
.trip-card.trip-past { opacity: .6; }
.trip-card.trip-current { border-color: var(--green); }

.trip-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; cursor: pointer; gap: 1rem; user-select: none;
}
.trip-header:hover { background: var(--bg); }
.trip-header-left  { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.trip-header-right { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.trip-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--muted);
}
.trip-current .trip-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.trip-upcoming .trip-dot { background: #3498db; }
.trip-past .trip-dot { background: var(--line); }

.trip-title { font-weight: 600; font-size: .97rem; }
.trip-dest  { font-size: .8rem; color: var(--muted); margin-top: .05rem; }
.trip-dates { font-family: "DM Mono", monospace; font-size: .76rem; color: var(--muted); }

.trip-countdown {
  font-size: .73rem; font-weight: 700; padding: .22rem .6rem;
  border-radius: 99px; white-space: nowrap; letter-spacing: .02em;
}
.badge-upcoming { background: #e8f4fd; color: #1a6fa0; }
.badge-current  { background: var(--green-tint); color: var(--green-dark); }
.badge-past     { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.trip-chevron { font-size: .85rem; color: var(--muted); transition: transform .2s; display: inline-block; }
.trip-chevron.open { transform: rotate(180deg); }

.trip-body { border-top: 1px solid var(--line); }
.trip-body-layout { display: grid; grid-template-columns: 1fr 960px; gap: 0; }
.trip-body-main { min-width: 0; }
.trip-body-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.trip-map-wrap { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.trip-map-frame { width: 100%; flex: 1; min-height: 320px; border: none; border-radius: 8px; display: block; }
.trip-map-link { font-size: .75rem; text-align: right; }
.trip-map-link a { color: var(--muted); }
@media (max-width: 900px) {
  .trip-body-layout { grid-template-columns: 1fr; }
  .trip-body-side { border-left: none; border-top: 1px solid var(--line); }
}
.trip-section { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.trip-section:last-child { border-bottom: none; }
.trip-body-main .trip-section:last-child { border-bottom: none; }
.trip-body-side .trip-section { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.trip-section-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: .7rem;
}

.detail-row { display: flex; gap: .5rem; margin-bottom: .4rem; font-size: .9rem; align-items: baseline; }
.detail-k { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 110px; flex-shrink: 0; }
.detail-notes { align-items: flex-start; }
.notes-pre { margin: 0; font-family: inherit; font-size: .88rem; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }

.wx-strip { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; }
.wx-strip::-webkit-scrollbar { height: 4px; }
.wx-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.wx-day {
  flex: 0 0 auto; width: 110px; text-align: center;
  background: var(--card); border: 1px solid var(--line);
  border-top: 3px solid var(--wx-accent, var(--line));
  border-radius: 10px; padding: .65rem .5rem .55rem;
  display: flex; flex-direction: column; align-items: center;
}
.wx-day-label { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .3rem; }
.wx-icon { font-size: 1.9rem; line-height: 1; margin-bottom: .15rem; }
.wx-condition { font-size: .64rem; color: var(--muted); margin-bottom: .35rem; line-height: 1.2; min-height: 1.8em; }
.wx-temps { font-family: "DM Mono", monospace; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; }
.wx-hi { color: var(--wx-accent, var(--ink)); }
.wx-lo { color: var(--muted); }
.wx-sep { color: var(--muted); margin: 0 .15rem; font-weight: 400; }
.wx-details { display: flex; flex-direction: column; gap: .15rem; font-size: .65rem; color: var(--muted); width: 100%; }
.wx-details span { white-space: nowrap; }
.uv-low  { }
.uv-mod  { color: #e67e22; font-weight: 600; }
.uv-high { color: #e74c3c; font-weight: 700; }

.attraction-filter-bar { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.af-btn { font-size: .78rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--muted); cursor: pointer; transition: all .15s; white-space: nowrap; }
.af-btn:hover { border-color: var(--green); color: var(--green); }
.af-btn.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

.suggestions-wrap { margin-bottom: .8rem; }
.suggestions-title { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.suggestion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.suggestion-card { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; display: flex; flex-direction: column; gap: .3rem; }
.suggestion-name { font-size: .83rem; font-weight: 500; line-height: 1.3; }
.suggestion-name a { color: var(--ink); text-decoration: none; }
.suggestion-name a:hover { text-decoration: underline; }
.suggestion-dist { font-size: .72rem; color: var(--muted); }
.suggestion-add { font-size: .73rem; padding: .2rem .5rem; margin-top: auto; align-self: flex-start; border: 1px solid var(--line); border-radius: 4px; }
.suggestion-added { color: var(--muted) !important; cursor: default; }
.suggestion-rating { font-size: .75rem; display: flex; align-items: center; gap: .25rem; margin: .1rem 0; }
.suggestion-rating .stars { color: #f39c12; letter-spacing: -.05em; }
.suggestion-rating .rating-num { font-weight: 600; color: var(--ink); }
.suggestion-rating .rating-count { color: var(--muted); }
.suggestion-rating.no-rating { color: var(--muted); font-style: italic; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.checklist li:last-child { border-bottom: none; }
.checklist li.done > span { text-decoration: line-through; color: var(--muted); }
.checklist input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--green); flex-shrink: 0; }
.checklist .ci-del { margin-left: auto; padding: .1rem .4rem; font-size: .8rem; }

.attraction-list { list-style: none; margin: 0; padding: 0; }
.attraction-item { display: flex; align-items: flex-start; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.attraction-item:last-child { border-bottom: none; }
.attraction-name  { font-weight: 500; font-size: .9rem; }
.attraction-note  { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.attraction-link  { font-size: .78rem; color: var(--green); text-decoration: none; margin-top: .15rem; display: inline-block; }
.attraction-link:hover { text-decoration: underline; }
.ai-del { padding: .1rem .4rem; font-size: .8rem; flex-shrink: 0; margin-top: .05rem; }

.add-row { display: flex; gap: .5rem; }
.add-row input { flex: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Mobile top bar + hamburger ---------- */
.mobile-bar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 52px; background: var(--card); border-bottom: 1px solid var(--line);
  align-items: center; padding: 0 1rem; gap: .8rem;
}
.hamburger {
  background: none; border: none; font-size: 1.3rem; color: var(--ink);
  padding: .3rem .4rem; cursor: pointer; line-height: 1;
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.35);
}
.sidebar-overlay.open { display: block; }

@media (max-width: 720px) {
  .mobile-bar { display: flex; }

  .app { grid-template-columns: 1fr; padding-top: 52px; }

  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
    width: 260px; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: none;
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.15); }

  /* Hide desktop brand in sidebar on mobile (shown in top bar) */
  .sidebar > .brand { display: none; }

  .main { padding: 1.2rem 1rem; max-width: 100% !important; }

  /* Grids stack */
  .grid2, .grid3 { grid-template-columns: 1fr; }

  /* Summary bar wraps */
  .summary { flex-wrap: wrap; gap: .8rem; }

  /* Tables scroll horizontally */
  .card { overflow-x: auto; }
  table { min-width: 480px; }
  .runs-table { min-width: 520px; }
  .admin-table { min-width: 560px; }

  /* Wide page layouts collapse */
  .trip-body-layout { grid-template-columns: 1fr !important; }
  .trip-map-frame { min-height: 240px; }
  .runs-stats { grid-template-columns: repeat(2,1fr); }
  .runs-viz-row { grid-template-columns: 1fr; }
  .runs-grid4 { grid-template-columns: repeat(2,1fr); }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  /* Stock cards go single column on very small screens */
  .stock-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); }

  /* Bigger touch targets */
  .nav-item { padding: .7rem .6rem; }
  button { min-height: 38px; }
  input, select { min-height: 38px; }

  /* Runs input row wraps */
  .runs-input-row { flex-wrap: wrap; }

  /* View head stacks on small screens */
  .view-head { flex-direction: column; gap: .6rem; align-items: flex-start; }
}

/* ==================== ADMIN ==================== */
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { text-align: left; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .4rem .6rem; border-bottom: 2px solid var(--line); }
.admin-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }
.admin-num { font-family: "DM Mono", monospace; font-weight: 600; }
.admin-status { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .5rem; border-radius: 20px; }
.admin-status-confirmed { background: var(--green-tint); color: var(--green); }
.admin-status-force_change_password { background: #fff8e6; color: #b07d00; }
.admin-status-unconfirmed { background: #fef0f0; color: var(--danger); }
.admin-status-disabled { background: #f0f0f0; color: #888; }
.admin-actions { white-space: nowrap; }
.admin-act-btn { font-size: .75rem; padding: .25rem .6rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; margin-left: .3rem; }
.admin-block  { color: #b07d00; border-color: #e6c97a; }
.admin-block:hover  { background: #fff8e6; }
.admin-enable { color: var(--green); border-color: #a8d5b8; }
.admin-enable:hover { background: var(--green-tint); }
.admin-delete { color: var(--danger); border-color: #e8b5b0; }
.admin-delete:hover { background: #fef0f0; }

/* ==================== RUNS ==================== */
.runs-wrap { padding: 0 0 3rem; }

.runs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 0 1rem;
  border-bottom: 3px solid #E8420A;
  margin-bottom: 1.3rem;
}
.runs-brand { display: flex; align-items: center; gap: .9rem; }
.runs-glyph { font-size: 2.2rem; line-height: 1; }
.runs-eyebrow { font-size: .62rem; font-weight: 700; letter-spacing: .15em; color: #E8420A; text-transform: uppercase; }
.runs-title { font-size: 1.75rem; font-weight: 800; color: var(--ink); line-height: 1; }
.runs-odometer {
  font-family: "DM Mono", monospace; font-size: 1rem; font-weight: 700;
  color: #E8420A; background: rgba(232,66,10,.07);
  border: 1.5px solid rgba(232,66,10,.2); border-radius: 8px; padding: .35rem .75rem;
}

.runs-input-card {
  background: #1A1A1A; border-radius: 14px;
  padding: 1.1rem 1.3rem; margin-bottom: 1.1rem;
}
.runs-input-label { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.55); margin-bottom: .5rem; }
.runs-textarea {
  width: 100%; background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.11);
  border-radius: 10px; color: #fff; font-size: .94rem; font-family: inherit;
  padding: .7rem 1rem; resize: none; line-height: 1.5; box-sizing: border-box;
}
.runs-textarea::placeholder { color: rgba(255,255,255,.3); }
.runs-textarea:focus { outline: none; border-color: #E8420A; }
.runs-input-row { display: flex; gap: .6rem; align-items: center; margin-top: .7rem; flex-wrap: wrap; }
.runs-btn-primary {
  background: #E8420A; color: #fff; border: none; border-radius: 8px;
  padding: .5rem 1.2rem; font-size: .87rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.runs-btn-primary:hover { background: #c93908; }
.runs-btn-primary:disabled { opacity: .45; cursor: default; }
.runs-btn-ghost {
  background: transparent; color: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.18); border-radius: 8px;
  padding: .5rem .9rem; font-size: .84rem; cursor: pointer;
}
.runs-btn-ghost:hover { border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.85); }
.runs-msg { font-size: .8rem; color: rgba(255,255,255,.65); }

.runs-manual-card {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 1.1rem 1.3rem; margin-bottom: 1.1rem;
}
.runs-grid4 { display: grid; grid-template-columns: repeat(4,1fr); gap: .6rem; }

.runs-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; margin-bottom: 1.1rem; }
.runs-stat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem; text-align: center; position: relative; overflow: hidden;
}
.runs-stat-box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: #E8420A;
}
.runs-stat-val { font-family: "DM Mono", monospace; font-size: 1.45rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.runs-stat-lbl { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .3rem; }

.runs-viz-row { display: grid; grid-template-columns: 1fr 150px; gap: .75rem; margin-bottom: 1.1rem; }
.runs-chart-card, .runs-ring-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem;
}
.runs-section-label { font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.runs-chart-svg { width: 100%; height: 80px; display: block; }
.runs-chart-labels { display: flex; justify-content: space-between; font-size: .65rem; color: var(--muted); margin-top: .3rem; }
.runs-empty-chart { font-size: .82rem; color: var(--muted); text-align: center; padding: 1.5rem 0; }
.runs-ring-svg { width: 100%; max-width: 110px; display: block; margin: 0 auto; }
.runs-ring-sub { text-align: center; font-size: .72rem; color: var(--muted); margin-top: .35rem; }

.runs-history-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.runs-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.runs-table thead tr { border-bottom: 2px solid #E8420A; }
.runs-table th { font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); text-align: left; padding: .4rem .5rem; }
.runs-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.run-row:last-child td { border-bottom: none; }
.run-row:hover { background: rgba(232,66,10,.025); }
.run-date { color: var(--muted); white-space: nowrap; font-size: .83rem; }
.run-dist-badge { background: rgba(232,66,10,.1); color: #E8420A; font-weight: 700; border-radius: 20px; padding: .18rem .55rem; font-size: .81rem; }
.run-dur { color: var(--muted); font-size: .85rem; }
.run-feel { font-size: 1.1rem; }
.run-notes { color: var(--muted); font-size: .8rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runs-del { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1.1rem; padding: .1rem .3rem; border-radius: 4px; }
.runs-del:hover { color: var(--danger); background: rgba(180,69,58,.08); }

.runs-empty { text-align: center; padding: 2.5rem 1rem; }
.runs-empty-glyph { font-size: 2.8rem; margin-bottom: .7rem; }
.runs-empty-text { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.runs-empty-sub { font-size: .83rem; color: var(--muted); margin-top: .35rem; }

.runs-pb-toast { position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 9999; }
.runs-pb-inner {
  background: linear-gradient(135deg,#E8420A,#ff8c00); color: #fff;
  font-weight: 700; font-size: .95rem; padding: .75rem 1.6rem;
  border-radius: 40px; box-shadow: 0 4px 20px rgba(232,66,10,.4); white-space: nowrap;
  animation: pbIn .35s ease;
}
@keyframes pbIn { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }

@media (max-width: 700px) {
  .runs-stats    { grid-template-columns: repeat(2,1fr); }
  .runs-viz-row  { grid-template-columns: 1fr; }
  .runs-grid4    { grid-template-columns: repeat(2,1fr); }
}
