/* ============================================================
   base.css - structural styles for the booking site.
   ALL colors / fonts / shapes come from CSS variables so a theme
   file only has to override the variables below to completely
   change the look. Themes live in /themes/*.css.
   ============================================================ */

:root {
  /* fonts */
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* base palette (neutral fallback - themes override) */
  --bg: #f6f5f2;
  --bg-alt: #edebe6;
  --surface: #ffffff;
  --surface-alt: #f3f1ec;
  --text: #23201b;
  --text-soft: #5f594f;
  --text-faint: #9a938a;
  --accent: #3a6ea5;
  --accent-hover: #2f5b8a;
  --accent-contrast: #ffffff;
  --border: rgba(35, 32, 27, 0.12);
  --border-strong: rgba(35, 32, 27, 0.25);

  /* shape */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow: 0 1px 3px rgba(20, 18, 14, 0.07);
  --shadow-lg: 0 12px 40px rgba(20, 18, 14, 0.16);

  /* header / hero / footer */
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-text: var(--text);
  --hero-bg: linear-gradient(140deg, #e8e4dc 0%, #f6f5f2 100%);
  --hero-text: var(--text);
  --footer-bg: #23201b;
  --footer-text: #cfc9c0;

  /* calendar states */
  --cal-free-bg: transparent;
  --cal-booked: #d95d5d;
  --cal-booked-soft: rgba(217, 93, 93, 0.28);
  --cal-pending: #e5b93c;
  --cal-pending-soft: rgba(229, 185, 60, 0.32);
  --cal-selected: var(--accent);
  --cal-selected-soft: rgba(58, 110, 165, 0.16);

  /* semantic status colors (dark themes MUST override these) */
  --ok: #17753e;                       /* success text */
  --ok-bg: rgba(40, 160, 90, 0.18);    /* success badge background */
  --ok-solid: #1d9e75;                 /* solid success button */
  --err: #a03636;                      /* error / danger text */
  --err-bg: rgba(180, 70, 70, 0.14);   /* danger badge background */
  --warn-text: #7c5e08;                /* warning text on warn background */
  --warn-note: #a1741a;                /* warning text on page background */

  --max-width: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: var(--accent); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── layout ────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ── header ────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 12px;
}
.site-title {
  font-family: var(--font-display);
  font-size: 22px; color: var(--header-text);
  text-decoration: none; letter-spacing: 0.2px;
}
.header-right { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; gap: 2px; border: 1px solid var(--border-strong); border-radius: 20px; padding: 2px; }
.lang-btn {
  border: none; background: transparent; color: var(--text-soft);
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 16px; cursor: pointer;
}
.lang-btn.active { background: var(--accent); color: var(--accent-contrast); }

/* ── hero ─────────────────────────────────────────────── */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: 54px 0 46px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 44px); font-weight: 500; margin-bottom: 8px; }
.hero p { font-size: 17px; opacity: 0.82; max-width: 560px; }

/* ── apartment cards ──────────────────────────────────── */
.section-title {
  font-family: var(--font-display); font-size: 24px; font-weight: 500;
  margin: 34px 0 18px;
}
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px; padding-bottom: 50px;
}
.apt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: fadeUp .4s ease both;
  cursor: pointer;
}
.apt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.apt-card-img {
  aspect-ratio: 16 / 10; background-size: cover; background-position: center;
  position: relative;
}
.apt-card-img.placeholder { display: flex; align-items: center; justify-content: center; }
.apt-card-img.placeholder::after {
  content: '🏠'; font-size: 44px; opacity: .55;
}
.apt-avail-badge {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(20, 18, 14, 0.62); color: #fff;
  font-size: 12px; padding: 4px 11px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.apt-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.apt-card-name { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.apt-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-soft); }
.apt-card-meta .price { color: var(--accent); font-weight: 600; }
.apt-card-desc { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }
.apt-card-amen { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.amen-chip {
  font-size: 11.5px; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 9px;
  background: var(--surface-alt);
}
.apt-card-btn {
  margin-top: 12px; text-align: center;
  background: var(--accent); color: var(--accent-contrast);
  border: none; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.apt-card-btn:hover { background: var(--accent-hover); }

/* ── apartment page ───────────────────────────────────── */
.apt-page { padding: 26px 0 60px; animation: fadeUp .35s ease both; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--text-soft); font-size: 14px; margin-bottom: 16px; padding: 4px 0;
}
.back-link:hover { color: var(--text); }

.apt-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; }
@media (max-width: 860px) { .apt-layout { grid-template-columns: 1fr; } }

