/* ================================================================
   PORTAL 4 — Design System  v4.0
   Brand identity: Portal for homes
   Palette: Negro #000000 · Blanco #FFFFFF · Grises #1A1A1A / #666666 / #E5E5E5
   Typography: Poppins (primary) · Montserrat (secondary) · DM Mono (data)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,600&family=Montserrat:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand palette — exact from identity document */
  --black:         #000000;
  --white:         #FFFFFF;
  --gray-900:      #111111;
  --gray-800:      #1A1A1A;
  --gray-700:      #2D2D2D;
  --gray-600:      #444444;
  --gray-500:      #666666;
  --gray-400:      #999999;
  --gray-300:      #CCCCCC;
  --gray-200:      #E5E5E5;
  --gray-100:      #F2F2F2;
  --gray-50:       #F8F8F8;

  /* Semantic aliases — used across all components */
  --ink:           var(--gray-900);
  --ink-soft:      var(--gray-800);
  --ink-card:      var(--gray-700);
  --ink-border:    var(--gray-600);
  --ink-border-soft: var(--gray-700);

  /* Status colors — unchanged, these are functional not brand */
  --success:       #3FB950;
  --danger:        #F85149;
  --warning:       #D29922;
  --info:          #58A6FF;

  /* Accent — brand primary action uses black on white, white on black */
  /* "copper" alias kept so HTML files require zero changes */
  --copper:        var(--black);
  --copper-light:  var(--gray-400);
  --copper-mist:   rgba(0,0,0,.06);
  --copper-glow:   rgba(0,0,0,.12);
  --gold:          var(--gray-800);
  --gold-mist:     rgba(0,0,0,.04);

  /* Kept for compatibility */
  --champagne:     var(--gray-100);
  --champagne-deep:var(--gray-200);
  --champagne-soft:var(--gray-200);
  --slate:         var(--gray-500);
  --slate-light:   var(--gray-400);
  --white-soft:    rgba(255,255,255,.8);

  /* Radius — tighter, more architectural */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  20px;

  /* Shadows — subtle, black-based */
  --shadow-sm:     0 1px 4px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.16), 0 16px 48px rgba(0,0,0,.10);
  --shadow-copper: 0 4px 20px rgba(0,0,0,.20);

  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--ink);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Background — clean, no texture ────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  /* Very subtle grid — matches architectural aesthetic */
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: rgba(17,17,17,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-700);
  position: sticky; top: 0; z-index: 100;
  padding: 0 2rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

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

/* Logo mark — now uses inline SVG in HTML; this styles a fallback text mark */
.navbar-logo {
  width: 36px; height: 36px;
  background: var(--white);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800; font-size: .9rem;
  color: var(--black);
  flex-shrink: 0;
}

.navbar-brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: .95rem; font-weight: 700;
  color: var(--white); letter-spacing: -.01em;
}
.navbar-brand-sub {
  font-size: .58rem; color: var(--gray-500);
  font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; margin-top: 2px;
}
.navbar-tagline {
  font-size: .72rem; color: var(--gray-500);
  padding-left: 16px;
  border-left: 1px solid var(--gray-700);
  font-weight: 300;
}

.navbar-nav { display: flex; align-items: center; gap: 2px; }

.nav-link {
  font-size: .7rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--gray-500);
  padding: 6px 14px; border-radius: var(--r-sm);
  text-decoration: none; transition: var(--transition);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
}
.nav-link:hover { background: var(--gray-800); color: var(--white); }
.nav-link.active {
  background: var(--white); color: var(--black);
  border: 1px solid var(--white);
}

.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px;
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--r-md);
}
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 800; color: var(--black);
}
.nav-user-name { font-size: .72rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .04em; }
.nav-user-role { font-size: .58rem; color: var(--gray-500); font-weight: 400; }

.btn-logout {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  border: 1px solid rgba(248,81,73,.3);
  background: rgba(248,81,73,.08);
  color: var(--danger);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: .78rem;
}
.btn-logout:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ── Hamburger ──────────────────────────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 4px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span { width: 20px; height: 1.5px; background: var(--white); border-radius: 1px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── Mobile nav ─────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed; inset: 64px 0 0 0;
  background: rgba(17,17,17,.98);
  backdrop-filter: blur(24px);
  z-index: 99; padding: 2rem;
  flex-direction: column; gap: 6px;
  overflow-y: auto;
  animation: slideDown .2s ease;
}
.mobile-nav.open { display: flex; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
.mobile-nav .nav-link { font-size: .82rem; padding: 13px 16px; border-radius: var(--r-md); border: 1px solid transparent; }
.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active { border-color: var(--gray-700); background: var(--gray-800); color: var(--white); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gray-600); }

