/*
 * HIVE Design System — Shared Stylesheet
 * Version: 2.0
 * Brand: Premium Student Accommodation Platform
 *
 * Color system: Amber/Golden primary (#f59e0b) on light backgrounds.
 * Typography: Plus Jakarta Sans (primary), Inter (fallback).
 * Import this file in every page's <head> AFTER Bootstrap:
 *   <link href="/css/hive-design-system.css" rel="stylesheet">
 *
 * CRITICAL: This file must NOT change any Thymeleaf logic,
 * form field names, CSRF tokens, or JavaScript business logic.
 */

/* =========================================================
   1. GOOGLE FONTS IMPORT
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* =========================================================
   2. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================= */
:root {
  /* === Brand Colors === */
  --hive-primary:        #f59e0b;
  --hive-primary-dark:   #d97706;
  --hive-primary-darker: #b45309;
  --hive-primary-light:  #fef3c7;
  --hive-primary-subtle: #fffbeb;

  /* === Semantic Colors === */
  --hive-success:        #10b981;
  --hive-success-light:  #d1fae5;
  --hive-danger:         #ef4444;
  --hive-danger-light:   #fee2e2;
  --hive-warning:        #f59e0b;
  --hive-warning-light:  #fef3c7;
  --hive-info:           #3b82f6;
  --hive-info-light:     #dbeafe;

  /* === Neutrals === */
  --hive-dark:           #0f172a;
  --hive-dark-surface:   #1e293b;
  --hive-text:           #1e293b;
  --hive-text-muted:     #64748b;
  --hive-text-light:     #94a3b8;
  --hive-border:         #e2e8f0;
  --hive-border-light:   #f1f5f9;
  --hive-bg:             #f8fafc;
  --hive-bg-alt:         #f1f5f9;
  --hive-card-bg:        #ffffff;
  --hive-overlay:        rgba(15, 23, 42, 0.55);

  /* === Spacing & Shape === */
  --hive-radius-sm:      6px;
  --hive-radius:         12px;
  --hive-radius-lg:      16px;
  --hive-radius-xl:      24px;
  --hive-radius-pill:    999px;

  /* === Shadows === */
  --hive-shadow-xs:      0 1px 2px rgba(0,0,0,0.05);
  --hive-shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --hive-shadow:         0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --hive-shadow-md:      0 8px 16px -2px rgba(0,0,0,0.08), 0 4px 6px -3px rgba(0,0,0,0.05);
  --hive-shadow-lg:      0 12px 24px -4px rgba(0,0,0,0.10), 0 6px 8px -4px rgba(0,0,0,0.05);
  --hive-shadow-xl:      0 20px 40px -8px rgba(0,0,0,0.14);

  /* === Transitions === */
  --hive-ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --hive-transition:     all 0.2s var(--hive-ease);
  --hive-transition-slow: all 0.35s var(--hive-ease);

  /* === Typography === */
  --hive-font:           'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hive-font-mono:      'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  /* === Z-index ladder === */
  --hive-z-base:         1;
  --hive-z-sidebar:      1010;
  --hive-z-nav:          1030;
  --hive-z-modal:        1050;
  --hive-z-toast:        1090;
}

/* =========================================================
   2.1. DARK THEME TOKENS ([data-bs-theme="dark"])
   ========================================================= */