.gallery-main {
  aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background-size: cover; background-position: center; cursor: zoom-in;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.gallery-main.placeholder { display: flex; align-items: center; justify-content: center; cursor: default; }
.gallery-main.placeholder::after { content: '🏠'; font-size: 64px; opacity: .5; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumb {
  width: 74px; height: 54px; border-radius: var(--radius-sm);
  background-size: cover; background-position: center; cursor: pointer;
  border: 2px solid transparent; opacity: .8;
}
.gallery-thumb.active { border-color: var(--accent); opacity: 1; }

.apt-info h1 { font-family: var(--font-display); font-size: 30px; font-weight: 500; margin-bottom: 4px; }
.apt-address { color: var(--text-faint); font-size: 13.5px; margin-bottom: 12px; }
.apt-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; }
.apt-badge {
  font-size: 13px; padding: 5px 13px; border-radius: 20px;
  background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-soft);
}
.apt-badge.price { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); font-weight: 600; }
.apt-desc { color: var(--text-soft); font-size: 14.5px; white-space: pre-line; margin-bottom: 18px; }
.apt-amen-title, .apt-sec-title { font-family: var(--font-display); font-size: 19px; margin: 18px 0 10px; font-weight: 500; }
.apt-amen-list { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── calendar ─────────────────────────────────────────── */
.cal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--text-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.leg-swatch { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--border); }
.leg-swatch.free { background: var(--surface); }
.leg-swatch.booked { background: var(--cal-booked-soft); border-color: var(--cal-booked); }
.leg-swatch.pending { background: var(--cal-pending-soft); border-color: var(--cal-pending); }
.leg-swatch.selected { background: var(--cal-selected-soft); border-color: var(--cal-selected); }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-soft); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cal-nav-btn:hover:not(:disabled) { background: var(--surface-alt); }
.cal-nav-btn:disabled { opacity: .35; cursor: default; }
.cal-month-label { font-family: var(--font-display); font-size: 17px; }

.cal-months { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 700px) { .cal-months.two { grid-template-columns: 1fr 1fr; } }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-faint); font-weight: 600; padding: 4px 0; }
.cal-day {
  position: relative; aspect-ratio: 1; min-height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; border-radius: var(--radius-sm);
  cursor: pointer; user-select: none; overflow: hidden;
  background: var(--cal-free-bg);
  border: 1px solid transparent;
}
.cal-day.empty { cursor: default; }
.cal-day.past { color: var(--text-faint); opacity: .45; cursor: default; }
.cal-day .num { position: relative; z-index: 3; }
.cal-day.today .num { font-weight: 800; text-decoration: underline; }

/* occupancy overlays: full / left half (checkout) / right half (checkin) */
.cal-day .ov { position: absolute; top: 0; bottom: 0; z-index: 1; }
.cal-day .ov.full { left: 0; right: 0; }
.cal-day .ov.left { left: 0; right: 50%; }
.cal-day .ov.right { left: 50%; right: 0; }
.cal-day .ov.booked { background: var(--cal-booked-soft); }
.cal-day .ov.pending { background: var(--cal-pending-soft); }
.cal-day.fully-booked { cursor: not-allowed; }
.cal-day.fully-booked .num { color: var(--text-faint); text-decoration: line-through; }

/* selection */
.cal-day.in-range { background: var(--cal-selected-soft); }
.cal-day.sel-start, .cal-day.sel-end {
  background: var(--cal-selected); color: var(--accent-contrast);
  border-color: var(--cal-selected);
}
.cal-day.sel-start .num, .cal-day.sel-end .num { color: var(--accent-contrast); }

.cal-note { font-size: 12.5px; color: var(--text-soft); margin-top: 10px; }
.cal-note.warn { color: var(--warn-note); }
.cal-note.error { color: var(--err); }