/* card-copper / card-gold: kept as class names, restyled */
.card-copper { border-color: var(--gray-600); background: linear-gradient(135deg, var(--gray-800), rgba(255,255,255,.02)); }
.card-gold   { border-color: var(--gray-600); }

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition); position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; bottom: -24px; right: -24px;
  width: 90px; height: 90px; border-radius: 50%; opacity: .06;
}
/* Left border accent — brand-appropriate neutral accent */
.stat-card.s-copper { border-left: 2px solid var(--white); }
.stat-card.s-copper::after { background: var(--white); }
.stat-card.s-gold   { border-left: 2px solid var(--gray-400); }
.stat-card.s-gold::after   { background: var(--gray-400); }
.stat-card.s-green  { border-left: 2px solid var(--success); }
.stat-card.s-green::after  { background: var(--success); }
.stat-card.s-red    { border-left: 2px solid var(--danger); }
.stat-card.s-red::after    { background: var(--danger); }
.stat-card.s-blue   { border-left: 2px solid var(--info); }
.stat-card.s-blue::after   { background: var(--info); }

.stat-icon  { width: 44px; height: 44px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-value { font-family: 'Poppins', sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--white); letter-spacing: -.03em; }
.stat-label { font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-500); margin-top: 4px; }
.stat-trend { font-size: .7rem; font-weight: 600; margin-top: 4px; }
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1.5px solid transparent;
  border-radius: var(--r-md); cursor: pointer; transition: var(--transition);
  padding: 0 20px; height: 42px; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; pointer-events: none; }

/* Primary = white on black */
.btn-primary { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-primary:hover { background: var(--gray-200); border-color: var(--gray-200); box-shadow: var(--shadow-sm); }

/* Gold = same as primary in new brand */
.btn-gold { background: var(--white); color: var(--black); border-color: var(--white); font-weight: 700; }
.btn-gold:hover { background: var(--gray-200); }

/* Ghost = very subtle gray background */
.btn-ghost { background: rgba(255,255,255,.06); color: var(--gray-400); border: 1.5px solid var(--gray-700); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--gray-500); color: var(--white); }

/* Outline = visible border, transparent bg */
.btn-outline { background: transparent; border-color: var(--gray-600); color: var(--gray-400); }
.btn-outline:hover { border-color: var(--white); color: var(--white); }

/* Danger */
.btn-danger-ghost { background: rgba(248,81,73,.08); color: var(--danger); border: 1.5px solid rgba(248,81,73,.25); }
.btn-danger-ghost:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-dark    { background: var(--gray-800); color: var(--white); border-color: var(--gray-700); }
.btn-dark:hover { background: var(--gray-700); border-color: var(--gray-600); }

.btn-lg { height: 50px; font-size: .8rem; padding: 0 28px; border-radius: var(--r-lg); }
.btn-sm { height: 32px; font-size: .65rem; padding: 0 14px; border-radius: var(--r-sm); }
.btn-xs { height: 26px; font-size: .62rem; padding: 0 10px; border-radius: var(--r-sm); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); }

