/* ============================================================
   ROOMsy - Global CSS
   ============================================================ */

/* --- Variables --- */
:root {

  /* Brand Colors */
  --primary:       #e8173a;
  --primary-dark:  #c0122f;
  --primary-light: #fde8ec;
  --primary-mid:   #f04060;

  /* Gradient */
  --gradient-primary: linear-gradient(135deg, #e8173a 0%, #f04060 100%);
  --gradient-dark:    linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --gradient-hero:    linear-gradient(135deg, #1a1a2e 0%, #e8173a 100%);

  /* Secondary & Accent */
  --secondary:      #1a1a2e;
  --secondary-light:#16213e;
  --accent:         #f5a623;
  --accent-light:   #fff4e0;

  /* Neutrals */
  --white:     #ffffff;
  --black:     #000000;
  --gray-50:   #f9fafb;
  --gray-100:  #f8f9fa;
  --gray-200:  #e9ecef;
  --gray-300:  #dee2e6;
  --gray-400:  #ced4da;
  --gray-500:  #adb5bd;
  --gray-600:  #6c757d;
  --gray-700:  #495057;
  --gray-800:  #343a40;
  --gray-900:  #212529;

  /* Surface / Background */
  --surface:        #f9fafb;
  --surface-card:   #ffffff;
  --surface-input:  #f8f9fa;
  --overlay:        rgba(0, 0, 0, 0.5);
  --overlay-light:  rgba(0, 0, 0, 0.25);

  /* Semantic Colors */
  --success:       #22c55e;
  --success-light: #dcfce7;
  --warning:       #f59e0b;
  --warning-light: #fef3c7;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;
  --info:          #3b82f6;
  --info-light:    #dbeafe;

  /* Typography */
  --font-main:    'Poppins', sans-serif;
  --font-size-xs:   0.70rem;   /* 11.2px */
  --font-size-sm:   0.875rem;  /* 14px   */
  --font-size-base: 1rem;      /* 16px   */
  --font-size-lg:   1.125rem;  /* 18px   */
  --font-size-xl:   1.25rem;   /* 20px   */
  --font-size-2xl:  1.5rem;    /* 24px   */
  --font-size-3xl:  1.875rem;  /* 30px   */
  --font-size-4xl:  2.25rem;   /* 36px   */
  --font-size-5xl:  3rem;      /* 48px   */

  --line-height-tight:  1.2;
  --line-height-snug:   1.375;
  --line-height-normal: 1.6;
  --line-height-loose:  1.8;

  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0em;
  --letter-spacing-wide:   0.04em;
  --letter-spacing-wider:  0.08em;

  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;
  --font-weight-extrabold:800;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:  0 16px 40px rgba(0,0,0,0.15);
  --shadow-primary: 0 8px 24px rgba(232,23,58,0.30);

  /* Transitions */
  --transition:      all 0.25s ease;
  --transition-slow: all 0.4s ease;
  --transition-fast: all 0.15s ease;

  /* Layout */
  --nav-height:     70px;
  --sidebar-width:  260px;
  --content-max:    1200px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }

/* --- Typography --- */
h1 { font-size: var(--font-size-4xl);  font-weight: var(--font-weight-bold);     line-height: var(--line-height-tight);  letter-spacing: var(--letter-spacing-tight); }
h2 { font-size: var(--font-size-3xl);  font-weight: var(--font-weight-bold);     line-height: var(--line-height-snug); }
h3 { font-size: var(--font-size-2xl);  font-weight: var(--font-weight-semibold); line-height: var(--line-height-snug); }
h4 { font-size: var(--font-size-xl);   font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--font-size-lg);   font-weight: var(--font-weight-semibold); }
h6 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }
p  { font-size: var(--font-size-base); color: var(--gray-600); line-height: var(--line-height-normal); }

