/* ============================================================
   BestPriceRoom – Main Stylesheet
   Blue/Navy palette, pastel accents, high-contrast typography
   Font: DM Sans (Latin + Cyrillic + Spanish support)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  /* Brand Blues */
  --bpr-blue-900:   #0a1628;
  --bpr-blue-800:   #102240;
  --bpr-blue-700:   #1a3a6b;
  --bpr-blue-600:   #1e4d8c;
  --bpr-blue-500:   #2563c8;
  --bpr-blue-400:   #3b82f6;
  --bpr-blue-300:   #60a5fa;
  --bpr-blue-200:   #93c5fd;
  --bpr-blue-100:   #dbeafe;
  --bpr-blue-50:    #eff6ff;

  /* Accent - Steel/Teal */
  --bpr-teal-600:   #0891b2;
  --bpr-teal-400:   #22d3ee;
  --bpr-teal-100:   #cffafe;
  --bpr-teal-50:    #ecfeff;

  /* Semantic */
  --bpr-success:    #16a34a;
  --bpr-success-bg: #f0fdf4;
  --bpr-warning:    #d97706;
  --bpr-warning-bg: #fffbeb;
  --bpr-danger:     #dc2626;
  --bpr-danger-bg:  #fef2f2;
  --bpr-info:       #0284c7;
  --bpr-info-bg:    #f0f9ff;

  /* Neutrals */
  --bpr-gray-900:   #111827;
  --bpr-gray-800:   #1f2937;
  --bpr-gray-700:   #374151;
  --bpr-gray-600:   #4b5563;
  --bpr-gray-500:   #6b7280;
  --bpr-gray-400:   #9ca3af;
  --bpr-gray-300:   #d1d5db;
  --bpr-gray-200:   #e5e7eb;
  --bpr-gray-100:   #f3f4f6;
  --bpr-gray-50:    #f9fafb;

  /* Typography */
  --font-primary:   'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:   'DM Serif Display', Georgia, serif;

  /* Layout */
  --navbar-height:  64px;
  --sidebar-width:  260px;
  --border-radius:  10px;
  --card-shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --card-shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);

  /* Bootstrap overrides */
  --bs-primary:         #2563c8;
  --bs-primary-rgb:     37,99,200;
  --bs-link-color:      #2563c8;
  --bs-link-hover-color:#1a3a6b;
  --bs-border-radius:   var(--border-radius);
  --bs-font-sans-serif: var(--font-primary);
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.65;
  color: var(--bpr-gray-800);
  background-color: var(--bpr-gray-50);
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--bpr-blue-900);
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.display-title {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.1;
  color: #fff;
}

a {
  color: var(--bpr-blue-500);
  text-decoration: none;
  transition: color .15s;
}
a:hover { color: var(--bpr-blue-700); }

/* ── Navbar ──────────────────────────────────────────── */
.bpr-navbar {
  height: var(--navbar-height);
  background: var(--bpr-blue-800);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 12px rgba(10,22,40,.25);
}

.bpr-navbar .navbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff !important;
  letter-spacing: -0.02em;
}

.bpr-navbar .brand-accent {
  color: var(--bpr-blue-300);
}

.bpr-navbar .nav-link {
  color: rgba(255,255,255,.82) !important;
  font-weight: 500;
  font-size: .925rem;
  padding: .4rem .85rem !important;
  border-radius: 6px;
  transition: background .15s, color .15s;
}

.bpr-navbar .nav-link:hover,
.bpr-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.10);
}

.bpr-navbar .btn-nav-cta {
  background: var(--bpr-blue-500);
  color: #fff !important;
  border: none;
  padding: .38rem 1.1rem !important;
  font-weight: 600;
  transition: background .15s;
}
.bpr-navbar .btn-nav-cta:hover {
  background: var(--bpr-blue-600);
}

/* ── Admin Sidebar ───────────────────────────────────── */
.bpr-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bpr-blue-900);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform .25s ease;
}

.bpr-sidebar .sidebar-brand {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
}

