/* ═══════════════════════════════════════════════
   STAR CRM — Admin Panel Stylesheet
   admin.css
═══════════════════════════════════════════════ */

:root {
  --navy: #0D47A1;
  --blue: #1565C0;
  --blue-light: #E3F2FD;
  --blue-mid: #90CAF9;
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --orange: #E65100;
  --orange-light: #FFF3E0;
  --red: #C62828;
  --red-light: #FFEBEE;
  --purple: #0D47A1;
  --purple-light: #F3E5F5;
  --grey-900: #1A2340;
  --grey-700: #4A5568;
  --grey-500: #8895A7;
  --grey-300: #D9E0E8;
  --grey-100: #F5F7FA;
  --white: #FFFFFF;
  --sidebar-w: 236px;
  --topbar-h: 60px;
  --radius: 10px;
}

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

body {
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  background: var(--grey-100);
  color: var(--grey-900);
  font-size: 14px;
  overflow: hidden;
}

/* ══════════════════════════════
   LAYOUT
══════════════════════════════ */
.shell {
  display: flex;
  height: 100vh;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.page-wrap {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page {
  display: block;
  padding: 28px 32px 60px;
}

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0D47A1 0%, #0a3a85 100%);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-logo {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.sidebar-logo-icon i {
  color: #fff;
  font-size: 17px;
}

.sidebar-logo-text .name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.sidebar-logo-text .sub {
  font-size: 10px;
  color: var(--blue-mid);
  margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 14px 10px 5px;
}

.nav-section-label:first-child {
  padding-top: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s;
  position: relative;
  text-decoration: none;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}

.nav-badge {
  margin-left: auto;
  background: #FF5252;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.sidebar-footer-text {
  flex: 1;
  min-width: 0;
}

.sidebar-footer-text .nm {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer-text .rl {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.sidebar-footer>i {
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 13px;
}

.sidebar-footer>a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Sidebar close button (mobile only) */
.sidebar-close {
  display: none;
}

/* ══════════════════════════════
   TOPBAR
══════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--grey-300);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-title {
  flex: 1;
  min-width: 0;
}

.topbar-title h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--grey-900);
}

.topbar-title p {
  font-size: 11px;
  color: var(--grey-500);
  margin-top: 1px;
}

/* Hamburger / mobile menu toggle */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--grey-700);
  font-size: 17px;
  flex-shrink: 0;
  border: none;
  background: none;
}

.menu-toggle:hover {
  background: var(--grey-100);
}

.topbar-search {
  width: 260px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: var(--grey-100);
  transition: border-color 0.15s;
  font-family: inherit;
}

.topbar-search input:focus {
  border-color: var(--blue);
  background: #fff;
}

.topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-500);
  font-size: 13px;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-700);
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.topbar-icon-btn:hover {
  background: var(--grey-100);
}

.topbar-icon-btn i {
  font-size: 15px;
}

.topbar-icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #FF5252;
  border-radius: 50%;
  border: 1.5px solid #fff;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding-left: 12px;
  border-left: 1px solid var(--grey-300);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.topbar-user .nm {
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-900);
}

.topbar-user .rl {
  font-size: 10px;
  color: var(--grey-500);
}

/* ══════════════════════════════
   PAGE HEADER
══════════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--grey-900);
}

.page-header p {
  font-size: 13px;
  color: var(--grey-500);
  margin-top: 3px;
}

/* ══════════════════════════════
   STAT CARDS
══════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--grey-300);
  padding: 18px 20px;
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon i {
  font-size: 16px;
}

.stat-trend {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
}

.stat-trend.up {
  background: var(--green-light);
  color: var(--green);
}

.stat-trend.down {
  background: var(--red-light);
  color: var(--red);
}

.stat-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--grey-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--grey-500);
}

/* ══════════════════════════════
   CARD COMPONENT
══════════════════════════════ */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--grey-300);
  margin-bottom: 20px;
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--grey-900);
}

