
/* ==========================================================================
   MODAL & BACKDROP VISIBILITY (STRICT)
   ========================================================================== */
.modal-backdrop, .login-backdrop, .modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(10, 15, 29, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
  margin: 0 !important;
}

.modal-backdrop.hidden, .login-backdrop.hidden, .modal-overlay.hidden,
.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* Global Hidden Utility */
.hidden {
  display: none !important;
}

/* Modal Backdrops & Overlays (Always Fixed & Isolated) */
.login-backdrop, .modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(10, 15, 29, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5rem !important;
  margin: 0 !important;
}

.login-backdrop.hidden, .modal-backdrop.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* C Tours MX - Backoffice Supplier Portal Theme */
:root {
  --primary: #24BDC7;
  --primary-dark: #1aa0aa;
  --primary-light: #e0f7f9;
  --dark-bg: #0b1320;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --success: #10b981;
  --success-light: #ecfdf5;
  --danger: #ef4444;
  --warning: #f59e0b;
  --purple: #8b5cf6;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f8fafc;
  color: var(--text-main);
  min-height: 100vh;
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* App Shell */
.admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sync-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #065f46;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

.status-dot.pulse {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(36, 189, 199, 0.3);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Main Body */
.main-body {
  padding: 32px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* KPI Dashboard */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.bg-teal-light { background-color: var(--primary-light); }
.text-teal { color: var(--primary-dark); }
.bg-green-light { background-color: var(--success-light); }
.text-green { color: var(--success); }
.bg-purple-light { background-color: #f3e8ff; }
.text-purple { color: var(--purple); }
.bg-amber-light { background-color: #fef3c7; }
.text-amber { color: var(--warning); }

.kpi-details {
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #0f172a;
}

/* Toolbar */
.toolbar-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 189, 199, 0.15);
}

.filter-group {
  display: flex;
  gap: 12px;
}

.custom-select {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--primary);
}

/* Tours Grid */
.tours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tour-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.card-image-wrap {
  position: relative;
  height: 200px;
  background-color: #e2e8f0;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.active-toggle-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #94a3b8;
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--success);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-title {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #0f172a;
}

.price-comparison-box {
  background-color: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gyg-strike-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.direct-price-wrap {
  display: flex;
  flex-direction: column;
}

.direct-price-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
}

.direct-price-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #0f172a;
}

.savings-badge {
  background-color: var(--success-light);
  color: #065f46;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.card-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-card {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-card:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-card-edit {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  border-color: rgba(36, 189, 199, 0.3);
}

.btn-card-edit:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-card-del {
  color: var(--danger);
}

.btn-card-del:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-enter 0.25s ease-out;
}

