/* First Linden Rentals — premium dark + gold */
:root {
  --bg: #0b0b0d;
  --surface: #111114;
  --surface-2: #16161a;
  --border: #262629;
  --text: #f4f4f5;
  --muted: #9a9aa0;
  --gold: #c9a961;
  --gold-hi: #e6c885;
  --gold-lo: #9c8248;
  --danger: #e05b5b;
  --success: #6fbf73;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.4rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar { background: #08080a; border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; justify-content: space-between; align-items: center; }
.topbar-phone { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.05em; transition: color 0.2s; }
.topbar-phone:hover { color: var(--gold-hi); }
@media (max-width: 600px) { .topbar-inner span { display: none; } .topbar-inner { justify-content: center; } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,11,13,0.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1240px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 96px; height: 62px; background: url('/img/logo.jpg') center/contain no-repeat; font-size: 0; text-indent: -9999px; overflow: hidden; flex-shrink: 0; }
.brand-text { display: none; }
.brand-name, .brand-sub { display: none; }
.login-card .brand-mark { width: 120px; height: 76px; margin: 0 auto 8px; }
.admin-sidebar .brand-mark { width: 84px; height: 54px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 0.9rem; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 2px; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; }
.btn-sm { padding: 10px 20px; font-size: 0.8rem; }
.btn-gold { background: var(--gold); color: #0b0b0d; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline-gold { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: #0b0b0d; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { display: flex; width: 100%; }

/* Hero */
.hero { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=1800&q=80') center/cover; opacity: 0.35; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,13,0.4) 0%, rgba(11,11,13,0.95) 100%); }
.hero-content { position: relative; z-index: 1; text-align: center; padding: 100px 24px; max-width: 900px; }
.hero-eyebrow { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.35em; text-transform: uppercase; margin-bottom: 20px; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero-sub { color: var(--muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 40px; line-height: 1.6; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-eyebrow { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.35em; text-transform: uppercase; margin-bottom: 16px; }
.section-header p { color: var(--muted); max-width: 600px; margin: 16px auto 0; }
.divider-gold { width: 60px; height: 1px; background: var(--gold); margin: 20px auto; }

/* Car grid */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; }
.car-card { background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: all 0.3s; }
.car-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.car-image { aspect-ratio: 16/10; background: #0e0e10 center/cover; overflow: hidden; }
.car-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.car-card:hover .car-image img { transform: scale(1.05); }
.car-body { padding: 24px; }
.car-cat { color: var(--gold); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; }
.car-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; margin: 8px 0 16px; }
.car-specs { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; margin-bottom: 20px; }
.car-specs span::before { content: '•'; margin-right: 8px; color: var(--gold); }
.car-specs span:first-child::before { display: none; }
.car-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--border); }
.car-price { }
.car-price .amt { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600; }
.car-price .per { color: var(--muted); font-size: 0.8rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.feature { padding: 32px; border: 1px solid var(--border); background: var(--surface); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); margin-bottom: 20px; border-radius: 2px; font-size: 1.4rem; }
.feature h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; margin-bottom: 12px; }
.feature p { color: var(--muted); line-height: 1.6; font-size: 0.95rem; }

/* Forms */
.form-grid { display: grid; gap: 20px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.field input, .field select, .field textarea { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 14px 16px; font-family: inherit; font-size: 0.95rem; border-radius: 2px; transition: border-color 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 100px; resize: vertical; }

/* Filter bar */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; align-items: center; justify-content: center; }
.filter-bar input, .filter-bar select { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 12px 16px; border-radius: 2px; font-family: inherit; }

/* Booking */
.booking-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; }
@media (max-width: 900px) { .booking-layout { grid-template-columns: 1fr; } }
.booking-summary { background: var(--surface); border: 1px solid var(--border); padding: 32px; height: fit-content; position: sticky; top: 100px; }
/* Availability calendar */
.cal-swatch { display: inline-block; width: 14px; height: 14px; vertical-align: middle; margin-right: 4px; border-radius: 2px; }
.cal-month { background: var(--surface); border: 1px solid var(--border); padding: 12px; }
.cal-month-header { display:flex; justify-content: space-between; align-items:center; margin-bottom:10px; }
.cal-month-title { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; color: var(--text); }
.cal-nav { background: transparent; border: 1px solid var(--border); color: var(--muted); width: 28px; height: 28px; cursor:pointer; }
.cal-nav:hover { color: var(--gold); border-color: var(--gold); }
.cal-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align:center; font-size: 0.65rem; letter-spacing: 0.2em; color: var(--muted); padding: 6px 0; }
.cal-day { aspect-ratio: 1; display:flex; align-items:center; justify-content:center; font-size: 0.85rem; background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--text); user-select:none; transition: background .12s, color .12s; }
.cal-day:hover { background: rgba(201,169,97,0.15); border-color: var(--gold); color: var(--gold); }
.cal-day.empty { background: transparent; border: none; cursor: default; }
.cal-day.past { background: var(--surface); color: #555; cursor: not-allowed; text-decoration: line-through; }
.cal-day.past:hover { background: var(--surface); border-color: var(--border); color: #555; }
.cal-day.blocked { background: #4a1414 !important; border-color: #7a1f1f !important; color: #ffb3b3 !important; cursor: not-allowed; }
.cal-day.blocked:hover { background: #4a1414 !important; color: #ffb3b3 !important; }
.cal-day.selected { background: var(--gold) !important; border-color: var(--gold) !important; color: #0b0b0d !important; font-weight: 700; }
.cal-day.in-range { background: rgba(201,169,97,0.25); border-color: var(--gold); color: var(--gold); }
@media (max-width: 700px) { #calendarWrap { grid-template-columns: 1fr !important; } }
.summary-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.summary-row.total { border-bottom: none; border-top: 1px solid var(--gold); padding-top: 20px; margin-top: 8px; font-size: 1.2rem; }
.summary-row.total .label { color: var(--gold); }

/* Alerts */
.alert { padding: 16px 20px; border-radius: 2px; margin-bottom: 24px; font-size: 0.9rem; }
.alert-error { background: rgba(224,91,91,0.1); border: 1px solid var(--danger); color: #ffb0b0; }
.alert-success { background: rgba(111,191,115,0.1); border: 1px solid var(--success); color: #b3e6b6; }

/* Confirmation */
.confirm-box { max-width: 700px; margin: 0 auto; text-align: center; padding: 60px 40px; border: 1px solid var(--gold); background: var(--surface); }
.confirm-check { width: 80px; height: 80px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; margin: 0 auto 30px; color: var(--gold); font-size: 2rem; }
.confirm-details { text-align: left; margin: 30px 0; padding: 24px; background: var(--bg); border: 1px solid var(--border); }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 60px 0 30px; margin-top: 100px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h5 { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 16px; }
.footer a, .footer p { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; transition: color 0.2s; }
.footer a:hover { color: var(--gold); }
.footer-bottom { max-width: 1240px; margin: 40px auto 0; padding: 20px 24px 0; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 0.8rem; }

/* Detail page */
.car-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 900px) { .car-detail { grid-template-columns: 1fr; } }
.car-detail-image { aspect-ratio: 16/10; overflow: hidden; }
.car-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 30px 0; }
.spec-item { padding: 16px; border: 1px solid var(--border); background: var(--surface); }
.spec-item .k { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 6px; }
.spec-item .v { font-size: 1rem; }
.detail-price { padding: 24px 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); margin: 30px 0; }
.detail-price .amt { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 3rem; font-weight: 600; }

/* Admin */
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--surface); border-right: 1px solid var(--border); padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .brand { padding: 0 24px 24px; border-bottom: 1px solid var(--border); }
.admin-nav { padding: 20px 0; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--muted); font-size: 0.9rem; border-left: 2px solid transparent; transition: all 0.2s; }
.admin-nav a:hover { color: var(--gold); background: rgba(201,169,97,0.05); }
.admin-nav a.active { color: var(--gold); border-left-color: var(--gold); background: rgba(201,169,97,0.08); }
.admin-nav a .icon { width: 20px; text-align: center; }
.admin-main { flex: 1; padding: 32px 40px; overflow-x: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.admin-header h1 { font-size: 2rem; }
.admin-header .actions { display: flex; gap: 12px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat { background: var(--surface); border: 1px solid var(--border); padding: 24px; position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--gold); }
.stat .label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 10px; }
.stat .value { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; color: var(--text); font-weight: 600; }
.stat .value.gold { color: var(--gold); }
.stat .sub { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

/* Tables */
.card { background: var(--surface); border: 1px solid var(--border); padding: 24px; }
.card + .card { margin-top: 24px; }
.card-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 12px 16px; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid var(--border); font-weight: 500; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.table tr:hover td { background: rgba(201,169,97,0.03); }
.table .car-thumb { width: 60px; height: 40px; object-fit: cover; border-radius: 2px; }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 2px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.badge-pending { background: rgba(201,169,97,0.15); color: var(--gold); border: 1px solid var(--gold); }
.badge-confirmed { background: rgba(111,191,115,0.15); color: var(--success); border: 1px solid var(--success); }
.badge-cancelled { background: rgba(224,91,91,0.15); color: var(--danger); border: 1px solid var(--danger); }
.badge-completed { background: rgba(154,154,160,0.15); color: var(--muted); border: 1px solid var(--muted); }
.badge-paid { background: rgba(111,191,115,0.15); color: var(--success); border: 1px solid var(--success); }
.badge-available { background: rgba(111,191,115,0.15); color: var(--success); border: 1px solid var(--success); }
.badge-maintenance { background: rgba(201,169,97,0.15); color: var(--gold); border: 1px solid var(--gold); }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.login-card { max-width: 420px; width: 100%; background: var(--surface); border: 1px solid var(--border); padding: 48px 40px; }
.login-card .brand { justify-content: center; margin-bottom: 30px; }
.login-card h2 { text-align: center; margin-bottom: 8px; }
.login-card .muted { text-align: center; margin-bottom: 30px; }

/* Chart */
.chart-bars { display: flex; align-items: end; gap: 12px; height: 200px; padding: 20px 0; }
.chart-bar { flex: 1; background: linear-gradient(180deg, var(--gold) 0%, var(--gold-lo) 100%); position: relative; min-height: 4px; border-radius: 2px 2px 0 0; transition: all 0.3s; }
.chart-bar:hover { background: var(--gold-hi); }
.chart-bar .val { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--gold); white-space: nowrap; }
.chart-labels { display: flex; gap: 12px; }
.chart-labels span { flex: 1; text-align: center; color: var(--muted); font-size: 0.75rem; }

/* Utility */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.text-right { text-align: right; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 12px; } .gap-3 { gap: 20px; }
.inline-form { display: inline; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gold); margin: 5px 0; transition: 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
.nav-account { position: relative; }
.unread-dot { display: inline-block; background: var(--gold); color: #0b0b0d; font-size: 0.7rem; font-weight: 600; border-radius: 999px; padding: 2px 7px; margin-left: 6px; }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); flex-direction: column; padding: 20px; gap: 8px; align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .btn { text-align: center; margin-top: 8px; }
}

/* Mobile responsive tweaks */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  .hero { min-height: 70vh; }
  .hero-content { padding: 60px 16px; }
  .hero-sub { font-size: 1rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .car-grid { grid-template-columns: 1fr; gap: 20px; }
  .features { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat .value { font-size: 1.8rem; }
  .booking-summary { position: static; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select, .filter-bar button, .filter-bar a { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .confirm-box { padding: 40px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }

  /* Tables become card-like on mobile */
  .card { padding: 16px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 600px; }
  .table td, .table th { padding: 10px 8px; font-size: 0.85rem; }
  .car-thumb { width: 44px; height: 32px; }

  /* Admin */
  .admin-body { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; padding: 12px 0; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-sidebar .brand { border-bottom: none; padding: 0 16px 12px; }
  .admin-nav { display: flex; flex-wrap: wrap; padding: 0 8px; gap: 4px; }
  .admin-nav a { border-left: none; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 0.8rem; flex: 0 0 auto; }
  .admin-nav a.active { border-left-color: transparent; border-bottom-color: var(--gold); }
  .admin-main { padding: 20px 16px; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .admin-header .actions { width: 100%; flex-wrap: wrap; }

  /* Forms */
  .field input, .field select, .field textarea { font-size: 16px; /* prevent iOS zoom */ }

  /* Car detail */
  .car-detail { grid-template-columns: 1fr; gap: 30px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .detail-price .amt { font-size: 2.4rem; }

  /* Chart */
  .chart-bars { height: 140px; }
  .chart-bar .val { font-size: 0.65rem; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .brand-mark { width: 84px; height: 54px; }
}

/* Chat / messages */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; height: calc(100vh - 200px); min-height: 500px; }
@media (max-width: 800px) { .chat-layout { grid-template-columns: 1fr; height: auto; } }
.thread-list { background: var(--surface); border: 1px solid var(--border); overflow-y: auto; }
.thread-item { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; position: relative; }
.thread-item:hover { background: rgba(201,169,97,0.05); }
.thread-item.active { background: rgba(201,169,97,0.1); border-left: 3px solid var(--gold); }
.thread-item .name { font-weight: 500; color: var(--text); font-size: 0.95rem; }
.thread-item .preview { color: var(--muted); font-size: 0.8rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .time { color: var(--muted); font-size: 0.7rem; margin-top: 4px; }
.thread-item .unread { position: absolute; top: 14px; right: 14px; background: var(--gold); color: #0b0b0d; font-size: 0.7rem; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.chat-panel { background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 400px; }
.chat-bubble { max-width: 75%; padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; line-height: 1.5; word-wrap: break-word; }
.chat-bubble.mine { align-self: flex-end; background: var(--gold); color: #0b0b0d; border-bottom-right-radius: 3px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 3px; }
.chat-bubble .time { display: block; font-size: 0.7rem; opacity: 0.7; margin-top: 6px; }
.chat-bubble .attachment { margin-top: 8px; padding: 8px 12px; background: rgba(0,0,0,0.15); border-radius: 6px; font-size: 0.85rem; display: inline-block; }
.chat-bubble.theirs .attachment { background: rgba(201,169,97,0.15); border: 1px solid var(--gold); }
.chat-bubble .attachment a { color: inherit; text-decoration: underline; }
.chat-form { padding: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.chat-form-row { display: flex; gap: 10px; }
.chat-form textarea { flex: 1; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: 0.95rem; border-radius: 6px; resize: none; min-height: 44px; }
.chat-form textarea:focus { outline: none; border-color: var(--gold); }
.chat-empty { display: flex; align-items: center; justify-content: center; flex: 1; color: var(--muted); text-align: center; padding: 40px; }

/* Auth pages */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { max-width: 460px; width: 100%; background: var(--surface); border: 1px solid var(--border); padding: 40px 32px; }
.auth-card h2 { text-align: center; }
.auth-card .divider-gold { margin: 20px auto 30px; }
.auth-links { text-align: center; margin-top: 20px; color: var(--muted); font-size: 0.9rem; }
.auth-links a { color: var(--gold); }

/* Account portal */
.account-hero { padding: 60px 0 40px; border-bottom: 1px solid var(--border); }
.account-tabs { display: flex; gap: 24px; margin-bottom: 30px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.account-tabs a { padding: 14px 0; color: var(--muted); font-size: 0.9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.account-tabs a.active, .account-tabs a:hover { color: var(--gold); border-bottom-color: var(--gold); }
