/* =========================================================================
   SAWASDEE RENTAL - LUXURY BRAND THEME & STYLESHEET
   Matching original app.py luxury minimal palette & overlapping folder tabs
   ========================================================================= */

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

:root {
  --bg-main: #FDFBF7;
  --sidebar-bg: #F4EBE1;
  --card-bg: #FFFFFF;
  --brand-primary: #E85826;
  --brand-secondary: #FF7A42;
  --brand-glow: rgba(232, 88, 38, 0.18);
  --brand-gradient: linear-gradient(135deg, #FF7A42 0%, #E85826 100%);
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --border-card: #EFEAE3;
  --shadow-soft: 0 2px 5px rgba(31,41,55,.025), 0 14px 40px rgba(31,41,55,.035);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --field-bg: #FAF7F2;
  --field-border: #E5DFD7;
  --positive-bg: #E8F9EE;
  --positive-text: #166534;
  --positive-border: #BBF7D0;
  --warning-bg: #FFF3EB;
  --warning-text: #C2410C;
  --warning-border: #FFEDD5;
  --danger-bg: #FEE2E2;
  --danger-text: #991B1B;
  --danger-border: #FECACA;
  --font-ui: 'Plus Jakarta Sans', 'Prompt', 'Sarabun', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Subtle Watermark Background Logo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/static/sawasdee-logo.png');
  background-repeat: no-repeat;
  background-position: 55% 50%;
  background-size: min(50vw, 550px);
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

/* Top App Header */
.app-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-card);
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #1F2937;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cloud-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--positive-bg);
  border: 1px solid var(--positive-border);
  color: var(--positive-text);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cloud-pill:hover {
  background: #DCFCE7;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  color: #9A3412;
  font-weight: 600;
}

.user-badge .role-tag {
  background: #FFEDD5;
  color: #C2410C;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
}

/* App Main Container */
.app-container {
  display: flex;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 255px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(215, 195, 175, .45);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-dark);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid var(--border-card);
  background: #FFFFFF;
}

.nav-item:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--brand-gradient);
  color: white;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.nav-badge {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.15);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.nav-item:not(.active) .nav-badge {
  background: var(--brand-primary);
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 26px 36px;
  overflow-y: auto;
}

/* =========================================================================
   LUXURY OVERLAPPING FOLDER TABS ("แท็บแฟ้มแบบหรูหรา")
   ========================================================================= */
.folder-tabs-wrapper {
  background: radial-gradient(circle at 50% 0%, #F5ECE0 0%, #E8DECf 70%, #DFD3C0 100%);
  padding: 12px 16px 0 16px;
  border-radius: 16px 16px 0 0;
  border: 1px solid #D2C4B0;
  border-bottom: none;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
  margin-bottom: 0px;
}

.workflow-tabs {
  display: flex;
  gap: 0;
  align-items: flex-end;
  position: relative;
  overflow-x: auto;
  padding-bottom: 0;
}

.tab-btn {
  height: 48px;
  border-radius: 14px 14px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 18px;
  cursor: pointer;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F2EB 30%, #ECE2D4 80%, #DFD3C2 100%);
  border: 1px solid #CFC2B0;
  border-top: 2.5px solid #FFFFFF;
  border-bottom: 2px solid #C4B49F;
  color: #4D4439;
  transform: translateY(2px);
  box-shadow: -5px -2px 12px rgba(0,0,0,0.06), 5px -2px 12px rgba(0,0,0,0.04), inset 0 1px 2px rgba(255,255,255,0.9);
  margin-left: -12px;
}

.tab-btn:first-child {
  margin-left: 0;
}

.tab-btn:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F2 30%, #FBEFE2 100%);
  border-color: #E85826;
  border-top: 3px solid #FFAB80;
  color: #E85826;
  transform: translateY(-3px);
  z-index: 20;
  box-shadow: -6px -4px 16px rgba(232, 88, 38, 0.2), 6px -4px 16px rgba(232, 88, 38, 0.15);
}