/* ── Inputs ─────────────────────────────────────────────────── */
.input-field {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--gray-800);
  border: 1.5px solid var(--gray-700);
  border-radius: var(--r-md);
  font-family: 'Poppins', sans-serif;
  font-size: .85rem; font-weight: 400;
  color: var(--white);
  transition: var(--transition); outline: none;
}
.input-field::placeholder { color: var(--gray-600); }
.input-field:focus { border-color: var(--white); background: var(--gray-900); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.input-field.error { border-color: var(--danger); background: rgba(248,81,73,.05); }
.input-field.valid { border-color: var(--success); }
textarea.input-field { height: auto; padding: 12px 14px; resize: none; line-height: 1.6; }
select.input-field {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666666'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

.field-label { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 6px; }
.field-error-msg { font-size: .7rem; color: var(--danger); margin-top: 5px; font-weight: 500; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 4px; font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-family: 'Montserrat', sans-serif; }
.badge-active   { background: rgba(63,185,80,.12);  color: var(--success); border: 1px solid rgba(63,185,80,.25); }
.badge-pending  { background: rgba(210,153,34,.12); color: var(--warning); border: 1px solid rgba(210,153,34,.25); }
.badge-moroso   { background: rgba(248,81,73,.12);  color: var(--danger);  border: 1px solid rgba(248,81,73,.25); }
.badge-admin    { background: rgba(255,255,255,.08); color: var(--white);   border: 1px solid var(--gray-600); }
.badge-tenant   { background: rgba(88,166,255,.12); color: var(--info);    border: 1px solid rgba(88,166,255,.25); }
.badge-owner    { background: rgba(255,255,255,.06); color: var(--gray-300);border: 1px solid var(--gray-700); }
.badge-guard    { background: rgba(255,255,255,.04); color: var(--gray-500);border: 1px solid var(--gray-700); }
.badge-success  { background: rgba(63,185,80,.12);  color: var(--success); border: 1px solid rgba(63,185,80,.25); }
.badge-danger   { background: rgba(248,81,73,.12);  color: var(--danger);  border: 1px solid rgba(248,81,73,.25); }

/* ── Table ──────────────────────────────────────────────────── */
.p4-table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--gray-700); -webkit-overflow-scrolling: touch; }
.p4-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 700px; }
.p4-table th {
  background: var(--gray-900); color: var(--gray-500);
  padding: 12px 16px; text-align: left;
  font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; border-bottom: 1px solid var(--gray-700);
  font-family: 'Montserrat', sans-serif;
}
.p4-table td { padding: 11px 16px; border-bottom: 1px solid var(--gray-700); vertical-align: middle; color: var(--white); }
.p4-table tr:last-child td { border-bottom: none; }
.p4-table tr:hover td { background: rgba(255,255,255,.02); transition: .15s; }
.p4-table .mono { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--gray-400); }

/* ── Login ──────────────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0;
  background: var(--gray-900);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.login-screen::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.login-card {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 420px;
  padding: 2.5rem 2rem;
  animation: slideUp .45s cubic-bezier(.22,1,.36,1);
  position: relative; z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-mark {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--white);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  /* Houses the inline SVG logo */
}
.login-logo h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem; font-weight: 800; color: var(--white);
  line-height: 1.2; letter-spacing: -.02em;
}
.login-logo p { font-size: .75rem; color: var(--gray-500); margin-top: 6px; font-weight: 300; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 1.25rem 0;
  font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-600);
}
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-700); }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: all; display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-radius: var(--r-md);
  font-size: .78rem; font-weight: 600; color: #fff;
  min-width: 260px; max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .35s cubic-bezier(.22,1,.36,1) both;
  border: 1px solid rgba(255,255,255,.06);
  font-family: 'Poppins', sans-serif;
}
.toast-icon { font-size: .9rem; flex-shrink: 0; }
.toast.success { background: #0d2b15; border-color: rgba(63,185,80,.3); }
.toast.error   { background: #2b0d0d; border-color: rgba(248,81,73,.3); }
.toast.info    { background: #0d1a2b; border-color: rgba(88,166,255,.3); }
.toast.warning { background: #2b1e00; border-color: rgba(210,153,34,.3); }
.toast.hide    { animation: toastOut .25s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px) scale(.97); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateX(20px) scale(.97); } }

/* ── Offline banner ─────────────────────────────────────────── */
#offline-banner {
  display: none; position: fixed; top: 0; left: 0; right: 0;
  background: var(--danger); color: #fff; text-align: center;
  padding: 8px 16px; font-size: .75rem; font-weight: 600;
  z-index: 10000; letter-spacing: .04em; font-family: 'Poppins', sans-serif;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 1rem;
  animation: fadeIn .15s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal-box {
  background: var(--gray-800); border: 1px solid var(--gray-700);
  border-radius: var(--r-2xl); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  animation: slideUp .3s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.modal-header {
  padding: 1.4rem 1.75rem;
  border-bottom: 1px solid var(--gray-700);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--gray-900);
}
.modal-title { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; color: var(--white); letter-spacing: -.01em; }
.modal-body  { padding: 1.5rem 1.75rem; }
.modal-footer { padding: 1rem 1.75rem; border-top: 1px solid var(--gray-700); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes slideUp { from { opacity:0; transform:translateY(16px) scale(.98); } to { opacity:1; transform:none; } }

/* ── Section styles ─────────────────────────────────────────── */
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--white);
  line-height: 1.25; letter-spacing: -.02em;
}
.section-eyebrow {
  font-size: .58rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gray-500); margin-bottom: 4px;
  font-family: 'Montserrat', sans-serif;
}
.divider { height: 1px; background: var(--gray-700); margin: 1rem 0; }

