/* ============================================
   Chirie.MD — Design System v3.0
   "Nordic Clarity" — Modern, Premium, Consistent
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Primary */
  --c-primary: #6366F1;
  --c-primary-hover: #4F46E5;
  --c-primary-light: #EEF2FF;
  --c-primary-subtle: #E0E7FF;

  /* Neutrals */
  --c-bg: #F8FAFC;
  --c-surface: #FFFFFF;
  --c-surface-raised: #FFFFFF;
  --c-border: #E2E8F0;
  --c-border-hover: #CBD5E1;

  /* Text */
  --c-text: #0F172A;
  --c-text-secondary: #334155;
  --c-text-muted: #64748B;
  --c-text-faint: #94A3B8;

  /* Semantic */
  --c-success: #10B981;
  --c-success-bg: #ECFDF5;
  --c-success-border: #A7F3D0;
  --c-warning: #F59E0B;
  --c-warning-bg: #FFFBEB;
  --c-warning-border: #FDE68A;
  --c-error: #EF4444;
  --c-error-bg: #FEF2F2;
  --c-error-border: #FECACA;
  --c-info: #3B82F6;
  --c-info-bg: #EFF6FF;
  --c-info-border: #BFDBFE;

  /* Dark surfaces */
  --c-dark: #0F172A;
  --c-dark-lighter: #1E293B;
  --c-dark-text: #F1F5F9;
  --c-dark-muted: #94A3B8;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 150ms;
  --transition: var(--duration) var(--ease);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--c-text-secondary);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary-hover); }
img { max-width: 100%; height: auto; display: block; }
main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--c-text);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ============================================
   LAYOUT
   ============================================ */

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

.c-container--sm { max-width: 640px; }
.c-container--md { max-width: 800px; }
.c-container--lg { max-width: 1024px; }
.c-container--xl { max-width: 1400px; }

.c-section {
  padding: 3rem 0;
}

.c-section--sm { padding: 1.5rem 0; }
.c-section--lg { padding: 5rem 0; }
.c-section--dark { background: var(--c-dark); color: var(--c-dark-text); }

.c-grid {
  display: grid;
  gap: 1.5rem;
}

.c-grid--2 { grid-template-columns: repeat(2, 1fr); }
.c-grid--3 { grid-template-columns: repeat(3, 1fr); }
.c-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .c-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .c-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .c-grid--4, .c-grid--3, .c-grid--2 { grid-template-columns: 1fr; }
  .c-container { padding: 0 1rem; }
  .c-section { padding: 2rem 0; }
}

.c-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-stack--sm { gap: 0.5rem; }
.c-stack--lg { gap: 1.5rem; }

.c-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.c-row--between { justify-content: space-between; }
.c-row--center { justify-content: center; }
.c-row--wrap { flex-wrap: wrap; }
.c-row--start { align-items: flex-start; }

/* ============================================
   NAVIGATION
   ============================================ */

.c-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--c-border);
  height: 64px;
}

.c-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.c-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.c-nav__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--c-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
}

.c-nav__logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

.c-nav__logo-accent { color: var(--c-primary); }

.c-nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.c-nav__link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.c-nav__link:hover {
  color: var(--c-text);
  background: var(--c-bg);
}

.c-nav__link--active {
  color: var(--c-primary);
  background: var(--c-primary-light);
}

.c-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.c-nav__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--c-text-muted);
  transition: all var(--transition);
  border: none;
  background: none;
  cursor: pointer;
}

.c-nav__icon-btn:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.c-nav__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--c-error);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.c-nav__badge--visible { display: flex; }

.c-nav__mobile-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--c-text);
  cursor: pointer;
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .c-nav__links { display: none; }
  .c-nav__mobile-btn { display: flex; }
}

/* Dropdown */
.c-dropdown { position: relative; }

.c-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}

.c-dropdown__trigger:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-xs);
}

.c-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.375rem;
  z-index: 2000;
  animation: c-dropdown-in 0.15s var(--ease);
}

.c-dropdown__menu--open { display: block; }

@keyframes c-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.c-dropdown__header {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 0.25rem;
}

.c-dropdown__header-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
}

.c-dropdown__header-email {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

.c-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--c-text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.c-dropdown__item:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.c-dropdown__item--danger { color: var(--c-error); }
.c-dropdown__item--danger:hover { background: var(--c-error-bg); }

.c-dropdown__divider {
  height: 1px;
  background: var(--c-border);
  margin: 0.25rem 0;
}

.c-dropdown__item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

/* ============================================
   CARDS
   ============================================ */

.c-card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  overflow: hidden;
}