[data-bs-theme="dark"] {
  /* === Dark Mode Neutral Palette === */
  --hive-dark:           #f8fafc;
  --hive-dark-surface:   #0f172a;
  --hive-text:           #f1f5f9;
  --hive-text-muted:     #94a3b8;
  --hive-text-light:     #64748b;
  --hive-border:         #334155;
  --hive-border-light:   #1e293b;
  --hive-bg:             #0b1120;
  --hive-bg-alt:         #0f172a;
  --hive-card-bg:        #1e293b;
  --hive-overlay:        rgba(0, 0, 0, 0.75);

  /* === Adjusted Shadows for Dark Mode === */
  --hive-shadow-xs:      0 1px 2px rgba(0,0,0,0.3);
  --hive-shadow-sm:      0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --hive-shadow:         0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.3);
  --hive-shadow-md:      0 8px 16px -2px rgba(0,0,0,0.5), 0 4px 6px -3px rgba(0,0,0,0.3);
  --hive-shadow-lg:      0 12px 24px -4px rgba(0,0,0,0.6), 0 6px 8px -4px rgba(0,0,0,0.4);
  --hive-shadow-xl:      0 20px 40px -8px rgba(0,0,0,0.7);
}

/* Theme Toggle Button */
.hive-theme-toggle {
  background: transparent;
  border: 1px solid var(--hive-border);
  color: var(--hive-text);
  border-radius: var(--hive-radius-pill);
  padding: 0.35rem 0.65rem;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--hive-transition);
}
.hive-theme-toggle:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--hive-primary);
  color: var(--hive-primary);
}

/* =========================================================
   3. GLOBAL RESET & BASE
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--hive-font);
  background-color: var(--hive-bg);
  color: var(--hive-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hive-font);
  font-weight: 700;
  line-height: 1.3;
  color: var(--hive-dark);
}

p {
  line-height: 1.65;
  color: var(--hive-text-muted);
}

a {
  transition: var(--hive-transition);
}

img {
  max-width: 100%;
}

/* =========================================================
   4. TYPOGRAPHY UTILITIES
   ========================================================= */
.hive-display {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hive-h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.015em; }
.hive-h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.01em; }
.hive-h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; }
.hive-h4 { font-size: 1.25rem; font-weight: 600; }
.hive-h5 { font-size: 1.1rem; font-weight: 600; }

.text-hive-primary    { color: var(--hive-primary) !important; }
.text-hive-muted      { color: var(--hive-text-muted) !important; }
.text-hive-dark       { color: var(--hive-dark) !important; }
.text-hive-success    { color: var(--hive-success) !important; }
.text-hive-danger     { color: var(--hive-danger) !important; }

/* =========================================================
   5. NAVBAR / TOP NAVIGATION
   ========================================================= */
.hive-navbar {
  background: var(--hive-card-bg);
  border-bottom: 1px solid var(--hive-border);
  padding: 0.7rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: var(--hive-z-nav);
  box-shadow: var(--hive-shadow-sm);
  width: 100%;
}

/* Super Admin Top Navbar — Sticky across all admin pages */
.navbar-admin {
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #1e293b;
  position: sticky !important;
  top: 0 !important;
  z-index: var(--hive-z-nav) !important;
  box-shadow: var(--hive-shadow-sm);
  width: 100%;
}

/* Owner Portal Top Navbar */
.navbar-hive {
  background: var(--hive-card-bg);
  border-bottom: 1px solid var(--hive-border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: var(--hive-z-nav);
  box-shadow: var(--hive-shadow-sm);
  width: 100%;
}

.hive-navbar .navbar-brand,
.hive-navbar .brand-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--hive-dark);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.hive-navbar .navbar-brand span,
.hive-navbar .brand-accent {
  color: var(--hive-primary);
}

.hive-navbar .nav-link {
  color: var(--hive-text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--hive-radius-sm);
  transition: var(--hive-transition);
}

.hive-navbar .nav-link:hover,
.hive-navbar .nav-link:focus {
  color: var(--hive-dark);
  background: var(--hive-bg);
}

.hive-navbar .nav-link.active {
  color: var(--hive-primary-dark);
  font-weight: 600;
}

/* Portal pill (e.g. "OWNER PORTAL") */
.portal-pill {
  background: var(--hive-primary-light);
  color: var(--hive-primary-darker);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--hive-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* User avatar (small, circular) */
.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--hive-primary);
  flex-shrink: 0;
}

.user-avatar-md {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--hive-primary);
}

