/* ==========================================================================
   VASTU 1 — Find Your Perfect Property
   style.css — design tokens, layout primitives, components
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
  /* Core palette */
  --navy-900: #0A1C33;
  --navy-800: #102944;
  --navy-700: #1B3A5C;
  --blue-600: #1650C4;
  --blue-500: #1F66E8;
  --blue-050: #EDF3FF;
  --gold-600: #A87B2C;
  --gold-500: #C79A42;
  --gold-050: #FBF4E6;

  /* Neutrals */
  --white: #FFFFFF;
  --mist: #F5F7FA;
  --line: #E2E8F0;
  --line-soft: #EDF1F6;
  --ink: #14202F;
  --muted: #5C6B80;
  --muted-soft: #8494A8;

  /* Status */
  --green-600: #15803D;
  --green-050: #E9F7EE;
  --amber-600: #A16207;
  --amber-050: #FDF5E3;
  --red-600: #B91C1C;
  --red-050: #FCECEC;

  /* Shape + depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-1: 0 1px 2px rgba(10, 28, 51, .06), 0 2px 8px rgba(10, 28, 51, .05);
  --shadow-2: 0 4px 12px rgba(10, 28, 51, .08), 0 12px 32px rgba(10, 28, 51, .07);
  --shadow-3: 0 18px 48px rgba(10, 28, 51, .16);

  /* Type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --shell: 1220px;
  --gut: 24px;
  --header-h: 76px;
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.012em;
  margin: 0 0 .5em;
  color: var(--navy-900);
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.1vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.02rem; font-family: var(--ui); font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 1em; max-width: 68ch; }

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- 3. Layout ----------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }

.section { padding: 72px 0; }
.section--mist { background: var(--mist); }
.section--tight { padding: 48px 0; }

.section-head { margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 .25em; }
.section-head p { margin: 0; color: var(--muted); }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.page-head {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #D9E3F0;
  padding: 44px 0 40px;
}
.page-head h1 { color: var(--white); margin-bottom: .2em; }
.page-head p { color: #A9BCD4; margin: 0; }
.crumbs { font-size: .85rem; color: #7E95B4; margin-bottom: 10px; }
.crumbs a { color: #A9BCD4; }

/* --- 4. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: .95rem; font-weight: 600; letter-spacing: -.005em;
  background: var(--blue-600); color: var(--white);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--navy-800); text-decoration: none; color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--line); }
.btn--ghost:hover { background: var(--mist); color: var(--navy-900); border-color: var(--muted-soft); }
.btn--gold { background: var(--gold-500); color: var(--navy-900); }
.btn--gold:hover { background: var(--gold-600); color: var(--white); }
.btn--green { background: #1D9A57; }
.btn--green:hover { background: #157443; }
.btn--danger { background: transparent; color: var(--red-600); border-color: #F0C9C9; }
.btn--danger:hover { background: var(--red-050); color: var(--red-600); }
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--sm { padding: 8px 14px; font-size: .84rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* --- 5. Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__name { font-family: var(--display); font-size: 1.32rem; font-weight: 600; color: var(--navy-900); line-height: 1.05; }
.brand__tag { display: block; font-family: var(--ui); font-size: .68rem; font-weight: 500; color: var(--gold-600); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 9px 12px; border-radius: var(--r-sm); font-size: .92rem; font-weight: 500;
  color: var(--navy-800); text-decoration: none;
}
.nav a:hover { background: var(--mist); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--blue-600); background: var(--blue-050); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; }
.nav-toggle span { display: block; width: 19px; height: 2px; background: var(--navy-900); border-radius: 2px; }
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 1080px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-header.is-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; inset: var(--header-h) 0 auto; background: var(--white);
    border-bottom: 1px solid var(--line); padding: 12px var(--gut) 8px;
  }
  .site-header.is-open .nav a { padding: 12px; }
  .site-header.is-open .header-actions {
    display: flex; position: absolute; inset: auto 0 auto; top: calc(var(--header-h) + 100%);
    background: var(--white); padding: 0 var(--gut) 16px; border-bottom: 1px solid var(--line);
  }
  .site-header.is-open .header-actions .btn { flex: 1; }
}

/* --- 6. Hero ------------------------------------------------------------- */
.hero { position: relative; background: var(--navy-900); color: var(--white); overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(10, 28, 51, .94) 8%, rgba(10, 28, 51, .62) 62%, rgba(10, 28, 51, .8));
}
.hero__inner { position: relative; padding: 78px 0 128px; }
.hero h1 { color: var(--white); max-width: 15ch; margin-bottom: .32em; }
.hero__sub { color: #C3D2E5; font-size: 1.08rem; max-width: 56ch; margin-bottom: 26px; }
.hero__stats { display: flex; gap: 40px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); max-width: 620px; }
.hero__stat b { display: block; font-family: var(--display); font-size: 1.7rem; font-weight: 500; color: var(--gold-500); }
.hero__stat span { font-size: .84rem; color: #9FB4CE; }

/* --- 7. Search panel ----------------------------------------------------- */
.searchbar {
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  padding: 8px 8px 20px; margin-top: -76px; position: relative; z-index: 5;
}
.searchbar--inline { margin-top: 0; box-shadow: var(--shadow-1); border: 1px solid var(--line); }

.search-tabs { display: flex; gap: 4px; padding: 6px; }
.search-tabs button {
  flex: none; padding: 11px 26px; border: 0; border-radius: var(--r-sm);
  background: transparent; font-weight: 600; font-size: .95rem; color: var(--muted);
}
.search-tabs button[aria-selected="true"] { background: var(--navy-900); color: var(--white); }

.search-fields {
  display: grid; gap: 14px; padding: 8px 16px 0;
  grid-template-columns: repeat(4, 1fr) auto;
  align-items: end;
}
@media (max-width: 900px) { .search-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .search-fields { grid-template-columns: 1fr; } }

/* --- 8. Forms ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label {
  font-size: .8rem; font-weight: 600; color: var(--navy-700); letter-spacing: -.003em;
}
.field .hint { font-size: .76rem; color: var(--muted-soft); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--white); font-size: .93rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235C6B80' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-050);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--red-600); }
.err { font-size: .78rem; color: var(--red-600); min-height: 1em; }

.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid .span-2 { grid-column: auto; } }

fieldset { border: 0; padding: 0; margin: 0 0 30px; }
legend { padding: 0; }
.fieldset-title {
  font-family: var(--ui); font-size: .95rem; font-weight: 700; color: var(--navy-900);
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
  width: 100%; display: block;
}

.checks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.check {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .88rem;
  background: var(--white);
}
.check input { accent-color: var(--blue-600); width: 16px; height: 16px; }
.check:has(input:checked) { border-color: var(--blue-500); background: var(--blue-050); }

.switch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.switch-row label {
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .87rem; font-weight: 500; cursor: pointer; background: var(--white);
}
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row label:has(input:checked) { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }

/* --- 9. Property card ---------------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-1); transition: box-shadow .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-2); border-color: var(--line); }

.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--mist); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card__save {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: grid; place-items: center; box-shadow: var(--shadow-1);
}
.card__save svg { width: 17px; height: 17px; fill: none; stroke: var(--navy-800); stroke-width: 1.8; }
.card__save[aria-pressed="true"] svg { fill: var(--gold-500); stroke: var(--gold-600); }

.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card__price { font-family: var(--display); font-size: 1.42rem; font-weight: 600; color: var(--navy-900); }
.card__price small { font-family: var(--ui); font-size: .8rem; font-weight: 500; color: var(--muted); }
.card__title { font-size: 1rem; font-weight: 600; margin: 4px 0 2px; color: var(--ink); }
.card__title a { color: inherit; }
.card__loc { font-size: .87rem; color: var(--muted); margin-bottom: 12px; }
.card__specs {
  display: flex; gap: 16px; flex-wrap: wrap; padding: 11px 0; margin-bottom: 12px;
  border-block: 1px solid var(--line-soft); font-size: .84rem; color: var(--navy-700);
}
.card__specs b { font-weight: 600; }
.card__desc { font-size: .87rem; color: var(--muted); margin: 0 0 14px; }
.card__foot { margin-top: auto; display: flex; gap: 8px; }
.card__foot .btn { flex: 1; }
.card__meta { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; color: var(--muted-soft); margin-bottom: 12px; }

/* List view */
.results--list .card { flex-direction: row; }
.results--list .card__media { width: 300px; flex: none; aspect-ratio: auto; }
@media (max-width: 760px) {
  .results--list .card { flex-direction: column; }
  .results--list .card__media { width: auto; aspect-ratio: 4 / 3; }
}

/* --- 10. Badges + pills -------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .005em;
  background: var(--navy-900); color: var(--white);
}
.badge--rent { background: var(--blue-600); }
.badge--sale { background: var(--navy-900); }
.badge--res { background: rgba(255, 255, 255, .92); color: var(--navy-800); }
.badge--com { background: var(--gold-500); color: var(--navy-900); }
.badge--verified { background: var(--green-050); color: var(--green-600); }
.badge--pending { background: var(--amber-050); color: var(--amber-600); }
.badge--rejected { background: var(--red-050); color: var(--red-600); }
.badge--closed { background: var(--mist); color: var(--muted); }

/* --- 11. Category tiles -------------------------------------------------- */
.tile {
  position: relative; display: block; border-radius: var(--r-lg); overflow: hidden;
  min-height: 190px; color: var(--white); text-decoration: none; background: var(--navy-800);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.tile:hover { text-decoration: none; }
.tile:hover img { opacity: .75; }
.tile__body {
  position: relative; height: 100%; min-height: 190px; padding: 18px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(10, 28, 51, .1) 30%, rgba(10, 28, 51, .88));
}
.tile__body strong { font-family: var(--display); font-size: 1.22rem; font-weight: 500; }
.tile__body span { font-size: .82rem; color: #BACBE0; }
.tile__link { font-size: .84rem; font-weight: 600; color: var(--gold-500); margin-top: 8px; }

/* --- 12. Results toolbar ------------------------------------------------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.toolbar__count { font-size: .92rem; color: var(--muted); }
.toolbar__count b { color: var(--navy-900); }
.toolbar__right { display: flex; align-items: center; gap: 10px; }
.viewtoggle { display: flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.viewtoggle button { border: 0; background: var(--white); padding: 9px 13px; font-size: .84rem; font-weight: 500; }
.viewtoggle button[aria-pressed="true"] { background: var(--navy-900); color: var(--white); }

.layout-filters { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
@media (max-width: 960px) { .layout-filters { grid-template-columns: 1fr; } }

.filters {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; position: sticky; top: calc(var(--header-h) + 16px);
}
@media (max-width: 960px) { .filters { position: static; } }
.filters h3 { font-family: var(--ui); font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.filters .field + .field, .filters .filter-group + .filter-group { margin-top: 15px; }
.filter-group > .label { display: block; margin-bottom: 8px; }
.filter-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filters__actions { display: grid; gap: 9px; margin-top: 20px; }

.empty {
  text-align: center; padding: 60px 24px; border: 1px dashed var(--line);
  border-radius: var(--r-lg); background: var(--mist);
}
.empty h3 { margin-bottom: .3em; }
.empty p { margin-inline: auto; color: var(--muted); }

/* --- 13. Property detail ------------------------------------------------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 980px) { .detail { grid-template-columns: 1fr; } }

.gallery { border-radius: var(--r-lg); overflow: hidden; background: var(--navy-900); }
.gallery__stage { position: relative; aspect-ratio: 16 / 10; }
.gallery__stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center;
  font-size: 1.1rem; color: var(--navy-900); box-shadow: var(--shadow-1);
}
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__expand {
  position: absolute; right: 14px; bottom: 14px; border: 0; border-radius: var(--r-sm);
  background: rgba(10, 28, 51, .78); color: var(--white); padding: 8px 13px; font-size: .82rem; font-weight: 500;
}
.gallery__count {
  position: absolute; left: 14px; bottom: 14px; background: rgba(10, 28, 51, .78);
  color: var(--white); border-radius: 999px; padding: 5px 12px; font-size: .8rem;
}
.gallery__thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; }
.gallery__thumbs button {
  flex: none; width: 92px; height: 66px; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; padding: 0; background: none;
}
.gallery__thumbs button[aria-current="true"] { border-color: var(--gold-500); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(6, 16, 30, .94);
  display: grid; place-items: center; padding: 30px;
}
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; border-radius: var(--r-md); }
.lightbox__close {
  position: absolute; top: 20px; right: 22px; background: none; border: 0;
  color: var(--white); font-size: 2rem; line-height: 1;
}
.lightbox .gallery__nav { background: rgba(255, 255, 255, .86); }

.spec-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.spec-table div { background: var(--white); padding: 13px 16px; }
.spec-table dt { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.spec-table dd { margin: 0; font-size: .93rem; font-weight: 600; color: var(--navy-900); }

.amenity-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.amenity-list li { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--navy-800); }
.amenity-list li::before {
  content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: var(--green-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.7 9 10 3.4' stroke='%2315803D' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.aside-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-1);
}
.aside-card + .aside-card { margin-top: 18px; }
.aside-card--sticky { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 980px) { .aside-card--sticky { position: static; } }
.owner { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.owner__avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--navy-900); color: var(--gold-500); font-family: var(--display); font-size: 1.15rem;
}
.owner__name { font-weight: 600; }
.owner__type { font-size: .82rem; color: var(--muted); }
.stack { display: grid; gap: 9px; }

.price-block { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.price-block b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 600; color: var(--navy-900); line-height: 1.1; }
.price-block span { font-size: .87rem; color: var(--muted); }

/* --- 14. Uploader -------------------------------------------------------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--r-lg); background: var(--mist);
  padding: 34px 20px; text-align: center; transition: border-color .15s ease, background .15s ease;
}
.dropzone.is-over { border-color: var(--blue-500); background: var(--blue-050); }
.dropzone h4 { margin-bottom: .35em; }
.dropzone p { color: var(--muted); font-size: .88rem; margin-inline: auto; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.thumb { position: relative; border-radius: var(--r-md); overflow: hidden; border: 2px solid var(--line); background: var(--mist); }
.thumb img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.thumb.is-primary { border-color: var(--gold-500); }
.thumb__tag {
  position: absolute; top: 7px; left: 7px; background: var(--gold-500); color: var(--navy-900);
  font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.thumb__tools { display: flex; gap: 1px; background: var(--line-soft); }
.thumb__tools button {
  flex: 1; border: 0; background: var(--white); padding: 7px 4px; font-size: .74rem; font-weight: 600; color: var(--navy-700);
}
.thumb__tools button:hover { background: var(--mist); }
.thumb__tools button.rm { color: var(--red-600); }

/* --- 15. Dashboard ------------------------------------------------------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 17px 18px;
}
.stat b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--navy-900); line-height: 1.1; }
.stat span { font-size: .82rem; color: var(--muted); }
.stat--accent { background: var(--navy-900); border-color: var(--navy-900); }
.stat--accent b { color: var(--gold-500); }
.stat--accent span { color: #A9BCD4; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.panel__head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.panel__head h3 { margin: 0; font-family: var(--ui); font-size: 1rem; font-weight: 700; }
.panel__body { padding: 20px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 12px 15px; font-size: .92rem; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--navy-900); border-bottom-color: var(--gold-500); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 620px; }
table.data th {
  text-align: left; font-size: .76rem; font-weight: 700; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data .thumb-cell { display: flex; align-items: center; gap: 11px; }
table.data .thumb-cell img { width: 58px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
table.data .thumb-cell strong { display: block; font-weight: 600; }
table.data .thumb-cell small { color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button {
  border: 1px solid var(--line); background: var(--white); border-radius: 6px;
  padding: 5px 10px; font-size: .78rem; font-weight: 600; color: var(--navy-700);
}
.row-actions button:hover { background: var(--mist); }
.row-actions button.danger { color: var(--red-600); border-color: #F0C9C9; }
.row-actions button.ok { color: var(--green-600); border-color: #BFE6CC; }

/* --- 16. Auth ------------------------------------------------------------ */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } }
.auth__panel { padding: 56px var(--gut); display: grid; place-items: center; }
.auth__form { width: 100%; max-width: 420px; }
.auth__art { position: relative; background: var(--navy-900); color: var(--white); overflow: hidden; }
@media (max-width: 880px) { .auth__art { min-height: 260px; } }
.auth__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.auth__art-body { position: relative; padding: 56px 46px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; background: linear-gradient(180deg, rgba(10, 28, 51, .4), rgba(10, 28, 51, .9)); }
.auth__art-body h2 { color: var(--white); }
.auth__art-body p { color: #BACBE0; }

/* --- 17. Modal + toast --------------------------------------------------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 28, 51, .55); z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal {
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
}
.modal__head { padding: 20px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal__head h3 { margin: 0; }
.modal__close { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); }
.modal__body { padding: 16px 24px 24px; }

.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 95; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  background: var(--navy-900); color: var(--white); padding: 13px 17px; border-radius: var(--r-md);
  box-shadow: var(--shadow-3); font-size: .9rem; display: flex; gap: 10px; align-items: center;
}
.toast--ok { background: #12603A; }
.toast--err { background: #8E1C1C; }

.notice {
  border-radius: var(--r-md); padding: 14px 16px; font-size: .9rem; margin-bottom: 20px;
  background: var(--blue-050); color: var(--navy-800); border: 1px solid #CFE0FF;
}
.notice--ok { background: var(--green-050); border-color: #BFE6CC; color: #14532D; }
.notice--warn { background: var(--amber-050); border-color: #F0DDB0; color: #713F12; }

/* --- 18. Prose + misc --------------------------------------------------- */
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 20px; color: var(--muted); }
.prose li { margin-bottom: .4em; }
.lead { font-size: 1.1rem; color: var(--muted); }

.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: var(--r-lg); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; padding-top: 42px; position: relative; }
.steps li::before {
  content: counter(s); position: absolute; top: 0; left: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-050); color: var(--gold-600); font-size: .85rem; font-weight: 700;
}
.steps strong { display: block; margin-bottom: 4px; }
.steps span { font-size: .9rem; color: var(--muted); }

/* --- 19. Footer ---------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: #A9BCD4; padding: 56px 0 26px; margin-top: 0; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: 1.6fr repeat(3, 1fr); }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-size: .92rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { color: #A9BCD4; font-size: .89rem; }
.site-footer a:hover { color: var(--white); }
.footer-brand .brand__name { color: var(--white); }
.footer-brand p { font-size: .89rem; margin: 14px 0 18px; max-width: 34ch; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: var(--white);
}
.socials a:hover { background: var(--gold-500); color: var(--navy-900); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
.footer-base {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .84rem;
}

/* --- 20. Utilities ------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hidden { display: none !important; }