.bpr-sidebar .sidebar-brand span { color: var(--bpr-blue-300); }

.bpr-sidebar .nav-section-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 1.2rem 1.25rem .35rem;
}

.bpr-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1.25rem;
  color: rgba(255,255,255,.72);
  font-size: .9rem;
  font-weight: 500;
  border-radius: 0;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.bpr-sidebar .sidebar-link i {
  font-size: 1.05rem;
  width: 20px;
  flex-shrink: 0;
  opacity: .8;
}

.bpr-sidebar .sidebar-link:hover,
.bpr-sidebar .sidebar-link.active {
  background: rgba(255,255,255,.09);
  color: #fff;
}

.bpr-sidebar .sidebar-link.active {
  border-left: 3px solid var(--bpr-blue-400);
  background: rgba(37,99,200,.25);
  color: #fff;
}

.bpr-sidebar .sidebar-link.active i { opacity: 1; }

/* Main content offset for sidebar */
.bpr-admin-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 1.5rem 1.75rem;
}

/* ── Cards ───────────────────────────────────────────── */
.bpr-card {
  background: #fff;
  border: 1px solid var(--bpr-gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.bpr-card .card-header {
  padding: 1rem 1.25rem .875rem;
  border-bottom: 1px solid var(--bpr-gray-100);
  background: transparent;
  font-weight: 600;
  color: var(--bpr-blue-900);
}

.bpr-card .card-body { padding: 1.25rem; }

/* Stat cards */
.bpr-stat-card {
  background: #fff;
  border: 1px solid var(--bpr-gray-200);
  border-radius: var(--border-radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.bpr-stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: .75rem;
}

.bpr-stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bpr-blue-900);
  line-height: 1;
  margin-bottom: .2rem;
}

.bpr-stat-card .stat-label {
  font-size: .82rem;
  color: var(--bpr-gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bpr-stat-card .stat-change {
  font-size: .8rem;
  font-weight: 600;
  margin-top: .4rem;
}

.bpr-stat-card .stat-change.up   { color: var(--bpr-success); }
.bpr-stat-card .stat-change.down { color: var(--bpr-danger); }

/* Icon color variants */
.icon-blue    { background: var(--bpr-blue-100); color: var(--bpr-blue-600); }
.icon-teal    { background: var(--bpr-teal-100); color: var(--bpr-teal-600); }
.icon-success { background: var(--bpr-success-bg); color: var(--bpr-success); }
.icon-warning { background: var(--bpr-warning-bg); color: var(--bpr-warning); }
.icon-danger  { background: var(--bpr-danger-bg);  color: var(--bpr-danger); }

/* ── Hotel Card (listing) ────────────────────────────── */
.hotel-card {
  background: #fff;
  border: 1.5px solid var(--bpr-gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: box-shadow .2s, border-color .2s, transform .15s;
  cursor: pointer;
  position: relative;
}

.hotel-card:hover {
  box-shadow: var(--card-shadow-md);
  border-color: var(--bpr-blue-300);
  transform: translateY(-2px);
}

.hotel-card.selected {
  border-color: var(--bpr-blue-500);
  box-shadow: 0 0 0 3px rgba(37,99,200,.15), var(--card-shadow-md);
}

.hotel-card .hotel-img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  display: block;
}

.hotel-card .hotel-img-placeholder {
  width: 100%;
  height: 195px;
  background: linear-gradient(135deg, var(--bpr-blue-100), var(--bpr-blue-200));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bpr-blue-400);
  font-size: 2.5rem;
}

.hotel-card .card-body { padding: 1rem 1.1rem; }

.hotel-card .hotel-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bpr-blue-900);
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hotel-card .hotel-brand {
  font-size: .78rem;
  color: var(--bpr-blue-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .3rem;
}

.hotel-card .hotel-location {
  font-size: .85rem;
  color: var(--bpr-gray-500);
  margin-bottom: .6rem;
}

.hotel-card .hotel-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bpr-blue-600);
}