.card-header p {
  font-size: 11px;
  color: var(--grey-500);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

.card-link {
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}

/* ══════════════════════════════
   DATA TABLES
══════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--grey-300);
  background: var(--grey-100);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 13px 16px;
  font-size: 13px;
  color: var(--grey-700);
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #FAFBFD;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.cell-primary {
  font-weight: 600;
  color: var(--grey-900);
}

.cell-sub {
  font-size: 11px;
  color: var(--grey-500);
  margin-top: 2px;
}

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.table-avatar.green {
  background: var(--green-light);
  color: var(--green);
}

.table-avatar.orange {
  background: var(--orange-light);
  color: var(--orange);
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ══════════════════════════════
   BADGES
══════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge i {
  font-size: 8px;
}

.badge-green {
  background: var(--green-light);
  color: var(--green);
}

.badge-orange {
  background: var(--orange-light);
  color: var(--orange);
}

.badge-red {
  background: var(--red-light);
  color: var(--red);
}

.badge-blue {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-grey {
  background: var(--grey-100);
  color: var(--grey-500);
}

.badge-purple {
  background: var(--purple-light);
  color: var(--purple);
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy);
}

.btn-outline {
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-light);
}

.btn-danger {
  background: var(--red-light);
  color: var(--red);
}

.btn-danger:hover {
  background: #FFCDD2;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 11.5px;
}

.btn-icon-only {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-radius: 7px;
}

.action-approve {
  background: var(--green-light);
  color: var(--green);
}

.action-approve:hover {
  background: #C8E6C9;
}

.action-reject {
  background: var(--red-light);
  color: var(--red);
  margin: 3px;
}

.action-reject:hover {
  background: #FFCDD2;
}

.action-view {
  background: var(--grey-100);
  color: var(--grey-700);
}

.action-view:hover {
  background: var(--grey-300);
}

.action-edit {
  background: var(--blue-light);
  color: var(--blue);
  margin: 3px;
}

.action-edit:hover {
  background: #BBDEFB;
}

/* ══════════════════════════════
   FILTER BAR
══════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--grey-700);
  background: #fff;
  cursor: pointer;
  appearance: none;
  font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238895A7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-search {
  flex: 1;
  max-width: 280px;
  position: relative;
}

.filter-search input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
}

.filter-search input:focus {
  border-color: var(--blue);
}

.filter-search i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-500);
  font-size: 12px;
}

.tab-pills {
  display: flex;
  gap: 6px;
}

.tab-pill {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--grey-700);
  background: var(--grey-100);
  transition: all 0.15s;
}

.tab-pill.active {
  background: var(--blue);
  color: #fff;
}

/* ══════════════════════════════
   FORM ELEMENTS
══════════════════════════════ */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-700);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-label span {
  color: var(--red);
  margin-left: 2px;
}

.form-control {
  padding: 10px 14px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: 13px;
  color: var(--grey-900);
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.08);
}

.form-control::placeholder {
  color: var(--grey-500);
}

.form-select {
  padding: 10px 32px 10px 14px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: 13px;
  color: var(--grey-900);
  outline: none;
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238895A7'/%3E%3C/svg%3E") no-repeat right 12px center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.08);
}

.form-hint {
  font-size: 11px;
  color: var(--grey-500);
  margin-top: 4px;
}

/* Multi-select city tags */
.city-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  background: #fff;
  min-height: 44px;
  cursor: text;
}

.city-tags:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.08);
}

.city-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 3px 8px 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.city-tag button {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
}

.city-tags-input {
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--grey-900);
  min-width: 80px;
  flex: 1;
  font-family: inherit;
}

.city-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}

.city-dropdown-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--grey-700);
  transition: background 0.12s;
}

.city-dropdown-item:hover {
  background: var(--grey-100);
  color: var(--grey-900);
}

.form-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid var(--blue-light);
}

.form-section-title i {
  margin-right: 8px;
}

/* Password field */
.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--grey-500);
  font-size: 15px;
}

.password-toggle:hover {
  color: var(--grey-700);
}

/* ══════════════════════════════
   TWO COLUMN LAYOUT
══════════════════════════════ */
.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ══════════════════════════════
   PROGRESS / MINI BARS
══════════════════════════════ */
.mini-progress {
  height: 6px;
  background: var(--grey-100);
  border-radius: 3px;
  overflow: hidden;
  width: 80px;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 3px;
}

/* ══════════════════════════════
   MODAL / SLIDE-OVER PANEL
══════════════════════════════ */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 60, 0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 14px;
  width: 560px;
  max-width: calc(100vw - 40px);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.22s ease;
}

.modal.modal-lg {
  width: 720px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--grey-300);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--grey-900);
}

.modal-header p {
  font-size: 12px;
  color: var(--grey-500);
  margin-top: 2px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--grey-500);
  transition: background 0.15s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--grey-100);
  color: var(--grey-900);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--grey-300);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--grey-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.25s ease;
  min-width: 240px;
  max-width: 360px;
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: var(--red);
}

.toast i {
  font-size: 15px;
  flex-shrink: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ══════════════════════════════
   TOUR PLAN CALENDAR VIEW
══════════════════════════════ */
.tour-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 20px;
}