.c-card--elevated {
  border-color: transparent;
  box-shadow: var(--shadow);
}

.c-card--bordered { /* default behavior */ }

.c-card--interactive {
  transition: all var(--transition);
  cursor: pointer;
}

.c-card--interactive:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.c-card__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.c-card__header-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
}

.c-card__body {
  padding: 1.5rem;
}

.c-card__body--compact { padding: 1rem 1.5rem; }
.c-card__body--flush { padding: 0; }

.c-card__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
}

/* ============================================
   BUTTONS
   ============================================ */

.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5625rem 1.125rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.c-btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

.c-btn--primary {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}

.c-btn--primary:hover {
  background: var(--c-primary-hover);
  border-color: var(--c-primary-hover);
  color: white;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.c-btn--secondary {
  background: var(--c-primary-light);
  color: var(--c-primary);
  border-color: transparent;
}

.c-btn--secondary:hover {
  background: var(--c-primary-subtle);
}

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

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

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

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

.c-btn--danger {
  background: var(--c-error);
  color: white;
  border-color: var(--c-error);
}

.c-btn--danger:hover {
  background: #DC2626;
  box-shadow: 0 4px 12px rgba(239,68,68,0.35);
}

.c-btn--dark {
  background: var(--c-dark);
  color: white;
  border-color: var(--c-dark);
}

.c-btn--dark:hover {
  background: var(--c-dark-lighter);
}

.c-btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.c-btn--xs { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.c-btn--lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.c-btn--block { width: 100%; }
.c-btn--icon { padding: 0.5rem; }

.c-btn[disabled], .c-btn--disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================
   FORMS
   ============================================ */

.c-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.c-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: 0.01em;
}

.c-input, .c-select, .c-textarea {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  line-height: 1.5;
}

.c-input:hover, .c-select:hover, .c-textarea:hover {
  border-color: var(--c-border-hover);
}

.c-input:focus, .c-select:focus, .c-textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.c-input::placeholder, .c-textarea::placeholder {
  color: var(--c-text-faint);
}

.c-input--error { border-color: var(--c-error); }
.c-input--error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

.c-textarea { min-height: 100px; resize: vertical; }

.c-field__hint {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

.c-field__error {
  font-size: 0.75rem;
  color: var(--c-error);
}

.c-checkbox, .c-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--c-text-secondary);
  cursor: pointer;
}

.c-checkbox input, .c-radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--c-primary);
}

/* ============================================
   BADGES
   ============================================ */

.c-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.4;
}

.c-badge--neutral {
  background: var(--c-bg);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
}

.c-badge--success {
  background: var(--c-success-bg);
  color: #047857;
}

.c-badge--warning {
  background: var(--c-warning-bg);
  color: #B45309;
}

.c-badge--error {
  background: var(--c-error-bg);
  color: #B91C1C;
}

.c-badge--info {
  background: var(--c-info-bg);
  color: #1D4ED8;
}

.c-badge--primary {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

.c-badge--lg {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* ============================================
   ALERTS
   ============================================ */

.c-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border: 1px solid;
}

.c-alert--success { background: var(--c-success-bg); border-color: var(--c-success-border); color: #065F46; }
.c-alert--warning { background: var(--c-warning-bg); border-color: var(--c-warning-border); color: #92400E; }
.c-alert--error { background: var(--c-error-bg); border-color: var(--c-error-border); color: #991B1B; }
.c-alert--info { background: var(--c-info-bg); border-color: var(--c-info-border); color: #1E40AF; }

/* ============================================
   STAT CARDS
   ============================================ */

.c-stat {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}

.c-stat__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.c-stat--indigo .c-stat__icon { background: var(--c-primary-light); color: var(--c-primary); }
.c-stat--emerald .c-stat__icon { background: var(--c-success-bg); color: var(--c-success); }
.c-stat--amber .c-stat__icon { background: var(--c-warning-bg); color: var(--c-warning); }
.c-stat--rose .c-stat__icon { background: var(--c-error-bg); color: var(--c-error); }

.c-stat__content { min-width: 0; }

.c-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.c-stat__label {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-top: 0.125rem;
}

/* ============================================
   TABLES
   ============================================ */

.c-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}

.c-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.c-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}

.c-table td {
  padding: 0.75rem 1rem;
  color: var(--c-text-secondary);
  border-bottom: 1px solid var(--c-border);
}

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

.c-table tr:hover td {
  background: var(--c-bg);
}

.c-table__cell--bold {
  font-weight: 600;
  color: var(--c-text);
}

/* ============================================
   PAGE HEADERS
   ============================================ */

.c-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.c-page-header__breadcrumb {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-bottom: 0.25rem;
}

.c-page-header__breadcrumb a {
  color: var(--c-text-muted);
  text-decoration: none;
}

.c-page-header__breadcrumb a:hover {
  color: var(--c-primary);
}

.c-page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

.c-page-header__subtitle {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-top: 0.25rem;
}

.c-page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   EMPTY STATES
   ============================================ */

.c-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-lg);
}

.c-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.c-empty__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.375rem;
}