/* ── Skeleton ───────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-800) 25%, var(--gray-700) 50%, var(--gray-800) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { from { background-position: 300% 0; } to { background-position: -300% 0; } }

/* ── Tab bar ─────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 2px; border-bottom: 1px solid var(--gray-700); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 10px 18px;
  font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border: none; background: none; cursor: pointer; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: var(--transition);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}
.tab-btn:hover  { color: var(--white); background: var(--gray-800); }
.tab-btn.active { color: var(--white); border-bottom-color: var(--white); }
.tab-badge { background: var(--white); color: var(--black); border-radius: 4px; padding: 1px 7px; font-size: .58rem; font-weight: 800; }

/* ── Search bar ─────────────────────────────────────────────── */
.search-bar { position: relative; }
.search-bar input { padding-left: 44px; }
.search-bar .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-600); font-size: .82rem; pointer-events: none;
}

/* ── File drop ──────────────────────────────────────────────── */
.file-drop {
  border: 1.5px dashed var(--gray-700); border-radius: var(--r-lg);
  padding: 1.5rem; text-align: center;
  cursor: pointer; transition: var(--transition);
  background: var(--gray-800);
}
.file-drop:hover { border-color: var(--white); background: rgba(255,255,255,.04); }
.file-drop input[type=file] { display: none; }

/* ── Progress bar ───────────────────────────────────────────── */
.progress-bar  { width: 100%; height: 4px; background: var(--gray-700); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--white); transition: width .4s ease; }

/* ── QR card ────────────────────────────────────────────────── */
.qr-card {
  background: var(--gray-800); border: 1px solid var(--gray-700);
  border-radius: var(--r-lg); padding: 1.5rem; text-align: center;
}
.qr-placeholder {
  width: 140px; height: 140px; margin: 0 auto 1rem;
  background: var(--white); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}

/* ── Finance chart wrapper ──────────────────────────────────── */
.chart-wrap { background: var(--gray-800); border: 1px solid var(--gray-700); border-radius: var(--r-xl); padding: 1.5rem; }

/* ── Calendar ───────────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  aspect-ratio: 1; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); border: 1px solid transparent; color: var(--gray-500);
}
.cal-cell:hover    { background: var(--gray-700); color: var(--white); }
.cal-cell.today    { background: var(--white); color: var(--black); border-color: var(--white); }
.cal-cell.has-event::after { content: ''; width: 3px; height: 3px; background: var(--white); border-radius: 50%; margin-left: 2px; display: inline-block; }
.cal-cell.booked   { background: rgba(248,81,73,.1); color: var(--danger); border-color: rgba(248,81,73,.2); }
.cal-cell.available{ background: rgba(63,185,80,.08); color: var(--success); border-color: rgba(63,185,80,.2); }
.cal-cell.disabled { opacity: .25; pointer-events: none; }

/* ── Chat bubbles ───────────────────────────────────────────── */
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: var(--r-lg); font-size: .82rem; line-height: 1.55; }
.chat-bubble.sent { background: rgba(255,255,255,.08); border: 1px solid var(--gray-600); border-radius: var(--r-lg) var(--r-lg) 4px var(--r-lg); color: var(--white); margin-left: auto; }
.chat-bubble.recv { background: var(--gray-800); border: 1px solid var(--gray-700); border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px; color: var(--white); }
.chat-meta { font-size: .6rem; color: var(--gray-600); margin-top: 4px; }

/* ── Page enter animation ───────────────────────────────────── */
.page-enter { animation: pageEnter .4s ease both; }
@keyframes pageEnter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.stagger-1 { animation-delay: .05s; }
.stagger-2 { animation-delay: .10s; }
.stagger-3 { animation-delay: .15s; }
.stagger-4 { animation-delay: .20s; }
.stagger-5 { animation-delay: .25s; }

/* ── Success panel ──────────────────────────────────────────── */
.success-panel {
  background: rgba(63,185,80,.06); border: 1px solid rgba(63,185,80,.2);
  border-radius: var(--r-xl); padding: 2rem; text-align: center;
  animation: popIn .45s cubic-bezier(.22,1,.36,1);
}
@keyframes popIn { from { opacity:0; transform:scale(.94) translateY(12px); } to { opacity:1; transform:none; } }

/* ── Utility ────────────────────────────────────────────────── */
.mono { font-family: 'DM Mono', monospace; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .navbar-tagline { display: none; }
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 480px) {
  .navbar-brand-sub { display: none; }
  .nav-user-name { display: none; }
}