.tour-cal-hdr {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--grey-500);
  padding: 8px 0;
}

.tour-cal-cell {
  min-height: 90px;
  background: #fff;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  padding: 6px;
  font-size: 11px;
  vertical-align: top;
  transition: box-shadow 0.15s;
}

.tour-cal-cell:hover {
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.12);
}

.tour-cal-cell.weekend {
  background: #fafbff;
}

.tour-cal-cell.today {
  border: 2px solid var(--blue);
}

.tour-cal-cell.empty {
  background: transparent;
  border: none;
}

.cal-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--grey-500);
  margin-bottom: 4px;
}

.cal-date.today-num {
  color: var(--blue);
  background: var(--blue-light);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tour-chip {
  display: block;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 3px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s;
}

.tour-chip:hover {
  background: #BBDEFB;
}

.tour-chip.pending {
  background: var(--orange-light);
  color: var(--orange);
}

.tour-chip.approved {
  background: var(--green-light);
  color: var(--green);
}

.tour-chip.rejected {
  background: var(--red-light);
  color: var(--red);
}

/* ══════════════════════════════
   DOCTOR / MR DETAIL DRAWER
══════════════════════════════ */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: 13px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .k {
  color: var(--grey-500);
}

.detail-row .v {
  color: var(--grey-900);
  font-weight: 600;
  text-align: right;
}

/* ══════════════════════════════
   MISC UTILITIES
══════════════════════════════ */
.spacer {
  flex: 1;
}

.text-right {
  text-align: right;
}

.flex-center {
  display: flex;
  align-items: center;
}

.gap-8 {
  gap: 8px;
}

.gap-10 {
  gap: 10px;
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.hr {
  border: none;
  border-top: 1px solid var(--grey-300);
  margin: 20px 0;
}

.required-note {
  font-size: 11px;
  color: var(--grey-500);
  margin-bottom: 20px;
}

.required-note span {
  color: var(--red);
}

/* scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--grey-300);
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ══════════════════════════════
   LOGIN PAGE
══════════════════════════════ */
.login-wrap {
  min-height: 100vh;
  width: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0D47A1 0%, #1565C0 55%, #0a3a85 100%);
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  text-align: center;
}

.login-logo-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-icon i {
  color: var(--blue);
  font-size: 24px;
}

.login-logo .name {
  font-size: 19px;
  font-weight: 700;
  color: var(--grey-900);
}

.login-logo .sub {
  font-size: 12px;
  color: var(--grey-500);
  margin-top: 2px;
}

.login-footnote {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 20px;
}

.login-error {
  display: none;
  background: var(--red-light);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  align-items: center;
  gap: 8px;
}

.login-error.show {
  display: flex;
}

.login-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.login-check label {
  font-size: 12.5px;
  color: var(--grey-700);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.login-check a {
  font-size: 12.5px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.login-check a:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 11px 18px;
}

/* ══════════════════════════════
   RESPONSIVE — TABLET & MOBILE
══════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 50, 0.5);
  z-index: 150;
}

.sidebar-overlay.show {
  display: block;
}

@media (max-width: 1080px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .menu-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
  }

  .sidebar-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .topbar {
    padding: 0 16px;
    gap: 10px;
  }

  .topbar-user .nm,
  .topbar-user .rl {
    display: none;
  }

  .topbar-user {
    padding-left: 8px;
    gap: 6px;
  }

  .topbar-search {
    display: none;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 18px 16px 40px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    /* margin-bottom: 1rem; */
  }

  .page-header p {
    margin-bottom: 0;
  }

  .page-header>button,
  .page-header>a.btn {
    width: 100%;
    justify-content: center;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-num {
    font-size: 21px;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 1rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-search {
    max-width: none;
  }

  .filter-select {
    width: 100%;
  }

  .card-body {
    padding: 14px;
    overflow-x: auto;
  }

  .card-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Make tables horizontally scrollable instead of squeezing */
  .card-body[style*="padding:0"] {
    overflow-x: auto;
  }

  .data-table {
    min-width: 640px;
  }

  .modal,
  .modal.modal-lg {
    width: calc(100vw - 24px);
  }

  .tour-cal-grid {
    grid-template-columns: repeat(7, minmax(35px, 1fr));
    overflow-x: auto;
  }

  .btn {
    padding: 7px 9px;
  }

  .required-note {
    margin-bottom: 10px;
  }

  .tour-cal-cell {
    min-height: 60px;
  }

}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar-title h1 {
    font-size: 16px;
  }

  .topbar-title p {
    display: none;
  }

  .login-card {
    padding: 28px 22px;
  }
}