/* =========================================
   REPUBLICK - Global Styles
   Dark Purple Theme
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Brand Colors */
  --primary: #7C3AED;
  --primary-light: #8B5CF6;
  --primary-dark: #5B21B6;
  --primary-glow: rgba(124, 58, 237, 0.3);
  --accent: #A78BFA;
  --accent-light: #C4B5FD;

  /* Background Colors */
  --bg-base: #0A0A14;
  --bg-surface: #0F0F1E;
  --bg-card: #14142A;
  --bg-card-hover: #1A1A35;
  --bg-overlay: rgba(10, 10, 20, 0.85);
  --bg-input: #1E1E38;
  --bg-sidebar: #0C0C1F;

  /* Text Colors */
  --text-primary: #F1F0FF;
  --text-secondary: #A8A3C7;
  --text-muted: #6B6891;
  --text-on-primary: #FFFFFF;

  /* Borders */
  --border: rgba(124, 58, 237, 0.2);
  --border-hover: rgba(124, 58, 237, 0.5);
  --border-light: rgba(255, 255, 255, 0.06);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
  --gradient-card: linear-gradient(145deg, #14142A 0%, #1A1235 100%);
  --gradient-hero: linear-gradient(135deg, #0A0A14 0%, #160D2E 50%, #0A0A14 100%);

  /* Status Colors */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Spacing & Sizing */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --sidebar-width: 260px;
  --header-height: 70px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 0 30px rgba(124, 58, 237, 0.25);
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-light); }

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

button { cursor: pointer; font-family: inherit; }

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); }

.text-primary { color: var(--primary-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-hover);
}
.btn-secondary:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 10px; border-radius: 10px; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary);
}

.card-body { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* =========================================
   FORM ELEMENTS
   ========================================= */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(30, 30, 56, 0.9);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control-icon {
  position: relative;
}
.form-control-icon .form-control { padding-left: 44px; }
.form-control-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6891' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-primary);
}

textarea.form-control { resize: vertical; min-height: 100px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* =========================================
   BADGES
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary { background: var(--primary-glow); color: var(--accent-light); border: 1px solid var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--info); border: 1px solid rgba(59,130,246,0.3); }
.badge-muted { background: rgba(107, 104, 145, 0.15); color: var(--text-muted); border: 1px solid rgba(107,104,145,0.3); }

/* =========================================
   LAYOUT - APP SHELL
   ========================================= */
.app-shell {
  display: none;
  min-height: 100vh;
}
.app-shell.active { display: flex; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.sidebar-logo-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(124,58,237,0.5));
}

.sidebar-logo-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

.sidebar-logo-text em {
  color: var(--primary-light);
  font-style: normal;
  background: linear-gradient(135deg, #A855F7, #6366F1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-section { margin-bottom: 1.5rem; }
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 3px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.nav-item.active {
  background: var(--primary-glow);
  color: var(--accent-light);
  border-color: var(--border);
  font-weight: 600;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.95rem;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border-light);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.user-card:hover { border-color: var(--border-hover); }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .role { font-size: 0.7rem; color: var(--text-muted); }

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.header-left p { font-size: 0.8rem; color: var(--text-muted); line-height: 1; margin-top: 2px; }

.header-right { display: flex; align-items: center; gap: 12px; }

.header-search {
  position: relative;
}
.header-search input {
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 16px 8px 38px;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 220px;
  outline: none;
  transition: var(--transition);
}
.header-search input:focus { border-color: var(--primary); width: 280px; }
.header-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.9rem;
  cursor: pointer;
}
.header-btn:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--bg-card-hover); }

/* Page Content */
.page-content {
  flex: 1;
  padding: 2rem;
}

/* =========================================
   AUTH PAGES
   ========================================= */
.auth-page {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.auth-page.active { display: flex; }

.auth-bg-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.orb-1 { width: 500px; height: 500px; background: var(--primary); top: -150px; left: -100px; animation: float 8s ease-in-out infinite; }
.orb-2 { width: 400px; height: 400px; background: #4F46E5; bottom: -100px; right: -80px; animation: float 10s ease-in-out infinite reverse; }
.orb-3 { width: 300px; height: 300px; background: #7C3AED; top: 40%; left: 40%; animation: float 7s ease-in-out infinite 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.auth-container {
  width: 100%;
  max-width: 460px;
  padding: 1.5rem;
  z-index: 10;
}

.auth-card {
  background: rgba(20, 20, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--primary-glow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

/* ── Auth logo icon (tela de entrada) ── */
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 160px;
  height: 160px;
  margin: 0 auto 18px;
  display: block;
  object-fit: contain;
  border-radius: 32px;
  animation: logoFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 0 32px rgba(124,58,237,0.55)) drop-shadow(0 0 60px rgba(100,80,220,0.25));
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px) scale(1);
    filter: drop-shadow(0 0 28px rgba(124,58,237,0.5)) drop-shadow(0 0 50px rgba(100,80,220,0.2));
  }
  50% {
    transform: translateY(-6px) scale(1.02);
    filter: drop-shadow(0 0 42px rgba(168,85,247,0.75)) drop-shadow(0 0 70px rgba(124,58,237,0.3));
  }
}