.text-xs   { font-size: var(--font-size-xs); }
.text-sm   { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg   { font-size: var(--font-size-lg); }
.text-xl   { font-size: var(--font-size-xl); }
.text-2xl  { font-size: var(--font-size-2xl); }
.text-3xl  { font-size: var(--font-size-3xl); }
.text-4xl  { font-size: var(--font-size-4xl); }
.text-5xl  { font-size: var(--font-size-5xl); }

.fw-normal   { font-weight: var(--font-weight-normal); }
.fw-medium   { font-weight: var(--font-weight-medium); }
.fw-semibold { font-weight: var(--font-weight-semibold); }
.fw-bold     { font-weight: var(--font-weight-bold); }
.fw-extrabold{ font-weight: var(--font-weight-extrabold); }

.lh-tight  { line-height: var(--line-height-tight); }
.lh-normal { line-height: var(--line-height-normal); }
.lh-loose  { line-height: var(--line-height-loose); }

.tracking-tight  { letter-spacing: var(--letter-spacing-tight); }
.tracking-wide   { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider  { letter-spacing: var(--letter-spacing-wider); }

.text-uppercase { text-transform: uppercase; }
.text-capitalize{ text-transform: capitalize; }

/* --- Layout --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 60px 0; }
.row        { display: flex; flex-wrap: wrap; gap: 20px; }
.col        { flex: 1; min-width: 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary   { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { opacity: 0.9; }
.btn-outline   { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-ghost     { background: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,0.8); color: var(--white); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.btn-sm  { padding: 7px 16px; font-size: var(--font-size-xs); }
.btn-lg  { padding: 14px 32px; font-size: var(--font-size-base); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- Form Elements --- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-label { font-size: var(--font-size-sm); font-weight: 600; color: var(--gray-700); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control.error { border-color: var(--danger); }
.form-error { font-size: var(--font-size-xs); color: var(--danger); }
.form-hint  { font-size: var(--font-size-xs); color: var(--gray-500); }

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-body  { padding: 20px; }
.card-title { font-size: var(--font-size-lg); font-weight: 600; margin-bottom: 8px; }
.card-text  { font-size: var(--font-size-sm); color: var(--gray-600); }

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}
.badge-success  { background: #d4edda; color: #155724; }
.badge-warning  { background: #fff3cd; color: #856404; }
.badge-danger   { background: #f8d7da; color: #721c24; }
.badge-info     { background: #d1ecf1; color: #0c5460; }
.badge-primary  { background: var(--primary-light); color: var(--primary); }

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--white);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}
.toast--show    { opacity: 1; transform: translateY(0); }
.toast--success { background: var(--success); }
.toast--error   { background: var(--danger); }
.toast--warning { background: var(--warning); color: var(--gray-900); }
.toast--info    { background: var(--info); }

/* --- Loader / Skeleton --- */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* --- Divider --- */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 20px 0; }

/* --- Utility --- */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-bold      { font-weight: 700; }
.fw-semibold  { font-weight: 600; }
.mt-1 { margin-top: 8px; }   .mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; }  .mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; }  .mb-3 { margin-bottom: 24px; }
.mt-4 { margin-top: 32px; }  .mb-4 { margin-bottom: 32px; }
.p-1  { padding: 8px; }      .p-2  { padding: 16px; }
.p-3  { padding: 24px; }     .p-4  { padding: 32px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: 8px; }  .gap-2 { gap: 16px; }  .gap-3 { gap: 24px; }
.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ============================================================
   UI COMPONENT LIBRARY
   ============================================================ */

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.navbar__logo img { height: 40px; width: auto; object-fit: contain; }
.navbar__logo-text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--secondary);
  letter-spacing: var(--letter-spacing-tight);
}
.navbar__logo-text span { color: var(--primary); }
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.navbar__link {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--gray-700);
  transition: var(--transition);
}
.navbar__link:hover { background: var(--gray-100); color: var(--primary); }
.navbar__link.active { color: var(--primary); font-weight: var(--font-weight-semibold); }
.navbar__actions { display: flex; align-items: center; gap: 10px; }
.navbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--gray-200);
}
.navbar__user:hover { border-color: var(--primary); background: var(--primary-light); }
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.navbar--dark { background: var(--secondary); box-shadow: none; }
.navbar--dark .navbar__link { color: rgba(255,255,255,0.8); }
.navbar--dark .navbar__link:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.navbar--dark .navbar__logo-text { color: var(--white); }
.navbar--transparent {
  background: transparent;
  box-shadow: none;
  position: absolute;
}
.navbar--transparent .navbar__link { color: rgba(255,255,255,0.9); }
.navbar--transparent .navbar__link:hover { background: rgba(255,255,255,0.15); color: var(--white); }
.navbar--transparent .navbar__logo-text { color: var(--white); }

