/* TravelNexus Back Office styles */
:root {
  --navy: #1E2A38; --gold: #C8A86B; --cream: #F5F2EB;
  --steel: #4A6B82; --olive: #758368; --offwhite: #EFECE6;
}
* { box-sizing: border-box; }
body { font-family: 'Poppins', Arial, sans-serif; background: var(--cream); margin: 0; color: var(--navy); }
a { text-decoration: none; color: inherit; }

.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; background: var(--navy); color: #fff; flex-shrink: 0;
  padding: 26px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand { padding: 0 24px 26px; font-family: 'Playfair Display', serif; font-size: 1.3rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 16px; }
.admin-sidebar .brand span { color: var(--gold); }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  color: #cfd8e0; font-size: 0.92rem; transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.06); color: #fff; border-left-color: var(--gold); }
.admin-nav .nav-group-label { padding: 18px 24px 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #8493a1; }

.admin-main { flex: 1; padding: 30px 36px; max-width: calc(100% - 250px); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h1 { font-family: 'Playfair Display', serif; font-size: 1.6rem; }
.admin-topbar .user-chip { background: #fff; padding: 8px 16px; border-radius: 30px; font-size: 0.85rem; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.card { background: #fff; border-radius: 12px; padding: 26px; box-shadow: 0 4px 20px rgba(30,42,56,0.06); margin-bottom: 26px; }
.card h2, .card h3 { font-family: 'Playfair Display', serif; margin-top: 0; margin-bottom: 18px; font-size: 1.2rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: 12px; padding: 22px; box-shadow: 0 4px 20px rgba(30,42,56,0.06); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; background: var(--offwhite); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-card .num { font-size: 1.6rem; font-weight: 700; }
.stat-card .label { font-size: 0.8rem; color: #778; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th { text-align: left; background: var(--offwhite); padding: 10px 14px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
table.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--offwhite); font-size: 0.9rem; vertical-align: middle; }
table.admin-table img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
table.admin-table .actions { display: flex; gap: 8px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 0.85rem; cursor: pointer; border: none; }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-danger { background: #fde8e8; color: #c0392b; }
.btn-secondary { background: var(--offwhite); color: var(--navy); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.form-control, textarea.form-control, select.form-control {
  width: 100%; padding: 11px 14px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 16px; font-family: inherit; font-size: 0.9rem;
}
label.form-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; }
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: 0.2s; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
input:checked + .toggle-slider { background: var(--olive); }
input:checked + .toggle-slider:before { transform: translateX(22px); }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.88rem; }
.alert-success { background: #e6f4ea; color: #1e7e34; }
.alert-error { background: #fde8e8; color: #c0392b; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); }
.login-box { background: #fff; padding: 44px; border-radius: 14px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-box h1 { font-family: 'Playfair Display', serif; text-align: center; margin-bottom: 6px; }
.login-box p.sub { text-align: center; color: #778; font-size: 0.85rem; margin-bottom: 26px; }

@media (max-width: 900px) {
  .admin-sidebar { position: fixed; left: -260px; z-index: 999; transition: left 0.3s; }
  .admin-sidebar.open { left: 0; }
  .admin-main { max-width: 100%; padding: 20px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