.tab-btn.active {
  background: linear-gradient(180deg, #FF7033 0%, #E85826 35%, #D04515 80%, #B8370B 100%);
  border: 1px solid #B8370B;
  border-top: 4px solid #FFD4BF;
  border-bottom: none;
  color: #FFFFFF;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transform: translateY(0px);
  z-index: 25;
  box-shadow: 0 -8px 24px rgba(232, 88, 38, 0.45), -8px 0 16px rgba(0,0,0,0.15), 8px 0 16px rgba(0,0,0,0.15);
}

.folder-shelf-line {
  height: 6px;
  background: linear-gradient(90deg, #B8370B 0%, #E85826 15%, #FFA870 50%, #E85826 85%, #B8370B 100%);
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(232, 88, 38, 0.45), 0 1px 3px rgba(0,0,0,0.12);
  margin-bottom: 24px;
}

/* Cards & Containers */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}

.card-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The Booking Bar Hero */
.booking-bar {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFFBEB 100%);
  border: 1.5px solid #FDBA74;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.08);
}

.booking-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
  align-items: end;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #78350F;
}

.form-control {
  background: #FFFFFF;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text-dark);
  outline: none;
  transition: all 0.18s ease;
  width: 100%;
}

.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(232, 88, 38, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: 0 2px 8px var(--brand-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #FF8A54 0%, #DC4C1C 100%);
  box-shadow: 0 4px 14px rgba(232, 88, 38, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: var(--border-card);
  color: var(--text-dark);
}
.btn-secondary:hover {
  background: #F8FAFC;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-success {
  background: linear-gradient(135deg, #34D399 0%, #059669 100%);
  color: white;
}
.btn-success:hover {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
}

.btn-danger {
  background: linear-gradient(135deg, #F87171 0%, #DC2626 100%);
  color: white;
}

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

/* Fleet Grid & Luxury Cards */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 22px;
}

.car-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.car-image-container {
  height: 185px;
  position: relative;
  background: #F1F5F9;
}

.car-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 11px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.car-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.car-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 2px;
}

.car-plate {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 12px;
}

.car-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 16px;
}

.car-pricing {
  margin-top: auto;
  border-top: 1px dashed #E2E8F0;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-main {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand-primary);
}

/* Back Office Table (Matching .bo-table in app.py) */
.table-responsive {
  overflow-x: auto;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid #EFEAE3;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.custom-table th {
  background-color: #EAE3D9;
  color: #1F2937;
  border-bottom: 2px solid #D7C3AF;
  font-weight: 700;
  padding: 13px 15px;
  white-space: nowrap;
}

.custom-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  color: #1F2937;
}

.custom-table tr:hover td {
  background: #FAF8F5;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success { background: var(--positive-bg); color: var(--positive-text); border: 1px solid var(--positive-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.badge-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-gray { background: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: white;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-soft);
}

.kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Modal Popup */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: white;
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 660px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  padding: 26px;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 14px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #94A3B8;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: #1E293B;
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(215, 195, 175, .45);
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 14px;
  }
  .app-content {
    padding: 16px;
  }
}

/* =========================================================================
   APP SPLASH / BRAND LOADING SCREEN
   ========================================================================= */