.auth-logo-img {
  width: 200px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(124,58,237,0.6));
  animation: logoFloat 4s ease-in-out infinite;
}

.auth-logo p { font-size: 0.9rem; color: var(--text-muted); }

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.auth-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.auth-divider span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

.btn-visitor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.btn-visitor:hover {
  border-color: var(--primary);
  color: var(--accent);
  background: var(--primary-glow);
}

/* =========================================
   SECTION PAGES
   ========================================= */
.section-page { display: none; }
.section-page.active { display: block; }

/* =========================================
   REPUBLIC CARDS
   ========================================= */
.republics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.republic-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.republic-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-primary);
}

.republic-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.republic-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1A1235, #2D1B69);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary-light);
}

.republic-card-body { padding: 1.25rem; }

.republic-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.republic-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.republic-card-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.republic-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.republic-card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
}

.republic-card-price span { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }

.republic-card-footer {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.republic-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warning);
}

.amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--accent);
  margin: 2px;
}

/* =========================================
   FILTERS
   ========================================= */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.filter-bar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 1rem;
  align-items: end;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--accent-light);
  cursor: pointer;
  transition: var(--transition);
}
.filter-tag:hover { background: rgba(124, 58, 237, 0.4); }
.filter-tag i { font-size: 0.65rem; }

.range-slider { display: flex; align-items: center; gap: 10px; }
.range-slider input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  outline: none;
}
.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 6px var(--primary-glow);
}
.range-value { font-size: 0.8rem; font-weight: 600; color: var(--accent); min-width: 60px; text-align: right; }

/* =========================================
   EVENT CARDS
   ========================================= */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.event-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-primary);
}

.event-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  position: relative;
}

.event-card-type {
  position: absolute;
  top: 12px;
  left: 12px;
}

.event-card-body { padding: 1.25rem; }

.event-date-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.event-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.event-card-republic {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border-light);
}

.event-participants {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), 0 0 50px var(--primary-glow);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-lg { max-width: 800px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 1.2rem; font-weight: 700; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.modal-close:hover { color: var(--danger); border-color: var(--danger); background: rgba(239,68,68,0.1); }

.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-light); display: flex; gap: 10px; justify-content: flex-end; }

/* =========================================
   REPUBLIC DETAIL VIEW
   ========================================= */
.republic-detail-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.republic-detail-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.republic-detail-gallery img:first-child {
  grid-column: 1 / -1;
  height: 280px;
}

.republic-detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.detail-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.detail-stat-card .value { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.detail-stat-card .label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* =========================================
   DASHBOARD STATS
   ========================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--border-hover); }

.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-icon.purple { background: rgba(124, 58, 237, 0.2); color: var(--primary-light); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.stat-icon.green { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.2); color: #FCD34D; }

.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-change { font-size: 0.75rem; display: flex; align-items: center; gap: 3px; margin-top: 6px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.empty-state h3 { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(100%); }
}

.toast.removing { animation: toastOut 0.3s ease forwards; }

.toast i { font-size: 1.1rem; flex-shrink: 0; }
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.success i { color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.error i { color: var(--danger); }
.toast.info { border-color: var(--border-hover); }
.toast.info i { color: var(--primary-light); }
.toast-msg { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }

/* =========================================
   LOADING SPINNER
   ========================================= */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

/* =========================================
   MOBILE SIDEBAR TOGGLE
   ========================================= */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1200px) {
  .filter-grid { grid-template-columns: 1fr 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .page-content { padding: 1.25rem; }
  .filter-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .republics-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .republic-detail-info { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 1.75rem; }
  .header-search { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}

/* =========================================
   AMENITY CHECKBOXES
   ========================================= */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.amenity-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.amenity-check:has(input:checked),
.amenity-check.checked {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--accent-light);
}

.amenity-check input { accent-color: var(--primary); }

/* =========================================
   PHOTO UPLOAD
   ========================================= */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-input);
}

.photo-upload-area:hover { border-color: var(--primary); background: var(--primary-glow); }
.photo-upload-area i { font-size: 2rem; color: var(--text-muted); margin-bottom: 8px; }
.photo-upload-area p { font-size: 0.85rem; color: var(--text-muted); }

/* =========================================
   TABS
   ========================================= */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
  width: fit-content;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--gradient-primary);
  color: white;
}

/* =========================================
   PAGE HEADER
   ========================================= */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header-left h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header-left p { font-size: 0.9rem; color: var(--text-muted); }
.page-header-right { display: flex; align-items: center; gap: 10px; }

/* =========================================
   MISC UTILITIES
   ========================================= */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--border-light); margin: 1.5rem 0; }

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Scrollbar modal */
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 2px; }