.user-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--hive-primary);
}

.user-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hive-primary-light);
  color: var(--hive-primary-dark);
  font-weight: 700;
  border-radius: 50%;
}

/* =========================================================
   6. HERO SECTIONS
   ========================================================= */
.hive-hero {
  position: relative;
  background: linear-gradient(135deg, var(--hive-dark) 0%, var(--hive-dark-surface) 100%);
  color: white;
  overflow: hidden;
  padding: 5rem 0;
}

.hive-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15,23,42,0.65), rgba(15,23,42,0.45));
  z-index: 1;
}

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

.hive-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: white;
}

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

.hive-hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
  margin-top: 0.75rem;
}

/* Search hero variant */
.hive-search-hero {
  background: linear-gradient(rgba(15,23,42,0.6), rgba(15,23,42,0.6)),
              url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?auto=format&fit=crop&w=1470&q=80') center/cover no-repeat;
  padding: 5rem 0 7rem;
}

/* =========================================================
   7. SEARCH BAR & FILTER CHIPS
   ========================================================= */
.hive-search-card {
  background: white;
  border-radius: var(--hive-radius-lg);
  box-shadow: var(--hive-shadow-xl);
  padding: 2rem;
  margin-top: -3.5rem;
  position: relative;
  z-index: 10;
}

.hive-search-card .form-control,
.hive-search-card .form-select {
  height: 48px;
  border-radius: var(--hive-radius);
  border: 1.5px solid var(--hive-border);
  font-size: 0.93rem;
  transition: var(--hive-transition);
}

.hive-search-card .form-control:focus,
.hive-search-card .form-select:focus {
  border-color: var(--hive-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.375rem 1rem;
  background: white;
  border: 1.5px solid var(--hive-border);
  border-radius: var(--hive-radius-pill);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--hive-text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: var(--hive-transition);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--hive-primary);
  color: var(--hive-primary-dark);
  background: var(--hive-primary-subtle);
}

.filter-chip.active {
  background: var(--hive-dark);
  border-color: var(--hive-dark);
  color: white;
}

/* =========================================================
   8. PROPERTY CARDS
   ========================================================= */
