/* ============================================================
   DNNET DESIGN SYSTEM
   Stack: Django + HTMX (Tailwind CDN removed — pure CSS)
   Fonts: Playfair Display (display), DM Sans (body) — loaded async
   Primary: #1B2E4B (Navy), #C8912A (Amber), #1A6B4A (Emerald)
   ============================================================ */

/* System font stack hiển thị ngay lập tức, Google Fonts ghi đè khi tải xong */
body { font-family: "DM Sans", system-ui, -apple-system, sans-serif; }
h1, h2, h3, .profile-name, .hero-title, .section-title {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

:root {
  --navy:          #1B2E4B;
  --navy-light:    #2D4A6F;
  --navy-dark:     #111E30;
  --amber:         #C8912A;
  --amber-light:   #F0B942;
  --amber-pale:    #FDF4E3;
  --emerald:       #1A6B4A;
  --emerald-light: #E8F5EE;
  --surface:       #F7F6F2;
  --white:         #FFFFFF;
  --text:          #1B2020;
  --muted:         #6B7280;
  --border:        rgba(27,46,75,0.12);
  --danger:        #C0392B;
  --warning:       #D97706;
  --success:       #1A6B4A;
  --radius-sm:     3px;
  --radius-md:     5px;
  --radius-lg:     7px;
  --radius-pill:   9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.font-display { font-family: 'Playfair Display', Georgia, serif; }

h1, .h1 { font-size: 22px; font-weight: 500; line-height: 1.3; }
h2, .h2 { font-size: 18px; font-weight: 500; line-height: 1.35; }
h3, .h3 { font-size: 16px; font-weight: 500; line-height: 1.4; }
h4, .h4 { font-size: 14px; font-weight: 500; }

.display-hero {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-wrap { min-height: 100vh; }

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  background: var(--navy);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--amber-light);
  letter-spacing: 0.02em;
  text-decoration: none;
  outline: none;
  flex-shrink: 0;
}
.nav-logo span { color: white; }

.nav-search {
  flex: 1;
  max-width: 380px;
  background: rgba(255,255,255,0.1);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  cursor: text;
}
.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}
.nav-search input::placeholder { color: rgba(255,255,255,0.5); }

.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
@media (max-width: 768px) { .nav-links { display: none; } }

.nav-link {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: white; }
.nav-link.active { color: var(--amber-light); font-weight: 500; }

.nav-cta {
  background: var(--amber);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  text-decoration: none;
}
.nav-cta:hover { background: var(--amber-light); }

.nav-user-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: white;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-bell {
  position: relative;
  color: rgba(255,255,255,0.7);
  font-size: 20px;
  cursor: pointer;
  display: flex;
}
.nav-bell-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber-light);
  position: absolute;
  top: -2px; right: -2px;
}

/* ============================================================
   SIDEBAR NAVIGATION (authenticated)
   ============================================================ */

.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
}

.sidebar {
  background: white;
  border-right: 0.5px solid var(--border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 10px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.sidebar-item:hover {
  background: #F3F4F6;
  color: var(--text);
}
.sidebar-item.active {
  background: #EEF2FB;
  color: var(--navy);
  font-weight: 500;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--amber);
  color: white;
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 500;
}
.sidebar-badge.danger { background: var(--danger); }

.sidebar-divider {
  height: 0.5px;
  background: var(--border);
  margin: 6px 0;
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}

.badge-verified {
  background: var(--emerald-light);
  color: var(--emerald);
  border: 0.5px solid #A8D5BC;
}
.badge-assoc {
  background: #EEF2FB;
  color: var(--navy-light);
  border: 0.5px solid #B8C8E8;
}
.badge-industry {
  background: #F3F4F6;
  color: var(--muted);
  border: 0.5px solid #E5E7EB;
}

/* ============================================================
   PRIVACY TIER INDICATORS
   ============================================================ */

.privacy-private {
  background: #FEF3F2;
  color: #B91C1C;
  border: 0.5px solid #FCA5A5;
}
.privacy-members {
  background: #EEF2FB;
  color: #1D4ED8;
  border: 0.5px solid #93C5FD;
}
.privacy-public {
  background: var(--emerald-light);
  color: var(--emerald);
  border: 0.5px solid #A8D5BC;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--navy); color: white; }
.btn-amber   { background: var(--amber); color: white; }
.btn-success { background: var(--emerald); color: white; }
.btn-danger  { background: var(--danger); color: white; }

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}
.btn-outline-amber {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber);
}
.btn-outline-white {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}

