/* ══════════════════════════════════════════════════════════════════
   Equity Estates — Inspection platform design system
   Mirrors the "Property Inspection" mockup: Plus Jakarta Sans + Newsreader,
   navy #14233b / gold #e9c98a / blue #2e6bdb on warm paper #f4f3ef.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --navy: #14233b;
  --gold: #e9c98a;
  --blue: #2e6bdb;
  --paper: #f4f3ef;
  --ink: #1c2733;
  --muted: #5b626c;
  --faint: #8a8f98;
  --line: #e6e3da;
  --card: #fff;
  --good: #1f7a55;
  --good-bg: #e7f5ee;
  --warn: #c23a3a;
  --warn-bg: #fbe9e9;
  --amber: #ad6a16;
  --amber-bg: #fbeedd;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--paper);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
input, textarea, button, select { font-family: inherit; }
textarea { resize: vertical; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.serif { font-family: 'Newsreader', Georgia, serif; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d3ca; border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }

@keyframes eeRec { 0%,100%{opacity:1;} 50%{opacity:.35;} }
@keyframes eeIn { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:none;} }
@keyframes eePop { from{opacity:0;transform:scale(.96);} to{opacity:1;transform:none;} }
@keyframes eeSpin { to { transform: rotate(360deg); } }

/* ── Brand mark ── */
.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--navy);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: 'Newsreader', serif; font-weight: 600; font-size: 18px; letter-spacing: .5px; flex: none;
}
.brand .name { font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: var(--navy); }
.brand .tag { font-size: 12px; letter-spacing: 1px; color: var(--faint); }

/* ── Layout containers ── */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 22px 80px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 28px 22px 80px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14.5px; cursor: pointer;
  transition: all .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 6px 18px rgba(46,107,219,.28); }
.btn-dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-ghost { background: #fff; color: var(--muted); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--warn); border-color: #f0cfcf; }

/* ── Forms ── */
label.field { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #e0ddd4; border-radius: 12px; padding: 0 14px;
  font-size: 15px; color: var(--ink); background: #faf9f6; outline: none; height: 50px;
}
.textarea { padding: 12px 14px; min-height: 80px; height: auto; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); background: #fff; }
.form-row { margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Cards ── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: 0 1px 2px rgba(20,35,59,.04);
}
.card + .card { margin-top: 16px; }

/* ── Pills / badges ── */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-na { background: #eef0f3; color: #586273; }
.pill-blue { background: #e8f0fd; color: var(--blue); }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-muted { background: #f0eee7; color: var(--faint); }

.status-upcoming { background: #eef0f3; color: #586273; }
.status-in_progress { background: #e8f0fd; color: var(--blue); }
.status-completed { background: var(--good-bg); color: var(--good); }

/* ── Progress bar ── */
.progress { height: 7px; border-radius: 4px; background: #edeae2; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width .3s; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; letter-spacing: 1px; color: var(--faint); text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid #f0eee7; font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }

/* ── Section heads ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-family: 'Newsreader', serif; font-size: 40px; line-height: 1.05; font-weight: 500; letter-spacing: -.5px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--faint); margin-bottom: 6px; }
.section-title { font-weight: 700; font-size: 17px; margin: 28px 0 12px; }

/* ── Flash messages ── */
.flash { border-radius: 12px; padding: 13px 16px; margin-bottom: 18px; font-size: 14px; font-weight: 600; }
.flash-success { background: var(--good-bg); color: var(--good); }
.flash-error { background: var(--warn-bg); color: var(--warn); }

/* ── Auth screen ── */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }

/* ── Admin shell ── */
.admin { display: flex; min-height: 100vh; }
.admin-side {
  width: 246px; flex: none; background: var(--navy); color: #eef1f6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-side .head { padding: 20px 20px; border-bottom: 1px solid rgba(255,255,255,.08); display:flex; align-items:center; gap:12px; }
.admin-side .head .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--navy); display:flex; align-items:center; justify-content:center; font-family:'Newsreader',serif; font-weight:600; font-size:15px; flex:none; }
.admin-side .head .name { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }
.admin-side .head .tag { font-size: 10.5px; opacity: .55; letter-spacing: .5px; }
.admin-nav { flex: 1; padding: 14px 12px; }
.admin-nav a {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 10px;
  color: #cdd5e2; font-weight: 600; font-size: 14px; margin-bottom: 3px; text-decoration: none;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.admin-nav a.on { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav a .ph { font-size: 19px; width: 22px; text-align: center; }
.admin-side .foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.admin-side .foot .who { opacity: .7; margin-bottom: 8px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5; }
@media (max-width: 820px) {
  .admin { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; flex-direction: column; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav a { margin: 0; }
}

/* ── Tabs ── */
.tabs { display: inline-flex; gap: 4px; background: #eceae3; padding: 4px; border-radius: 12px; margin-bottom: 20px; }
.tab-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.tab-btn.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tab-panel[hidden] { display: none; }
.search-box { position: relative; }
.search-box .ph { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 16px; }
.search-box input { height: 40px; padding-left: 36px; width: 280px; max-width: 60vw; }

/* ── Stat tiles ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.stat .n { font-family: 'Newsreader', serif; font-size: 38px; font-weight: 600; line-height: 1; }
.stat .l { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

/* ── Inspection list cards ── */
.ins-card { display: flex; gap: 15px; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 1px 2px rgba(20,35,59,.04); text-decoration: none; color: inherit; margin-bottom: 14px; }
.ins-card:hover { border-color: #d4cfc2; text-decoration: none; }
.ins-card .thumb { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; flex: none; background: #e7e4dd; }
.ins-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.muted { color: var(--faint); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
hr.sep { border: none; border-top: 1px solid #f0eee7; margin: 16px 0; }
