/* ================================================================
   HOMEFUTURE — DESIGN SYSTEM
   site.css: Variables · Reset · Typography · Layout · Utilities
   ================================================================ */

/* ── 1. CSS CUSTOM PROPERTIES ──────────────────────────────── */
:root {
  /* Brand palette */
  --primary:        #0D6EFD;
  --primary-hover:  #0B5ED7;
  --primary-dark:   #0A58CA;
  --primary-light:  #E7F1FF;
  --primary-50:     rgba(13,110,253,.05);

  /* Status */
  --success:        #198754;
  --success-light:  #D1E7DD;
  --danger:         #DC3545;
  --danger-light:   #F8D7DA;
  --warning:        #FFC107;
  --warning-light:  #FFF3CD;
  --info:           #0DCAF0;
  --info-light:     #CFF4FC;

  /* Neutrals */
  --white:          #FFFFFF;
  --bg:             #F5F7FB;
  --bg-card:        #FFFFFF;
  --bg-input:       #F8F9FA;
  --text:           #212529;
  --text-muted:     #6C757D;
  --text-light:     #ADB5BD;
  --border:         #DEE2E6;
  --border-light:   #F1F3F5;
  --divider:        rgba(0,0,0,.06);

  /* Real estate badges */
  --vip:            #FF6B00;
  --vip-light:      #FFF0E6;
  --hot:            #DC3545;
  --urgent:         #FFC107;
  --sold:           #6C757D;
  --gold:           #F5A623;
  --new:            #198754;

  /* Shape */
  --radius:         16px;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      24px;
  --radius-pill:    100px;

  /* Elevation */
  --shadow-xs:   0 1px 4px rgba(0,0,0,.04);
  --shadow:      0 2px 12px rgba(0,0,0,.06);
  --shadow-md:   0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
  --shadow-focus:0 0 0 4px rgba(13,110,253,.15);
  --shadow-hover:0 8px 24px rgba(13,110,253,.12);

  /* Typography */
  --font:        'Be Vietnam Pro', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --size-xs:     11px;
  --size-sm:     12px;
  --size-base:   14px;
  --size-md:     15px;
  --size-lg:     16px;
  --size-xl:     18px;
  --size-2xl:    20px;
  --size-3xl:    24px;
  --size-4xl:    28px;
  --size-5xl:    36px;
  --lh:          1.6;
  --lh-tight:    1.25;
  --lh-loose:    1.8;

  /* Spacing */
  --gap-xs:   4px;
  --gap-sm:   8px;
  --gap-md:   16px;
  --gap-lg:   24px;
  --gap-xl:   32px;
  --gap-2xl:  48px;

  /* Animation */
  --ease:       cubic-bezier(.4,0,.2,1);
  --transition: all .2s var(--ease);
  --transition-slow: all .35s var(--ease);

  /* Z-index scale */
  --z-dropdown: 1000;
  --z-sticky:   1020;
  --z-fixed:    1030;
  --z-modal-bg: 1040;
  --z-modal:    1050;
  --z-toast:    1060;
  --z-spinner:  1070;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font);
  font-size: var(--size-base);
  line-height: var(--lh);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--border-light); }
::-webkit-scrollbar-thumb        { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: var(--text-light); }

/* Selection */
::selection { background: var(--primary-light); color: var(--primary-dark); }

/* Links */
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* Lists */
ul, ol { list-style: none; }

/* Images */
img { max-width: 100%; height: auto; display: block; }

/* Tables */
table { border-collapse: collapse; width: 100%; }

/* HR */
hr { border: none; border-top: 1px solid var(--border); margin: var(--gap-lg) 0; }

