:root,
[data-theme="neon"] {
  --ink: #e8f7fb;
  --muted: #8eb4bd;
  --line: rgba(34, 224, 255, 0.38);
  --paper: #070b10;
  --card: #0c1622;
  --copper: #22e0ff;
  --accent-ink: #041018;
  --accent-hover: #7af3ff;
  --nav: rgba(5, 8, 12, 0.92);
  --nav-link: #d7f7fc;
  --field: #071018;
  --placeholder: #6f9098;
  --option: #0c1622;
  --stat: #ffffff;
  --shadow: 0 0 0 1px rgba(34, 224, 255, 0.05), 0 0 28px rgba(34, 224, 255, 0.08);
  --btn-shadow: 0 0 18px rgba(34, 224, 255, 0.28);
  --focus: rgba(34, 224, 255, 0.45);
  --table-line: rgba(34, 224, 255, 0.18);
  --ghost-hover: rgba(34, 224, 255, 0.12);
  --body: radial-gradient(900px 420px at 100% -10%, rgba(34, 224, 255, 0.12), transparent 55%), linear-gradient(180deg, #101820 0%, #070b10 280px);
  color-scheme: dark;
}
[data-theme="classic"] {
  --ink: #1c1917; --muted: #78716c; --line: #e7e5e4; --paper: #f6f3ee; --card: #fffdf8;
  --copper: #c2410c; --accent-ink: #fff; --accent-hover: #9a3412; --nav: #1c1917; --nav-link: #f5f5f4;
  --field: #fff; --placeholder: #a8a29e; --option: #fffdf8; --stat: #1c1917; --shadow: none; --btn-shadow: none;
  --focus: rgba(194, 65, 12, 0.35); --table-line: #e7e5e4; --ghost-hover: #f5f5f4;
  --body: #f6f3ee; color-scheme: light;
}
[data-theme="slate"] {
  --ink: #e8eef5; --muted: #93a4b8; --line: rgba(148, 176, 212, 0.35); --paper: #12161c; --card: #1b222c;
  --copper: #8eb4e8; --accent-ink: #10141a; --accent-hover: #d5e6fa; --nav: #0e1319; --nav-link: #d5deea;
  --field: #121820; --placeholder: #7e8da1; --option: #1b222c; --stat: #fff; --shadow: none; --btn-shadow: none;
  --focus: rgba(142, 180, 232, 0.45); --table-line: rgba(148, 176, 212, 0.22); --ghost-hover: rgba(142, 180, 232, 0.12);
  --body: #12161c; color-scheme: dark;
}
[data-theme="daylight"] {
  --ink: #142033; --muted: #5c6b80; --line: #d5deea; --paper: #f4f7fb; --card: #fff;
  --copper: #1d4e89; --accent-ink: #fff; --accent-hover: #163e6e; --nav: #142033; --nav-link: #e8eef5;
  --field: #fff; --placeholder: #8aa0b8; --option: #fff; --stat: #142033; --shadow: none; --btn-shadow: none;
  --focus: rgba(29, 78, 137, 0.35); --table-line: #d5deea; --ghost-hover: #e8eef5;
  --body: #f4f7fb; color-scheme: light;
}
[data-theme="grove"] {
  --ink: #f4f7f1;
  --muted: #a8bba8;
  --line: rgba(226, 182, 87, 0.42);
  --paper: #0c1510;
  --card: #15241c;
  --copper: #e2b657;
  --accent-ink: #1c1508;
  --accent-hover: #f3d48a;
  --nav: #09110d;
  --nav-link: #e8f2e6;
  --field: #0e1a14;
  --placeholder: #7f9684;
  --option: #15241c;
  --stat: #ffffff;
  --shadow: 0 0 0 1px rgba(226, 182, 87, 0.08), 0 0 26px rgba(36, 92, 58, 0.28);
  --btn-shadow: 0 0 16px rgba(226, 182, 87, 0.24);
  --focus: rgba(226, 182, 87, 0.45);
  --table-line: rgba(226, 182, 87, 0.22);
  --ghost-hover: rgba(226, 182, 87, 0.14);
  --body: radial-gradient(900px 420px at 100% -10%, rgba(52, 122, 74, 0.32), transparent 55%), linear-gradient(180deg, #1a3326 0%, #0c1510 280px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--body);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 16px;
}
a { color: var(--copper); }
.app-nav {
  background: var(--nav);
  color: white;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.nav-inner, .page { width: min(1180px, calc(100% - 1.5rem)); margin: 0 auto; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1180px, 100%); }
.brand { display: flex; background: #05080c; border-radius: 14px; padding: 0.1rem 0.35rem; }
.brand-logo { display: block; height: 74px; width: auto; max-width: min(220px, 42vw); }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; justify-content: flex-end; }
.nav-links a { color: var(--nav-link); text-decoration: none; }
.nav-links a:hover { color: var(--copper); }
.page { padding: 1.25rem 0 3rem; }
.card, .stat, .login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.login-body .page { width: 100%; max-width: none; margin: 0; padding: 0; }
.login-stage {
  min-height: 100vh; display: grid; place-items: center; position: relative; overflow: auto;
  background:
    radial-gradient(900px 480px at 50% 40%, rgba(0, 170, 255, 0.28), transparent 60%),
    linear-gradient(180deg, #031018 0%, #071525 100%);
}
.login-back {
  position: absolute; inset: 0; display: grid; place-items: center;
  filter: blur(1px); opacity: 0.72; pointer-events: none;
}
.login-back .login-card { transform: translateY(-150px) scale(0.92); }
.glass-login {
  position: relative; z-index: 2; width: min(440px, calc(100% - 1.5rem));
  padding: 1.35rem 1.25rem 1.15rem; border-radius: 26px; text-align: left;
  color: #f3fbff;
  background: linear-gradient(165deg, rgba(18, 92, 160, 0.62), rgba(5, 18, 40, 0.78));
  border: 2px solid #3ee6ff;
  box-shadow: 0 0 0 1px rgba(0, 40, 80, 0.4), 0 0 42px rgba(0, 190, 255, 0.55), inset 0 0 28px rgba(0, 170, 255, 0.18);
  backdrop-filter: blur(18px);
}
.glass-login::before, .glass-login::after {
  content: ""; position: absolute; width: 28px; height: 28px; border: 3px solid #7af6ff;
}
.glass-login::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.glass-login::after { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }
.glass-kicker { margin: 0; color: #7af6ff; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.78rem; font-weight: 700; }
.glass-login h1 { margin: 0.15rem 0 0.35rem; color: #e9fbff; font-size: 2rem; text-shadow: 0 0 18px rgba(80, 230, 255, 0.85); }
.glass-note { color: #d7f6ff; font-size: 0.92rem; margin: 0 0 0.8rem; }
.glass-login label { color: #e7f8ff; font-weight: 650; }
.glass-login input, .glass-login select {
  background: rgba(3, 16, 32, 0.55); color: #fff; border: 1px solid rgba(90, 220, 255, 0.75);
}
.captcha-label { margin: 0.2rem 0 0.35rem; color: #7af6ff; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.glass-login .captcha-img { width: min(280px, 100%); height: auto; margin: 0 0 0.55rem; background: #e8faff; border: 3px solid #7af6ff; box-shadow: 0 0 18px rgba(0, 220, 255, 0.7); }
.glass-login .btn {
  background: linear-gradient(90deg, #00b7ff, #5ff6ff); color: #04121c;
  border-radius: 12px; box-shadow: 0 0 22px rgba(0, 200, 255, 0.55);
}
.fit-page .nav-inner, .fit-page .page { width: min(1600px, calc(100% - 0.8rem)); }
.login-card { width: min(420px, 100%); text-align: center; }
.login-card label, .login-card .help, .login-card .flash { text-align: left; }
.login-logo { display: block; width: min(210px, 72%); margin: 0 auto 0.4rem; background: #05080c; border-radius: 16px; padding: 0.45rem; }
.captcha-img { display: block; margin: 0 auto 0.6rem; border-radius: 10px; border: 1px solid var(--line); }
.eyebrow { color: var(--copper); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { margin: 0.2rem 0 0.6rem; }
.grid-stats, .split, .photo-grid { display: grid; gap: 0.8rem; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.split { grid-template-columns: 1fr; }
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.stat strong { display: block; font-size: 1.35rem; margin-top: 0.2rem; color: var(--stat); }
.stat span, .muted, .help, .sub { color: var(--muted); }
.sub, .help { display: block; font-size: 0.9rem; }
label { display: block; font-size: 0.92rem; margin-bottom: 0.25rem; }
input, select, textarea, button { font: inherit; font-size: 16px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.75rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); border-color: var(--copper); }
select option { background: var(--option); color: var(--ink); }
textarea { min-height: 90px; }
.check-line { display: flex; gap: 0.5rem; align-items: center; }
.check-line input { width: auto; margin: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 0.7rem 1.1rem; min-height: 46px;
  text-decoration: none; cursor: pointer; background: var(--copper); color: var(--accent-ink);
  font-weight: 700; box-shadow: var(--btn-shadow);
}
.btn:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--copper); border: 1px solid var(--line); box-shadow: none; }
.btn.small { min-height: 36px; padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn.block { width: 100%; }
.account-child { padding-left: 1.2rem; }
.report-dates, .report-picks { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.report-picks select[multiple] { min-height: 8.5rem; }
.stack { display: grid; gap: 0.4rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--table-line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; }
tr.overdue td { background: rgba(244, 63, 94, 0.12); }
tr.deadline td { box-shadow: inset 3px 0 0 var(--copper); }
.flash { padding: 0.75rem 0.9rem; border-radius: 10px; margin-bottom: 0.8rem; }
.flash.success { background: rgba(16, 80, 70, 0.55); color: #b7fff0; }
.flash.danger { background: rgba(127, 29, 29, 0.45); color: #fecdd3; }
.flash.warning { background: rgba(120, 53, 15, 0.45); color: #fde68a; }
.pill {
  display: inline-block; border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.75rem;
  border: 1px solid var(--line); text-transform: capitalize;
}
.pill.overdue, .pill.rejected, .pill.sold, .pill.booked { color: #fecdd3; }
.pill.paid, .pill.available { color: #bbf7d0; }
.plot-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.4rem; }
.plot-card {
  display: flex; flex-direction: column; gap: 0.08rem; min-height: 0;
  border-radius: 12px; padding: 0.4rem 0.45rem; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
}
.plot-card strong { font-size: 1.05rem; line-height: 1.1; }
.plot-card em.buyer {
  color: #ffe14a; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.01em;
}
.plot-card span, .plot-card em, .plot-card small {
  font-size: 0.68rem; font-style: normal; color: var(--muted); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 1200px) { .plot-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 800px) { .plot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plot-card.available { background: rgba(22, 163, 74, 0.2); border-color: #16a34a; }
.plot-card.booked, .plot-card.sold { background: rgba(225, 29, 72, 0.22); border-color: #e11d48; }
.plot-card.cancelled { background: rgba(100, 116, 139, 0.25); border-color: #94a3b8; }
.photo-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; background: #fff; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.photo-pop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.82);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.photo-pop[hidden] { display: none !important; }
.photo-frame { position: relative; max-width: min(920px, 94vw); }
.photo-pop img { display: block; max-width: 100%; max-height: 82vh; object-fit: contain; background: #fff; border-radius: 12px; }
.photo-pop p { margin: 0.5rem 0 0; color: white; }
.photo-x {
  position: absolute; top: 0.45rem; left: 0.45rem; z-index: 2;
  width: 48px; height: 48px; border: 3px solid #fff; border-radius: 50%;
  background: #111; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.receipt { padding: 0.7rem 0; border-bottom: 1px solid var(--table-line); }
.receipt .help { display: inline; margin-left: 0.4rem; }
.head-list, .person { list-style: none; padding: 0; }
.person { padding: 0.7rem 0; border-bottom: 1px solid var(--table-line); }
.inline-form { display: flex; gap: 0.4rem; align-items: end; flex-wrap: wrap; }
.inline-form input { margin: 0; width: auto; min-width: 10rem; }
.theme-pick { display: flex; align-items: center; gap: 0.35rem; margin: 0; color: var(--nav-link); font-size: 0.85rem; }
.theme-pick select { width: auto; min-width: 7rem; margin: 0; min-height: 36px; padding: 0.2rem 0.55rem; border-radius: 999px; }
.theme-pick.on-card { justify-content: center; color: var(--ink); margin: 0 auto 0.6rem; }
.inventory-grand { font-size: 1.4rem; font-weight: 700; color: var(--stat); }
@media (max-width: 720px) {
  .nav-inner { display: grid; grid-template-columns: 1fr auto; }
  .nav-links { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; }
  .nav-links a { white-space: nowrap; }
  .brand-logo { height: 64px; }
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
}