.hotel-card .hotel-price span {
  font-size: .8rem;
  font-weight: 400;
  color: var(--bpr-gray-500);
}

.hotel-card .selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bpr-blue-500);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
}

.hotel-card.selected .selected-badge { display: flex; }

.hotel-card .amenity-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .74rem;
  color: var(--bpr-gray-600);
  background: var(--bpr-gray-100);
  padding: 2px 7px;
  border-radius: 4px;
  margin: 2px 2px 2px 0;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  font-family: var(--font-primary);
  font-weight: 600;
  border-radius: 8px;
  transition: all .15s;
  letter-spacing: .01em;
}

.btn-primary {
  background: var(--bpr-blue-500);
  border-color: var(--bpr-blue-500);
  color: #fff;
}
.btn-primary:hover {
  background: var(--bpr-blue-600);
  border-color: var(--bpr-blue-600);
  color: #fff;
}

.btn-outline-primary {
  color: var(--bpr-blue-500);
  border-color: var(--bpr-blue-400);
}
.btn-outline-primary:hover {
  background: var(--bpr-blue-500);
  border-color: var(--bpr-blue-500);
  color: #fff;
}

.btn-navy {
  background: var(--bpr-blue-800);
  border-color: var(--bpr-blue-800);
  color: #fff;
}
.btn-navy:hover {
  background: var(--bpr-blue-900);
  border-color: var(--bpr-blue-900);
  color: #fff;
}

.btn-rfq {
  background: var(--bpr-blue-500);
  color: #fff;
  border: none;
  padding: .55rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  width: 100%;
  border-radius: 8px;
  transition: background .15s;
}
.btn-rfq:hover { background: var(--bpr-blue-600); color: #fff; }
.btn-rfq:disabled { background: var(--bpr-gray-300); cursor: not-allowed; }

/* ── Forms ───────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--bpr-gray-300);
  border-radius: 8px;
  padding: .55rem .85rem;
  font-family: var(--font-primary);
  font-size: .925rem;
  color: var(--bpr-gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--bpr-blue-400);
  box-shadow: 0 0 0 3px rgba(37,99,200,.12);
  outline: none;
}

.form-label {
  font-weight: 600;
  font-size: .875rem;
  color: var(--bpr-gray-700);
  margin-bottom: .4rem;
}

.form-text { color: var(--bpr-gray-500); font-size: .8rem; }

.invalid-feedback { font-size: .82rem; font-weight: 500; }

/* ── Badges ──────────────────────────────────────────── */
.badge-status {
  font-size: .76rem;
  font-weight: 600;
  padding: .28rem .65rem;
  border-radius: 5px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.badge-open      { background: var(--bpr-blue-100); color: var(--bpr-blue-700); }
.badge-pending   { background: var(--bpr-warning-bg); color: var(--bpr-warning); }
.badge-accepted  { background: var(--bpr-success-bg); color: var(--bpr-success); }
.badge-closed    { background: var(--bpr-gray-100); color: var(--bpr-gray-600); }
.badge-expired   { background: var(--bpr-danger-bg); color: var(--bpr-danger); }

/* ── Tables ──────────────────────────────────────────── */
.bpr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.bpr-table thead th {
  background: var(--bpr-gray-50);
  color: var(--bpr-gray-600);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  border-bottom: 1.5px solid var(--bpr-gray-200);
  white-space: nowrap;
}

.bpr-table tbody td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--bpr-gray-100);
  color: var(--bpr-gray-700);
  vertical-align: middle;
}

.bpr-table tbody tr:hover { background: var(--bpr-gray-50); }
.bpr-table tbody tr:last-child td { border-bottom: none; }

/* ── Alerts / Toasts ─────────────────────────────────── */
.alert {
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  padding: .8rem 1.1rem;
}

.alert-success { background: var(--bpr-success-bg); color: var(--bpr-success); }
.alert-danger  { background: var(--bpr-danger-bg);  color: var(--bpr-danger); }
.alert-warning { background: var(--bpr-warning-bg); color: var(--bpr-warning); }
.alert-info    { background: var(--bpr-info-bg);    color: var(--bpr-info); }

