/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Theme Classic (Dynasty 8 Green) */
  --classic-primary: #7bb828;
  --classic-primary-hover: #679c20;
  --classic-primary-rgb: 123, 184, 40;
  --classic-bg: #0d0f12;
  --classic-header-bg: #15181d;
  --classic-card-bg: #1a1e24;
  --classic-text: #ffffff;
  --classic-text-muted: #8e9ca8;
  --classic-border: #272e38;

  /* Theme Executive (Dark & Gold) */
  --exec-primary: #d4af37;
  --exec-primary-hover: #bda032;
  --exec-primary-rgb: 212, 175, 55;
  --exec-bg: #09090b;
  --exec-header-bg: #121216;
  --exec-card-bg: #18181c;
  --exec-text: #f4f4f5;
  --exec-text-muted: #a1a1aa;
  --exec-border: #2e2e38;

  /* Status Colors */
  --color-success: #4caf50;
  --color-warning: #ff9800;
  --color-danger: #f44336;
  
  /* Transition Constants */
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease-in-out;
}

/* ==========================================================================
   DYNAMIC THEME MAPPING
   ========================================================================== */
body.theme-classic {
  --primary: var(--classic-primary);
  --primary-hover: var(--classic-primary-hover);
  --primary-rgb: var(--classic-primary-rgb);
  --bg-color: var(--classic-bg);
  --header-bg: var(--classic-header-bg);
  --card-bg: var(--classic-card-bg);
  --text-color: var(--classic-text);
  --text-muted: var(--classic-text-muted);
  --border-color: var(--classic-border);
  --accent-glow: rgba(123, 184, 40, 0.15);
}

body.theme-executive {
  --primary: var(--exec-primary);
  --primary-hover: var(--exec-primary-hover);
  --primary-rgb: var(--exec-primary-rgb);
  --bg-color: var(--exec-bg);
  --header-bg: var(--exec-header-bg);
  --card-bg: var(--exec-card-bg);
  --text-color: var(--exec-text);
  --text-muted: var(--exec-text-muted);
  --border-color: var(--exec-border);
  --accent-glow: rgba(212, 175, 55, 0.12);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==========================================================================
   TOP BAR AND NAVIGATION
   ========================================================================== */
.top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  transition: var(--transition-smooth);
}

.main-header {
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

/* Brand Logo */
.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
  gap: 12px;
}

.logo-icon-wrapper {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: var(--transition-smooth);
}

.logo-icon-classic, .logo-icon-executive {
  position: absolute;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

body.theme-classic .logo-icon-executive {
  opacity: 0;
  transform: rotate(-180deg) scale(0.5);
  pointer-events: none;
}
body.theme-classic .logo-icon-classic {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.theme-executive .logo-icon-classic {
  opacity: 0;
  transform: rotate(180deg) scale(0.5);
  pointer-events: none;
}
body.theme-executive .logo-icon-executive {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  line-height: 1.1;
  transition: var(--transition-smooth);
}

body.theme-classic .brand-name {
  color: var(--text-color);
}
body.theme-executive .brand-name {
  color: var(--primary);
}

.brand-number {
  color: var(--primary);
  transition: var(--transition-smooth);
}
body.theme-executive .brand-number {
  color: var(--text-color);
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  display: block;
}

.brand-sub-exec {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--primary);
  display: none;
  animation: fadeIn 0.5s ease;
}

body.theme-executive .brand-sub {
  display: none;
}
body.theme-executive .brand-sub-exec {
  display: block;
}

/* Budget Input Widget */
.budget-widget {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s ease;
}

.budget-widget:focus-within {
  border-color: var(--primary);
}

.budget-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.budget-label i {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.budget-input-wrapper {
  display: flex;
  align-items: center;
  color: var(--color-success);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
}

.currency-symbol {
  margin-right: 2px;
}

#budget-input {
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  width: 110px;
  text-align: left;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-section {
  position: relative;
  height: 250px;
  background-image: url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1200&q=80');
  background-size: cover;
  background-position: center 35%;
  display: flex;
  align-items: center;
  text-align: center;
  border-bottom: 2px solid var(--primary);
  transition: border-color 0.5s ease;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(var(--classic-bg-rgb, 13), 15, 18, 0.95) 100%);
  transition: var(--transition-smooth);
}

body.theme-executive .hero-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(9, 9, 11, 0.98) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 30px;
  text-shadow: 0 4px 10px rgba(0,0,0,0.6);
  line-height: 1.2;
  margin-bottom: 10px;
  color: #fff;
}

.hero-title .highlight {
  color: var(--primary);
  transition: var(--transition-smooth);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   CONTROLS & FILTERS
   ========================================================================== */
.controls-section {
  margin-top: -30px;
  position: relative;
  z-index: 20;
}

.controls-wrapper {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

/* Category Buttons */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.tab-btn i {
  width: 16px;
  height: 16px;
}

.tab-btn:hover {
  color: var(--text-color);
  background-color: rgba(255,255,255,0.03);
}

.tab-btn.active {
  color: var(--bg-color);
  background-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-glow);
}

body.theme-executive .tab-btn.active {
  color: #000;
  background-color: var(--primary);
}

/* Search and Sort bar */
.search-sort-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 250px;
  position: relative;
  background-color: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  transition: border-color 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

#search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-color);
  padding: 10px 8px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
}

.clear-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.clear-btn:hover {
  color: var(--primary);
}

/* Sort dropdown */
.select-wrapper {
  position: relative;
  background-color: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 180px;
}

.select-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-right: 8px;
}

#sort-select {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 14px;
  width: 100%;
  cursor: pointer;
  padding: 10px 0;
  -webkit-appearance: none;
  appearance: none;
}