.modal-lg {
  max-width: 1000px;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-heading {
  font-size: 1.35rem;
  color: #0f172a;
}

.modal-subheading {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #0f172a;
}

.modal-tabs {
  display: flex;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: #ffffff;
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.col-span-2 {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 189, 199, 0.15);
}

.highlight-input {
  border-color: var(--primary) !important;
  font-weight: 700;
  color: var(--primary-dark);
}

.read-input {
  background-color: #f1f5f9;
  cursor: not-allowed;
  font-weight: 700;
  color: var(--success);
}

.pricing-banner {
  background-color: var(--primary-light);
  border: 1px solid rgba(36, 189, 199, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: #0e7490;
  margin-bottom: 20px;
}

.pricing-banner i {
  font-size: 1.4rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  margin-top: 6px;
}

/* Itinerary List */
.itinerary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.itinerary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.itinerary-step-card {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 40px 1fr 1fr 2fr 40px;
  gap: 10px;
  align-items: center;
}

.step-num {
  font-weight: 800;
  color: var(--primary-dark);
  text-align: center;
}

/* Media Tab */
.input-with-preview {
  display: flex;
  gap: 10px;
}

.input-with-preview input {
  flex: 1;
}

.banner-preview-box {
  width: 100%;
  height: 220px;
  background-color: #f1f5f9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.banner-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  max-height: 500px;
  overflow-y: auto;
}

.photo-thumb-card {
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-thumb-card:hover {
  transform: scale(1.03);
  border-color: var(--primary);
}

.photo-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.code-box {
  background-color: #0f172a;
  color: #38bdf8;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.85rem;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 12px;
}

/* Modal Footer */
.modal-footer {
  padding: 16px 28px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background-color: #0f172a;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  animation: toast-enter 0.3s ease;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

@keyframes toast-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Photo Upload Dropzone */
.photo-upload-container {
  margin-bottom: 24px;
}

.photo-dropzone {
  border: 2px dashed var(--primary);
  background-color: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.photo-dropzone:hover, .photo-dropzone.dragover {
  background-color: #cbf2f5;
  border-color: var(--primary-dark);
  transform: scale(1.01);
}

.dropzone-icon {
  font-size: 2.2rem;
  color: var(--primary-dark);
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropzone-text strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.dropzone-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.upload-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #e2e8f0;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.gallery-section-heading {
  margin-bottom: 14px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.gallery-section-heading h4 {
  font-size: 1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-thumb-card {
  position: relative;
  height: 130px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-color);
  background-color: #0f172a;
}

.photo-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.photo-thumb-card:hover img {
  transform: scale(1.05);
}

.photo-overlay-actions {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.photo-thumb-card:hover .photo-overlay-actions {
  opacity: 1;
}

.btn-photo-action {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease;
}

.btn-photo-action:hover {
  transform: scale(1.08);
}

.btn-photo-select {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-photo-delete {
  background-color: var(--danger);
  color: #ffffff;
}

/* Per-Tour Dedicated Photo Studio */
.tour-cover-studio {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
}

.cover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.cover-header h4 {
  font-size: 1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-preview-box {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: #0f172a;
}

.banner-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-path-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.cover-path-overlay input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-family: monospace;
  outline: none;
}

.tour-gallery-studio {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.gallery-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-studio-header h4 {
  font-size: 1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-dropzone-inline {
  border: 2px dashed var(--primary);
  background-color: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.photo-dropzone-inline:hover, .photo-dropzone-inline.dragover {
  background-color: #cbf2f5;
  border-color: var(--primary-dark);
}

.dropzone-icon-sm {
  font-size: 1.8rem;
  color: var(--primary-dark);
}

.dropzone-text-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.dropzone-text-inline strong {
  font-size: 0.9rem;
  color: #0f172a;
}

.dropzone-text-inline span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tour-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.tour-photo-card {
  position: relative;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-color);
  background-color: #0f172a;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.tour-photo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tour-photo-card.is-cover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(36, 189, 199, 0.4);
}

.tour-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-cover {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tour-photo-card .photo-overlay-actions {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 10px;
}

.tour-photo-card:hover .photo-overlay-actions {
  opacity: 1;
}

.btn-set-cover {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease;
}

.btn-set-cover:hover {
  background-color: var(--primary-dark);
  transform: scale(1.04);
}

.btn-del-photo {
  background-color: var(--danger);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease;
}

.btn-del-photo:hover {
  background-color: #dc2626;
  transform: scale(1.04);
}


/* ==========================================================================
   AUTHENTICATION & SECURITY MODAL STYLES
   ========================================================================== */
.login-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-backdrop.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(13, 148, 136, 0.15);
  animation: loginCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardPop {
  0% { transform: scale(0.92) translateY(15px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-box {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #14b8a6;
}

.login-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f3f4f6;
  margin-bottom: 0.35rem;
}

.login-header p {
  color: #9ca3af;
  font-size: 0.85rem;
}

.login-alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.login-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.login-alert.hidden {
  display: none;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 2.75rem;
}

.btn-eye {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.btn-eye:hover {
  color: #f3f4f6;
}

.login-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

/* User profile badge in topbar */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(31, 41, 55, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d9488;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #f3f4f6;
}

.user-role {
  font-size: 0.7rem;
  color: #9ca3af;
}

.btn-icon-tool {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-icon-tool:hover {
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.1);
}

.text-danger:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

.modal-sm {
  max-width: 420px;
}