.c-empty__text {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  max-width: 360px;
  margin: 0 auto 1.25rem auto;
}

/* ============================================
   FOOTER
   ============================================ */

.c-footer {
  background: var(--c-dark);
  color: var(--c-dark-muted);
  margin-top: auto;
}

.c-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.c-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .c-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .c-footer__grid { grid-template-columns: 1fr; }
}

.c-footer__heading {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-dark-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.c-footer__text {
  font-size: 0.8125rem;
  color: var(--c-dark-muted);
  line-height: 1.6;
}

.c-footer__link {
  display: block;
  font-size: 0.8125rem;
  color: var(--c-dark-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.c-footer__link:hover { color: white; }

.c-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
}

.c-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--c-dark-muted);
}

.c-footer__logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.c-footer__logo-accent { color: var(--c-primary); }

.c-footer__badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.c-footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  color: var(--c-dark-muted);
}

/* ============================================
   AUTH PAGES
   ============================================ */

.c-auth {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--c-bg);
}

.c-auth__card {
  width: 100%;
  max-width: 420px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

@media (max-width: 480px) {
  .c-auth__card { padding: 1.5rem; }
}

.c-auth__header {
  text-align: center;
  margin-bottom: 2rem;
}

.c-auth__icon {
  width: 48px;
  height: 48px;
  background: var(--c-primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.c-auth__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.375rem;
}

.c-auth__subtitle {
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

.c-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-auth__footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

.c-auth__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  font-size: 0.75rem;
  color: var(--c-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.c-auth__divider::before, .c-auth__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.c-auth__social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.c-auth__social-btn:hover {
  background: var(--c-bg);
  border-color: var(--c-border-hover);
}

.c-auth__role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.c-auth__role-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-align: center;
  background: var(--c-surface);
}

.c-auth__role-option:hover { border-color: var(--c-border-hover); }

.c-auth__role-option input { display: none; }

.c-auth__role-option--selected, .c-auth__role-option:has(input:checked) {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
  color: var(--c-primary);
}

/* ============================================
   HERO
   ============================================ */

.c-hero {
  background: linear-gradient(135deg, var(--c-dark) 0%, #1E293B 50%, #312E81 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.c-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(99,102,241,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.c-hero__inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.c-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.5rem;
}

.c-hero__title {
  font-size: 2.75rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .c-hero__title { font-size: 1.875rem; }
  .c-hero { padding: 3rem 0; }
}

.c-hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.c-hero__search {
  display: flex;
  align-items: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

@media (max-width: 640px) {
  .c-hero__search {
    flex-direction: column;
    border-radius: var(--radius-lg);
  }
}

.c-hero__search-input, .c-hero__search-select {
  flex: 1;
  padding: 0.875rem 1rem;
  border: none;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--c-text);
  background: transparent;
  outline: none;
}

.c-hero__search-select {
  flex: 0 0 auto;
  max-width: 160px;
  border-left: 1px solid var(--c-border);
  color: var(--c-text-muted);
}

@media (max-width: 640px) {
  .c-hero__search-select {
    border-left: none;
    border-top: 1px solid var(--c-border);
    max-width: 100%;
  }
}

.c-hero__search-btn {
  padding: 0.875rem 1.5rem;
  background: var(--c-primary);
  color: white;
  border: none;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
}

.c-hero__search-btn:hover { background: var(--c-primary-hover); }

.c-hero__stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

@media (max-width: 640px) {
  .c-hero__stats { gap: 1.5rem; flex-wrap: wrap; }
}

.c-hero__stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  display: block;
}

.c-hero__stat-label {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

/* ============================================
   PROPERTY CARDS
   ============================================ */

.c-prop-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.c-prop-card:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.c-prop-card__img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--c-bg);
}

.c-prop-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}

.c-prop-card:hover .c-prop-card__img img {
  transform: scale(1.04);
}

.c-prop-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.c-prop-card__favorite {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}

.c-prop-card__favorite:hover {
  background: white;
  transform: scale(1.1);
}

.c-prop-card__body {
  padding: 1rem 1.25rem 1.25rem;
}

.c-prop-card__price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.25rem;
}

.c-prop-card__price-period {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--c-text-muted);
}