.hive-property-card {
  background: var(--hive-card-bg);
  border-radius: var(--hive-radius-lg);
  overflow: hidden;
  border: 1px solid var(--hive-border-light);
  box-shadow: var(--hive-shadow-sm);
  transition: var(--hive-transition-slow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.hive-property-card .card-img-top,
.hive-property-card .property-img {
  height: 210px;
  object-fit: cover;
  width: 100%;
}

.hive-property-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.property-type-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: var(--hive-radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.6rem;
}

.badge-hostel   { background: #ede9fe; color: #5b21b6; }
.badge-pg       { background: #dcfce7; color: #166534; }
.badge-flat     { background: #dbeafe; color: #1e40af; }
.badge-house    { background: #fef3c7; color: #92400e; }
.badge-primary  { background: var(--hive-primary-light); color: var(--hive-primary-darker); }

.hive-property-card .property-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hive-dark);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.hive-property-card .property-location {
  font-size: 0.82rem;
  color: var(--hive-text-muted);
  margin-bottom: 0.75rem;
}

.hive-property-card .property-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hive-dark);
}

.hive-property-card .price-period {
  font-size: 0.8rem;
  color: var(--hive-text-muted);
  font-weight: 400;
}

.property-img-overlay {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
}

.property-distance-badge {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  background: rgba(15,23,42,0.75);
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--hive-radius-pill);
  backdrop-filter: blur(4px);
}

/* =========================================================
   9. BUTTONS
   ========================================================= */

/* Primary (amber) button */
.btn-hive {
  background: var(--hive-primary);
  color: var(--hive-dark);
  border: none;
  font-weight: 600;
  border-radius: var(--hive-radius);
  padding: 0.6rem 1.5rem;
  transition: var(--hive-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-hive:hover {
  background: var(--hive-primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-hive:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-hive-outline {
  background: transparent;
  color: var(--hive-primary-dark);
  border: 1.5px solid var(--hive-primary);
  font-weight: 600;
  border-radius: var(--hive-radius);
  padding: 0.6rem 1.5rem;
  transition: var(--hive-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-hive-outline:hover {
  background: var(--hive-primary);
  color: var(--hive-dark);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-hive-dark {
  background: var(--hive-dark);
  color: white;
  border: none;
  font-weight: 600;
  border-radius: var(--hive-radius);
  padding: 0.6rem 1.5rem;
  transition: var(--hive-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-hive-dark:hover {
  background: var(--hive-dark-surface);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--hive-shadow-md);
}

.btn-hive-ghost {
  background: transparent;
  color: var(--hive-text-muted);
  border: 1px solid var(--hive-border);
  font-weight: 500;
  border-radius: var(--hive-radius);
  padding: 0.55rem 1.25rem;
  transition: var(--hive-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-hive-ghost:hover {
  background: var(--hive-bg);
  border-color: var(--hive-text-muted);
  color: var(--hive-dark);
}

/* =========================================================
   10. FORM ELEMENTS
   ========================================================= */
.hive-form .form-label,
.form-label-hive {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hive-text);
  margin-bottom: 0.4rem;
}

.hive-form .form-control,
.hive-form .form-select,
.form-control-hive {
  border: 1.5px solid var(--hive-border);
  border-radius: var(--hive-radius);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: var(--hive-text);
  background: var(--hive-card-bg);
  transition: var(--hive-transition);
}

.hive-form .form-control:focus,
.hive-form .form-select:focus,
.form-control-hive:focus {
  border-color: var(--hive-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
  outline: none;
}

.hive-form .form-control.is-invalid,
.form-control-hive.is-invalid {
  border-color: var(--hive-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.hive-form .form-control.is-valid,
.form-control-hive.is-valid {
  border-color: var(--hive-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.hive-input-icon-wrapper {
  position: relative;
}

.hive-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hive-text-muted);
  pointer-events: none;
}

.hive-input-icon ~ .form-control {
  padding-left: 2.5rem;
}

/* =========================================================
   11. CARDS
   ========================================================= */
.hive-card {
  background: var(--hive-card-bg);
  border: 1px solid var(--hive-border-light);
  border-radius: var(--hive-radius-lg);
  box-shadow: var(--hive-shadow-sm);
  transition: var(--hive-transition);
}

.hive-card:hover {
  box-shadow: var(--hive-shadow-md);
}

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

.hive-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hive-dark);
  margin: 0;
}

.hive-card-body {
  padding: 1.5rem;
}

/* Stat / KPI card */
.hive-stat-card {
  background: var(--hive-card-bg);
  border-radius: var(--hive-radius-lg);
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--hive-border-light);
  box-shadow: var(--hive-shadow-sm);
  transition: var(--hive-transition);
}

.hive-stat-card:hover {
  box-shadow: var(--hive-shadow-md);
  transform: translateY(-2px);
}

.hive-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--hive-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.icon-amber  { background: var(--hive-primary-light);  color: var(--hive-primary-dark); }
.icon-blue   { background: #dbeafe; color: #1d4ed8; }
.icon-green  { background: var(--hive-success-light);  color: #059669; }
.icon-red    { background: var(--hive-danger-light);   color: #dc2626; }
.icon-purple { background: #ede9fe; color: #7c3aed; }
.icon-dark   { background: var(--hive-bg-alt); color: var(--hive-dark); }

.hive-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--hive-dark);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.hive-stat-label {
  font-size: 0.8rem;
  color: var(--hive-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =========================================================
   12. BADGES & STATUS PILLS
   ========================================================= */
.hive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--hive-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hive-badge-primary  { background: var(--hive-primary-light); color: var(--hive-primary-darker); }
.hive-badge-success  { background: var(--hive-success-light); color: #047857; }
.hive-badge-danger   { background: var(--hive-danger-light); color: #b91c1c; }
.hive-badge-warning  { background: var(--hive-warning-light); color: #92400e; }
.hive-badge-info     { background: var(--hive-info-light); color: #1e40af; }
.hive-badge-dark     { background: var(--hive-dark); color: white; }
.hive-badge-muted    { background: var(--hive-bg-alt); color: var(--hive-text-muted); }

/* Status dots */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-active   { background: var(--hive-success); }
.status-dot-pending  { background: var(--hive-warning); }
.status-dot-inactive { background: var(--hive-text-muted); }
.status-dot-danger   { background: var(--hive-danger); }

/* =========================================================
   13. SIDEBAR NAVIGATION (Dashboard pages)
   ========================================================= */
.hive-sidebar {
  width: 270px;
  background: var(--hive-card-bg);
  border-right: 1px solid var(--hive-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
}

.hive-sidebar-section {
  padding: 1.25rem 1rem 0.5rem;
}

.hive-sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hive-text-light);
  padding: 0 0.75rem;
  margin-bottom: 0.4rem;
}

.hive-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--hive-radius);
  color: var(--hive-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  transition: var(--hive-transition);
}

.hive-sidebar-link i {
  font-size: 1.1rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.hive-sidebar-link:hover {
  background: var(--hive-primary-subtle);
  color: var(--hive-primary-dark);
}

.hive-sidebar-link.active,
.hive-sidebar-link[aria-current="page"] {
  background: var(--hive-primary-light);
  color: var(--hive-primary-darker);
  font-weight: 600;
}

.hive-sidebar-link.danger:hover {
  background: var(--hive-danger-light);
  color: var(--hive-danger);
}

/* =========================================================
   14. TABLES
   ========================================================= */
.hive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.hive-table th {
  background: var(--hive-bg);
  color: var(--hive-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--hive-border);
  white-space: nowrap;
}

.hive-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--hive-border-light);
  color: var(--hive-text);
  vertical-align: middle;
}

.hive-table tbody tr:hover td {
  background: var(--hive-primary-subtle);
}

.hive-table tbody tr:last-child td {
  border-bottom: none;
}

/* =========================================================
   15. ALERTS / FLASH MESSAGES
   ========================================================= */
.hive-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--hive-radius);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border-left: 4px solid transparent;
}

.hive-alert i {
  margin-top: 0.1rem;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.hive-alert-success {
  background: var(--hive-success-light);
  color: #065f46;
  border-left-color: var(--hive-success);
}

.hive-alert-danger {
  background: var(--hive-danger-light);
  color: #991b1b;
  border-left-color: var(--hive-danger);
}

.hive-alert-warning {
  background: var(--hive-warning-light);
  color: #78350f;
  border-left-color: var(--hive-warning);
}

.hive-alert-info {
  background: var(--hive-info-light);
  color: #1e3a8a;
  border-left-color: var(--hive-info);
}

/* =========================================================
   16. MODALS
   ========================================================= */
.hive-modal .modal-content {
  border: none;
  border-radius: var(--hive-radius-xl);
  box-shadow: var(--hive-shadow-xl);
  overflow: hidden;
}

.hive-modal .modal-header {
  background: var(--hive-bg);
  border-bottom: 1px solid var(--hive-border);
  padding: 1.25rem 1.5rem;
}

.hive-modal .modal-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--hive-dark);
}

.hive-modal .modal-body {
  padding: 1.5rem;
}

.hive-modal .modal-footer {
  background: var(--hive-bg);
  border-top: 1px solid var(--hive-border);
  padding: 1rem 1.5rem;
}

/* =========================================================
   17. FOOTER
   ========================================================= */
.hive-footer {
  background: var(--hive-dark);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 2rem;
}

.hive-footer .footer-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
}

.hive-footer .footer-brand span {
  color: var(--hive-primary);
}

.hive-footer p {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
}

.hive-footer h6 {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

.hive-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--hive-transition);
}

.hive-footer a:hover {
  color: var(--hive-primary);
}

.hive-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.hive-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--hive-transition);
}

.hive-social-link:hover {
  border-color: var(--hive-primary);
  color: var(--hive-primary);
  background: rgba(245, 158, 11, 0.1);
}

/* =========================================================
   18. SECTION HEADERS
   ========================================================= */
.hive-section-header {
  margin-bottom: 2rem;
}

.hive-section-header .section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hive-primary);
  margin-bottom: 0.4rem;
}

.hive-section-header .section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--hive-dark);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hive-section-header .section-subtitle {
  font-size: 1rem;
  color: var(--hive-text-muted);
}

/* Section divider */
.hive-divider {
  border: none;
  height: 1px;
  background: var(--hive-border);
  margin: 2rem 0;
}

/* =========================================================
   19. TABS
   ========================================================= */
.hive-tabs {
  display: flex;
  border-bottom: 2px solid var(--hive-border);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.hive-tabs::-webkit-scrollbar { display: none; }

.hive-tab-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  color: var(--hive-text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: var(--hive-transition);
}

.hive-tab-link:hover {
  color: var(--hive-dark);
}

.hive-tab-link.active {
  color: var(--hive-primary-dark);
  border-bottom-color: var(--hive-primary);
  font-weight: 600;
}

/* =========================================================
   20. EMPTY STATE
   ========================================================= */
.hive-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--hive-text-muted);
}

.hive-empty-state .empty-icon {
  font-size: 3rem;
  color: var(--hive-border);
  margin-bottom: 1rem;
  display: block;
}

.hive-empty-state h5 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hive-text);
  margin-bottom: 0.5rem;
}

.hive-empty-state p {
  font-size: 0.9rem;
  max-width: 350px;
  margin: 0 auto 1.5rem;
}

/* =========================================================
   21. PAGINATION
   ========================================================= */
.hive-pagination .page-link {
  border: 1px solid var(--hive-border);
  color: var(--hive-text-muted);
  border-radius: var(--hive-radius-sm) !important;
  font-size: 0.87rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  transition: var(--hive-transition);
}

.hive-pagination .page-link:hover {
  background: var(--hive-primary-light);
  border-color: var(--hive-primary);
  color: var(--hive-primary-darker);
}

.hive-pagination .page-item.active .page-link {
  background: var(--hive-primary);
  border-color: var(--hive-primary);
  color: white;
}

/* =========================================================
   22. FILTER SIDEBAR (Listings pages)
   ========================================================= */
.hive-filter-sidebar {
  background: var(--hive-card-bg);
  border-radius: var(--hive-radius-lg);
  border: 1px solid var(--hive-border);
  padding: 1.5rem;
  box-shadow: var(--hive-shadow-sm);
  position: sticky;
  top: 80px;
}

.hive-filter-sidebar .filter-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hive-text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hive-border-light);
}

.hive-range-slider {
  accent-color: var(--hive-primary);
}

/* =========================================================
   23. AMENITY ICONS GRID
   ========================================================= */
.hive-amenity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--hive-text-muted);
  padding: 0.3rem 0;
}