.app-splash-wrapper {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #FFFFFF 0%, #FBF8F3 60%, #F4EDE2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-splash-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  padding: 24px;
  animation: splashPopIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes splashPopIn {
  0% { opacity: 0; transform: scale(0.9) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.app-splash-logo-circle {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(232, 88, 38, 0.28), 0 4px 16px rgba(0, 0, 0, 0.22);
  position: relative;
  animation: splashLogoPulse 2.4s infinite ease-in-out;
}

@keyframes splashLogoPulse {
  0% { transform: scale(1); box-shadow: 0 10px 30px rgba(232, 88, 38, 0.25), 0 4px 16px rgba(0,0,0,0.2); }
  50% { transform: scale(1.05); box-shadow: 0 16px 45px rgba(232, 88, 38, 0.45), 0 6px 22px rgba(0,0,0,0.28); }
  100% { transform: scale(1); box-shadow: 0 10px 30px rgba(232, 88, 38, 0.25), 0 4px 16px rgba(0,0,0,0.2); }
}

.app-splash-logo-circle img {
  width: 76px;
  height: auto;
  object-fit: contain;
}

.app-splash-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #1F2937;
  margin-bottom: 6px;
}

.app-splash-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  margin-bottom: 24px;
}

.app-splash-loader {
  width: 220px;
  height: 5px;
  background: #E5DFD7;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}

.app-splash-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: var(--brand-gradient);
  border-radius: 999px;
  animation: splashIndeterminate 1.4s infinite ease-in-out;
}

@keyframes splashIndeterminate {
  0% { left: -45%; width: 40%; }
  50% { left: 30%; width: 60%; }
  100% { left: 105%; width: 40%; }
}

.app-splash-status {
  font-size: 12.5px;
  font-weight: 600;
  color: #9CA3AF;
  letter-spacing: 0.3px;
}

/* =========================================================================
   AUTHENTICATION GATE SCREEN (EXCLUSIVE LOGIN SCREEN MATCHING STREAMLIT)
   ========================================================================= */
.auth-gate-wrapper {
  position: fixed;
  inset: 0;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 24px 16px;
  overflow-y: auto;
}

.auth-gate-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/static/sawasdee-logo.png');
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: min(55vw, 500px);
  opacity: 0.04;
  pointer-events: none;
}

.auth-gate-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-gate-logo-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.auth-gate-logo-circle img {
  width: 70px;
  height: auto;
  object-fit: contain;
}

.auth-gate-box {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(31, 41, 55, 0.06);
  padding: 28px 26px;
}

.gate-form-group {
  margin-bottom: 14px;
}

.gate-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

.gate-input {
  width: 100%;
  padding: 11px 14px;
  background: #FAF7F2;
  border: 1.5px solid #E5DFD7;
  border-radius: 8px;
  font-size: 13.5px;
  color: #1F2937;
  outline: none;
  transition: all 0.2s ease;
}

.gate-input:focus {
  border-color: var(--brand-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.gate-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.gate-alert.error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
}

.gate-alert.success {
  display: block;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}

.gate-btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--brand-glow);
  margin-top: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gate-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(232, 88, 38, 0.3);
}

.gate-sub-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.gate-btn-sub {
  flex: 1;
  padding: 9.5px;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.gate-btn-sub:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #FFF7ED;
}

.gate-form-title {
  text-align: center;
  color: var(--brand-primary);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.gate-form-desc {
  font-size: 12px;
  color: #6B7280;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Sidebar Custom User Card */
.sb-user-card {
  background: #FFFFFF;
  border: 1px solid #EFEAE3;
  border-left: 4px solid var(--brand-primary);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.sb-admin-staff-btn {
  background: #FFFFFF;
  border: 1px solid #EFEAE3;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sb-admin-staff-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: #FFF7ED;
}

.sb-logout-btn {
  width: 100%;
  margin-top: auto;
  padding: 8px 12px;
  background: #FFFFFF;
  border: 1px solid #FECACA;
  color: #DC2626;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sb-logout-btn:hover {
  background: #FEE2E2;
  border-color: #EF4444;
}

/* ========================================================================= */
/* COLLAPSIBLE EXPANDER CARDS (STREAMLIT EXPANDER PARITY)                    */
/* ========================================================================= */
.expander-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.expander-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #FAF7F2;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease;
}

.expander-header:hover {
  background: #F4EBE1;
}

.expander-header.open {
  border-bottom: 1px solid var(--border);
}

.expander-title {
  font-size: 15px;
  font-weight: 700;
  color: #1F2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.expander-indicator {
  font-size: 12.5px;
  font-weight: 700;
  color: #8C827A;
}

.expander-body {
  padding: 20px;
}

/* Donut & Trend Cards */
.donut-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.donut-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 4px;
}

.donut-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.donut-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed #E5DFD7;
}

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

