/* Shared design system for the Ventassess admin portal (web/index.php,
   web/clients.php). Deliberately reuses the marketing site's exact tokens
   (site/index.html: Barlow Condensed / Barlow / DM Mono, same accent and
   neutrals) rather than inventing a second identity -- the portal borrowed
   the marketing site's colors before 19 Sep 2026 but none of its
   typography, which is most of why it read as generic.
   web/property.php (the client-facing report) is deliberately NOT built
   against this file -- that's its own surface, out of scope here. */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Barlow:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* 20 Oct 2026 (Matt): the dark purple and black scheme of the survey screens and the iPad app, for the whole portal */
  --accent: #7030A0;
  --accent-dark: #5a2680;
  --bg: #1a1a1a;
  --card: #242424;
  --card2: #2e2e2e;
  --hover: #2e2e2e;
  --border: #3d3d3d;
  --text: #f5f5f5;
  --text2: #a8a8a8;
  --text3: #7a7a7a;
  --nav: #242424;
  --ok: #22c55e;
  --ok-bg: rgba(34,197,94,.12);
  --warn: #f59332;
  --warn-bg: rgba(245,147,50,.12);
  --danger: #dc2626;
  --danger-bg: rgba(220,38,38,.14);
  --fh: 'Barlow Condensed', sans-serif;
  --fb: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fm: 'DM Mono', 'SF Mono', monospace;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); font-family: var(--fb); margin: 0; }

/* ── Top nav ── */
.v-nav { background: var(--nav); border-bottom: 2px solid var(--accent); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; }
.v-nav .v-nav-left { display: flex; align-items: center; gap: 28px; }
.v-nav .v-logo { font-family: var(--fh); font-size: 22px; font-weight: 800; letter-spacing: .3px; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.v-nav .v-links { display: flex; gap: 4px; }
.v-nav .v-links a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 6px; transition: background .15s, color .15s; }
.v-nav .v-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.v-nav .v-links a.active { background: rgba(255,255,255,.12); color: #fff; }
.v-nav .v-nav-right a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 13px; font-weight: 500; }
.v-nav .v-nav-right a:hover { color: #fff; }

.v-main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; }
.v-main.narrow { max-width: 460px; }

/* ── Page header ── */
.v-page-hdr { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.v-page-hdr h1 { font-family: var(--fh); font-size: 30px; font-weight: 800; margin: 0; letter-spacing: .2px; }
.v-page-hdr .v-sub { font-size: 13px; color: var(--text2); }
.v-eyebrow { font-family: var(--fm); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; display: block; }

/* ── Cards ── */
.v-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; }
.v-card + .v-card { margin-top: 12px; }

/* ── Buttons ── */
.v-btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--fb); font-weight: 600; font-size: 13.5px; padding: 9px 16px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s; }
.v-btn-primary { background: var(--accent); color: #fff; }
.v-btn-primary:hover { background: var(--accent-dark); }
.v-btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.v-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.v-btn-danger-ghost { background: transparent; border-color: var(--border); color: var(--danger); }
.v-btn-danger-ghost:hover { border-color: var(--danger); background: var(--danger-bg); }
.v-btn:disabled { opacity: .5; cursor: default; }
.v-btn-sm { padding: 5px 11px; font-size: 12.5px; }

/* ── Forms ── */
.v-field { margin-bottom: 12px; }
.v-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text2); margin-bottom: 5px; }
.v-field input[type="text"], .v-field input[type="email"], .v-field input[type="tel"], .v-field input[type="number"], .v-field input[type="password"], .v-field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: var(--fb); background: var(--card2); color: var(--text);
}
.v-field input:focus, .v-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(112,48,160,.25); }
.v-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .v-row2 { grid-template-columns: 1fr; } }

/* ── Chips (module toggles, framing, status) ── */
.v-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.v-chip { font-family: var(--fm); font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card2); color: var(--text2); cursor: pointer; user-select: none; transition: all .12s; line-height: 1.3; }
.v-chip:hover { border-color: var(--accent); }
.v-chip.on { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 500; }
.v-chip.static { cursor: default; }
.v-chip.static:hover { border-color: var(--border); }