/* Toast container */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  min-width: 300px;
}

.bpr-toast {
  background: var(--bpr-blue-900);
  color: #fff;
  border-radius: 10px;
  padding: .9rem 1.2rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  animation: slideInRight .25s ease;
}

.bpr-toast.toast-success { background: var(--bpr-success); }
.bpr-toast.toast-danger  { background: var(--bpr-danger); }
.bpr-toast.toast-warning { background: #b45309; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Page Header ─────────────────────────────────────── */
.bpr-page-header {
  margin-bottom: 1.5rem;
}

.bpr-page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bpr-blue-900);
  margin: 0;
}

.bpr-page-header .breadcrumb {
  font-size: .82rem;
  margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before { color: var(--bpr-gray-400); }

/* ── Pagination ──────────────────────────────────────── */
.pagination .page-link {
  color: var(--bpr-blue-500);
  border-color: var(--bpr-gray-200);
  font-weight: 500;
  font-size: .875rem;
}

.pagination .page-link:hover {
  background: var(--bpr-blue-50);
  border-color: var(--bpr-blue-300);
}

.pagination .page-item.active .page-link {
  background: var(--bpr-blue-500);
  border-color: var(--bpr-blue-500);
}

/* ── Auth Pages ──────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(150deg, var(--bpr-blue-900) 0%, var(--bpr-blue-700) 55%, var(--bpr-teal-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(10,22,40,.35);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 440px;
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card .auth-logo span {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--bpr-blue-800);
}

.auth-card .auth-logo span em {
  font-style: normal;
  color: var(--bpr-blue-500);
}

.auth-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: var(--bpr-blue-900);
  margin-bottom: .35rem;
}

.auth-card .auth-sub {
  text-align: center;
  color: var(--bpr-gray-500);
  font-size: .88rem;
  margin-bottom: 1.75rem;
}

/* ── Hero Section ────────────────────────────────────── */
.bpr-hero {
  background: linear-gradient(155deg, var(--bpr-blue-900) 0%, var(--bpr-blue-700) 60%, var(--bpr-teal-600) 100%);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.bpr-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.bpr-hero .display-title {
  font-size: 3.2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.bpr-hero .hero-subtitle {
  color: rgba(255,255,255,.82);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Search box in hero */
.hero-search-box {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
}

/* ── RFQ Selection Bar ───────────────────────────────── */
.rfq-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bpr-blue-900);
  color: #fff;
  padding: .85rem 1.5rem;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}

.rfq-bar.visible { display: flex; }

.rfq-bar .rfq-count {
  font-weight: 700;
  color: var(--bpr-blue-300);
  font-size: 1.05rem;
}

/* ── Notification dot ────────────────────────────────── */
.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--bpr-danger);
  border-radius: 50%;
  border: 2px solid var(--bpr-blue-800);
}

/* ── Utilities ───────────────────────────────────────── */
.text-blue-500  { color: var(--bpr-blue-500) !important; }
.text-blue-800  { color: var(--bpr-blue-800) !important; }
.text-muted-sm  { font-size: .82rem; color: var(--bpr-gray-500); }
.bg-blue-50     { background: var(--bpr-blue-50) !important; }
.bg-blue-900    { background: var(--bpr-blue-900) !important; }

.divider {
  border: none;
  border-top: 1px solid var(--bpr-gray-200);
  margin: 1.25rem 0;
}

/* ── Spinner overlay ─────────────────────────────────── */
.bpr-spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

.bpr-spinner-overlay.active { display: flex; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 991.98px) {
  .bpr-sidebar {
    transform: translateX(-100%);
  }
  .bpr-sidebar.open {
    transform: translateX(0);
  }
  .bpr-admin-content {
    margin-left: 0;
  }
  .bpr-hero .display-title { font-size: 2.2rem; }
}

@media (max-width: 575.98px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .bpr-hero  { padding: 3rem 0 2.5rem; }
}