.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-lg  { padding: 10px 22px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-square {
  padding: 8px;
  border-radius: var(--radius-md);
  background: white;
  border: 0.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-square:hover { background: #F3F4F6; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: white;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.card + .card { margin-top: 10px; }

.card-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.metric-card {
  background: #F3F4F6;
  border-radius: var(--radius-md);
  padding: 10px;
}
.metric-label  { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.metric-value  { font-size: 24px; font-weight: 600; color: var(--text); }
.metric-sub    { font-size: 11px; color: var(--muted); margin-top: 3px; }
.metric-green  { color: var(--emerald); }
.metric-red    { color: var(--danger); }
.metric-amber  { color: var(--amber); }

/* ============================================================
   COMPANY CARD (grid)
   ============================================================ */

.company-card {
  background: white;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.company-card:hover {
  border-color: rgba(27,46,75,0.3);
  box-shadow: 0 2px 8px rgba(27,46,75,0.06);
}

.company-logo {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-light);
  font-size: 15px; font-weight: 700;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.company-name  { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.company-country { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.company-desc  {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.company-tags  { display: flex; gap: 5px; flex-wrap: wrap; }

/* ============================================================
   EVENT CARD
   ============================================================ */

.event-card {
  background: white;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: border-color 0.15s;
}
.event-card:hover { border-color: rgba(27,46,75,0.3); }

.event-card-header {
  background: var(--navy);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.event-date-box {
  background: var(--amber);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  text-align: center;
  min-width: 42px;
  flex-shrink: 0;
}
.event-date-day { font-size: 20px; font-weight: 700; color: white; line-height: 1; }
.event-date-mon { font-size: 10px; color: rgba(255,255,255,0.85); text-transform: uppercase; letter-spacing: 0.06em; }

.event-title-sm { font-size: 13px; font-weight: 500; color: white; line-height: 1.4; }
.event-organizer { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 2px; }

.event-card-body { padding: 8px 12px; }
.event-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.event-spots-pill {
  display: inline-block;
  background: var(--amber-pale);
  color: var(--amber);
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  margin-top: 4px;
}

/* ============================================================
   MEMBERSHIP STATUS CARD
   ============================================================ */

.membership-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.membership-card::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(240,185,66,0.12);
}
.membership-card::after {
  content: '';
  position: absolute;
  right: 40px; bottom: -50px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(240,185,66,0.07);
}

.membership-assoc  { font-size: 11px; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.membership-name   { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--amber-light); margin-bottom: 12px; }

.membership-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(26,107,74,0.3);
  color: #6ee7b7;
  border: 0.5px solid rgba(110,231,183,0.25);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
}

.membership-status-warning {
  background: rgba(200,145,42,0.25);
  color: var(--amber-light);
  border-color: rgba(240,185,66,0.3);
}

.membership-status-expired {
  background: rgba(192,57,43,0.25);
  color: #FCA5A5;
  border-color: rgba(252,165,165,0.3);
}

.membership-expiry-label { font-size: 10px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.membership-expiry-val   { font-size: 14px; color: rgba(255,255,255,0.8); font-weight: 500; }

/* ============================================================
   QR TICKET
   ============================================================ */

.ticket {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  max-width: 340px;
}
.ticket-top {
  background: var(--navy);
  padding: 16px 18px;
}
.ticket-event-name  { font-size: 14px; font-weight: 600; color: white; margin-bottom: 4px; }
.ticket-event-date  { font-size: 12px; color: rgba(255,255,255,0.6); }

.ticket-divider {
  border-top: 1.5px dashed var(--border);
  position: relative;
}

.ticket-body {
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.ticket-holder  { font-size: 14px; font-weight: 500; color: var(--text); }
.ticket-id      { font-size: 10px; color: var(--muted); font-family: 'Courier New', monospace; margin-top: 5px; }

/* ============================================================
   SEARCH BAR
   ============================================================ */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
}
.search-bar:focus-within { border-color: var(--navy); }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}
.search-bar input::placeholder { color: var(--muted); }

.search-bar-hero {
  background: white;
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.search-bar-hero input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
}
.search-bar-hero input::placeholder { color: var(--muted); }

.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  background: white;
  border: 0.5px solid #D1D5DB;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover { border-color: var(--navy-light); color: var(--navy); }
.chip.active {
  background: #EEF2FB;
  border-color: #B8C8E8;
  color: var(--navy-light);
  font-weight: 500;
}
.chip .chip-x { font-size: 13px; margin-left: 2px; opacity: 0.6; }

/* ============================================================
   SOCIAL LOGIN BUTTONS
   ============================================================ */

.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 0.5px solid #D1D5DB;
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  color: var(--text);
  font-family: inherit;
  transition: background 0.12s;
  text-decoration: none;
}
.social-btn:hover { background: #F9FAFB; }

.social-icon {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.s-google { background: white; border: 1px solid #DDD; color: #EA4335; }
.s-facebook { background: #1877F2; color: white; }
.s-linkedin { background: #0A66C2; color: white; }

/* ============================================================
   NOTIFICATION TOAST
   ============================================================ */

.toast-container {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: white;
  border: 0.5px solid #D1D5DB;
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  max-width: 340px;
  pointer-events: all;
  animation: toast-in 0.2s ease;
}
.toast.warning { border-left-color: var(--amber); }
.toast.danger  { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--navy); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast-title { font-size: 13px; font-weight: 500; color: var(--text); }
.toast-msg   { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.toast-close { margin-left: auto; color: var(--muted); cursor: pointer; flex-shrink: 0; }

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 5px; display: block; }
.form-label-muted { font-size: 12px; color: var(--muted); margin-bottom: 5px; display: block; }

.form-input {
  width: 100%;
  padding: 7px 11px;
  border: 0.5px solid #D1D5DB;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,46,75,0.08);
}
.form-input::placeholder { color: #9CA3AF; }

/* ============================================================
   STATUS PILLS (member status)
   ============================================================ */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}
.status-active    { background: var(--emerald-light); color: var(--emerald); }
.status-pending   { background: var(--amber-pale); color: #92600A; }
.status-expired   { background: #FEF3F2; color: #B91C1C; }
.status-suspended { background: #F3F4F6; color: var(--muted); }

/* ============================================================
   TABLES
   ============================================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 9px 16px;
  background: #F9FAFB;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 0.5px solid var(--border);
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 0.5px solid var(--border);
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #FAFAFA; }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 16px;
}
.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  border: 0.5px solid var(--border);
  background: white;
  color: var(--text);
  transition: all 0.12s;
}
.page-btn:hover  { background: #F3F4F6; }
.page-btn.active { background: var(--navy); color: white; border-color: var(--navy); }
.page-ellipsis   { color: var(--muted); font-size: 13px; padding: 0 4px; }

/* ============================================================
   FILTER SIDEBAR
   ============================================================ */

.filter-sidebar {
  background: white;
  border-right: 0.5px solid var(--border);
  padding: 12px;
}

.filter-section { margin-bottom: 20px; }
.filter-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 0.5px solid var(--border);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
  transition: background 0.12s;
}
.filter-item:hover { background: #F3F4F6; }
.filter-item.active { background: #EEF2FB; color: var(--navy-light); font-weight: 500; }

.filter-checkbox {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 0.5px solid #D1D5DB;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.filter-checkbox.checked { background: var(--navy-light); border-color: var(--navy-light); }

.filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}

.toggle-pill {
  width: 34px; height: 19px;
  border-radius: var(--radius-pill);
  background: var(--emerald);
  position: relative;
  flex-shrink: 0;
}
.toggle-pill::after {
  content: '';
  position: absolute;
  right: 2px; top: 2.5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
}
.toggle-pill.off { background: #D1D5DB; }
.toggle-pill.off::after { right: auto; left: 2px; }

/* ============================================================
   PAGE SECTIONS
   ============================================================ */

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 18px; font-weight: 500; color: var(--text); }
.section-subtitle { font-size: 13px; color: var(--muted); margin-top: 3px; }
.section-link { font-size: 13px; color: var(--navy-light); cursor: pointer; text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* ============================================================
   GRID HELPERS
   ============================================================ */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  background: linear-gradient(155deg, #1B2E4B 0%, #2D4A6F 60%, #1A3A50 100%);
  padding: 44px 24px 36px;
  position: relative;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #F0B942 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(240,185,66,0.15);
  border: 0.5px solid rgba(240,185,66,0.3);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: 12px;
  color: var(--amber-light);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 600;
  color: white;
  line-height: 1.25;
  margin-bottom: 12px;
  max-width: 540px;
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-country-tags { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero-tag {
  background: rgba(255,255,255,0.1);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
}

/* Stats bar below hero */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--navy);
}
.stat-item {
  padding: 12px 18px;
  text-align: center;
  border-right: 0.5px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-right: none; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 600; color: var(--amber-light); }
.stat-lbl { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 3px; }

@media (max-width: 600px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
}

/* ============================================================
   CTA BANNER
   ============================================================ */

.cta-banner {
  background: var(--navy);
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-banner-title { font-family: 'Playfair Display', serif; font-size: 24px; color: white; margin-bottom: 6px; }
.cta-banner-text  { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.65; max-width: 440px; }
.cta-banner-btns  { display: flex; gap: 10px; flex-shrink: 0; }

/* ============================================================
   PROFILE PAGES — shared header
   ============================================================ */

.profile-banner {
  background: linear-gradient(145deg, var(--navy), var(--navy-light));
  height: 88px;
  position: relative;
  overflow: hidden;
}
.profile-banner-dots {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #F0B942 1px, transparent 1px);
  background-size: 24px 24px;
}

.profile-header-body {
  background: white;
  padding: 0 20px 16px;
  border-bottom: 0.5px solid var(--border);
}

.profile-logo-wrap { margin-top: -26px; margin-bottom: 14px; display: inline-block; }
.profile-logo {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-light);
  font-size: 24px; font-weight: 700;
  border: 3px solid white;
}

.profile-name    { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; margin-bottom: 5px; }
.profile-tagline { font-size: 14px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

/* ============================================================
   PAGE TABS
   ============================================================ */

.tabs-bar {
  display: flex;
  gap: 0;
  border-bottom: 0.5px solid var(--border);
  background: white;
  padding: 0 24px;
}
.tab {
  padding: 13px 16px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  white-space: nowrap;
  transition: color 0.12s;
  text-decoration: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--navy); font-weight: 500; border-bottom-color: var(--navy); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-left   { display: none; }
}

.login-left {
  background: var(--navy);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-left-bg {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #F0B942 1px, transparent 1px);
  background-size: 24px 24px;
}
.login-left-logo { font-family: 'Playfair Display', serif; font-size: 26px; color: var(--amber-light); margin-bottom: 48px; }
.login-left-logo span { color: white; }
.login-left-heading { font-family: 'Playfair Display', serif; font-size: 26px; color: white; line-height: 1.35; margin-bottom: 12px; }
.login-left-text { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; }
.login-left-stats { display: flex; gap: 24px; margin-top: 36px; }
.login-stat-num { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--amber-light); }
.login-stat-lbl { font-size: 11px; color: rgba(255,255,255,0.5); }
.login-gdpr { font-size: 11px; color: rgba(255,255,255,0.35); display: flex; align-items: center; gap: 5px; }

.login-right {
  background: white;
  padding: 30px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-title { font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.login-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 12px;
  color: var(--muted);
}
.or-line { flex: 1; height: 0.5px; background: var(--border); }

.gdpr-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}
.gdpr-checkbox {
  width: 17px; height: 17px;
  border-radius: 4px;
  border: 0.5px solid #D1D5DB;
  background: #EEF2FB;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.gdpr-text { font-size: 12px; color: var(--muted); line-height: 1.55; }
.gdpr-text a { color: var(--navy-light); text-decoration: underline; }

.lang-switcher {
  display: flex;
  gap: 7px;
  margin-top: 18px;
  justify-content: center;
}
.lang-btn {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 0.5px solid var(--border);
  background: white;
  transition: all 0.12s;
}
.lang-btn:hover { color: var(--navy); border-color: var(--navy-light); }
.lang-btn.active { color: var(--navy-light); background: #EEF2FB; border-color: #B8C8E8; font-weight: 500; }

/* ============================================================
   PAGE NAV — breadcrumb bar
   ============================================================ */

.page-nav {
  background: white;
  border-bottom: 0.5px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.page-title-h   { font-size: 18px; font-weight: 500; color: var(--text); }
.page-title-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.page-actions   { display: flex; gap: 8px; align-items: center; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: #F3F4F6;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 0.5px solid var(--border);
}
.footer-logo  { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--muted); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-link  { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--text); }
.footer-gdpr  { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero-title { font-size: 26px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .cta-banner { flex-direction: column; }
  .profile-header-body { padding: 0 16px 18px; }
  .tabs-bar { overflow-x: auto; padding: 0 16px; }
  .tab { padding: 12px 12px; font-size: 12px; }
  .login-right { padding: 32px 24px; }
}

/* ============================================================
   HTMX HELPERS
   ============================================================ */

.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator { opacity: 1; }

.htmx-added { animation: htmx-highlight 0.3s ease; }
@keyframes htmx-highlight {
  from { background: rgba(27,46,75,0.05); }
  to   { background: transparent; }
}

[x-cloak] { display: none !important; }
