/* =========================================================
   TRAVEL AGENCY ENTERPRISE ERP & PORTAL - STYLESHEET
   Design System: Modern Glassmorphism & Sleek Dark Accents
   ========================================================= */

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

:root {
  --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Brand Palette */
  --color-brand-50: #eef2ff;
  --color-brand-100: #e0e7ff;
  --color-brand-500: #6366f1;
  --color-brand-600: #4f46e5;
  --color-brand-700: #4338ca;
  --color-brand-900: #312e81;

  /* Accent Colors */
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  --color-rose: #f43f5e;
  --color-cyan: #06b6d4;

  /* Dark Theme Surfaces */
  --bg-dark-body: #0b0f19;
  --bg-dark-card: #111827;
  --bg-dark-glass: rgba(17, 24, 39, 0.75);
  --border-dark: rgba(255, 255, 255, 0.08);

  /* Light Theme Surfaces (Print / Customer UI) */
  --bg-light-body: #f8fafc;
  --bg-light-card: #ffffff;
  --text-dark-primary: #f9fafb;
  --text-dark-secondary: #9ca3af;
  --text-light-primary: #0f172a;
  --text-light-secondary: #475569;

  --shadow-glow: 0 0 25px rgba(79, 70, 229, 0.25);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark-body);
  color: var(--text-dark-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Glassmorphism utility */
.glass-panel {
  background: var(--bg-dark-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
}

/* Header & Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dark);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-badge {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-700));
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border-dark);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-dark-secondary);
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.active {
  background: var(--color-brand-600);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Main Container Layout */
.main-wrapper {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(16, 185, 129, 0.1));
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-banner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-banner p {
  font-size: 1.1rem;
  color: var(--text-dark-secondary);
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

/* Category Filters */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip-tag {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  color: var(--text-dark-secondary);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-tag:hover, .chip-tag.active {
  border-color: var(--color-brand-500);
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
}

/* Package Grid */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.package-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.package-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-glow);
}

.card-img-wrapper {
  position: relative;
  height: 190px;
  width: 100%;
  background: #1f2937;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-code {
  font-size: 0.8rem;
  color: var(--color-brand-500);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dark-secondary);
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dark);
}

.price-tag {
  font-size: 0.8rem;
  color: var(--text-dark-secondary);
}

.price-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-emerald);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-500), var(--color-brand-600));
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-brand-600), var(--color-brand-700));
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dark-primary);
  border: 1px solid var(--border-dark);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}

/* ADMIN DASHBOARD STYLES */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

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

.stat-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dark-secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--color-emerald);
  margin-top: 0.25rem;
}

/* Data Table Styling */
.table-container {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 2rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dark-secondary);
  padding: 1rem 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-dark);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-dark);
  color: var(--text-dark-primary);
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge {
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  text-transform: uppercase;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-confirmed, .badge-paid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-deposit {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-cancelled {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-dark-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark-secondary);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-brand-500);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Printable PDF Invoice Preview */
.invoice-printable {
  background: #ffffff;
  color: var(--text-light-primary);
  padding: 2.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.invoice-table th, .invoice-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 0;
  color: var(--text-light-primary);
  text-align: left;
}

/* Hide views */
.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* Print CSS Rules */
@media print {
  body * {
    visibility: hidden;
  }
  .invoice-printable, .invoice-printable * {
    visibility: visible;
  }
  .invoice-printable {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}