/* ── 3. TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--text);
}
h1 { font-size: clamp(22px, 4vw, var(--size-5xl)); }
h2 { font-size: clamp(18px, 3vw, var(--size-4xl)); }
h3 { font-size: clamp(16px, 2.5vw, var(--size-3xl)); }
h4 { font-size: var(--size-xl); }
h5 { font-size: var(--size-lg); }
h6 { font-size: var(--size-base); }

p { margin-bottom: var(--gap-md); }
p:last-child { margin-bottom: 0; }

small { font-size: var(--size-sm); }
strong { font-weight: 700; }
em { font-style: italic; }

.text-xs    { font-size: var(--size-xs) !important; }
.text-sm    { font-size: var(--size-sm) !important; }
.text-base  { font-size: var(--size-base) !important; }
.text-md    { font-size: var(--size-md) !important; }
.text-lg    { font-size: var(--size-lg) !important; }
.text-xl    { font-size: var(--size-xl) !important; }
.text-2xl   { font-size: var(--size-2xl) !important; }
.text-3xl   { font-size: var(--size-3xl) !important; }

.font-300 { font-weight: 300 !important; }
.font-400 { font-weight: 400 !important; }
.font-500 { font-weight: 500 !important; }
.font-600 { font-weight: 600 !important; }
.font-700 { font-weight: 700 !important; }
.font-800 { font-weight: 800 !important; }

.text-primary   { color: var(--primary) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger)  !important; }
.text-warning   { color: var(--warning) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-light     { color: var(--text-light) !important; }
.text-white     { color: var(--white)   !important; }
.text-vip       { color: var(--vip)     !important; }

.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-1   { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2   { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3   { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── 4. LAYOUT ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gap-md);
}
@media (min-width: 576px)  { .container { padding-inline: var(--gap-lg); } }
@media (min-width: 1200px) { .container { padding-inline: var(--gap-xl); } }

.container-sm  { max-width: 640px;  margin-inline: auto; padding-inline: var(--gap-md); }
.container-md  { max-width: 960px;  margin-inline: auto; padding-inline: var(--gap-md); }
.container-lg  { max-width: 1280px; margin-inline: auto; padding-inline: var(--gap-md); }

/* Section */
.section          { padding-block: var(--gap-2xl); }
.section-sm       { padding-block: var(--gap-lg); }
.section-lg       { padding-block: 64px; }

