/* ===========================================================
   Luxuria Association 2026-2028 - Design System
   Blue / green / white with tasteful gold accents.
   =========================================================== */

:root {
  --color-navy: #0b2e4f;
  --color-blue: #0f5ea8;
  --color-blue-light: #e7f1fb;
  --color-green: #1f8a5f;
  --color-green-light: #e7f7ef;
  --color-gold: #b8892b;
  --color-gold-light: #fbf1dc;
  --color-white: #ffffff;
  --color-bg: #f5f7fa;
  --color-text: #1c2733;
  --color-text-muted: #5a6b7a;
  --color-border: #dbe3ea;
  --color-danger: #b3261e;
  --color-danger-light: #fbeceb;
  --color-warning: #a15c00;
  --color-warning-light: #fff3e0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(11, 46, 79, 0.08);
  --shadow-md: 0 6px 20px rgba(11, 46, 79, 0.12);
  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: var(--color-blue); }
a:hover { color: var(--color-navy); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: linear-gradient(135deg, var(--color-navy), var(--color-blue));
  color: #fff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand img {
  height: 42px;
  width: 42px;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
  border: 2px solid var(--color-gold);
}

.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-family: var(--font-heading); font-size: 1.15rem; letter-spacing: 0.02em; }
.brand-text span { display: block; font-size: 0.75rem; color: var(--color-gold-light); opacity: 0.9; }

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  white-space: nowrap;
}

