/* Bhatt Enterprises — Admin panel (clean, low-clutter) */
:root {
  --admin-sidebar-bg: #0f172a;
  --admin-sidebar-bg2: #1e293b;
  --admin-sidebar-hover: #334155;
  --admin-sidebar-active: #f59e0b;
  --admin-sidebar-text: #f1f5f9;
  --admin-sidebar-muted: #94a3b8;
  --admin-topbar-h: 56px;
  --admin-sidebar-w: 260px;
  --admin-page-bg: #f1f5f9;
  --admin-surface: #ffffff;
  --admin-card-border: #e2e8f0;
  --admin-heading: #0f172a;
  --admin-muted: #64748b;
  --admin-accent: #ea580c;
  --admin-accent-soft: rgba(234, 88, 12, 0.12);
}

.admin-app {
  background: var(--admin-page-bg);
  min-height: 100vh;
}

.admin-body {
  color: #1e293b;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 0.9375rem;
  -webkit-font-smoothing: antialiased;
}

/* Sidebar — dark slate, single accent */
.admin-sidebar {
  width: var(--admin-sidebar-w);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 1020;
  background: linear-gradient(180deg, var(--admin-sidebar-bg) 0%, #020617 100%);
  color: var(--admin-sidebar-text);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar-brand {
  padding: 1.25rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-brand h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}

.admin-sidebar-brand small {
  display: block;
  font-size: 0.65rem;
  color: var(--admin-sidebar-muted);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.admin-nav-section {
  padding: 0.85rem 1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--admin-sidebar-muted);
}

.admin-sidebar .nav-link {
  color: #e2e8f0;
  padding: 0.5rem 0.85rem;
  margin: 0.12rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-sidebar .nav-link:hover {
  background: var(--admin-sidebar-hover);
  color: #fff;
}

.admin-sidebar .nav-link.active {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 600;
}

.admin-sidebar .nav-link i {
  font-size: 1.05rem;
  opacity: 0.95;
}

.admin-topbar {
  min-height: var(--admin-topbar-h);
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-card-border);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-page-title h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--admin-heading);
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.admin-page-title .admin-page-subtitle,
.admin-page-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--admin-muted);
  font-weight: 400;
  max-width: 42rem;
  line-height: 1.45;
}

.admin-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

/* Dashboard only — quick links in a stable grid (no 7+2 orphan row) */
.admin-kpi-section {
  padding: 0;
}

.admin-kpi-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-muted);
  margin-bottom: 0.65rem;
}

.admin-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-kpi-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-card-border);
  border-radius: 0.65rem;
  padding: 0.75rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

.admin-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  color: inherit;
}

.admin-kpi-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--admin-accent-soft);
  color: #c2410c;
  font-size: 1rem;
  flex-shrink: 0;
}

.admin-kpi-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-kpi-value {
  font-weight: 700;
  color: var(--admin-heading);
  line-height: 1.15;
  font-size: 1.125rem;
  font-feature-settings: "tnum" 1;
}

.admin-kpi-label {
  font-size: 0.7rem;
  color: var(--admin-muted);
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Content cards — calm, not heavy */
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-card-border);
  border-radius: 0.65rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.admin-card .card-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--admin-card-border);
  font-weight: 600;
  font-size: 0.875rem;
  color: #334155;
  padding: 0.75rem 1.1rem;
}

.admin-card .card-body {
  padding: 1.1rem 1.15rem;
}

.admin-table thead th {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-muted);
  font-weight: 600;
  border-bottom-width: 1px;
  white-space: nowrap;
  background: #f8fafc;
}

.admin-table tbody td {
  vertical-align: middle;
  font-size: 0.875rem;
  border-color: #f1f5f9;
}

.table-hover > tbody > tr:hover > * {
  background: #f8fafc;
}

.admin-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #f1f5f9;
}

.admin-dl dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--admin-muted);
  font-weight: 600;
}

.admin-dl dd {
  margin-bottom: 1rem;
}

/* Forms */
.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
  border-radius: 0.5rem;
  font-size: 0.9375rem;
}

.form-control,
.form-select {
  border-color: #e2e8f0;
  box-shadow: none;
  color: #1e293b;
}

.form-control:focus,
.form-select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.btn {
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 0.9rem;
}

.form-label {
  font-weight: 600;
  color: #334155;
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.form-text {
  color: var(--admin-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Primary actions — one warm accent, no loud gradient */
.btn-primary {
  background: #ea580c;
  border-color: #c2410c;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #c2410c;
  border-color: #9a3412;
  color: #fff;
}

.btn-outline-primary {
  border-color: #cbd5e1;
  color: #334155;
  background: #fff;
}

.btn-outline-primary:hover {
  background: #fff7ed;
  border-color: #ea580c;
  color: #9a3412;
}

.btn-outline-secondary {
  border-color: #e2e8f0;
  color: #475569;
}

.btn-outline-danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.alert {
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
}

.badge {
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 0.7rem;
}

code.small,
.font-monospace,
.admin-code {
  font-size: 0.78em;
  background: #f1f5f9;
  color: #475569;
  padding: 0.12em 0.4em;
  border-radius: 0.25rem;
  border: 1px solid #e2e8f0;
}

/* Collapsible help — keeps forms scannable */
.admin-details-hint {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  padding: 0.35rem 0.75rem;
}

.admin-details-hint > summary {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  list-style: none;
}

.admin-details-hint > summary::-webkit-details-marker {
  display: none;
}

.admin-details-hint[open] {
  padding-bottom: 0.65rem;
}

.admin-details-hint[open] > summary {
  margin-bottom: 0;
  color: #475569;
}

/* Breadcrumb breathing room in topbar */
.admin-topbar .breadcrumb {
  margin-bottom: 0;
  font-size: 0.8125rem;
}

/* Flash messages — less huge */
main .alert {
  margin-bottom: 1.25rem;
}

/* Dashboard metric cards */
.admin-dash-stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.admin-dash-stat-label--emphasis {
  color: #9a3412;
}

.admin-dash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--admin-accent-soft) !important;
  color: #c2410c !important;
}

.admin-enquiry-spotlight {
  border: 0 !important;
  box-shadow: 0 0 0 1px #fed7aa, 0 2px 8px rgba(234, 88, 12, 0.08) !important;
}

@media (max-width: 1199.98px) {
  .admin-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    max-height: 100vh;
    overflow-y: auto;
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1019;
  }
  .admin-sidebar-backdrop.show {
    display: block;
  }

  .admin-topbar {
    padding: 0.6rem 0.9rem;
  }

  .admin-page-title h1 {
    font-size: 1.2rem;
  }
}

@media (max-width: 575.98px) {
  .admin-kpi-row {
    grid-template-columns: 1fr;
  }
}
