/* ============================================================
   BALAJI HOLIDAYS CMS - Admin Stylesheet
   ============================================================ */
:root {
  --navy: #0b2a5b;
  --navy-2: #123b7a;
  --brand: #c8102e;
  --gold: #f2b319;
  --ink: #1c2434;
  --muted: #64748b;
  --line: #e6eaf1;
  --bg: #f2f5fa;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body.admin-body {
  font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--ink);
  font-size: 14.4px; line-height: 1.65; display: flex; min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ---------- sidebar ---------- */
.sidebar {
  width: 262px; background: linear-gradient(180deg, #071c3f, #0b2a5b 55%, #0e3268);
  color: #c9d6ee; padding: 22px 16px; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 100;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.sb-brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 16px; }
.sb-brand img { height: 52px; background: #fff; padding: 4px 9px; border-radius: 10px; }
.sb-brand b { color: #fff; font-size: 15px; display: block; line-height: 1.2; }
.sb-brand span { font-size: 11px; color: var(--gold); letter-spacing: 1.6px; text-transform: uppercase; }
.sb-section { font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase; color: #7f93b8; margin: 18px 10px 7px; }
.sb-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10.5px 13px; border-radius: 11px;
  font-size: 13.8px; font-weight: 500; color: #c9d6ee; margin-bottom: 3px; transition: all .25s ease; position: relative;
}
.sb-nav a i { width: 18px; text-align: center; font-size: 14px; color: #8fa5c9; }
.sb-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(200,16,46,.35); }
.sb-nav a.active i { color: #fff; }
.sb-nav a.sb-logout { color: #ff9d9d; margin-top: 14px; }
.sb-badge { background: var(--gold); color: #0b2a5b; font-size: 10.6px; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-left: auto; }
.sb-overlay { display: none; }

/* ---------- main ---------- */
.admin-main { flex: 1; margin-left: 262px; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  background: #fff; padding: 13px 26px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 14px rgba(11, 42, 91, .07); position: sticky; top: 0; z-index: 50;
}
.tb-title { font-weight: 600; color: var(--navy); flex: 1; }
.tb-user { display: flex; align-items: center; gap: 11px; }
.tb-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.tb-user b { font-size: 13.4px; display: block; line-height: 1.2; }
.tb-user span { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.sb-burger { display: none; background: none; border: none; font-size: 19px; color: var(--navy); cursor: pointer; }
.admin-content { padding: 26px; flex: 1; }
.admin-footer { padding: 16px 26px; color: var(--muted); font-size: 12.3px; text-align: center; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; color: var(--navy); font-family: 'Poppins', sans-serif; font-weight: 600; }
.page-head h1 i { color: var(--brand); margin-right: 6px; }
.page-head p { color: var(--muted); font-size: 13.4px; }

/* ---------- alerts ---------- */
.alert { padding: 13px 18px; border-radius: 12px; font-size: 13.6px; margin-bottom: 18px; }
.alert.success { background: #e9f9ef; color: #177245; border: 1px solid #bfe9cf; }
.alert.error { background: #fdecec; color: #9f1d20; border: 1px solid #f6c8c8; }

/* ---------- cards ---------- */
.card { background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 4px 18px rgba(11, 42, 91, .06); }
.card-title { font-size: 16px; color: var(--navy); font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title i { margin-right: 4px; color: var(--brand); }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.admin-grid > .form-card:only-of-type { max-width: 900px; }
@media (min-width: 1200px) {
  .admin-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .admin-grid .form-card.full { grid-column: 1 / -1; }
}

/* ---------- stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 15px; padding: 18px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 16px rgba(11,42,91,.07); transition: transform .3s ease, box-shadow .3s ease; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(11,42,91,.13); }
.stat-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 20px; }
.stat-card b { font-size: 23px; color: var(--navy); display: block; line-height: 1.15; }
.stat-card span { font-size: 12.3px; color: var(--muted); }

/* ---------- forms ---------- */
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 12.6px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-group label .req { color: var(--brand); }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=password],
.form-group input[type=number], .form-group input[type=date], .form-group input[type=url], .form-group select, .form-group textarea {
  width: 100%; padding: 10.5px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 13.7px; color: var(--ink); background: #fbfcfe; outline: none; transition: all .25s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(200,16,46,.09); background: #fff; }
.form-group textarea { resize: vertical; }
.hint { display: block; font-size: 11.6px; color: var(--muted); margin-top: 5px; }
.form-actions { margin-top: 20px; display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 24px; border-radius: 11px; font-weight: 600; font-size: 13.6px; border: none; cursor: pointer; transition: all .25s ease; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg, var(--brand), #a30d25); color: #fff; box-shadow: 0 8px 20px rgba(200,16,46,.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(200,16,46,.4); }
.btn-light { background: #eef1f7; color: var(--navy); }
.btn-light:hover { background: #e2e7f0; }
.thumb-prev { margin-top: 10px; }
.thumb-prev img { width: 108px; height: 78px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.4px; font-weight: 500; color: var(--ink); }
.switch input { display: none; }
.switch span { width: 44px; height: 24px; background: #cbd5e1; border-radius: 20px; position: relative; transition: all .25s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: all .25s ease; }
.switch input:checked + span { background: #177245; }
.switch input:checked + span::after { left: 23px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: 13.3px; min-width: 640px; }
.atable.wide { min-width: 1050px; }
.atable thead th {
  text-align: left; padding: 11px 12px; background: #f5f7fb; color: var(--navy);
  font-size: 12px; letter-spacing: .6px; text-transform: uppercase; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.atable tbody td { padding: 11px 12px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.atable tbody tr:hover { background: #f8fafd; }
.atable tbody tr.row-active { background: #fff7e6; }
.row-thumb { width: 62px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11.4px; font-weight: 600; }
.badge.ok { background: #e9f9ef; color: #177245; }
.badge.off { background: #f1f5f9; color: #64748b; }
.badge.warn { background: #fff4d6; color: #92620a; }
.actions { display: flex; gap: 7px; align-items: center; }
.ibtn {
  width: 33px; height: 33px; border-radius: 9px; display: inline-grid; place-items: center;
  background: #eef1f7; color: var(--navy); font-size: 12.6px; border: none; cursor: pointer; transition: all .22s ease;
}
.ibtn.edit { background: #e7f0ff; color: #1d5fd6; }
.ibtn.edit:hover { background: #1d5fd6; color: #fff; }
.ibtn.toggle { background: #eef7ee; color: #177245; }
.ibtn.toggle:hover { background: #177245; color: #fff; }
.ibtn.del { background: #fdecec; color: #c02626; }
.ibtn.del:hover { background: #c02626; color: #fff; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 18px; border-radius: 30px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 500; border: 1.5px solid var(--line); transition: all .25s ease; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.inline-status select { padding: 7px 10px !important; border-radius: 8px !important; font-size: 12.4px !important; }
.pw-row td { background: #f5f7fb; }
.pw-form { display: flex; gap: 10px; max-width: 480px; }
.pw-form input { flex: 1; }
.msg-view p { margin-bottom: 9px; font-size: 13.6px; }
.msg-body { background: #f5f7fb; border-radius: 12px; padding: 16px 18px; margin-top: 12px; font-size: 14px; line-height: 1.8; }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #071c3f, #0b2a5b 45%, #123b7a), radial-gradient(circle at 80% 10%, rgba(242,179,25,.2), transparent 50%); }
.login-card { width: min(430px, 92vw); background: #fff; border-radius: 20px; padding: 34px 32px 26px; box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.login-head { text-align: center; margin-bottom: 24px; }
.login-head img { height: 74px; border-radius: 14px; margin-bottom: 12px; }
.login-head h1 { font-size: 20px; color: var(--navy); font-family: 'Poppins', sans-serif; }
.login-head h1 span { color: var(--brand); }
.login-head p { font-size: 12.8px; color: var(--muted); }
.login-card .field { margin-bottom: 15px; }
.login-card .field label { display: block; font-size: 12.6px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.login-card .field label i { color: var(--brand); margin-right: 5px; }
.login-card .field input { width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 11px; font-family: inherit; font-size: 14px; outline: none; transition: all .25s ease; }
.login-card .field input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(200,16,46,.1); }
.login-tip { margin-top: 18px; background: #fff7e6; border: 1px dashed #e3b93e; color: #7a5b10; border-radius: 11px; padding: 11px 15px; font-size: 12.4px; }
.back-site { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: var(--navy); font-weight: 500; }
.back-site:hover { color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .35s ease; }
  .sidebar.open { transform: translateX(0); }
  .sb-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 90; }
  .admin-main { margin-left: 0; }
  .sb-burger { display: inline-block; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-content { padding: 18px 14px; }
  .page-head h1 { font-size: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