.c-prop-card__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-text-secondary);
  margin-bottom: 0.375rem;
  text-decoration: none;
  display: block;
}

.c-prop-card__title:hover { color: var(--c-primary); }

.c-prop-card__location {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.c-prop-card__meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}

.c-prop-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================
   TABS
   ============================================ */

.c-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}

.c-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}

.c-tab:hover { color: var(--c-text); }

.c-tab--active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

.c-tab-content { margin-top: 1.5rem; }
.c-tab-panel { display: none; }
.c-tab-panel--active { display: block; }

/* ============================================
   AVATAR
   ============================================ */

.c-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary-light);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.c-avatar--sm { width: 28px; height: 28px; font-size: 0.6875rem; }
.c-avatar--lg { width: 56px; height: 56px; font-size: 1.25rem; }
.c-avatar--xl { width: 80px; height: 80px; font-size: 1.75rem; }

.c-avatar--dark {
  background: var(--c-dark);
  color: white;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.c-progress {
  height: 6px;
  background: var(--c-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.c-progress__bar {
  height: 100%;
  background: var(--c-primary);
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease);
}

.c-progress__bar--success { background: var(--c-success); }
.c-progress__bar--warning { background: var(--c-warning); }

/* ============================================
   TIMELINE
   ============================================ */

.c-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.c-timeline__item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}

.c-timeline__item:last-child { padding-bottom: 0; }

.c-timeline__dot {
  width: 10px;
  height: 10px;
  background: var(--c-border);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.375rem;
  position: relative;
}

.c-timeline__dot--active {
  background: var(--c-primary);
  box-shadow: 0 0 0 4px var(--c-primary-light);
}

.c-timeline__dot--done { background: var(--c-success); }

.c-timeline__item:not(:last-child) .c-timeline__dot::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 1rem);
  background: var(--c-border);
}

.c-timeline__content { min-width: 0; flex: 1; }

/* ============================================
   PILLS
   ============================================ */

.c-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--c-bg);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
}

/* ============================================
   DIVIDER
   ============================================ */

.c-divider {
  height: 1px;
  background: var(--c-border);
  margin: 1rem 0;
}

.c-divider--lg { margin: 1.5rem 0; }

/* ============================================
   TEXT UTILITIES
   ============================================ */

.c-text--xs { font-size: 0.75rem; }
.c-text--sm { font-size: 0.8125rem; }
.c-text--lg { font-size: 1.125rem; }
.c-text--xl { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.c-text--muted { color: var(--c-text-muted); }
.c-text--faint { color: var(--c-text-faint); }
.c-text--primary { color: var(--c-primary); }
.c-text--success { color: var(--c-success); }
.c-text--error { color: var(--c-error); }
.c-text--warning { color: var(--c-warning); }
.c-text--center { text-align: center; }
.c-text--right { text-align: right; }
.c-text--mono { font-family: var(--font-mono); }
.c-text--bold { font-weight: 600; }
.c-text--heading { font-weight: 700; color: var(--c-text); }

/* ============================================
   SPACING UTILITIES
   ============================================ */

.c-mt-0 { margin-top: 0; }
.c-mt-1 { margin-top: 0.25rem; }
.c-mt-2 { margin-top: 0.5rem; }
.c-mt-3 { margin-top: 0.75rem; }
.c-mt-4 { margin-top: 1rem; }
.c-mt-5 { margin-top: 1.5rem; }
.c-mt-6 { margin-top: 2rem; }
.c-mt-8 { margin-top: 3rem; }

.c-mb-0 { margin-bottom: 0; }
.c-mb-1 { margin-bottom: 0.25rem; }
.c-mb-2 { margin-bottom: 0.5rem; }
.c-mb-3 { margin-bottom: 0.75rem; }
.c-mb-4 { margin-bottom: 1rem; }
.c-mb-5 { margin-bottom: 1.5rem; }
.c-mb-6 { margin-bottom: 2rem; }
.c-mb-8 { margin-bottom: 3rem; }

.c-p-0 { padding: 0; }
.c-p-3 { padding: 0.75rem; }
.c-p-4 { padding: 1rem; }
.c-p-5 { padding: 1.5rem; }
.c-p-6 { padding: 2rem; }

.c-gap-1 { gap: 0.25rem; }
.c-gap-2 { gap: 0.5rem; }
.c-gap-3 { gap: 0.75rem; }
.c-gap-4 { gap: 1rem; }
.c-gap-5 { gap: 1.5rem; }
.c-gap-6 { gap: 2rem; }

/* ============================================
   DISPLAY UTILITIES
   ============================================ */

.c-hidden { display: none; }
.c-flex { display: flex; }
.c-block { display: block; }
.c-inline-flex { display: inline-flex; }
.c-w-full { width: 100%; }

@media (max-width: 768px) {
  .c-hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .c-hide-desktop { display: none !important; }
}

/* ============================================
   MOBILE NAV DRAWER
   ============================================ */

.c-mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--c-surface);
  z-index: 999;
  padding: 1rem;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  border-top: 1px solid var(--c-border);
}

