/* ============================================================
   DOM Imobiliária — Global Stylesheet
   style.css | Shared across all pages
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  /* Colors */
  --bg:          #1a1a18;
  --bg-deep:     #121210;
  --surface:     #242422;
  --surface-2:   #2e2e2c;
  --border:      #404038;
  --border-soft: rgba(255,255,255,0.06);
  --text:        #E8E6E1;
  --text-soft:   #ccc9c2;
  --muted:       #9a9892;
  --muted-2:     #6b6a65;
  --primary:     #C9A84C;
  --primary-soft:#F0D080;
  --primary-dim: rgba(201,168,76,0.12);
  --primary-glow:rgba(201,168,76,0.25);
  --success:     #6dbf7b;
  --error:       #e05555;
  --info:        #7ec2e8;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  /* Spacing */
  --nav-h:  75px;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.25s ease;
  --t-slow: 0.45s ease;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-primary: 0 8px 32px rgba(201,168,76,0.2);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* ── Skip Link (Accessibility) ───────────────────────────── */
.skip-link {
  position: fixed; top: -100%; left: 16px; z-index: 9999;
  background: var(--primary); color: var(--bg);
  padding: 8px 16px; border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 13px;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 40px;
  background: rgba(26,26,24,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--t-base), box-shadow var(--t-base);
}
.nav.scrolled {
  background: rgba(26,26,24,0.97);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  width: 100%; max-width: 1360px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img {
  height: 48px; width: auto;
  transition: opacity var(--t-fast);
}
.nav-logo:hover img { opacity: 0.8; }

.nav-menu {
  display: flex; align-items: center; gap: 36px;
}
.nav-menu a {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast);
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px; background: var(--primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-base);
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--text);
}
.nav-menu a:hover::after, .nav-menu a.active::after {
  transform: scaleX(1);
}
.nav-cta {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 22px;
  background: var(--text); color: var(--bg);
  border-radius: var(--radius-xs);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  font-weight: 500;
}
.nav-cta:hover {
  background: var(--primary); color: var(--bg);
  transform: translateY(-1px);
}

/* Nav auth area */
.nav-auth { display: flex; align-items: center; gap: 10px; margin-left: 4px; }
.nav-auth-btn {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 8px 18px;
  border: 1px solid var(--border); color: var(--muted);
  border-radius: var(--radius-xs);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.nav-auth-btn:hover { color: var(--text); border-color: var(--text); }
.nav-user-chip {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted);
}
.nav-user-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-dim); border: 1px solid rgba(201,168,76,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-family: var(--font-serif); font-size: 11px;
}
.nav-user-logout {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-xs);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.nav-user-logout:hover { color: var(--text); border-color: var(--muted); }