.main-nav a:hover, .main-nav a.active {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-chip {
  font-size: 0.85rem;
  color: var(--color-gold-light);
  padding: 6px 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

.btn-primary { background: var(--color-blue); color: #fff; }
.btn-primary:hover { background: var(--color-navy); color: #fff; }

.btn-gold { background: var(--color-gold); color: #fff; }
.btn-gold:hover { background: #966e20; color: #fff; }

.btn-green { background: var(--color-green); color: #fff; }
.btn-green:hover { background: #146a48; color: #fff; }

.btn-outline {
  background: #fff;
  border-color: var(--color-border);
  color: var(--color-navy);
}
.btn-outline:hover { border-color: var(--color-blue); color: var(--color-blue); }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #8c1e18; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: 0.65; cursor: not-allowed; }

.btn-white-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
.btn-white-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ---------------- Layout helpers ---------------- */
.page { padding: 28px 0 60px; }
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--color-gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-tight { padding: 16px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-blue);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card.accent-green { border-left-color: var(--color-green); }
.stat-card.accent-gold { border-left-color: var(--color-gold); }
.stat-card.accent-danger { border-left-color: var(--color-danger); }
.stat-card .stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; color: var(--color-navy); font-family: var(--font-heading); }
.stat-card .stat-sub { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 4px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-title h2 { margin: 0; }

.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; vertical-align: top; }
thead th { background: var(--color-blue-light); color: var(--color-navy); font-weight: 700; white-space: nowrap; }
tbody tr:hover { background: #fafcff; }
tbody tr:last-child td { border-bottom: none; }
td.actions-cell { white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

/* ---------------- Status badges ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-pending { background: var(--color-warning-light); color: var(--color-warning); }
.badge-approved { background: var(--color-green-light); color: var(--color-green); }
.badge-denied { background: var(--color-danger-light); color: var(--color-danger); }
.badge-revoked { background: #ece7f5; color: #5b3ea6; }
.badge-completed { background: var(--color-green-light); color: var(--color-green); }
.badge-in_progress { background: var(--color-blue-light); color: var(--color-blue); }
.badge-planned { background: var(--color-gold-light); color: var(--color-gold); }
.badge-policy_discussion { background: #efeef7; color: #5c5470; }
.badge-protected { background: var(--color-gold-light); color: var(--color-gold); }
.badge-upcoming { background: var(--color-blue-light); color: var(--color-blue); }
.badge-ongoing { background: var(--color-green-light); color: var(--color-green); }
.badge-cancelled { background: var(--color-danger-light); color: var(--color-danger); }
.badge-sent { background: var(--color-green-light); color: var(--color-green); }
.badge-failed { background: var(--color-danger-light); color: var(--color-danger); }
.badge-before { background: #eef2ff; color: #4338ca; }
.badge-after { background: var(--color-green-light); color: var(--color-green); }
.badge-both { background: var(--color-gold-light); color: var(--color-gold); }
.badge-rent { background: var(--color-blue-light); color: var(--color-blue); }
.badge-sale { background: var(--color-gold-light); color: var(--color-gold); }
.badge-active { background: var(--color-green-light); color: var(--color-green); }
.badge-closed { background: #eceef1; color: var(--color-text-muted); }

/* ---------------- Forms ---------------- */
form.stack { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field label, fieldset legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--color-navy);
}
.field .hint { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 4px; }
.field .error-text { font-size: 0.82rem; color: var(--color-danger); margin-top: 4px; font-weight: 600; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=file], input[type=tel],
select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 1px;
  border-color: var(--color-gold);
}

.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

fieldset { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; }

/* ---------------- Alerts / flash ---------------- */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--color-green-light); border-color: #b8e3cb; color: #145536; }
.alert-error { background: var(--color-danger-light); border-color: #f2c3bf; color: var(--color-danger); }
.alert-info { background: var(--color-blue-light); border-color: #bcdcf7; color: var(--color-navy); }

/* ---------------- Empty state ---------------- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  background: #fff;
}
.empty-state h3 { color: var(--color-text-muted); margin-bottom: 6px; }

/* ---------------- Photo gallery ---------------- */
.album-group { margin-bottom: 34px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photo-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.photo-card .photo-thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: #eef2f6;
  position: relative;
}
.photo-card .photo-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo-card .photo-thumb .badge { position: absolute; top: 8px; left: 8px; }
.photo-card .photo-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.photo-card .photo-body h4 { margin: 0; font-size: 0.98rem; }
.photo-card .photo-body p { margin: 0; font-size: 0.85rem; color: var(--color-text-muted); }
.photo-card .photo-actions { padding: 10px 14px; border-top: 1px solid var(--color-border); display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- Classifieds ---------------- */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ad-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.ad-card .ad-thumb { aspect-ratio: 4 / 3; width: 100%; overflow: hidden; background: #eef2f6; position: relative; }
.ad-card .ad-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ad-card .ad-thumb .badge { position: absolute; top: 8px; left: 8px; }
.ad-card .ad-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ad-card .ad-body h3 { margin: 0; font-size: 1.02rem; }
.ad-card .ad-price { font-weight: 700; color: var(--color-navy); font-size: 1.02rem; }
.ad-card .ad-location { font-size: 0.85rem; color: var(--color-text-muted); }
.ad-card .ad-body p { margin: 4px 0 0; font-size: 0.88rem; }
.ad-card .ad-contact { font-size: 0.85rem; border-top: 1px dashed var(--color-border); margin-top: 8px; padding-top: 8px; }
.ad-card .ad-contact strong { display: block; margin-bottom: 2px; }
.ad-card .ad-actions { padding: 10px 16px; border-top: 1px solid var(--color-border); display: flex; gap: 8px; flex-wrap: wrap; }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(11,20,30,0.88);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 24px;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.lightbox-caption { color: #fff; text-align: center; margin-top: 12px; max-width: 720px; }
.lightbox-close {
  position: absolute; top: 18px; right: 24px; background: rgba(255,255,255,0.14);
  color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: 999px;
  width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer;
}

/* ---------------- Modals / confirm ---------------- */
.inline-confirm-form { display: inline; }
.confirm-armed { background: var(--color-danger) !important; color: #fff !important; }

/* ---------------- Cards for updates/events/comments ---------------- */
.update-list, .event-list, .comment-list { display: flex; flex-direction: column; gap: 14px; }
.update-card, .event-card, .comment-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.update-card .update-head, .event-card .event-head, .comment-card .comment-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.event-card { display: flex; gap: 16px; }
.event-card .event-thumb { width: 140px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; background: #eef2f6; }
.event-card .event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-card .event-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 6px; }
@media (max-width: 560px) { .event-card { flex-direction: column; } .event-card .event-thumb { width: 100%; } }

.comment-card .comment-meta { font-size: 0.8rem; color: var(--color-text-muted); }
.comment-attachments { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.comment-attachments img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); cursor: zoom-in; }

/* ---------------- Auth / public pages ---------------- */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 55%, #1a6fa8 100%);
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
}
.hero .eyebrow { color: var(--color-gold-light); }
.hero h1 { color: #fff; font-size: 2.6rem; max-width: 760px; }
.hero p.lead { font-size: 1.1rem; color: rgba(255,255,255,0.9); max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.hero-logo { height: 84px; width: 84px; border-radius: 16px; background: #fff; padding: 6px; border: 3px solid var(--color-gold); }

.auth-shell {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px 32px;
  width: 100%;
  max-width: 440px;
}
.auth-card .auth-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.auth-card .auth-logo img { height: 56px; width: 56px; border-radius: 12px; border: 2px solid var(--color-gold); }
.auth-card h1 { text-align: center; font-size: 1.4rem; margin-bottom: 4px; }
.auth-card .auth-sub { text-align: center; color: var(--color-text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 0.88rem; }
.credential-hint { background: var(--color-gold-light); border: 1px solid #edd9ab; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.82rem; color: #6f5015; margin-top: 16px; }

.info-strip { background: var(--color-green-light); border-top: 1px solid #c9ecd8; border-bottom: 1px solid #c9ecd8; padding: 26px 0; }
.info-strip .grid-3 > div { text-align: center; }
.info-strip .num { font-size: 1.8rem; font-weight: 700; color: var(--color-navy); font-family: var(--font-heading); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.75);
  padding: 30px 0;
  font-size: 0.85rem;
  margin-top: 60px;
}
.site-footer a { color: rgba(255,255,255,0.9); }

/* ---------------- Loading / progress ---------------- */
.spinner {
  display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.help-text { color: var(--color-text-muted); font-size: 0.88rem; }
.text-muted { color: var(--color-text-muted); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.divider { border: none; border-top: 1px solid var(--color-border); margin: 24px 0; }

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tag-list a {
  text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 0.82rem;
  background: #fff; border: 1px solid var(--color-border); color: var(--color-navy);
}
.tag-list a.active, .tag-list a:hover { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }

.protected-note { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--color-gold); font-weight: 600; }

/* ---------------- Responsive nav ---------------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    background: var(--color-navy);
    padding: 8px 0;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 20px; border-radius: 0; }
  .site-header .header-inner { flex-wrap: wrap; }
  .header-actions { order: 3; width: 100%; justify-content: flex-start; padding-top: 0; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 1.9rem; }
  .page-header { flex-direction: column; }
  .auth-card { padding: 26px 20px; }
}
