/* ============================================================
   KAZ.HOLIDAY — ADMIN PANEL PRO DARK BENTO GLASS THEME v1.32.0
   Clean architecture, deep dark obsidian canvas, amber gold accents.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --brand-primary: #f59e0b;
  --brand-deep: #060a12;
  --brand-accent: #d4af37;
  --brand-gradient: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);

  --sidebar-w: 272px;
  --sidebar-bg: #202227;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-link: #94a3b8;
  --sidebar-link-hover: #ffffff;

  --bg-app: #202227;
  --bg-card: rgba(32,34,39, 0.75);
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.6);

  --topbar-h: 64px;
}

/* ============================================================
   BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg-app) !important;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #ffffff;
}

/* Custom dark scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #202227;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.5);
}

/* ============================================================
   SHELL & LAYOUT
   ============================================================ */
.admin-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
}

.admin-layout {
  display: flex;
  flex: 1;
  min-height: 100vh;
}

/* ============================================================
   DESKTOP SIDEBAR
   ============================================================ */
.admin-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--sidebar-border);
  z-index: 200;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-logo .brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.badge-admin {
  font-size: 0.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);
  color: #000000;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0 2rem;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 1.5rem;
  margin: 1.25rem 0 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.25rem;
  margin: 0.15rem 0.75rem;
  color: var(--sidebar-link);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-link i {
  font-size: 1.05rem;
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-link-hover);
  padding-left: 1.5rem;
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(212, 175, 55, 0.15) 100%);
  color: #f59e0b;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.sidebar-link.active i {
  color: #f59e0b;
  opacity: 1;
}

/* ============================================================
   DESKTOP TOPBAR
   ============================================================ */
.admin-desktop-topbar {
  background: rgba(32,34,39, 0.85) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ============================================================
   MAIN CONTENT CONTAINER
   ============================================================ */
.admin-content {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  background: var(--bg-app);
}

.admin-content-inner {
  padding: 2rem;
  max-width: 1600px;
}

@media (min-width: 992px) {
  .admin-content-inner {
    padding: 2.5rem 3rem;
  }
}

/* ============================================================
   STAT CARDS & BENTO CARDS
   ============================================================ */
.card {
  background: rgba(32,34,39, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px !important;
  color: #ffffff;
}

.stat-card {
  background: rgba(32,34,39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ============================================================
   GLOBAL DARK BENTO OVERRIDES FOR BOOTSTRAP UTILITIES IN ADMIN
   ============================================================ */
.admin-shell .bg-white {
  background: rgba(32,34,39, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.admin-shell .bg-light {
  background: rgba(32,34,39, 0.6) !important;
  color: #cbd5e1 !important;
}

.admin-shell .text-dark {
  color: #f8fafc !important;
}

.admin-shell .text-muted {
  color: #94a3b8 !important;
}

.admin-shell .card-header {
  background: rgba(32,34,39, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.admin-shell .card-footer {
  background: rgba(32,34,39, 0.7) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.admin-shell .form-control,
.admin-shell .form-select {
  background-color: rgba(32,34,39, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-radius: 12px;
  font-size: 0.9rem;
}

.admin-shell input::placeholder,
.admin-shell textarea::placeholder,
.admin-shell .form-control::placeholder {
  color: #cbd5e1 !important;
  opacity: 0.9 !important;
  font-size: 0.88rem;
}

.admin-shell .form-control:focus,
.admin-shell .form-select:focus {
  background-color: rgba(32,34,39, 0.95) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.25) !important;
}

.admin-shell .btn-outline-dark {
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.admin-shell .btn-outline-dark:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

/* Badge overrides for high-contrast crisp text in admin */
.admin-shell .badge.bg-info {
  background-color: rgba(32,34,39, 0.2) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.admin-shell .badge.bg-danger {
  background-color: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  color: #f87171 !important;
}

.admin-shell .badge.bg-success {
  background-color: rgba(52, 211, 153, 0.2) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: #34d399 !important;
}

.admin-shell .badge.bg-warning {
  background-color: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  color: #f59e0b !important;
}

/* ============================================================
   TABLES DARK STYLING (Universal Admin Dark Theme)
   ============================================================ */
.admin-shell .table {
  --bs-table-bg: transparent !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
  --bs-table-striped-color: #f8fafc !important;
  --bs-table-active-bg: rgba(255, 255, 255, 0.04) !important;
  --bs-table-active-color: #f8fafc !important;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04) !important;
  --bs-table-hover-color: #f8fafc !important;
  --bs-table-color: #f8fafc !important;
  --bs-table-border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  background-color: transparent !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.admin-shell .table > :not(caption) > * > * {
  background-color: transparent !important;
  color: #f8fafc !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 1.1rem 1.25rem !important;
  vertical-align: middle;
}

.admin-shell .table thead th {
  background: rgba(32,34,39, 0.95) !important;
  color: #e2e8f0 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12) !important;
}

.admin-shell .table tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* ============================================================
   PAGINATION DARK GLASS THEME
   ============================================================ */
.admin-shell .pagination,
.pagination {
  margin-bottom: 0 !important;
  gap: 5px !important;
  display: inline-flex !important;
  align-items: center !important;
}

.admin-shell .page-item .page-link,
.pagination .page-item .page-link {
  background: rgba(32,34,39, 0.85) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
  color: #f1f5f9 !important;
  border-radius: 10px !important;
  padding: 7px 14px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
  text-decoration: none !important;
  min-width: 38px;
  text-align: center;
}

.admin-shell .page-item .page-link:hover,
.pagination .page-item .page-link:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #f59e0b !important;
  color: #fde68a !important;
  transform: translateY(-1px) !important;
}

.admin-shell .page-item.active .page-link,
.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%) !important;
  border-color: #f59e0b !important;
  color: #111827 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}

.admin-shell .page-item.disabled .page-link,
.pagination .page-item.disabled .page-link {
  background: rgba(32,34,39, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.25) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Entity Tabs / Category Pills */
.entity-tab-pill {
  background: rgba(32,34,39, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 15px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.entity-tab-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.entity-tab-pill.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%) !important;
  border-color: #f59e0b !important;
  color: #111827 !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35) !important;
}

.entity-tab-pill.active .badge {
  background-color: #202227 !important;
  color: #ffffff !important;
}

.entity-tab-pill:not(.active) .badge {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

.admin-shell .modal-content {
  background: #202227 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-radius: 24px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.admin-page-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-page-footer .footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.admin-page-footer .footer-version {
  font-size: 0.78rem;
  color: #94a3b8;
}

.admin-page-footer .footer-version .version-chip {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f59e0b;
}