.hive-amenity-item i {
  color: var(--hive-primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* =========================================================
   24. MISC UTILITY CLASSES
   ========================================================= */
.hive-gradient-text {
  background: linear-gradient(135deg, var(--hive-primary) 0%, var(--hive-primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hive-gold-line {
  display: block;
  width: 50px;
  height: 4px;
  background: var(--hive-primary);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.hive-section {
  padding: 4.5rem 0;
}

.hive-section-sm {
  padding: 2.5rem 0;
}

.hive-section-alt {
  background: var(--hive-bg-alt);
}

.hive-rounded-img {
  border-radius: var(--hive-radius-lg);
  overflow: hidden;
}

.hive-overlay-dark {
  background: rgba(15, 23, 42, 0.6);
}

/* scrollbar slim */
.hive-slim-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--hive-border) transparent;
}
.hive-slim-scroll::-webkit-scrollbar { width: 5px; }
.hive-slim-scroll::-webkit-scrollbar-track { background: transparent; }
.hive-slim-scroll::-webkit-scrollbar-thumb { background: var(--hive-border); border-radius: 10px; }

/* Step indicator */
.hive-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--hive-card-bg);
  border-radius: var(--hive-radius-lg);
  border: 1px solid var(--hive-border-light);
  transition: var(--hive-transition);
}

.hive-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hive-primary-light);
  color: var(--hive-primary-darker);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hive-step-active {
  border-color: var(--hive-primary);
  background: var(--hive-primary-subtle);
}

.hive-step-active .hive-step-number {
  background: var(--hive-primary);
  color: white;
}

/* =========================================================
   25. BOOTSTRAP OVERRIDES (non-breaking)
   ========================================================= */

/* Badge overrides */
.badge.bg-primary { background: var(--hive-primary) !important; color: var(--hive-dark) !important; }
.badge.bg-warning  { background: var(--hive-warning) !important; color: var(--hive-dark) !important; }
.badge.bg-success  { background: var(--hive-success) !important; }
.badge.bg-danger   { background: var(--hive-danger) !important; }

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--hive-border);
  border-radius: var(--hive-radius-lg);
  box-shadow: var(--hive-shadow-lg);
  padding: 0.5rem;
  font-size: 0.88rem;
}