/* ── Toggle switch (retrofit / AI reviewer) ── */
.v-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.v-toggle-row .v-toggle-label { font-size: 13.5px; font-weight: 500; }
.v-toggle-row .v-toggle-label .v-toggle-hint { display: block; font-size: 11.5px; color: var(--text3); font-weight: 400; margin-top: 1px; }
.v-switch { position: relative; width: 40px; height: 22px; border-radius: 11px; background: var(--border); border: none; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.v-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.v-switch.on { background: var(--ok); }
.v-switch.on::after { transform: translateX(18px); }

/* ── Client / Project tree ── */
.v-client { border: 1px solid var(--border); border-radius: 10px; background: var(--card); margin-bottom: 12px; overflow: hidden; }
.v-client-hdr { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; cursor: pointer; gap: 12px; }
.v-client-hdr:hover { background: var(--hover); }
.v-client-name { font-family: var(--fh); font-size: 19px; font-weight: 700; }
.v-client-meta { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.v-client-meta .v-contact { font-family: var(--fm); font-size: 11.5px; }
.v-client-count { font-family: var(--fm); font-size: 11px; color: var(--text3); background: var(--bg); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.v-client-actions { display: flex; gap: 8px; align-items: center; }
.v-chevron { transition: transform .15s; color: var(--text3); }
.v-client.expanded .v-chevron { transform: rotate(90deg); }
.v-client-body { display: none; border-top: 1px solid var(--border); padding: 14px 18px 18px; background: var(--bg); }
.v-client.expanded .v-client-body { display: block; }

.v-project { border: 1px solid var(--border); border-radius: 8px; background: var(--card2); margin-bottom: 10px; overflow: hidden; }
.v-project-hdr { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; gap: 10px; }
.v-project-hdr:hover { background: var(--hover); }
.v-project-name { font-weight: 700; font-size: 14.5px; }
.v-project-summary { font-family: var(--fm); font-size: 11px; color: var(--text3); margin-top: 2px; }
.v-project-body { display: none; border-top: 1px solid var(--border); padding: 16px; }
.v-project.expanded .v-project-body { display: block; }
.v-project.expanded .v-chevron { transform: rotate(90deg); }

.v-section-lbl { font-family: var(--fm); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); margin: 14px 0 8px; }
.v-section-lbl:first-child { margin-top: 0; }

.v-empty { text-align: center; color: var(--text2); padding: 60px 20px; font-size: 14.5px; }
.v-empty .v-eyebrow { display: inline-block; margin-bottom: 8px; }

.v-error-msg { color: var(--danger); background: var(--danger-bg); border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.v-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(0); background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; }
.v-toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.v-toast.err { background: var(--danger); }

/* ── Login card (index.php) ── */
.v-login-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 36px 32px; margin: 64px auto 0; text-align: center; }
.v-login-box h2 { font-family: var(--fh); font-size: 24px; font-weight: 800; margin: 0 0 22px; }
.v-login-box .v-field { text-align: left; }
.v-login-box button { width: 100%; margin-top: 4px; justify-content: center; }

/* ── Survey grouping (index.php, by Project) ── */
.v-group { margin-bottom: 22px; }
.v-group-hdr { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--border); }
.v-group-title { font-family: var(--fh); font-size: 21px; font-weight: 700; }

/* ── Survey list (index.php) ── */
.v-survey-card { position: relative; display: block; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; transition: box-shadow .15s, border-color .15s; }
.v-survey-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.4); border-color: var(--accent); }
.v-survey-card-link { display: block; text-decoration: none; color: var(--text); padding-right: 32px; }
.v-survey-card .v-addr { font-family: var(--fh); font-weight: 700; font-size: 18px; margin-bottom: 3px; }
.v-survey-card .v-meta { font-family: var(--fm); font-size: 12px; color: var(--text2); }
.v-survey-card .v-delete-btn { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 17px; line-height: 1; cursor: pointer; padding: 4px; opacity: .5; }
.v-survey-card .v-delete-btn:hover { opacity: 1; }
