/* ==========================================================================
   LeaseTrack SaaS - Modern Institutional Design Engine
   ========================================================================== */

:root {
  /* System Tokens */
  --lt-bg-app: #f1f5f9; /* Slate-100 canvas (prevents white-on-white blend) */
  --lt-surface-card: #ffffff;
  --lt-sidebar: #0f172a;
  --lt-topbar-bg: rgba(255, 255, 255, 0.85);

  /* Primary Brand Tokens */
  --lt-primary: #1d4ed8;       /* Deep Royal Blue (Rich & Authoritative) */
  --lt-primary-hover: #1e40af; /* Dark Cobalt for active hover states */
  --lt-primary-light: #eff6ff; /* Soft tint for table hovers & subtle tags */
  --lt-primary-glow: rgba(29, 78, 216, 0.2);

  /* Borders & Shadows */
  --lt-border-subtle: rgba(226, 232, 240, 0.8);
  --lt-border-hover: rgba(203, 213, 225, 0.9);
  --lt-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --lt-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --lt-card-border: rgba(148, 163, 184, 0.35); /* Crisp hairline border */
}

/* ==========================================================================
   Global Layout & Boundary Constraints
   ========================================================================== */

html, body {
  background-color: var(--lt-bg-app) !important;
  max-width: 100vw;
  overflow-x: clip; /* Replaces overflow-x: hidden to prevent breaking sticky elements */
  overflow-y: visible;
}

body {
  background: var(--lt-bg-app);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-font-smoothing: antialiased;
}

.main-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  margin-left: 0 !important; /* Preserves flex stream without offset shifts */
}

main.container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  overflow-x: hidden;
  animation: pageFade .2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pageFade {
  from {
    opacity: 0.96;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input, select, textarea {
  font-size: 16px !important;
  border-radius: 10px;
}

/* ==========================================================================
   Splash Screen & Page Loader
   ========================================================================== */

#appSplash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top));
  background: var(--lt-bg-app);
  z-index: 99999;
  transition: opacity .25s ease, visibility .25s ease;
}

#appSplash.hide {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.splash-logo {
  width: 96px;
  max-width: 28vw;
  height: auto;
  animation: logoFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(37, 99, 235, 0.3));
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.splash-content h2 {
  margin-top: 18px;
  margin-bottom: 6px;
  color: var(--lt-sidebar);
  font-size: 1.6rem;
  font-weight: 700;
}

.splash-content p {
  color: var(--lt-sidebar);
  margin-bottom: 20px;
}

.splash-spinner {
  width: 2rem;
  height: 2rem;
  color: #3b82f6 !important;
}

#pageLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #bfc4ca, #ffffff);
  z-index: 999999;
  transition: width .25s ease, opacity .25s ease;
  opacity: 0;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 576px) {
  .splash-logo { width: 84px; }
  .splash-content h2 { font-size: 1.35rem; }
  .splash-content p { font-size: .9rem; }
}

/* ==========================================================================
   Sidebar Navigation (Enterprise Slate)
   ========================================================================== */

.sidebar {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 1000;
}

.sidebar .nav-link {
  color: #cfd8e3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .75rem .85rem;
  border-radius: 10px;
  transition: .2s;
  margin-bottom: 2px;
  font-weight: 500;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar .nav-link.active {
  background: var(--lt-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  font-weight: 600;
}

.sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-heading {
  color: #8fa3bf;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 20px 0 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
  color: #c9d3df;
  font-size: .9rem;
}

.sidebar-profile {
  text-align: center;
  padding: 1rem 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 1rem;
}

.sidebar-profile img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .15);
}

.sidebar-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-org {
  margin-top: .75rem;
  font-weight: 600;
  color: #fff;
}

