/* ==========================================================================
   AURA EXECUTIVE TRANSPORTATION — ADMIN DASHBOARD STYLES
   Obsidian & Brushed Gold Luxury Theme
   ========================================================================== */

:root {
  --bg-dark: #07080a;
  --bg-sidebar: #0b0e14;
  --bg-card: #0f131c;
  --bg-card-hover: #141924;
  --bg-input: #080a0f;
  --gold-primary: #c8a45c;
  --gold-light: #e6cb8b;
  --gold-dark: #9a7836;
  --gold-border: rgba(200, 164, 92, 0.35);
  --gold-border-subtle: rgba(200, 164, 92, 0.15);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --font-heading: 'Cinzel', 'Playfair Display', serif, system-ui;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* App Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-header img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.sidebar-badge {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(200, 164, 92, 0.12);
  border: 1px solid var(--gold-border-subtle);
  padding: 2px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-top: 4px;
}

.sidebar-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-category {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 14px 6px;
  font-weight: 700;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-nav a svg {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav a:hover svg {
  color: var(--gold-primary);
}

.sidebar-nav a.active {
  color: var(--gold-light);
  background: rgba(200, 164, 92, 0.1);
  border-left: 3px solid var(--gold-primary);
  font-weight: 600;
}

.sidebar-nav a.active svg {
  color: var(--gold-primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--gold-primary);
  color: #07080a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-primary);
  color: #07080a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.user-details h5 {
  font-size: 0.82rem;
  color: #ffffff;
}

.user-details span {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Main Content */
.admin-main {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Header */
.admin-topbar {
  height: 70px;
  background-color: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title h1 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-gold {
  background: linear-gradient(135deg, #c8a45c 0%, #e6cb8b 50%, #9a7836 100%);
  color: #07080a;
  box-shadow: 0 4px 15px rgba(200, 164, 92, 0.25);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 164, 92, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

.btn-outline:hover {
  color: #ffffff;
  border-color: var(--gold-border);
  background: rgba(255, 255, 255, 0.03);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* Content Area */
.admin-content {
  padding: 32px;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Stats / Cards Grid */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-primary);
}

.stat-box h4 {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.stat-box .number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #ffffff;
  font-weight: 700;
}

/* Card Container */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  margin-bottom: 28px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.card-body {
  padding: 24px;
}

/* Forms */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 3px;
  padding: 12px 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.15);
}

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

.form-hint {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Fleet Table / Grid */
.fleet-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 14px 18px;
  font-size: 0.74rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-card);
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.88rem;
  color: #cbd5e1;
  vertical-align: middle;
}

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

.car-preview-img {
  width: 68px;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--gold-border-subtle);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  font-weight: 600;
}

.badge-gold {
  background: rgba(200, 164, 92, 0.15);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

/* Toast Notifications */
.admin-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0f131c;
  border: 1px solid var(--gold-primary);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Modal */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.admin-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-box {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

/* Mobile Toggle */
.mobile-sidebar-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .mobile-sidebar-toggle {
    display: block;
  }
  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   LOGIN OVERLAY / PORTAL
   ========================================== */
.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #111622 0%, #06080c 100%);
  padding: 24px;
  z-index: 99999;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 19, 28, 0.95);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 44px 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  position: relative;
  backdrop-filter: blur(16px);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo img {
  height: 64px;
  width: auto;
  margin: 0 auto;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  text-align: center;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.login-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

.login-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  margin-bottom: 20px;
  display: none;
}

.login-credentials-note {
  background: rgba(200, 164, 92, 0.08);
  border: 1px dashed var(--gold-border);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.76rem;
  color: var(--gold-light);
  margin-top: 24px;
  text-align: center;
  line-height: 1.5;
}