/* ── reservation form ─────────────────────────────────── */
.res-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-top: 20px;
}
.res-form-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 14px; font-weight: 500; }
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .form-row2 { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 4px; letter-spacing: .2px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); }
.form-field textarea { resize: vertical; min-height: 74px; }
.form-field input[readonly] { background: var(--surface-alt); color: var(--text-soft); }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }

.res-summary {
  background: var(--surface-alt); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px; margin-bottom: 12px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.res-summary .total { font-weight: 700; color: var(--accent); }

.btn-primary {
  width: 100%; padding: 12px;
  background: var(--accent); color: var(--accent-contrast);
  border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-secondary {
  width: 100%; padding: 11px;
  background: var(--surface-alt); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-secondary:hover { background: var(--bg-alt); }

.form-error { color: var(--err); font-size: 13px; margin-top: 8px; display: none; }
.form-error.show { display: block; }

/* success screen */
.success-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 520px; margin: 60px auto; padding: 40px 34px; text-align: center;
  animation: fadeUp .4s ease both;
}
.success-icon { font-size: 46px; margin-bottom: 12px; }
.success-card h2 { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin-bottom: 10px; }
.success-card p { color: var(--text-soft); font-size: 14.5px; margin-bottom: 10px; }
.success-note { font-size: 13px; color: var(--text-faint); font-style: italic; margin-bottom: 20px; }

/* ── footer ───────────────────────────────────────────── */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 34px 0 26px; margin-top: 30px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-title { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; }
.footer-line { font-size: 13.5px; opacity: .85; margin-bottom: 3px; }
.footer-admin { font-size: 12px; opacity: .5; text-decoration: none; color: inherit; align-self: flex-end; }
.footer-admin:hover { opacity: .9; }

/* ── lightbox ─────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 9, 7, 0.88);
  align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; }
.lightbox-close {
  position: absolute; top: 16px; right: 22px;
  background: none; border: none; color: #fff; font-size: 34px; cursor: pointer;
}

/* ── showroom panel ───────────────────────────────────── */
#showroom-panel { position: fixed; right: 0; top: 40%; z-index: 300; font-family: var(--font-body); }
#showroom-toggle {
  position: absolute; right: 0; top: 0;
  width: 46px; height: 46px; border: none; cursor: pointer;
  border-radius: 12px 0 0 12px; font-size: 21px;
  background: var(--accent); color: var(--accent-contrast);
  box-shadow: var(--shadow-lg);
}
#showroom-drawer {
  /* fixed + vertically centered so the tall list never runs off the
     bottom of the screen (was clipped behind the taskbar before) */
  position: fixed; right: -240px; top: 50%; transform: translateY(-50%);
  width: 224px;
  background: var(--surface); border: 1px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px;
  transition: right .25s ease; visibility: hidden;
  max-height: min(86vh, calc(100vh - 20px)); overflow-y: auto;
}
#showroom-panel.open #showroom-drawer { right: 46px; visibility: visible; }
.sr-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.sr-sub { font-size: 11.5px; color: var(--text-faint); margin-bottom: 10px; }
.showroom-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px;
  cursor: pointer; font-size: 13px; color: var(--text); text-align: left;
}
.showroom-item:hover { background: var(--surface-alt); }
.showroom-item.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sr-swatch { display: flex; gap: 3px; }
.sr-dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--border-strong); }
.sr-reset {
  width: 100%; margin-top: 4px; background: none;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 7px; font-size: 12px; color: var(--text-soft); cursor: pointer;
}
.sr-reset:hover { background: var(--surface-alt); }
.sr-section {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-faint); margin: 10px 0 6px;
}
.sr-lay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 4px; }
.showroom-lay {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 4px; cursor: pointer;
  font-size: 11px; color: var(--text-soft);
}
.showroom-lay:hover { background: var(--surface-alt); }
.showroom-lay.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.sr-lay-icon { font-size: 15px; line-height: 1; }

/* custom theme editor (showroom drawer + admin settings) */
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; }
.ct-grid label, .ct-row {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; color: var(--text-soft);
}
.ct-row { margin-top: 7px; }
.ct-grid input[type="color"] {
  width: 100%; height: 30px; border: 1px solid var(--border-strong);
  border-radius: 6px; background: var(--surface); padding: 1px; cursor: pointer;
}
.ct-row select {
  width: 100%; padding: 6px 8px; font-size: 12px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--surface); color: var(--text); font-family: inherit;
}
.ct-row input[type="range"] { width: 100%; }