.sidebar-role { color: #8fa3bf; font-size: .8rem; }
.sidebar-user-name { color: #fff; font-weight: 600; }
.sidebar-user-role { color: rgba(255, 255, 255, .6); font-size: .85rem; }

/* Mobile Offcanvas Sidebar */
.mobile-sidebar { width: 320px; max-width: 85vw; }
.mobile-sidebar .offcanvas-header { padding: 1.25rem; }
.mobile-sidebar .offcanvas-body { padding: 1rem; }

.mobile-sidebar .nav-link {
  border-radius: 14px;
  padding: .85rem 1rem;
  color: #334155;
  font-weight: 500;
}

.mobile-sidebar .nav-link:hover { background: #f8fafc; }

.mobile-sidebar .sidebar-heading {
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 1rem 0 .5rem;
}

.mobile-sidebar .sidebar-user-name { color: #000000; font-weight: 600; }
.mobile-sidebar .sidebar-user-role { color: rgba(0, 0, 0, 0.6); font-size: .85rem; }
.mobile-menu-btn { display: none; }

@media (max-width: 991px) {
  .sidebar { display: none; }
  .mobile-menu-btn { display: inline-flex; }
}

/* ==========================================================================
   Topbar Glassmorphism
   ========================================================================== */

.topbar {
  background: var(--lt-topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 72px;
  border-bottom: 1px solid var(--lt-border-subtle);
  position: sticky;
  top: 0;
  z-index: 1060;
}

.brand-topbar {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: #111827;
  font-weight: 700;
}

.topbar-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text { font-size: 1.15rem; }
.install-btn { white-space: nowrap; }

.brand-wrap { display: flex; align-items: center; gap: 12px; }

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.brand-name { font-weight: 700; }
.brand-tag { color: #64748b; font-size: .8rem; }

@media (max-width: 768px) {
  .brand-text { display: none; }
  .topbar-logo { width: 34px; height: 34px; }
}

/* ==========================================================================
   Buttons & Primary Action Surfaces
   ========================================================================== */

.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: .55rem 1.1rem;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn:hover { transform: none; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: #fff;
  color: var(--bs-body-color);
  font-weight: 500;
  text-decoration: none;
  transition: .2s;
}

.btn-back:hover {
  background: #f8f9fa;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.page-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.search-box { max-width: 420px; }

/* ==========================================================================
   Card System & Metric Surfaces
   ========================================================================== */

.card {
  border: 1px solid var(--lt-card-border);
  border-radius: 16px;
  background-color: var(--lt-surface-card);
  box-shadow: var(--lt-shadow-sm);
  transition: box-shadow .18s ease, border-color .18s ease;
  overflow: visible;

  /* Smooth spring-like transition for natural weight */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
  
  /* Layered 3D Shadow: Inset top highlight + Ambient shadow + Directional shadow */
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),       /* Top edge 3D bevel reflection */
    0 4px 6px -1px rgba(15, 23, 42, 0.06),           /* Ambient ground contact */
    0 2px 4px -2px rgba(15, 23, 42, 0.04);          /* Crisp low-level drop shadow */
  
  overflow: visible;
  position: relative;
  will-change: transform, box-shadow;
}

.card:hover {
  /* Physical 6px lift upward on hover */
  transform: translateY(-6px);

  /* Expanded multi-tier shadow simulating height off the page */
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 1),         /* Brightened top bevel edge */
    0 20px 25px -5px rgba(15, 23, 42, 0.10),        /* Soft broad ambient blur */
    0 8px 10px -6px rgba(15, 23, 42, 0.06);         /* Concentrated drop shadow */
}



.stat-card { transition: .2s; }
.stat-card:hover { transform: translateY(-3px); }

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}


.org-card { transition: .2s; }
.org-card:hover { transform: translateY(-4px); }

.org-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.org-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}

.org-status.active { background: #dcfce7; color: #166534; }


/* ==========================================================================
   High-Contrast Compact KPI Cards
   ========================================================================== */

.kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

/* Accent Top Border Strips */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #cbd5e1;
}

.kpi-card-success::before { background: #10b981; }
.kpi-card-warning::before { background: #f59e0b; }
.kpi-card-primary::before { background: var(--lt-primary, #1d4ed8); }
.kpi-card-slate::before   { background: #64748b; }
.kpi-card-danger::before   { background: #cc1e2d; }

/* Micro-Typography Styling */
.kpi-value {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}

.kpi-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Soft Hover Depth without expansion */
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

.kpi-card .card-body, 
.action-card.card-body {
  padding: .5rem;
}


.action-card {
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--lt-primary) 0%, var(--lt-primary-hover) 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  color: #fff;
  transition: .25s;
  overflow: hidden;
  position: relative;
}

.action-card:hover {
  transform: translateY(-4px);
  color: #fff;
}

.action-card .action-icon { font-size: 1.25rem; margin-bottom: .5rem; }
.action-card .action-title { font-size: 1rem; font-weight: 700; }



/* Hero Banners */
.organization-header {
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 40%, #1d4ed8 100%);
}

.organization-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.organization-header::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.page-hero {
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: visible;
  z-index: 1050 !important;
  background: linear-gradient(135deg, var(--lt-primary) 0%, var(--lt-primary-hover) 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}


.page-hero::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  top: -140px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
}

.page-hero::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  bottom: -120px;
  right: -80px;
  pointer-events: none;
  z-index: 0;
}

.page-hero > * {
  position: relative;
  z-index: 2;
}

.hero-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.hero-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.hero-warning { background: linear-gradient(135deg, #d97706, #b45309); }
.hero-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.hero-secondary { background: linear-gradient(135deg, #475569, #334155); }

/* Dropdowns & Modals Depth */
.card.dropdown-card { position: relative; z-index: 100; }
.dropdown { position: relative; }
.dropdown-menu { z-index: 1080; }

/* Custom Property Dropdown Menu Adjustments */
.dropdown-menu-center {
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, 0) !important;
}

.dropdown-item.active {
  background-color: var(--lt-primary, #1d4ed8) !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: white;
  backdrop-filter: blur(10px);
  font-size: .8rem;
  font-weight: 700;
  color: black;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.organization-meta { opacity: .9; }
.quick-action { width: 100%; text-align: left; }



.lease-tabs .nav-link {
  color: var(--bs-secondary-color);
  border: 1px solid transparent;
  border-bottom: 0;
  font-size: .85rem;
  white-space: nowrap;
}
.lease-tabs .nav-link:hover {
  color: var(--bs-primary);
  background: var(--bs-light);
}
.lease-tabs .nav-link.active {
  color: var(--bs-primary);
  background: #fff;
  border-color: var(--bs-border-color) var(--bs-border-color) #fff;
  box-shadow: 0 -2px 0 var(--bs-primary) inset;
}
@media (max-width: 575.98px) {
    .lease-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .lease-tabs .nav-link {
      padding-left: .65rem !important;
      padding-right: .65rem !important;
      font-size: .78rem;
      flex: 1 0 auto;
    }
    .lease-tabs .nav-link i {
      margin-right: .2rem !important;
    }
}


/* ==========================================================================
   Management Cards & Property Switcher
   ========================================================================== */
/* ==========================================================================
   Institutional Management Card Engine
   ========================================================================== */

.management-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-color: var(--lt-surface-card, #ffffff);
  border: 1px solid var(--lt-card-border, rgba(148, 163, 184, 0.35));
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
  
  /* Layered 3D Elevation */
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 2px 4px -1px rgba(15, 23, 42, 0.04),
    0 1px 2px -1px rgba(15, 23, 42, 0.02);
  
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
}

/* Hover Elevation & Lift */
.management-card:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 78, 216, 0.4); /* Royal Blue Subtle Accent */
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 1),
    0 12px 20px -4px rgba(15, 23, 42, 0.08),
    0 4px 6px -2px rgba(15, 23, 42, 0.04);
}

/* Size Variants */
.management-card-compact { padding: 14px; }
.management-card-default { padding: 18px; }
.management-card-large   { padding: 24px; }

/* Structural Inner Components */
.management-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.management-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--lt-primary-light, #eff6ff);
  color: var(--lt-primary, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(29, 78, 216, 0.15);
}

.management-icon i {
  font-size: 1.2rem;
}

.management-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.management-subtitle {
  margin-top: 2px;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}

.management-stats {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--lt-border-subtle, rgba(226, 232, 240, 0.8));
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.management-stats strong {
  color: #0f172a;
  font-weight: 700;
}

/* Image & Avatar Containers inside Management Cards */
.management-card img {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.management-card .badge { font-size: .68rem; padding: .145rem .5rem; }

style="font-size: 0.68rem;

.icon-blue { background: #eff6ff; }
.icon-blue i { color: #2563eb; }
.icon-green { background: #ecfdf5; }
.icon-green i { color: #059669; }
.icon-amber { background: #fffbeb; }
.icon-amber i { color: #d97706; }
.icon-red { background: #fef2f2; }
.icon-red i { color: #dc2626; }

.property-switcher {
  width: 320px;
  max-width: 90vw;
  height: 46px;
  padding: 0 44px 0 16px;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15,23,42,.10);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5L8 12l6.5-6.5' stroke='%2364748b' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ==========================================================================
   Property Switcher Component
   ========================================================================== */

.property-switcher-btn {
  min-width: 240px;
  justify-content: space-between;
}

.property-switcher-icon {
  width: 26px;
  height: 26px;
}

.property-switcher-menu {
  min-width: 280px;
  max-height: 340px;
  overflow-y: auto;
  z-index: 1090 !important; /* Forces dropdown layer above hero & floating cards */
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, 0) !important;
}

.property-switcher-header {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.property-code-text {
  font-size: 0.75rem;
}

.dropdown-item.active {
  background-color: var(--lt-primary, #1d4ed8) !important;
}


@media (max-width: 768px) {
  .switcher-bar { text-align: center; justify-content: center; }
  .card.dropdown-card { position: relative; z-index: 100; }
  .property-switcher {
    max-width: 320px;
    margin: 0 auto;
    background: var(--bs-primary);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    backdrop-filter: blur(12px);
    height: 38px;
    border-radius: 10px;
    padding: 5px;
    min-width: 120px;
  }
  .property-switcher option { color: #000; }
}

/* Status Badges */
.badge-vacant { background: #dcfce7; color: #166534; }
.badge-occupied { background: #dbeafe; color: #1d4ed8; }
.badge-reserved { background: #fef3c7; color: #92400e; }
.badge-maintenance { background: #fee2e2; color: #b91c1c; }

.space-name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; color: #0f172a; }
.space-type { color: #64748b; font-size: .8rem; font-weight: 500; }

.accordion-floor { transition: .2s; }
.accordion-floor:hover { background: #f8fafc; }
.floor-chevron { transition: .25s; }
.floor-header[aria-expanded="true"] .floor-chevron { transform: rotate(180deg); }
.collapse, .collapsing { transition: .25s ease; }

/* Lease & Tenant Cards */
.lease-card { transition: .2s; border-radius: 16px; }
.lease-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.12)!important; }
.lease-card .badge { font-size: .72rem; }
.lease-card .small { font-size: .88rem; }

.tenant-logo { width: 84px; height: 84px; flex-shrink: 0; }

.tenant-image {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--bs-border-color);
  background: #fff;
}

.tenant-avatar {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid var(--bs-border-color);
}

.tenant-avatar i { font-size: 2rem; color: #6c757d; }

/* ==========================================================================
   Notification & Message Dropdowns
   ========================================================================== */

#notification-menu, #message-menu {
  width: 400px;
  max-width: 95vw;
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
}

.notification-title { font-weight: 700; font-size: 1rem; }
.notification-count { background: #0d6efd; color: #fff; padding: 4px 10px; border-radius: 20px; font-size: .75rem; }
.notification-list { max-height: 420px; overflow-y: auto; }

.notification-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 15px 18px;
  border-bottom: 1px solid #f3f4f6;
  transition: .2s;
}

.notification-item:hover { background: #f8fafc; }
.notification-item.unread { background: #eef6ff; }
.notification-item.unread:hover { background: #e2f0ff; }
.notification-item:last-child { border-bottom: none; }

.notification-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.notification-dot { width: 10px; height: 10px; border-radius: 50%; background: #0d6efd; flex-shrink: 0; }
.notification-title-text { font-weight: 600; font-size: .95rem; }
.notification-message { font-size: .84rem; color: #6c757d; line-height: 1.45; margin-left: 20px; }
.notification-time { font-size: .72rem; color: #adb5bd; margin-top: 6px; margin-left: 20px; }

.notification-footer { padding: 12px; border-top: 1px solid #edf2f7; background: #fff; }
.notification-footer a { font-weight: 600; text-decoration: none; }

@media (max-width: 768px) {
  #notification-menu, #message-menu { width: 250px; max-width: 95vw; }
}

/* ==========================================================================
   Space Selection & Alert Center
   ========================================================================== */

.space-select-card { display: block; cursor: pointer; }
.space-select-card input { display: none; }

.space-card-body {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  padding: 8px;
  transition: .2s;
  background: #fff;
}

.space-select-card:hover .space-card-body { border-color: var(--bs-primary); }

.space-select-card input:checked + .space-card-body {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb),.06);
  box-shadow: 0 .4rem .9rem rgba(0,0,0,.08);
}

.check-icon { opacity: 0; color: var(--bs-primary); font-size: 1.2rem; }
.space-select-card input:checked + .space-card-body .check-icon { opacity: 1; }

.subtle-space-card {
  border: 1px solid rgba(37, 99, 235, 0.15);
  background-color: rgba(37, 99, 235, 0.03);
  border-radius: 12px;
  padding: 16px;
}

.table thead th a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.table thead th a.active { color: var(--bs-primary); }
.table thead th i { font-size: .75rem; }


/* ==========================================================================
   Alert Center Engine - Edge-to-Edge Polygon Ribbon & Expanded Spacing
   ========================================================================== */

.alert-center { 
  width: 100%; 
  min-width: 0; 
}

/* Rounded Card with Severity Border & Edge Clipping */
.alert-item-card {
  position: relative;
  overflow: hidden; /* Clips ribbon perfectly to top-right and bottom-right border radius */
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s ease,
              border-color 0.2s ease;
}

/* Severity Border Tints (Deeper Tones) */
.alert-item-card.priority-high {
  border-color: rgba(185, 28, 28, 0.4); /* Deep Crimson */
}

.alert-item-card.priority-medium {
  border-color: rgba(194, 65, 12, 0.4); /* Deep Vermilion / Red-Orange */
}

.alert-item-card.priority-low {
  border-color: rgba(30, 64, 175, 0.4); /* Deep Sapphire Blue */
}

.alert-item-card:hover {
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* Icon Box */
.alert-icon-box {
  width: 42px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Icon Box - Deeper Jewel Tones */
.alert-icon-box.danger {
  background-color: #fef2f2;
  color: #b91c1c; /* Deep Crimson Red */
  border: 1px solid rgba(185, 28, 28, 0.25);
}

.alert-icon-box.warning {
  background-color: #fff7ed;
  color: #c2410c; /* Deep Red-Orange */
  border: 1px solid rgba(194, 65, 12, 0.25);
}

.alert-icon-box.primary {
  background-color: #eff6ff;
  color: #1e40af; /* Deep Navy / Sapphire Blue */
  border: 1px solid rgba(30, 64, 175, 0.25);
}

/* Angled Severity Ribbon - Bleeds Flush to Outer Edge & Border Radius */
.alert-severity-ribbon {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 0 20px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  flex-shrink: 0;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 0% 100%);
  margin: -1rem -1rem -1rem 0; /* Fully offsets p-3 card padding to sit flush against borders */
}

/* Deeper Angled Severity Ribbons */
.alert-severity-ribbon.severity-high {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); /* Rich Ruby Crimson */
}

.alert-severity-ribbon.severity-medium {
  background: linear-gradient(135deg, #ea580c 0%, #9a3412 100%); /* Deep Vermilion Red-Orange */
}

.alert-severity-ribbon.severity-low {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%); /* Deep Sapphire Blue */
}
.min-w-0 {
  min-width: 0 !important;
}


/* ==========================================================================
   Lease Grid Card Styles
   ========================================================================== */

.lease-item-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.2s ease, 
              border-color 0.2s ease;
}

.lease-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.4) !important;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08) !important;
}


/* ==========================================================================
   Space Selection Card Improvements - ***Create Leases Page***
   ========================================================================== */

.space-select-card {
  display: block;
  cursor: pointer;
}

.space-select-card input[type="checkbox"] {
  display: none;
}

.space-card-body {
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.space-select-card:hover .space-card-body {
  border-color: var(--lt-primary, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.space-select-card input:checked + .space-card-body {
  border-color: var(--lt-primary, #1d4ed8) !important;
  background-color: rgba(29, 78, 216, 0.04) !important;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.12) !important;
}

.check-icon {
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: scale(0.8);
}

.space-select-card input:checked + .space-card-body .check-icon {
  opacity: 1;
  transform: scale(1);
}

.tracking-wider {
  letter-spacing: 0.05em;
}