/* ==========================================================================
   KHANDURI TRAVELS — MODERN OFFLINE TAILWIND UTILITY ENGINE (ZERO CDN)
   ========================================================================== */

*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
  border-color: #e2e8f0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------ LAYOUT & CONTAINER ------------------ */
.container {
  width: 100%;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

.min-h-screen { min-height: 100vh; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------ GRID & RESPONSIVE BREAKPOINTS ------------------ */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------ GAPS & SPACING ------------------ */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }

.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

/* ------------------ DIMENSIONS ------------------ */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }

.w-36 { width: 9rem; }
.w-48 { width: 12rem; }
.w-60 { width: 15rem; }
.w-64 { width: 16rem; }

.max-w-xs { max-width: 20rem; }
.max-w-\[150px\] { max-width: 150px; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }

/* ------------------ TYPOGRAPHY ------------------ */
.text-\[11px\] { font-size: 11px; line-height: 14px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }

/* ------------------ COLORS (TEXT) ------------------ */
.text-slate-900 { color: #0f172a; }
.text-slate-800 { color: #1e293b; }
.text-slate-700 { color: #334155; }
.text-slate-600 { color: #475569; }
.text-slate-500 { color: #64748b; }
.text-slate-400 { color: #94a3b8; }
.text-slate-300 { color: #cbd5e1; }
.text-white { color: #ffffff; }

.text-blue-900 { color: #1e3a8a; }
.text-blue-800 { color: #1e40af; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-600 { color: #2563eb; }
.text-blue-200 { color: #bfdbfe; }

.text-indigo-950 { color: #1e1b4b; }
.text-indigo-900 { color: #312e81; }
.text-indigo-800 { color: #3730a3; }
.text-indigo-700 { color: #4338ca; }
.text-indigo-600 { color: #4f46e5; }

.text-emerald-950 { color: #022c22; }
.text-emerald-900 { color: #064e3b; }
.text-emerald-800 { color: #065f46; }
.text-emerald-700 { color: #047857; }
.text-emerald-600 { color: #059669; }

.text-rose-800 { color: #9f1239; }
.text-rose-700 { color: #be123c; }
.text-rose-600 { color: #e11d48; }
.text-red-600 { color: #dc2626; }

.text-amber-900 { color: #78350f; }
.text-amber-800 { color: #92400e; }
.text-amber-700 { color: #b45309; }
.text-amber-700\/80 { color: rgba(180, 83, 9, 0.8); }

.text-purple-800 { color: #6b21a8; }

/* ------------------ COLORS (BACKGROUND) ------------------ */
.bg-white { background-color: #ffffff; }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }

.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-300 { background-color: #cbd5e1; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }

.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-700 { background-color: #1d4ed8; }
.bg-blue-900 { background-color: #1e3a8a; }

.bg-indigo-50 { background-color: #eef2ff; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-700 { background-color: #4338ca; }
.bg-indigo-800 { background-color: #3730a3; }

.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-700 { background-color: #047857; }

.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-50\/20 { background-color: rgba(254, 243, 199, 0.2); }
.bg-amber-100 { background-color: #fef3c7; }

.bg-rose-50 { background-color: #fff1f2; }
.bg-rose-100 { background-color: #ffe4e6; }
.bg-rose-600 { background-color: #e11d48; }

.bg-purple-100 { background-color: #f3e8ff; }

/* ------------------ HOVER STATES ------------------ */
.hover\:bg-white\/20:hover { background-color: rgba(255, 255, 255, 0.2); }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:bg-emerald-700:hover { background-color: #047857; }
.hover\:bg-slate-200:hover { background-color: #e2e8f0; }
.hover\:bg-black:hover { background-color: #000000; }

.hover\:text-slate-300:hover { color: #cbd5e1; }
.hover\:text-slate-700:hover { color: #334155; }
.hover\:text-slate-900:hover { color: #0f172a; }

/* ------------------ BORDERS & RADIUS ------------------ */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }
.border-dashed { border-style: dashed; }

.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-500 { border-color: #3b82f6; }
.border-indigo-200 { border-color: #c7d2fe; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-300 { border-color: #fcd34d; }
.border-rose-200 { border-color: #fecdd3; }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-t-2xl { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ------------------ SHADOWS ------------------ */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }

/* ------------------ FORM CONTROLS & BUTTONS ------------------ */
input, select, textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background-color: #ffffff;
  color: #1e293b;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
}

button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.15s;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #1e3a8a;
  color: #ffffff;
  padding: 0.625rem 1.25rem;
}
.btn-primary:hover:not(:disabled) {
  background-color: #172554;
}

.btn-success {
  background-color: #059669;
  color: #ffffff;
  padding: 0.625rem 1.25rem;
}
.btn-success:hover:not(:disabled) {
  background-color: #047857;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  padding: 0.625rem 1.25rem;
}
.btn-secondary:hover:not(:disabled) {
  background-color: #e2e8f0;
}

/* ------------------ MODALS ------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}
.modal-overlay.hidden {
  display: none !important;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 36rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* ------------------ STATUS PILLS ------------------ */
.badge-paid {
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
}

.badge-partial {
  background-color: #fef9c3;
  color: #a16207;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
}

.badge-credit {
  background-color: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
}

/* ------------------ TABLES ------------------ */
table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  background-color: #f8fafc;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0.625rem 0.75rem;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
td {
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
tr:hover td { background-color: #f8fafc; }

/* ------------------ SVG ICONS ------------------ */
.lucide-icon {
  display: inline-block;
  vertical-align: middle;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

/* ------------------ ACTION BUTTONS ------------------ */
.btn-blue {
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.5rem 0.875rem;
}
.btn-blue:hover:not(:disabled) {
  background-color: #1d4ed8;
}

.btn-indigo {
  background-color: #4f46e5;
  color: #ffffff;
  padding: 0.5rem 0.875rem;
}
.btn-indigo:hover:not(:disabled) {
  background-color: #4338ca;
}

/* ------------------ TAB NAVIGATION ------------------ */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  background-color: #f1f5f9;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.tab-btn {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: #0f172a;
  background-color: rgba(226, 232, 240, 0.6);
}

.tab-btn-active {
  background-color: #ffffff !important;
  color: #1e3a8a !important;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) !important;
}

.relative { position: relative; }
.absolute { position: absolute; }
.right-2\.5 { right: 0.625rem; }
.pr-10 { padding-right: 2.5rem; }