/* apartment menu used by the Sidebar layout (hidden elsewhere) */
.apt-nav { display: none; }

/* ── shared admin bits (admin.html uses base.css too) ──── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 34px 30px; box-shadow: var(--shadow); animation: fadeUp .4s ease both;
}
.auth-card h1 { font-family: var(--font-display); font-size: 24px; text-align: center; margin-bottom: 4px; font-weight: 500; }
.auth-sub { text-align: center; font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }
.auth-link { display: block; text-align: center; margin-top: 12px; font-size: 12.5px; color: var(--text-faint); cursor: pointer; text-decoration: underline; background: none; border: none; width: 100%; }

.admin-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.admin-header .container { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-title { font-family: var(--font-display); font-size: 19px; }
.badge {
  font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 20px; letter-spacing: .4px;
}
.badge.pending { background: var(--cal-pending-soft); color: var(--warn-text); }
.badge.confirmed { background: var(--ok-bg); color: var(--ok); }
.badge.rejected, .badge.cancelled, .badge.expired { background: var(--err-bg); color: var(--err); }
.badge.blocked { background: var(--bg-alt); color: var(--text-soft); }

.tabs {
  display: flex; gap: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px; margin: 18px 0;
  overflow-x: auto;
}
.tab {
  flex: 1; min-width: 90px; padding: 9px 8px; text-align: center;
  border: none; background: transparent; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--text-soft); cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.tab .count {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--cal-booked); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card-title { font-size: 13.5px; font-weight: 700; color: var(--text-soft); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); letter-spacing: .3px; }

.res-row {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px; background: var(--surface);
  flex-wrap: wrap;
}
.res-row.pending-row { border-color: var(--cal-pending); box-shadow: 0 0 0 1px var(--cal-pending-soft); }
.res-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.res-main { flex: 1; min-width: 180px; }
.res-name { font-weight: 600; font-size: 14.5px; }
.res-meta { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.res-msg { font-size: 12.5px; color: var(--text-faint); font-style: italic; margin-top: 4px; white-space: pre-line; }
.res-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-sm {
  padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
}
.btn-sm:hover { background: var(--surface-alt); }
.btn-sm.ok { background: var(--ok-solid); border-color: var(--ok-solid); color: #fff; }
.btn-sm.ok:hover { filter: brightness(0.9); }
.btn-sm.danger:hover { background: var(--err-bg); color: var(--err); border-color: var(--err); }

.empty-state { text-align: center; color: var(--text-faint); font-size: 13.5px; padding: 26px 0; }
.loading { text-align: center; color: var(--text-faint); font-size: 13.5px; padding: 22px 0; }
.succ-msg { color: var(--ok); font-size: 13px; margin-top: 8px; display: none; }
.succ-msg.show { display: block; }

.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(20, 18, 14, 0.55);
  align-items: center; justify-content: center; padding: 18px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius);
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  padding: 24px; animation: fadeUp .25s ease both;
}
.modal h3 { font-family: var(--font-display); font-size: 21px; margin-bottom: 16px; font-weight: 500; }
.modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.modal-btns button { flex: 1; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.photo-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.photo-item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-item .cover-badge {
  position: absolute; top: 5px; left: 5px; background: var(--accent);
  color: var(--accent-contrast); font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 9px;
}
.photo-item .photo-actions {
  position: absolute; inset: auto 0 0 0; display: flex;
  background: rgba(15, 13, 10, 0.62);
}
.photo-item .photo-actions button {
  flex: 1; background: none; border: none; color: #fff; font-size: 11px;
  padding: 5px 2px; cursor: pointer;
}
.photo-item .photo-actions button:hover { background: rgba(255,255,255,0.14); }

.color-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.color-opt { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.color-opt.sel { border-color: var(--text); }

.apt-admin-row {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.apt-admin-thumb {
  width: 62px; height: 46px; border-radius: 6px; flex-shrink: 0;
  background-size: cover; background-position: center; background-color: var(--surface-alt);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-soft); margin-bottom: 12px; }
.checkbox-row input { width: auto; }

@media (max-width: 480px) {
  .hero { padding: 36px 0 30px; }
  .cards-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
  .res-actions { width: 100%; }
}
