/* ===== AlizDevelop Admin — design tokens ===== */
:root {
  --az-primary: #4f46e5;
  --az-primary-dark: #4338ca;
  --az-primary-soft: #eef2ff;
  --az-success: #16a34a;
  --az-warning: #d97706;
  --az-danger: #dc2626;
  --az-info: #0891b2;

  --az-bg: #f4f5f9;
  --az-surface: #ffffff;
  --az-border: #e5e7eb;
  --az-text: #1f2430;
  --az-text-muted: #6b7280;

  --az-sidebar-bg: #111827;
  --az-sidebar-text: #cbd5e1;
  --az-sidebar-text-active: #ffffff;
  --az-sidebar-active-bg: var(--az-primary);
  --az-sidebar-section: #6b7280;

  --az-radius: 0.65rem;
  --az-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --az-bg: #0f1115;
    --az-surface: #171a21;
    --az-border: #2a2e37;
    --az-text: #e6e8ec;
    --az-text-muted: #9aa1ac;
    --az-primary-soft: #1e2140;
  }
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background-color: var(--az-bg);
  color: var(--az-text);
}

a {
  color: var(--az-primary);
}

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

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--az-primary-dark);
  border-color: var(--az-primary-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* ===== App shell ===== */
.az-app {
  min-height: 100vh;
}

.az-sidebar {
  width: 260px;
  min-width: 260px;
  background-color: var(--az-sidebar-bg);
  color: var(--az-sidebar-text);
  transition: margin 0.2s ease;
}

.az-sidebar .az-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.az-nav-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--az-sidebar-section);
  margin: 1rem 0.75rem 0.25rem;
}

.az-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--az-sidebar-text);
  border-radius: var(--az-radius);
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  font-size: 0.92rem;
}

.az-nav-link i {
  font-size: 1.05rem;
  width: 1.25rem;
  text-align: center;
}

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

.az-nav-link.active {
  background-color: var(--az-sidebar-active-bg);
  color: var(--az-sidebar-text-active);
}

.az-topbar {
  background-color: var(--az-surface);
  border-bottom: 1px solid var(--az-border);
  min-height: 64px;
}

.az-main {
  min-width: 0;
}

.az-content {
  padding: 1.5rem;
}

/* ===== Cards, stats ===== */
.card {
  border: 1px solid var(--az-border);
  border-radius: var(--az-radius);
  background-color: var(--az-surface);
  box-shadow: var(--az-shadow);
}

.az-stat-card .az-stat-value {
  font-size: 1.85rem;
  font-weight: 700;
}

.az-stat-card .az-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background-color: var(--az-primary-soft);
  color: var(--az-primary);
}

/* ===== Tables ===== */
.table {
  --bs-table-bg: var(--az-surface);
}

.table thead th {
  color: var(--az-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-width: 1px;
}

/* ===== Misc ===== */
.az-empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--az-text-muted);
}

.az-toast-stack {
  z-index: 1080;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 991.98px) {
  .az-sidebar {
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    z-index: 1045;
    margin-inline-start: -260px;
  }

  .az-sidebar.show {
    margin-inline-start: 0;
  }

  .az-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
  }

  .az-sidebar-backdrop.show {
    display: block;
  }
}