/* Login Modal */
.login-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,8,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.login-modal-overlay.open { opacity: 1; pointer-events: all; }
.login-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 44px; width: 100%; max-width: 420px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(.2,.8,.3,1);
  position: relative;
}
.login-modal-overlay.open .login-modal { transform: translateY(0) scale(1); }
.login-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: background var(--t-fast), color var(--t-fast);
  font-size: 18px; line-height: 1;
}
.login-modal-close:hover { background: var(--border-soft); color: var(--text); }
.login-modal-logo { display: flex; justify-content: center; margin-bottom: 28px; }
.login-modal-logo img { height: 36px; }
.login-modal-title { font-family: var(--font-serif); font-size: 1.4rem; color: var(--text); text-align: center; margin-bottom: 4px; }
.login-modal-sub { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.login-field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-xs); color: var(--text);
  font-family: var(--font-sans); font-size: 14px;
  transition: border-color var(--t-fast);
}
.login-field input:focus { outline: none; border-color: var(--primary); }
.login-field-pw { position: relative; }
.login-field-pw input { padding-right: 44px; }
.login-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); padding: 4px; border-radius: 4px;
  transition: color var(--t-fast);
}
.login-pw-toggle:hover { color: var(--text); }
.login-error { font-size: 12px; color: #E57373; text-align: center; margin-bottom: 14px; min-height: 18px; }
.login-submit { width: 100%; padding: 13px; margin-top: 4px; }
.login-submit.loading { opacity: 0.7; pointer-events: none; }
.login-hint { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); }
.login-hint a { color: var(--primary); }
.login-modal-divider { height: 1px; background: var(--border-soft); margin: 20px 0; }
.login-roles { display: flex; gap: 8px; }
.login-role-btn {
  flex: 1; padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); text-align: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  transition: all var(--t-fast); cursor: pointer;
}
.login-role-btn:hover, .login-role-btn.active { border-color: var(--primary); color: var(--primary); background: var(--primary-dim); }
@keyframes loginShake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}
.login-modal.shake { animation: loginShake 0.35s ease; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 40px; height: 40px; gap: 5px;
  border-radius: var(--radius-xs);
  transition: background var(--t-fast);
}
.nav-hamburger:hover { background: var(--surface); }
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform var(--t-base), opacity var(--t-base), width var(--t-base);
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Drawer */
.nav-drawer {
  position: fixed; top: var(--nav-h); right: 0; bottom: 0;
  width: min(320px, 90vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 999;
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 8px;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  box-shadow: var(--shadow-lg);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer a {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.nav-drawer a:hover { color: var(--text); padding-left: 8px; }
.nav-drawer .nav-cta {
  margin-top: 20px; text-align: center;
  padding: 14px; border-radius: var(--radius-sm);
}
.nav-overlay {
  position: fixed; inset: 0; z-index: 998;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg);
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:hover {
  background: var(--primary); color: var(--bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}
.btn:active { transform: translateY(0); }

.btn-outline {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--surface); color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent; color: var(--muted);
  border-color: transparent;
  padding: 11px 18px;
}
.btn-ghost:hover {
  background: var(--surface); color: var(--text);
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--primary); color: var(--bg);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-soft); color: var(--bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.btn-sm {
  padding: 9px 18px; font-size: 11px;
}
.btn-lg {
  padding: 16px 36px; font-size: 13px;
}
.btn-full { width: 100%; }

/* Loading state */
.btn.loading {
  pointer-events: none; opacity: 0.7;
  position: relative;
}
.btn.loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 6px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.card:hover {
  border-color: rgba(201,168,76,0.2);
  box-shadow: var(--shadow-md);
}
.card-sm { border-radius: var(--radius-sm); padding: 20px; }

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.badge-default { background: var(--surface-2); color: var(--muted); }
.badge-primary { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(201,168,76,0.3); }
.badge-success { background: rgba(109,191,123,0.12); color: var(--success); border: 1px solid rgba(109,191,123,0.25); }
.badge-info    { background: rgba(126,194,232,0.12); color: var(--info); border: 1px solid rgba(126,194,232,0.25); }
.badge-rent    { background: rgba(232,230,225,0.1); color: var(--text-soft); border: 1px solid var(--border); }
.badge-sale    { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(201,168,76,0.3); }
.badge-coliving{ background: rgba(126,194,232,0.1); color: var(--info); border: 1px solid rgba(126,194,232,0.25); }

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  line-height: 0;
  transition: color var(--t-fast);
}
.modal-close:hover { color: var(--text); }

/* ── DOMlog nav pill ─────────────────────────────────────── */
.nav-log-pill {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.08em;
  color: var(--primary) !important;
  border: 1px solid rgba(201,168,76,0.35);
  padding: 4px 12px !important;
  border-radius: 999px;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast) !important;
}
.nav-log-pill:hover {
  background: rgba(201,168,76,0.1) !important;
  border-color: rgba(201,168,76,0.6) !important;
}
.nav-log-pill.active {
  background: var(--primary) !important;
  color: #0e0e0c !important;
  border-color: var(--primary) !important;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px; font-family: var(--font-sans);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  appearance: none; -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
.field select {
  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 1l5 5 5-5' stroke='%239a9892' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.field textarea { min-height: 120px; resize: vertical; }
.field.error input, .field.error select, .field.error textarea {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(224,85,85,0.12);
}
.field-error-msg {
  font-size: 12px; color: var(--error);
  font-family: var(--font-mono);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px; font-family: var(--font-sans);
  box-shadow: var(--shadow-md);
  min-width: 260px; max-width: 380px;
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
}
.toast.out { animation: toastOut 0.3s ease forwards; }
.toast-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.toast.success .toast-dot { background: var(--success); }
.toast.error   .toast-dot { background: var(--error); }
.toast.info    .toast-dot { background: var(--info); }
.toast.warning .toast-dot { background: var(--primary); }

/* ============================================================
   PROPERTY CARDS (shared component)
   ============================================================ */
.property-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  display: flex; flex-direction: column;
}
.property-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201,168,76,0.25);
  box-shadow: var(--shadow-md);
}
.property-card-img {
  height: 220px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--bg-deep) 100%);
}
.property-card-img .img-label {
  position: absolute; bottom: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: rgba(26,26,24,0.8);
  padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.property-card-img .badge {
  position: absolute; top: 12px; right: 12px;
}
.property-card-fav {
  position: absolute; top: 12px; left: 12px;
  width: 34px; height: 34px;
  background: rgba(26,26,24,0.7); backdrop-filter: blur(6px);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--t-fast), transform var(--t-fast);
  color: var(--muted); font-size: 14px;
}
.property-card-fav:hover { background: rgba(26,26,24,0.95); transform: scale(1.1); }
.property-card-fav.active { color: #e05555; }

.property-card-body {
  padding: 22px 22px 18px; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.property-card-type {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.property-card-name {
  font-family: var(--font-serif); font-size: 1.15rem;
  color: var(--text); line-height: 1.3;
}
.property-card-location {
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.property-card-specs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
}
.property-card-specs span {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  padding: 4px 10px; border-radius: 999px;
}
.property-card-footer {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}
.property-card-price {
  display: flex; flex-direction: column; gap: 1px;
}
.property-card-price strong {
  font-family: var(--font-serif); font-size: 1.2rem; color: var(--primary);
}
.property-card-price span {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.property-card-cta {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 5px;
  transition: color var(--t-fast), gap var(--t-fast);
}
.property-card-cta:hover { color: var(--primary); gap: 8px; }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 32px 60px;
}
.page-wide {
  max-width: 1360px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 40px 60px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--text); line-height: 1.2;
  margin-bottom: 12px;
}
.page-subtitle {
  font-size: 15px; color: var(--muted);
  line-height: 1.7; max-width: 560px;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--text); line-height: 1.2;
}
.section-copy {
  font-size: 15px; color: var(--muted);
  line-height: 1.75; max-width: 480px;
}

/* ============================================================
   SIDEBAR DASHBOARD LAYOUT
   ============================================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-h));
  gap: 0;
}
.dashboard-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: calc(var(--nav-h) + 32px) 0 32px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.sidebar-logo img { height: 28px; }
.sidebar-section {
  padding: 8px 16px;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2); margin: 12px 0 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast), background var(--t-fast), padding-left var(--t-fast);
  border-left: 2px solid transparent;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar-link.active {
  color: var(--primary); background: var(--primary-dim);
  border-left-color: var(--primary);
  padding-left: 26px;
}
.sidebar-link svg { width: 15px; height: 15px; flex-shrink: 0; }

.dashboard-main {
  padding: calc(var(--nav-h) + 40px) 40px 60px;
  overflow-y: auto;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 20px;
  transition: border-color var(--t-base), transform var(--t-base);
}
.stat-card:hover {
  border-color: rgba(201,168,76,0.2);
  transform: translateY(-2px);
}
.stat-card-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.stat-card-value {
  font-family: var(--font-serif); font-size: 2rem;
  color: var(--primary); line-height: 1;
  margin-bottom: 4px;
}
.stat-card-desc {
  font-size: 12px; color: var(--muted-2);
}

/* ============================================================
   TABLE
   ============================================================ */
.data-table {
  width: 100%; border-collapse: collapse;
}
.data-table th {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  font-size: 13px; color: var(--text-soft);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr {
  transition: background var(--t-fast);
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }

/* ============================================================
   WHATSAPP FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 56px; height: 56px;
  background: #25D366; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform var(--t-base), box-shadow var(--t-base);
  animation: fabPulse 3s ease-in-out infinite;
}
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37,211,102,0.55);
  animation: none;
}
.whatsapp-fab svg { width: 26px; height: 26px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.page-transition.active { opacity: 1; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.breadcrumb a { transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--muted-2); font-size: 10px; }
.breadcrumb-current { color: var(--text-soft); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%; max-width: 520px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--t-base);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: var(--radius-xs);
  transition: background var(--t-fast), color var(--t-fast);
  font-size: 18px;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-title {
  font-family: var(--font-serif); font-size: 1.6rem;
  color: var(--text); margin-bottom: 8px;
}
.modal-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* ============================================================
   ANIMATIONS KEYFRAMES
   ============================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50%       { box-shadow: 0 4px 32px rgba(37,211,102,0.65); }
}
@keyframes shimmer {
  from { background-position: -600px 0; }
  to   { background-position: 600px 0; }
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted   { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-serif   { font-family: var(--font-serif); }
.text-mono    { font-family: var(--font-mono); }
.label-mono {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.divider {
  height: 1px; background: var(--border-soft);
  margin: 24px 0;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  :root { --nav-h: 66px; }
  .nav { padding: 0 20px; }
  .nav-menu { display: none; }
  .nav-cta  { display: none; }
  .nav-hamburger { display: flex; }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar {
    display: none;
  }
  .dashboard-main { padding: calc(var(--nav-h) + 24px) 20px 40px; }
  .page  { padding: calc(var(--nav-h) + 32px) 20px 48px; }
  .page-wide { padding: calc(var(--nav-h) + 32px) 20px 48px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .btn-lg { padding: 14px 24px; font-size: 12px; }
  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; }
}
