/* ═══════════════════════════════════════════════════════════════
   NETRO Tourism — National E-Governance Tourism & Recreation Office
   Ministry of Tourism · Government Portal Design System
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Sora:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');display=swap');

:root {
  /* Primary Palette — Government Teal-Indigo */
  --brand:        #1e5fa8;   /* Government blue — primary */
  --brand-dark:   #1a4f8f;
  --brand-light:  rgba(30,95,168,.09);
  --accent:       #d4790e;   /* Saffron — accent (national) */
  --accent-light: rgba(212,121,14,.09);
  --green:        #1a7c4f;   /* Forest/growth green */
  --green-light:  rgba(26,124,79,.09);
  --crimson:      #b91c1c;

  /* Surface */
  --bg:           #f0f3f8;
  --surface:      #ffffff;
  --surface-2:    #f7f9fc;
  --border:       #dde3ed;
  --border-2:     #c8d1e0;

  /* Text */
  --text-1:       #0e1420;
  --text-2:       #1e2a3a;
  --text-3:       #5a6a80;
  --text-4:       #8fa0b4;

  /* Elevation */
  --shadow-sm:    0 1px 3px rgba(14,20,32,.07), 0 1px 2px rgba(14,20,32,.04);
  --shadow-md:    0 4px 14px rgba(14,20,32,.09), 0 2px 4px rgba(14,20,32,.04);
  --shadow-lg:    0 10px 28px rgba(14,20,32,.12), 0 4px 8px rgba(14,20,32,.06);

  /* Shape */
  --radius:       9px;
  --radius-sm:    5px;
  --radius-lg:    13px;

  /* Sidebar */
  --sb-width:     236px;

  /* Transitions */
  --transition:   0.16s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
select, input, textarea { font-family: inherit; }

/* ══════════════════
   SIDEBAR
══════════════════ */
.sidebar {
  width: var(--sb-width);
  min-width: var(--sb-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition), min-width var(--transition);
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar.closed { width: 0; min-width: 0; border-right: none; overflow: hidden; }

.sb-head {
  padding: 0;
  flex-shrink: 0;
}
/* Government identity stripe at top */

.sb-identity {
  
  border-bottom: 1px solid var(--border);
}
.sb-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}
.sb-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(30,95,168,.3);
}
.sb-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text-1);
}
.sb-brand span { color: var(--brand); }
.sb-sub {
  font-size: 9.5px;
  color: var(--text-4);
  margin-top: 1px;
  white-space: nowrap;
  letter-spacing: .2px;
}
.sb-ministry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--brand-light);
  border: 1px solid rgba(30,95,168,.15);
  border-radius: var(--radius-sm);
}
.sb-ministry-text { font-size: 9.5px; font-weight: 600; color: var(--brand); }

/* Nav */
.sb-nav { flex: 1; padding: 8px 8px; overflow-y: auto; }
.sb-section-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-4);
  padding: 12px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 1px;
  border: 1px solid transparent;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-1); }
.nav-item.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
  border-color: rgba(30,95,168,.15);
}
.ni-icon { width: 15px; height: 15px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  flex-shrink: 0;
}

/* Sidebar footer */
.sb-footer {
  padding: 10px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-row { display: flex; align-items: center; gap: 8px; }
.user-ava {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #4c6ef5);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.user-role { font-size: 9.5px; color: var(--text-4); margin-top: 1px; }
.user-dept { font-size: 9px; color: var(--brand); font-weight: 600; margin-top: 1px; }

/* ══════════════════
   MAIN
══════════════════ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: margin var(--transition);
}
.main.full { margin-left: 0; }

/* ══════════════════
   TOPBAR
══════════════════ */
.topbar {
  height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
/* Saffron-white-green top accent line */
.topbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF9933 33%, #ffffff 33%, #ffffff 66%, #138808 66%);
}
.tb-menu {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-3);
  transition: background var(--transition);
  flex-shrink: 0;
  margin-top: 3px;
}
.tb-menu:hover { background: var(--surface-2); color: var(--text-1); }
.tb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-4);
  margin-top: 3px;
}
.tb-breadcrumb .tb-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-1);
}
.tb-sep { color: var(--border-2); }
.tb-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 3px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}
.tb-time { font-family: 'Montserrat', monospace; font-size: 11px; color: var(--text-3); }
.tb-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: box-shadow var(--transition);
  position: relative;
}
.tb-btn:hover { box-shadow: var(--shadow-sm); }
.tb-notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid white;
}