#sort-select option {
  background-color: var(--card-bg);
  color: var(--text-color);
}

/* ==========================================================================
   PROPERTIES GRID & CARDS
   ========================================================================== */
.properties-section {
  padding: 30px 0 60px 0;
}

.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.budget-status {
  padding: 4px 10px;
  border-radius: 6px;
  background-color: rgba(var(--classic-primary-rgb), 0.1);
  color: var(--primary);
  border: 1px solid rgba(var(--classic-primary-rgb), 0.2);
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  min-height: 200px;
}

/* Loading and Empty State */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.05);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.empty-state i {
  width: 48px;
  height: 48px;
  color: var(--primary);
}

/* Real Estate Card */
.property-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  position: relative;
}

.property-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-glow);
}

/* Image container */
.property-img-wrapper {
  position: relative;
  height: 180px;
  overflow: hidden;
  background-color: #000;
}

.property-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-img-wrapper img {
  transform: scale(1.08);
}

/* Badges on image */
.badge-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Card Body */
.property-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text-color);
  line-height: 1.3;
}

.property-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Meta info (Capacity) */
.property-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-bottom: 15px;
  font-size: 12px;
  color: var(--text-muted);
}

.meta-detail {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-detail i {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

/* Card Footer (Price & Action) */
.property-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-price {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--color-success);
}

/* Action button */
.btn-view {
  background-color: var(--primary);
  color: var(--bg-color);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

body.theme-executive .btn-view {
  color: #000;
}

.btn-view:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.btn-view i {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.btn-view:hover i {
  transform: translateX(2px);
}

/* Affordability card styles */
.property-card.unaffordable {
  border-left: 3px solid var(--color-danger);
}

.property-card.unaffordable .property-price {
  color: var(--color-danger);
}

.property-card.affordable {
  border-left: 3px solid var(--color-success);
}

.property-card.affordable .property-price {
  color: var(--color-success);
}

.affordable-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(76, 175, 80, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.affordable-badge i {
  width: 10px;
  height: 10px;
}

/* ==========================================================================
   MODAL PANEL (DETAIL & FORM)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 15px 50px rgba(0,0,0,0.8);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--color-danger);
  color: #fff;
}

.modal-close-btn i {
  width: 18px;
  height: 18px;
}

/* Grid layout in modal */
.modal-body-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .modal-body-grid {
    grid-template-columns: 1.1fr 1.3fr;
  }
}

/* Left Image Panel */
.modal-image-panel {
  position: relative;
  height: 250px;
  background-color: #000;
}

@media (min-width: 768px) {
  .modal-image-panel {
    height: 100%;
    min-height: 450px;
  }
}

.modal-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-category-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: var(--primary);
  color: var(--bg-color);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.theme-executive .modal-category-badge {
  color: #000;
}

/* Right Content Panel */
.modal-content-panel {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.modal-header-info h2 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 5px;
}

.modal-price {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 24px;
  color: var(--color-success);
}

.property-meta-specs {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.spec-item i {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.spec-item.shortage-warning {
  color: var(--color-danger);
}
.spec-item.shortage-warning i {
  color: var(--color-danger);
}

.property-long-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.property-features h3, .purchase-form-container h3 {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: var(--text-color);
}

.property-features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.property-features li {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-features li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 800;
}

/* Purchase interactive form */
.purchase-form-container {
  margin-top: 10px;
  padding: 18px;
  background-color: rgba(0,0,0,0.25);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

#purchase-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 180px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-group i {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.input-icon-group input, .form-group textarea {
  width: 100%;
  background-color: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s ease;
}

.input-icon-group input {
  padding-left: 32px;
}

.input-icon-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
}

.submit-request-btn {
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  color: var(--bg-color);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.theme-executive .submit-request-btn {
  color: #000;
}

.submit-request-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.35);
}

.submit-request-btn i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   TOAST SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-color);
  font-size: 13px;
  min-width: 300px;
  max-width: 400px;
  animation: slideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast.toast-success {
  border-left-color: var(--color-success);
}
.toast.toast-success i {
  color: var(--color-success);
}

.toast.toast-error {
  border-left-color: var(--color-danger);
}
.toast.toast-error i {
  color: var(--color-danger);
}

.toast i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 2px;
}

.toast-desc {
  color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
  background-color: var(--header-bg);
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  letter-spacing: 1px;
}

.footer-slogan {
  font-style: italic;
}

.footer-copyright {
  margin-top: 10px;
  color: rgba(255,255,255,0.15);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Agent access button in the public header */
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agent-access-link { display:flex; align-items:center; gap:8px; color:var(--text-color); text-decoration:none; border:1px solid var(--border-color); background:rgba(255,255,255,.03); border-radius:8px; padding:9px 12px; font-size:13px; font-weight:700; transition:var(--transition-fast); }
.agent-access-link:hover { border-color:var(--primary); color:var(--primary); }
.agent-access-link svg { width:16px; height:16px; }


/* Notification privée : cloche et compteur, visibles uniquement pour un agent connecté */
.agent-notification {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 2px;
  color: #fff;
  animation: agentBellPulse 1.8s ease-in-out infinite;
}
.agent-notification[hidden] { display: none !important; }
.agent-notification-icon {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.4;
}
.agent-request-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid var(--header-bg);
  background: #e33131;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(227, 49, 49, .55);
}
@keyframes agentBellPulse {
  0%, 76%, 100% { transform: rotate(0deg); }
  82% { transform: rotate(-9deg); }
  88% { transform: rotate(9deg); }
  94% { transform: rotate(-5deg); }
}