.dropdown-item {
  border-radius: var(--hive-radius-sm);
  padding: 0.55rem 0.875rem;
  transition: var(--hive-transition);
  color: var(--hive-text);
}

.dropdown-item:hover, .dropdown-item:focus {
  background: var(--hive-primary-subtle);
  color: var(--hive-primary-dark);
}

/* Pagination */
.pagination .page-link {
  color: var(--hive-text-muted);
}

.pagination .page-item.active .page-link {
  background: var(--hive-primary);
  border-color: var(--hive-primary);
  color: white;
}

/* Form control focus */
.form-control:focus,
.form-select:focus {
  border-color: var(--hive-primary);
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.2);
}

/* Accordion */
.accordion-button:not(.collapsed) {
  background: var(--hive-primary-subtle);
  color: var(--hive-primary-darker);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.2);
}

/* =========================================================
   26. RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 991.98px) {
  .hive-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--hive-border);
  }

  .hive-filter-sidebar {
    position: static;
  }

  .hive-search-card {
    margin-top: 0;
    border-radius: var(--hive-radius);
  }
}

@media (max-width: 767.98px) {
  .hive-section { padding: 3rem 0; }
  .hive-section-header .section-title { font-size: 1.5rem; }
  .hive-stat-value { font-size: 1.4rem; }
  .hive-property-card .card-img-top,
  .hive-property-card .property-img { height: 180px; }
  .hive-tabs { font-size: 0.83rem; }
  .hive-tab-link { padding: 0.6rem 0.875rem; }
  .filter-chips { gap: 0.35rem; }
  .filter-chip { font-size: 0.78rem; padding: 0.3rem 0.75rem; }
}

@media (max-width: 575.98px) {
  .hive-footer { padding: 2.5rem 0 1.5rem; }
  .hive-hero { padding: 3rem 0; }
  .hive-search-hero { padding: 3rem 0 5rem; }
  .hive-card-body { padding: 1.1rem; }
  .hive-stat-card { padding: 1.1rem; }
}

/* =========================================================
   27. PRINT STYLES
   ========================================================= */
@media print {
  .hive-navbar, .hive-sidebar, .hive-footer,
  .btn, .filter-chips { display: none !important; }
  body { background: white; }
  .hive-card { box-shadow: none; border: 1px solid #ccc; }
}
