/* admin/css/admin.css - Travelia Tours And Travels TTT Admin Panel Stylesheet */

:root {
  --primary: #146B52;
  --primary-dark: #0E4230;
  --primary-light: #E8F5E9;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --dark-navy: #0F172A;
  --slate: #1E293B;
  --slate-muted: #64748B;
  --bg-cream: #FAF7F2;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--dark-navy);
  line-height: 1.5;
  font-size: 0.925rem;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
#app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--dark-navy);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--primary-dark);
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 4px;
  object-fit: contain;
}

.sidebar-brand h1 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}

.sidebar-brand span {
  font-size: 0.725rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 16px 12px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: #CBD5E1;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: #94A3B8;
  transition: color 0.2s ease;
}

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

.nav-item:hover i {
  color: var(--accent);
}

.nav-item.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
}

.nav-item.active i {
  color: #FFFFFF;
}

.nav-badge {
  background: var(--accent);
  color: var(--dark-navy);
  font-size: 0.725rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.nav-badge.badge-danger {
  background: var(--danger);
  color: #FFFFFF;
}

/* Main Content Area */
.main-wrapper {
  margin-left: 260px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navbar */
.topbar {
  height: 68px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--dark-navy);
  cursor: pointer;
  padding: 6px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-navy);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quick-action-dropdown {
  position: relative;
}

.btn-primary-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(20, 107, 82, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 107, 82, 0.35);
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--bg-cream);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  font-size: 0.825rem;
  line-height: 1.2;
}

.user-role {
  font-size: 0.72rem;
  color: var(--slate-muted);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  margin-left: 4px;
}

/* Page Container */
.page-content {
  padding: 24px;
  flex-grow: 1;
}

/* Overdue Alert Banner */
.overdue-banner {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.overdue-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #991B1B;
  font-weight: 600;
}

.overdue-banner-left i {
  font-size: 1.4rem;
  color: var(--danger);
}

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

.stat-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-info span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-info h3 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--dark-navy);
  margin-top: 4px;
}

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

.stat-icon.green { background: #E6F4EA; color: #137333; }
.stat-icon.blue { background: #E8F0FE; color: #1A73E8; }
.stat-icon.amber { background: #FEF7E0; color: #B06000; }
.stat-icon.purple { background: #F3E8FD; color: #9333EA; }
.stat-icon.red { background: #FCE8E6; color: #C5221F; }
.stat-icon.teal { background: #E0F2FE; color: #0284C7; }

/* Quick Action Cards Bar */
.quick-actions-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.quick-action-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Card Section Containers */
.card-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-box-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.custom-table th {
  background: #F8FAFC;
  color: var(--slate-muted);
  font-weight: 700;
  font-size: 0.775rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--border-color);
}

.custom-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--slate);
}

.custom-table tbody tr:hover {
  background: #F1F5F9;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-new { background: #E0F2FE; color: #0369A1; }
.badge-contacted { background: #FEF3C7; color: #B45309; }
.badge-quoted { background: #EDE9FE; color: #6D28D9; }
.badge-followup { background: #FFEDD5; color: #C2410C; }
.badge-confirmed { background: #D1FAE5; color: #047857; }
.badge-completed { background: #DCFCE7; color: #15803D; }
.badge-cancelled { background: #FEE2E2; color: #B91C1C; }
.badge-available { background: #D1FAE5; color: #047857; }
.badge-booked { background: #DBEAFE; color: #1D4ED8; }
.badge-ontrip { background: #FEF3C7; color: #B45309; }

/* Filter & Search Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  min-width: 260px;
  flex-grow: 1;
  max-width: 400px;
}

.search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  background: #F8FAFC;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
}

.tab-group {
  display: flex;
  gap: 6px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.tab-btn {
  padding: 7px 14px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--slate-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: #FFFFFF;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-backdrop.show .modal-box {
  transform: scale(1);
}

.modal-header {
  padding: 18px 24px;
  background: var(--primary-dark);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-weight: 600;
  font-size: 0.825rem;
  color: var(--dark-navy);
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: #F8FAFC;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--dark-navy);
  outline: none;
  transition: all 0.2s ease;
}

textarea.form-control {
  height: auto;
  padding: 12px;
  resize: vertical;
}

.form-control:focus {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(20, 107, 82, 0.15);
}

/* Action Buttons */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.775rem;
  border-radius: var(--radius-sm);
}

.btn-secondary {
  background: #E2E8F0;
  color: var(--slate);
}

.btn-secondary:hover {
  background: #CBD5E1;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
}

.btn-whatsapp:hover {
  background: #1EBE57;
}

/* Login Auth Screen Overlay */
#auth-screen {
  position: fixed;
  inset: 0;
  background: var(--dark-navy);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  text-align: center;
}

.auth-logo {
  width: 70px;
  margin-bottom: 16px;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark-navy);
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--slate-muted);
  margin-bottom: 24px;
}

/* Print PDF Studio */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-document-area, #printable-document-area * {
    visibility: visible;
  }
  #printable-document-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

/* Responsive Mobile Rules */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .menu-toggle-btn {
    display: block;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
