/* Sayali Tours CRM - Modern Apple/Stripe Inspired Design System */

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

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-border: #bfdbfe;
  
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --primary-soft: #1e3a8a;
  --primary-border: #2563eb;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-glass);
}
[data-theme="dark"] .glass-panel {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom Cards */
.st-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  padding: 1.5rem;
}
.st-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-soft-primary {
  background-color: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  font-weight: 600;
}
.btn-soft-primary:hover {
  background-color: var(--primary);
  color: #ffffff;
}

/* Form Inputs */
.form-control, .form-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 0.625rem 1rem;
  font-size: 0.95rem;
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  background-color: var(--bg-card);
  color: var(--text-main);
}

/* Admin Sidebar Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}
.app-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
}
.app-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-header {
  height: 70px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Sidebar Nav Items */
.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-md);
  margin: 0.2rem 1rem;
  text-decoration: none;
  transition: var(--transition);
}
.nav-link-custom:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.nav-link-custom.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Step Wizard Progress */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 2rem;
}
.wizard-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}
.wizard-progress-bar {
  position: absolute;
  top: 20px;
  left: 0;
  height: 3px;
  background: var(--primary);
  z-index: 2;
  transition: width 0.4s ease;
}
.step-item {
  position: relative;
  z-index: 3;
  text-align: center;
  background: var(--bg-main);
  padding: 0 0.5rem;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 0.5rem;
  transition: var(--transition);
}
.step-item.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2);
}
.step-item.completed .step-circle {
  border-color: var(--success);
  background: var(--success);
  color: #ffffff;
}
.step-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.step-item.active .step-title {
  color: var(--primary);
}

/* Accordion Custom */
.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.accordion-button:not(.collapsed) {
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

/* Signature Pad Canvas */
.signature-pad-container {
  border: 2px dashed var(--primary-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  touch-action: none;
  position: relative;
}
canvas#signature-pad {
  width: 100%;
  height: 180px;
  display: block;
}

/* Bus Seat Allocation Layout */
.bus-layout {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 450px;
  margin: 0 auto;
}
.bus-driver {
  text-align: right;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 2px dashed var(--border-color);
  font-weight: 700;
  color: var(--text-muted);
}
.bus-seats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 40px 1fr 1fr;
  gap: 10px;
}
.bus-seat {
  aspect-ratio: 1;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  background: #ffffff;
  transition: var(--transition);
}
.bus-seat.occupied {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.bus-seat.selected {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

/* Hotel Room Layout */
.room-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: var(--bg-card);
}
.guest-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.2rem;
}

/* Status Badges */
.badge-status {
  padding: 0.35em 0.8em;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-active { background: #dbeafe; color: #1e40af; }

/* Timeline Component */
.timeline-list {
  position: relative;
  padding-left: 2rem;
  list-style: none;
}
.timeline-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}
.timeline-icon {
  position: absolute;
  left: -2rem;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-card);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-content {
    margin-left: 0;
  }
}

/* PRINT STYLES */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .no-print, .app-sidebar, .app-header, .btn, nav {
    display: none !important;
  }
  .app-content {
    margin-left: 0 !important;
  }
  .print-container {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .st-card {
    border: none !important;
    box-shadow: none !important;
  }
}
