:root {
  --primary: #233f93;
  --Secondary: #3b7a2e;
  --primary-hover: #132660;
  --accent: #f37021;
  --whatsapp: #3b7a2e;
  --success: #198754;
  --warning: #f59e0b;
  --danger: #dc3545;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #dce1e7;
  --text: #0f151d;
  --muted: #383d46;
  --font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;

}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.top-nav {
  background: var(--bg);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.nav-brand {
height: auto; width: auto; max-height: 50px
}


.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  background: var(--Secondary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.page {
  display: none;
  padding: 30px 16px;
  min-height: calc(100vh - 60px);
}

.page.active {
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
}

.hero-card, .auth-card {
  max-width: 560px;
  margin: 60px auto;
  background: var(--card);
  padding: 40px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  text-align: center;
  position: relative;
}

.hero-card img, .auth-card img {max-width: 280px; margin-bottom: 10px;}

.hero-card h1 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-card form {
  text-align: left;
  margin-top: 20px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.rc-button { background: var(--Secondary); color: #fff; }
.rc-button:hover:not(:disabled) { background: #2a5b20; }

.rc-button a{
  text-decoration: none;
  color: #fff;
}

.rc-button a:hover{
   text-decoration: none;
}

.btn, .rc-button {
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-lg { padding: 12px 26px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-secondary { background: #4b5563; color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #374151; }

.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #2a5b20; }

.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #111; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-dark { background: #1f2937; color: #fff; }
.btn-outline-light { background: transparent; border: 1px solid #233f93; color: #233f93; }

.welcome-banner {
  background: linear-gradient(135deg, var(--primary), #1d5fa3);
  color: #fff;
  padding: 28px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dash-card {
  background: var(--card);
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dash-card h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

.dash-card p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--bg);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.section-header h3 {
  color: var(--primary);
}

.status-pill {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: #e5e7eb;
  font-weight: 600;
}

.status-pill.saved {
  background: #d1fae5;
  color: #065f46;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #374151;
}

input, select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
}

input:disabled, select:disabled, input[readonly] {
  background: #f1f5f9;
  color: #475569;
}

.phone-group {
  display: flex;
  gap: 8px;
}

.code-input {
  width: 85px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 600;
}

.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 4px;
}

.section-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.package-card {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 18px;
  margin-top: 16px;
}

.package-card h4 {
  color: var(--accent);
  margin-bottom: 12px;
}

.commodity-row {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr 1fr 1fr 42px;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.btn-add-item {
  background: var(--primary);
  color: #fff;
  height: 38px;
  width: 38px;
  border-radius: 6px;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.success-panel {
  margin-top: 24px;
  border-top: 2px dashed var(--border);
  padding-top: 20px;
}

.success-alert {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.post-booking-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.new-booking-bar {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.search-bar-box {
  margin-bottom: 16px;
}

.table-responsive {
  overflow-x: auto;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.records-table th, .records-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.records-table th {
  background: var(--primary);
  color: #fff;
}

.loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 50;
}

.fixed-overlay {
  position: fixed;
  border-radius: 0;
  z-index: 9999;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-msg {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 8px;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 30px 16px;
  z-index: 2000;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 860px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.modal-toolbar {
  background: #1f2937;
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.printable-sheet {
  padding: 32px;
  background: #fff;
  color: #000;
}