.c-mobile-nav--open { display: flex; }

.c-mobile-nav__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.c-mobile-nav__link:hover, .c-mobile-nav__link--active {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

.c-mobile-nav__divider {
  height: 1px;
  background: var(--c-border);
  margin: 0.5rem 0;
}

/* ============================================
   MAP PAGE
   ============================================ */

.c-map-container {
  height: calc(100vh - 64px);
  position: relative;
}

.c-map-container #map { height: 100%; width: 100%; }

.c-map-panel {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 320px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

@media (max-width: 640px) {
  .c-map-panel {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-height: 50vh;
  }
}

.c-map-panel__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
}

.c-map-panel__body {
  padding: 1rem 1.25rem;
}

/* ============================================
   PROPERTY DETAIL
   ============================================ */

.c-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .c-detail-grid { grid-template-columns: 1fr; }
}

.c-detail-gallery {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--c-bg);
}

.c-detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-detail-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.c-detail-gallery__thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all var(--transition);
}

.c-detail-gallery__thumb--active, .c-detail-gallery__thumb:hover {
  opacity: 1;
  border-color: var(--c-primary);
}

.c-detail-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-detail-sidebar {
  position: sticky;
  top: 80px;
}

.c-detail-amenities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.c-detail-amenity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--c-text-secondary);
  background: var(--c-bg);
  border-radius: var(--radius);
}

.c-detail-amenity__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================
   CHAT
   ============================================ */

.c-chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 64px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 768px) {
  .c-chat-layout { grid-template-columns: 1fr; }
}

.c-chat-sidebar {
  border-right: 1px solid var(--c-border);
  overflow-y: auto;
}

.c-chat-sidebar__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
}

.c-chat-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}

.c-chat-contact:hover { background: var(--c-bg); }
.c-chat-contact--active { background: var(--c-primary-light); }

.c-chat-contact__name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
}

.c-chat-contact__preview {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-chat-main { display: flex; flex-direction: column; }

.c-chat-main__header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.c-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.c-chat-msg {
  max-width: 70%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.c-chat-msg--sent {
  align-self: flex-end;
  background: var(--c-primary);
  color: white;
  border-bottom-right-radius: var(--radius-sm);
}

.c-chat-msg--received {
  align-self: flex-start;
  background: var(--c-bg);
  color: var(--c-text);
  border-bottom-left-radius: var(--radius-sm);
}

.c-chat-msg__time {
  font-size: 0.6875rem;
  color: inherit;
  opacity: 0.6;
  margin-top: 0.25rem;
  display: block;
}

.c-chat-composer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 0.5rem;
}

.c-chat-composer__input {
  flex: 1;
  padding: 0.625rem 1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color var(--transition);
}

.c-chat-composer__input:focus {
  border-color: var(--c-primary);
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */

.c-admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

@media (max-width: 1024px) {
  .c-admin-layout { grid-template-columns: 1fr; }
}

.c-admin-sidebar {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 1.5rem 0;
}

@media (max-width: 1024px) {
  .c-admin-sidebar { display: none; }
}

.c-admin-sidebar__heading {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--c-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.c-admin-sidebar__heading:first-child { margin-top: 0; }

.c-admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: all var(--transition);
}

.c-admin-sidebar__link:hover {
  color: var(--c-text);
  background: var(--c-bg);
}

.c-admin-sidebar__link--active {
  color: var(--c-primary);
  background: var(--c-primary-light);
  border-right: 2px solid var(--c-primary);
}

.c-admin-content {
  padding: 2rem;
  background: var(--c-bg);
  overflow-x: auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes c-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.c-animate-in {
  animation: c-fade-in 0.3s var(--ease) both;
}

@keyframes c-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.c-loading { animation: c-pulse 1.5s var(--ease) infinite; }

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-border-hover); }

/* ============================================
   SELECTION
   ============================================ */

::selection {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

/* ============================================
   PRINT
   ============================================ */

@media print {
  .c-nav, .c-footer, .c-btn, .c-nav__mobile-btn { display: none !important; }
  body { background: white; }
  .c-card { box-shadow: none; border: 1px solid #ddd; }
}