/* Mobile Nav Drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--gray-200);
}
.nav-drawer.open { display: flex; }
.nav-drawer .navbar__link { padding: 12px 16px; border-radius: var(--radius-md); }

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--secondary);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  transition: var(--transition);
}
.sidebar__logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
  cursor: pointer;
}
.sidebar__link:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.sidebar__link.active { background: var(--primary); color: var(--white); box-shadow: var(--shadow-primary); }
.sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar__label { font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: var(--letter-spacing-wider); padding: 12px 14px 4px; }
.sidebar__footer { padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,0.1); margin-top: auto; }
.sidebar-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  background: var(--surface);
  min-height: 100vh;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.modal__title { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
.modal__close {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100);
  cursor: pointer;
  transition: var(--transition);
}
.modal__close:hover { background: var(--danger-light); color: var(--danger); }
.modal__body  { padding: 20px 24px; }
.modal__footer { padding: 16px 24px 20px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; justify-content: flex-end; }
.modal--sm .modal { max-width: 380px; }
.modal--lg .modal { max-width: 720px; }

/* --- Table --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: var(--font-size-sm);
}
.table thead { background: var(--gray-50); }
.table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--gray-700);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-50); }
.table--striped tbody tr:nth-child(even) { background: var(--gray-50); }
.table-actions { display: flex; gap: 6px; align-items: center; }

/* --- Star Rating --- */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.star {
  width: 16px;
  height: 16px;
  color: var(--gray-300);
  fill: currentColor;
  transition: var(--transition-fast);
}
.star.filled  { color: var(--accent); }
.star.half    { color: var(--accent); opacity: 0.6; }
.stars--lg .star { width: 22px; height: 22px; }
.stars--sm .star { width: 13px; height: 13px; }
.rating-input .star { cursor: pointer; }
.rating-input .star:hover,
.rating-input .star.hovered { color: var(--accent); transform: scale(1.15); }
.rating-count { font-size: var(--font-size-xs); color: var(--gray-500); margin-left: 4px; }

/* --- Property Card --- */
.property-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.property-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.property-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--gray-200);
}
.property-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
}
.property-card__wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-400);
}
.property-card__wishlist:hover,
.property-card__wishlist.active { color: var(--primary); }
.property-card__body { padding: 14px 16px 16px; }
.property-card__type { font-size: var(--font-size-xs); color: var(--primary); font-weight: var(--font-weight-semibold); text-transform: uppercase; letter-spacing: var(--letter-spacing-wide); margin-bottom: 4px; }
.property-card__name { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); color: var(--gray-900); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.property-card__location { font-size: var(--font-size-xs); color: var(--gray-500); display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.property-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gray-100); }
.property-card__price { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--gray-900); }
.property-card__price span { font-size: var(--font-size-xs); font-weight: var(--font-weight-normal); color: var(--gray-500); }
.property-card__rating { display: flex; align-items: center; gap: 4px; font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--gray-700); }

/* Skeleton Card */
.property-card--skeleton .property-card__img { background: none; }
.skeleton-img  { height: 200px; }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line--sm  { width: 60%; }
.skeleton-line--md  { width: 80%; }
.skeleton-line--full{ width: 100%; }

/* --- Avatar --- */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-semibold);
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar--xs  { width: 28px;  height: 28px;  font-size: var(--font-size-xs); }
.avatar--sm  { width: 36px;  height: 36px;  font-size: var(--font-size-sm); }
.avatar--md  { width: 48px;  height: 48px;  font-size: var(--font-size-base); }
.avatar--lg  { width: 64px;  height: 64px;  font-size: var(--font-size-xl); }
.avatar--xl  { width: 96px;  height: 96px;  font-size: var(--font-size-3xl); }
.avatar--2xl { width: 120px; height: 120px; font-size: var(--font-size-4xl); }

/* --- Page Header --- */
.page-header {
  background: var(--gradient-dark);
  padding: 48px 0 40px;
  color: var(--white);
}
.page-header__title { color: var(--white); margin-bottom: 8px; }
.page-header__subtitle { color: rgba(255,255,255,0.7); font-size: var(--font-size-base); }
.page-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.page-header__breadcrumb a { color: rgba(255,255,255,0.8); }
.page-header__breadcrumb a:hover { color: var(--white); }
.page-header__breadcrumb span { color: rgba(255,255,255,0.4); }

/* --- Section Title --- */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title__tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}
.section-title h2 { margin-bottom: 12px; }
.section-title p  { max-width: 520px; margin: 0 auto; color: var(--gray-500); }

/* --- Stat Card (Dashboard) --- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card__icon--primary { background: var(--primary-light); color: var(--primary); }
.stat-card__icon--success  { background: var(--success-light); color: var(--success); }
.stat-card__icon--warning  { background: var(--warning-light); color: var(--warning); }
.stat-card__icon--info     { background: var(--info-light);    color: var(--info); }
.stat-card__value { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); color: var(--gray-900); line-height: 1; margin-bottom: 4px; }
.stat-card__label { font-size: var(--font-size-sm); color: var(--gray-500); }
.stat-card__change { font-size: var(--font-size-xs); font-weight: var(--font-weight-medium); margin-top: 4px; }
.stat-card__change--up   { color: var(--success); }
.stat-card__change--down { color: var(--danger); }

/* --- Tabs --- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab {
  padding: 10px 18px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}
.tab:hover  { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: var(--font-weight-semibold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Dropdown --- */
.dropdown { position: relative; display: inline-block; }
.dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 180px;
  padding: 8px;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}
