/* Falcon Rentals — shared styles.
   Public site: warm, confident marketing. Portal: cool, dense ops tool.
   Both share the navy/amber identity. System fonts only (offline-safe). */

:root {
  --ink: #0e1d33;
  --steel: #16304f;
  --amber: #d99a2b;
  --amber-deep: #b87d18;
  --fog: #eceef1;
  --card: #ffffff;
  --text: #1b2733;
  --muted: #5b6b7c;
  --line: #d7dde4;
  --ok: #2e7d5b;
  --legal: #b4532a;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--fog);
  line-height: 1.5;
}

a { color: var(--steel); }

/* --- Brand wordmark --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: inherit;
}
.brand svg { display: block; flex: none; }
.brand .brand-name { font-size: 1.15rem; }
.brand .brand-name b { color: var(--amber); font-weight: 800; }

/* ======================= PUBLIC SITE ======================= */
.site-header {
  background: var(--ink);
  color: #fff;
}
.site-header .bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header .brand { color: #fff; }
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  color: #c6d2e0;
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: #fff; }
.site-nav .btn-ghost {
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  color: #fff;
}

.hero {
  background:
    linear-gradient(180deg, rgba(14,29,51,0.72), rgba(14,29,51,0.92)),
    radial-gradient(1200px 400px at 75% -10%, #27486f 0%, transparent 60%),
    var(--ink);
  color: #fff;
}
.hero .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 16ch;
  font-weight: 800;
}
.hero p.lede {
  font-size: 1.15rem;
  color: #cdd8e6;
  max-width: 52ch;
  margin: 0 0 2rem;
}

/* booking bar — the characteristic object of a rental company */
.booking {
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.75rem;
  box-shadow: 0 18px 40px rgba(6,15,30,0.35);
  max-width: 820px;
}
.booking .field { display: flex; flex-direction: column; gap: 0.25rem; }
.booking label { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.booking input, .booking select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font: inherit;
  color: var(--text);
  background: #fbfcfd;
}
.booking .go {
  align-self: end;
  background: var(--amber);
  color: #221600;
  border: none;
  border-radius: 8px;
  padding: 0.62rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}
.booking .go:hover { background: var(--amber-deep); color: #fff; }

.section { max-width: 1120px; margin: 0 auto; padding: 3rem 1.5rem; }
.section h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
}
.fleet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}
.car {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.car .thumb {
  height: 120px;
  background: linear-gradient(135deg, #e7ecf2, #cfd9e6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.car .body { padding: 0.9rem 1rem 1.1rem; }
.car h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.car .class { color: var(--muted); font-size: 0.85rem; }
.car .price { margin-top: 0.7rem; font-weight: 700; }
.car .price span { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.promo {
  background: var(--steel);
  color: #fff;
}
.promo .wrap { max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.5rem; }
.promo .stat b { display: block; font-size: 2rem; color: var(--amber); letter-spacing: -0.02em; }
.promo .stat span { color: #c6d2e0; }

.site-footer {
  background: var(--ink);
  color: #96a6ba;
  font-size: 0.9rem;
}
.site-footer .wrap {
  max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.site-footer a { color: #96a6ba; text-decoration: none; margin-right: 1.2rem; }
.site-footer a:hover { color: #fff; }

/* ======================= PORTAL ======================= */
.portal-guest {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(900px 500px at 50% -10%, #1c3758 0%, transparent 60%),
    var(--ink);
}
.panel {
  background: var(--card);
  border-radius: 16px;
  padding: 2.2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(4,10,22,0.45);
}
.panel .brand { margin-bottom: 1.4rem; }
.panel h1 { font-size: 1.4rem; margin: 0 0 0.3rem; }
.panel .sub { color: var(--muted); margin: 0 0 1.6rem; }
.status-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  background: #f7f9fb;
  margin-bottom: 1rem;
}
.status-row .k { color: var(--muted); font-size: 0.85rem; }
.status-row .v { font-family: var(--mono); font-weight: 600; }
.pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.pill.guest { background: #eef1f4; color: var(--muted); }
.pill.ops { background: #ddeee6; color: var(--ok); }
.notice {
  border-left: 3px solid var(--amber);
  background: #fdf6e8;
  padding: 0.9rem 1rem;
  border-radius: 0 8px 8px 0;
  color: #4a3b18;
  font-size: 0.95rem;
}
.notice code { font-family: var(--mono); background: #f3e6c4; padding: 0 0.3rem; border-radius: 4px; }

/* dashboard */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  flex: none;
  background: var(--ink);
  color: #c6d2e0;
  padding: 1.4rem 1.1rem;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { color: #fff; margin-bottom: 1.8rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 0.2rem; }
.sidebar nav a {
  color: #c6d2e0;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.sidebar nav a.active { background: var(--steel); color: #fff; }
.sidebar nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sidebar .me {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.85rem;
}
.sidebar .me .dept { font-family: var(--mono); color: var(--amber); }

.main { flex: 1; min-width: 0; }
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar h1 { font-size: 1.25rem; margin: 0; }
.lookup { display: flex; gap: 0.5rem; }
.lookup input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-family: var(--mono);
  width: 180px;
}
.lookup button {
  background: var(--steel);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
.lookup button:hover { background: var(--ink); }
.content { padding: 1.6rem; }

table.agreements {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
table.agreements th, table.agreements td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  vertical-align: top;
}
table.agreements th {
  background: #f3f6f9;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
table.agreements tr:last-child td { border-bottom: none; }
table.agreements td.ref a { font-family: var(--mono); font-weight: 700; text-decoration: none; color: var(--steel); }
table.agreements td.ref a:hover { text-decoration: underline; }
table.agreements .notes { color: var(--muted); max-width: 34ch; }
.stat-badge { font-size: 0.78rem; font-weight: 700; }
.stat-badge.active { color: var(--ok); }
.stat-badge.closed { color: var(--muted); }

/* agreement detail */
.record {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 760px;
  overflow: hidden;
}
.record .head {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.record .head .ref { font-family: var(--mono); font-size: 1.2rem; font-weight: 800; }
.record .dept-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: #eef1f4;
  color: var(--muted);
}
.record .dept-tag.legal { background: #f7e6dd; color: var(--legal); }
.record dl {
  margin: 0;
  padding: 1.3rem 1.5rem;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.55rem 1.2rem;
}
.record dt { color: var(--muted); font-size: 0.85rem; }
.record dd { margin: 0; }
.record .notes-block {
  border-top: 1px solid var(--line);
  padding: 1.3rem 1.5rem;
}
.record .notes-block h3 { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--muted); }
.record .notes-block pre {
  white-space: pre-wrap;
  font-family: var(--sans);
  margin: 0;
  line-height: 1.6;
}
.back { display: inline-block; margin-bottom: 1rem; color: var(--steel); text-decoration: none; font-size: 0.9rem; }
.back:hover { text-decoration: underline; }
.empty {
  background: #fdf6e8;
  border: 1px solid #efd9a6;
  color: #4a3b18;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  max-width: 560px;
}

/* help / api snippet */
.help-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 720px;
  padding: 1.4rem 1.5rem;
}
.help-card h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.help-card p { color: var(--muted); margin: 0 0 1.2rem; }
.snippet-wrap { position: relative; }
.snippet {
  background: #0d1a2c;
  color: #d6e2f0;
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}
.copy-btn {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 7px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }
.copy-btn.copied { background: var(--ok); border-color: var(--ok); }

@media (max-width: 760px) {
  .booking { grid-template-columns: 1fr 1fr; }
  .booking .go { grid-column: 1 / -1; }
  .app { flex-direction: column; }
  .sidebar { width: auto; flex-direction: row; align-items: center; gap: 1rem; overflow-x: auto; }
  .sidebar .brand { margin-bottom: 0; }
  .sidebar nav { flex-direction: row; }
  .sidebar .me { display: none; }
  .record dl { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .record dt { margin-top: 0.6rem; }
}

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

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