/* Grid */
.grid             { display: grid; }
.grid-2           { grid-template-columns: repeat(2, 1fr); gap: var(--gap-md); }
.grid-3           { grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
.grid-4           { grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
.grid-auto-fill   { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-fit    { grid-template-columns: repeat(auto-fit,  minmax(280px, 1fr)); }

/* Flex */
.flex             { display: flex; }
.flex-col         { flex-direction: column; }
.flex-wrap        { flex-wrap: wrap; }
.flex-center      { align-items: center; justify-content: center; }
.items-center     { align-items: center; }
.items-start      { align-items: flex-start; }
.items-end        { align-items: flex-end; }
.justify-between  { justify-content: space-between; }
.justify-center   { justify-content: center; }
.justify-end      { justify-content: flex-end; }
.flex-1           { flex: 1; }
.flex-shrink-0    { flex-shrink: 0; }
.gap-1            { gap: var(--gap-xs); }
.gap-2            { gap: var(--gap-sm); }
.gap-3            { gap: 12px; }
.gap-4            { gap: var(--gap-md); }
.gap-5            { gap: 20px; }
.gap-6            { gap: var(--gap-lg); }
.gap-8            { gap: var(--gap-xl); }

/* Spacing */
.m-0 { margin: 0 !important; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }
.mb-6 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-6 { margin-top: 24px !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }
.p-0  { padding: 0 !important; }
.p-2  { padding: 8px !important; }
.p-3  { padding: 12px !important; }
.p-4  { padding: 16px !important; }
.p-5  { padding: 20px !important; }
.p-6  { padding: 24px !important; }
.px-3 { padding-inline: 12px !important; }
.px-4 { padding-inline: 16px !important; }
.py-2 { padding-block: 8px !important; }
.py-3 { padding-block: 12px !important; }
.py-4 { padding-block: 16px !important; }
.py-5 { padding-block: 20px !important; }

/* Display */
.d-none    { display: none !important; }
.d-block   { display: block !important; }
.d-flex    { display: flex !important; }
.d-grid    { display: grid !important; }
.d-inline  { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }

/* Visibility */
.hidden     { visibility: hidden; }
.invisible  { opacity: 0; pointer-events: none; }
.visible    { visibility: visible; opacity: 1; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }
.inset-0  { inset: 0; }
.z-10     { z-index: 10; }
.z-20     { z-index: 20; }
.z-50     { z-index: 50; }

/* Width/Height */
.w-full   { width: 100%; }
.w-auto   { width: auto; }
.h-full   { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-full   { max-width: 100%; }
.overflow-hidden  { overflow: hidden; }
.overflow-x-auto  { overflow-x: auto; }
.overflow-y-auto  { overflow-y: auto; }

/* Background */
.bg-white   { background-color: var(--white) !important; }
.bg-light   { background-color: var(--bg) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger  { background-color: var(--danger) !important; }
.bg-warning { background-color: var(--warning) !important; }

/* Border */
.border        { border: 1px solid var(--border) !important; }
.border-top    { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.border-0      { border: none !important; }
.rounded       { border-radius: var(--radius) !important; }
.rounded-sm    { border-radius: var(--radius-sm) !important; }
.rounded-lg    { border-radius: var(--radius-lg) !important; }
.rounded-xl    { border-radius: var(--radius-xl) !important; }
.rounded-pill  { border-radius: var(--radius-pill) !important; }
.rounded-circle { border-radius: 50% !important; }

/* Shadow */
.shadow     { box-shadow: var(--shadow) !important; }
.shadow-md  { box-shadow: var(--shadow-md) !important; }
.shadow-lg  { box-shadow: var(--shadow-lg) !important; }
.shadow-none { box-shadow: none !important; }

/* ── 5. SECTION HEADER ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--gap-lg);
  gap: var(--gap-md);
}
.section-title {
  font-size: var(--size-xl);
  font-weight: 800;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}
.section-subtitle {
  font-size: var(--size-sm);
  color: var(--text-muted);
  margin-top: 4px;
}
.section-link {
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { gap: 8px; }

/* ── 6. BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  font-family: var(--font);
  font-size: var(--size-base);
  font-weight: 600;
  line-height: 1;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn:active   { transform: translateY(1px); }

.btn-sm  { padding: 6px 14px; font-size: var(--size-sm); }
.btn-lg  { padding: 12px 28px; font-size: var(--size-md); }
.btn-xl  { padding: 14px 32px; font-size: var(--size-lg); }
.btn-icon { padding: 8px; aspect-ratio: 1; border-radius: var(--radius-sm); }
.btn-icon-sm { padding: 6px; aspect-ratio: 1; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(13,110,253,.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--border-light);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-outline-secondary:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-danger:hover { background: #bb2d3b; border-color: #bb2d3b; color: var(--white); }

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover { background: #146c43; color: var(--white); }

.btn-warning {
  background: var(--warning);
  color: #212529;
  border-color: var(--warning);
}

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

.btn-pill  { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }

.btn-loading .btn-text { display: none; }
.btn-loading::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── 7. FORMS ──────────────────────────────────────────────── */
.form-group   { margin-bottom: var(--gap-md); }
.form-label {
  display: block;
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: var(--size-base);
  color: var(--text);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  line-height: var(--lh);
}
.form-control:focus,
.form-select:focus {
  background: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}
.form-control::placeholder { color: var(--text-light); }
.form-control:disabled,
.form-select:disabled {
  background: var(--border-light);
  cursor: not-allowed;
  opacity: .7;
}
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger);
}
.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236C757D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-text    { font-size: var(--size-sm); color: var(--text-muted); margin-top: 5px; }
.form-error   { font-size: var(--size-sm); color: var(--danger); margin-top: 5px; display: none; }
.form-error.show { display: block; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.form-check-input {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.form-check-label { font-size: var(--size-base); cursor: pointer; }

/* Input with icon */
.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .form-control { border-radius: 0; }
.input-group .form-control:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .form-control:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group-text {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: var(--size-base);
  display: flex;
  align-items: center;
}
.input-group-text:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.input-group-text:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: none; }
.input-group-text + .form-control { border-left: none; }
.input-group .form-control + .input-group-text { border-left: none; }

/* Password toggle */
.input-password-wrapper { position: relative; }
.input-password-wrapper .form-control { padding-right: 44px; }
.input-password-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 4px;
  transition: var(--transition);
  line-height: 1;
}
.input-password-toggle:hover { color: var(--text); }

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

/* Floating label */
.form-floating {
  position: relative;
}
.form-floating .form-control,
.form-floating .form-select {
  height: 56px;
  padding: 20px 14px 8px;
}
.form-floating label {
  position: absolute;
  top: 0; left: 14px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: var(--size-base);
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
  transform-origin: left top;
}
.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
  transform: scale(.8) translateY(-10px);
  color: var(--primary);
}

/* Range input */
.form-range { -webkit-appearance: none; width: 100%; height: 6px; background: var(--border); border-radius: 3px; outline: none; }
.form-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--primary); border-radius: 50%; cursor: pointer; border: 2px solid var(--white); box-shadow: var(--shadow-xs); }

/* ── 8. ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--size-sm);
  border-left: 3px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-primary { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }
.alert-success { background: var(--success-light); color: var(--success);      border-color: var(--success); }
.alert-danger  { background: var(--danger-light);  color: var(--danger);       border-color: var(--danger); }
.alert-warning { background: var(--warning-light); color: #856404;             border-color: var(--warning); }

/* ── 9. BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: var(--size-xs);
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger);  }
.badge-warning { background: var(--warning-light); color: #856404; }
.badge-vip     { background: #FFF0E6; color: var(--vip); }
.badge-hot     { background: var(--danger-light); color: var(--danger); }
.badge-urgent  { background: var(--warning-light); color: #856404; }
.badge-new     { background: var(--success-light); color: var(--success); }
.badge-solid-primary { background: var(--primary); color: var(--white); }
.badge-solid-danger  { background: var(--danger);  color: var(--white); }
.badge-solid-vip     { background: var(--vip);     color: var(--white); }
.badge-pill    { border-radius: var(--radius-pill); }

/* ── 10. CARDS ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body    { padding: var(--gap-lg); }
.card-header  { padding: var(--gap-md) var(--gap-lg); border-bottom: 1px solid var(--border); font-weight: 700; }
.card-footer  { padding: var(--gap-md) var(--gap-lg); border-top: 1px solid var(--border); }

/* ── 11. STATS CARDS ───────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon-primary { background: var(--primary-light); color: var(--primary); }
.stat-icon-success { background: var(--success-light); color: var(--success); }
.stat-icon-warning { background: var(--warning-light); color: #856404; }
.stat-icon-danger  { background: var(--danger-light);  color: var(--danger); }
.stat-value   { font-size: 26px; font-weight: 800; line-height: 1; color: var(--text); }
.stat-label   { font-size: var(--size-sm); color: var(--text-muted); margin-top: 2px; }
.stat-trend   { font-size: var(--size-xs); font-weight: 600; margin-top: 4px; }
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger);  }

/* ── 12. TABLE ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table-custom { width: 100%; border-collapse: collapse; }
.table-custom thead tr { background: var(--bg); }
.table-custom th {
  padding: 10px 16px;
  font-size: var(--size-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-custom td {
  padding: 12px 16px;
  font-size: var(--size-base);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table-custom tbody tr:last-child td { border-bottom: none; }
.table-custom tbody tr:hover td { background: var(--bg); }

/* ── 13. EMPTY STATE ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 56px;
  opacity: .25;
  margin-bottom: 12px;
  display: block;
  color: var(--text-muted);
}
.empty-state-title { font-size: var(--size-lg); font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state-text  { font-size: var(--size-sm); margin-bottom: 16px; }

/* ── 14. SKELETON LOADER ───────────────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text  { height: 14px; border-radius: 4px; margin-bottom: 8px; }
.skeleton-title { height: 20px; border-radius: 4px; }
.skeleton-image { aspect-ratio: 16/9; border-radius: var(--radius); }
.skeleton-circle{ border-radius: 50%; aspect-ratio: 1; }
.skeleton-card  { background: var(--white); border-radius: var(--radius); padding: var(--gap-md); border: 1px solid var(--border); }

/* ── 15. ANIMATIONS ────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.animate-fade-in    { animation: fadeIn .3s var(--ease); }
.animate-fade-in-up { animation: fadeInUp .4s var(--ease); }
.animate-scale-in   { animation: scaleIn .2s var(--ease); }
.animate-pulse      { animation: pulse 2s infinite; }

/* ── 16. MISC ──────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: .5; }
.opacity-100 { opacity: 1; }
.object-cover { object-fit: cover; }
.aspect-video { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1; }
.aspect-card { aspect-ratio: 4/3; }