/* ══════════════════
   CONTENT
══════════════════ */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.page-animate { animation: fadeUp .26s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Info stat card */
.is-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow var(--transition);
}
.is-card:hover { box-shadow: var(--shadow-md); }
.is-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.is-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-1);
}
.is-lbl { font-size: 10.5px; color: var(--text-3); margin-top: 3px; white-space: nowrap; }
.is-delta {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
}
.is-delta.up { color: #16a34a; }
.is-delta.down { color: var(--crimson); }

/* Page header */
.pg-header { margin-bottom: 16px; }
.pg-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg-subtitle { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: rgba(22,163,74,.1);   color: #15803d; }
.badge-blue   { background: rgba(30,95,168,.1);   color: #1e5fa8; }
.badge-cyan   { background: rgba(8,145,178,.1);   color: #0e7490; }
.badge-purple { background: rgba(124,58,237,.1);  color: #6d28d9; }
.badge-orange { background: rgba(212,121,14,.1);  color: #92400e; }
.badge-red    { background: rgba(185,28,28,.1);   color: #b91c1c; }
.badge-gray   { background: rgba(90,106,128,.1);  color: #475569; }
.badge-saffron{ background: rgba(255,153,51,.12); color: #c05a00; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 2px 8px rgba(30,95,168,.3); }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent:hover { background: #b86600; box-shadow: 0 2px 8px rgba(212,121,14,.3); }
.btn-danger { background: rgba(185,28,28,.08); color: #b91c1c; border-color: rgba(185,28,28,.2); }
.btn-danger:hover { background: rgba(185,28,28,.14); }
.btn-success { background: var(--green); color: white; border-color: var(--green); }
.btn-success:hover { background: #14693f; }
.btn-sm { padding: 5px 10px; font-size: 11px; }

/* Forms */
.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text-1);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,95,168,.1); }
.form-label { font-size: 11px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; display: block; }
.form-select {
  padding-right: 28px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fa0b4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}

/* Progress bars */
.progress-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--brand); transition: width .4s ease; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.data-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }

/* Alert strips */
.alert-strip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
}
.alert-strip.info    { background: rgba(30,95,168,.07);  color: #1e4e8c; border: 1px solid rgba(30,95,168,.2); }
.alert-strip.warning { background: rgba(217,119,6,.08);  color: #92400e; border: 1px solid rgba(217,119,6,.2); }
.alert-strip.danger  { background: rgba(185,28,28,.08);  color: #991b1b; border: 1px solid rgba(185,28,28,.2); }
.alert-strip.success { background: rgba(26,124,79,.08);  color: #14532d; border: 1px solid rgba(26,124,79,.2); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,20,32,.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn .16s ease;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  width: 500px;
  max-width: calc(100vw - 40px);
  position: relative;
  animation: scaleUp .18s ease;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.modal-sub { font-size: 11.5px; color: var(--text-3); margin-bottom: 18px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-3);
}
.modal-close:hover { background: var(--border); }

/* Section divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
}
.section-divider span {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-4);
  white-space: nowrap;
}
.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* Utilities */
.mono    { font-family: 'Montserrat', monospace; }
.grotesk { font-family: 'Montserrat', sans-serif; }
.fw-700  { font-weight: 700; }
.fw-600  { font-weight: 600; }
.flex    { display: flex; }
.flex-col{ display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.mb-12   { margin-bottom: 12px; }
.mb-14   { margin-bottom: 14px; }
.mb-16   { margin-bottom: 16px; }
.text-3  { color: var(--text-3); }
.text-4  { color: var(--text-4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Responsive */
@media (max-width: 1024px) { :root { --sb-width: 210px; } }
@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; }
  .sidebar.closed { transform: translateX(-100%); width: var(--sb-width); min-width: var(--sb-width); }
  .main { margin-left: 0 !important; }
}