.dropdown.open .dropdown__menu,
.dropdown__menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition-fast);
}
.dropdown__item:hover { background: var(--gray-100); color: var(--gray-900); }
.dropdown__item--danger:hover { background: var(--danger-light); color: var(--danger); }
.dropdown__divider { border: none; border-top: 1px solid var(--gray-200); margin: 6px 0; }

/* --- Alert Banner --- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  margin-bottom: 16px;
}
.alert--success { background: var(--success-light); color: #166534; border-left: 4px solid var(--success); }
.alert--warning { background: var(--warning-light); color: #92400e; border-left: 4px solid var(--warning); }
.alert--danger  { background: var(--danger-light);  color: #991b1b; border-left: 4px solid var(--danger); }
.alert--info    { background: var(--info-light);    color: #1e40af; border-left: 4px solid var(--info); }

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-state__icon { font-size: 56px; margin-bottom: 16px; opacity: 0.4; }
.empty-state__title { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); color: var(--gray-700); margin-bottom: 8px; }
.empty-state__text  { font-size: var(--font-size-sm); color: var(--gray-500); max-width: 320px; margin-bottom: 20px; }

/* --- Footer --- */
.footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 24px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand p { font-size: var(--font-size-sm); color: rgba(255,255,255,0.55); margin-top: 12px; max-width: 280px; line-height: var(--line-height-loose); }
.footer__heading { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--white); text-transform: uppercase; letter-spacing: var(--letter-spacing-wider); margin-bottom: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__link { font-size: var(--font-size-sm); color: rgba(255,255,255,0.55); transition: var(--transition); }
.footer__link:hover { color: var(--white); padding-left: 4px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.4);
}
.footer__social { display: flex; gap: 10px; }
.footer__social-link {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}
.footer__social-link:hover { background: var(--primary); color: var(--white); }

/* --- Notification Bell --- */
.notif-bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-600);
  transition: var(--transition);
  flex-shrink: 0;
}
.notif-bell:hover { background: var(--gray-100); color: var(--primary); }
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
  line-height: 1;
}

/* --- Notification Panel --- */
.notif-panel {
  position: fixed;
  width: 340px;
  max-height: 480px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifIn 0.18s ease;
}
@keyframes notifIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.notif-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.notif-panel__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
}
.notif-mark-all {
  font-size: var(--font-size-xs);
  color: var(--primary);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-panel__body {
  overflow-y: auto;
  flex: 1;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid var(--gray-50);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--gray-50); }
.notif-item--unread { background: var(--primary-light); }
.notif-item--unread:hover { background: #fad5db; }
.notif-item__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-item__content { flex: 1; min-width: 0; }
.notif-item__msg {
  font-size: var(--font-size-xs);
  color: var(--gray-800);
  line-height: 1.5;
  margin: 0 0 3px;
  font-weight: 500;
}
.notif-item--unread .notif-item__msg { font-weight: 600; }
.notif-item__time {
  font-size: 10px;
  color: var(--gray-400);
}
.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 8px;
  color: var(--gray-400);
  font-size: var(--font-size-sm);
}
.notif-empty p { margin: 0; }
@media (max-width: 480px) {
  .notif-panel { width: calc(100vw - 24px); right: 12px !important; }
}

/* --- Page fade-in --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-fade { animation: fadeIn 0.3s ease both; }

/* --- Focus visible (keyboard accessibility) --- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Responsive Components --- */
@media (max-width: 992px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-content { margin-left: 0; }
}
@media (max-width: 768px) {
  .navbar__nav { display: none; }
  .navbar__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .tabs { overflow-x: auto; padding-bottom: 2px; }
  .stat-card { padding: 16px; }
  .modal { border-radius: var(--radius-lg); }
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  :root { --content-max: 960px; }
}
@media (max-width: 992px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  .section { padding: 40px 0; }
}
@media (max-width: 768px) {
  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }
  .container { padding: 0 16px; }
  .section { padding: 30px 0; }
  .row { flex-direction: column; }
}
@media (max-width: 480px) {
  h1 { font-size: var(--font-size-xl); }
  h2 { font-size: var(--font-size-lg); }
  .btn-lg { padding: 12px 24px; }
  .text-5xl { font-size: var(--font-size-3xl); }
  .text-4xl { font-size: var(--font-size-2xl); }
}
