:root {
  --snow: #f8f9fa;
  --ice: #e8eff5;
  --ice-deep: #d0d8e0;
  --slate: #2d3748;
  --charcoal: #1a202c;
  --wood: #8B4513;
  --wood-light: #c9a67a;
  --alpine-blue: #4a6fa5;
  --alpine-blue-light: #7ba3d8;
  --sunset: #e07b53;
  --pine: #2d5a47;
  --pine-light: #4a8b6f;
  --gold: #d4a853;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--snow);
  color: var(--charcoal);
  line-height: 1.7;
  font-weight: 300;
}

/* Cross-browser <select> chevron — Safari/iOS render the native macOS
   up/down indicator on an unstyled <select>, while Chrome shows a single
   down-arrow. Paint our own so every dropdown looks the same. Class-styled
   selects (e.g. .admin-topbar__listing-select) override this with their own
   chevron via specificity. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%236c757d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.75rem;
}
/* Class rules below set `padding` shorthand, which clobbers the chevron
   gutter from the global select rule. Restore right-side breathing room. */
select.pet-input { padding-right: 2.25rem; }
select.edl-issue-room-select { padding-right: 1.75rem; }
.booking-row.editing select.booking-inline-select { padding-right: 1.4rem; }

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 50%, var(--charcoal) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero::after {
  content: '❄';
  position: absolute;
  font-size: 400px;
  opacity: 0.03;
  top: -100px;
  right: -100px;
  transform: rotate(15deg);
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  color: var(--snow);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  animation: fadeInUp 1s ease-out;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 500px;
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Wide-screen layout: the hamburger button is hidden, the link panel is
   inline so all links sit side by side. The mobile @media block below
   takes over below 600px. */
.hero nav .nav-toggle {
  display: none;
}

.hero nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hero nav a {
  color: var(--snow);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 30px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.05);
}

.hero nav a:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Content */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

section {
  margin-bottom: 5rem;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--alpine-blue);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ice);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h2 .icon {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--pine);
  margin: 2rem 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

p {
  margin-bottom: 1rem;
  color: var(--slate);
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  border: 1px solid var(--ice);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.card-title {
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.card-content {
  color: var(--slate);
  font-size: 0.95rem;
}

/* WiFi Box */
.wifi-box {
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.wifi-box h3 {
  color: rgba(255,255,255,0.8);
  margin-top: 0;
}

.wifi-box .wifi-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  margin: 0.5rem 0;
}

.wifi-box .wifi-pass {
  font-family: monospace;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.15);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  display: inline-block;
  margin-top: 0.5rem;
}

/* Emergency Box */
.emergency-box {
  background: linear-gradient(135deg, #c0392b 0%, #96281b 100%);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.emergency-box h3 {
  color: rgba(255,255,255,0.9);
  margin-top: 0;
  font-size: 0.9rem;
}

.emergency-box p {
  color: white;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.emergency-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  border: none;
  display: block;
  transition: background 0.2s ease;
}

.emergency-item:hover {
  background: rgba(255,255,255,0.2);
  border: none;
}

.emergency-item .number {
  font-size: 1.8rem;
  font-weight: 600;
}

.emergency-item .label {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Lists */
ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

ul li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--ice);
}

ul li:last-child {
  border-bottom: none;
}

ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--alpine-blue);
  font-weight: 500;
}

ol {
  counter-reset: item;
  list-style: none;
  margin-bottom: 1.5rem;
}

ol li {
  counter-increment: item;
  padding: 0.75rem 0;
  padding-left: 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--ice);
}

ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--alpine-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Links */
a {
  color: var(--alpine-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

a:hover {
  border-bottom-color: var(--alpine-blue);
}

/* Strong */
strong {
  font-weight: 500;
  color: var(--charcoal);
}

/* Tip Box */
.tip-box {
  background: linear-gradient(135deg, var(--gold) 0%, var(--sunset) 100%);
  color: white;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.tip-box::before {
  content: '💡';
  font-size: 1.2rem;
}

.tip-box a {
  color: white;
  border-bottom-color: rgba(255,255,255,0.5);
}

/* Placeholder */
.placeholder {
  background: var(--ice);
  border: 2px dashed var(--alpine-blue-light);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: var(--alpine-blue);
  font-style: italic;
  margin: 1rem 0;
}

/* Contact Box */
.contact-box {
  background: linear-gradient(135deg, var(--pine) 0%, var(--pine-light) 100%);
  color: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.contact-box h3 {
  color: rgba(255,255,255,0.8);
  margin-top: 0;
}

.contact-box .name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  margin: 0.5rem 0;
}

.contact-box .phone {
  font-size: 1.5rem;
  background: rgba(255,255,255,0.15);
  padding: 0.75rem 2rem;
  border-radius: 30px;
  display: inline-block;
  margin-top: 1rem;
}

.contact-box .phone a {
  color: white;
  border: none;
}

/* Tracking Section */
.tracking-section {
  background: var(--charcoal);
  color: var(--snow);
  padding: 4rem 2rem;
  margin-top: 4rem;
}

.tracking-section .container {
  max-width: 900px;
  margin: 0 auto;
}

.tracking-section h2 {
  color: var(--snow);
  border-bottom-color: rgba(255,255,255,0.2);
}

.tracking-section p {
  color: rgba(255,255,255,0.7);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.status-card {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.status-card h3 {
  color: var(--snow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
}

.status-card.done h3::before {
  content: '✓';
  background: var(--pine-light);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.status-card.todo h3::before {
  content: '○';
  color: var(--gold);
  font-size: 1.2rem;
}

.status-card ul {
  margin: 0;
}

.status-card ul li {
  border-bottom-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

.status-card ul li::before {
  color: rgba(255,255,255,0.4);
}

.status-card.done ul li::before {
  content: '✓';
  color: var(--pine-light);
}

.status-card.todo ul li::before {
  content: '○';
  color: var(--gold);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--ice);
  color: var(--slate);
  font-size: 0.9rem;
}

footer .message {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--alpine-blue);
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  /* Booklet nav becomes a hamburger anchored to the top-left of the hero,
     mirroring the language switcher in the top-right corner. Tapping the
     button reveals a dropdown panel that hangs below it. */
  .hero nav {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0;
    /* The desktop fadeInUp animation leaves a transform: translateY(0)
       on the nav (animation-fill-mode: both), which would make the nav
       a containing block for absolute descendants — pinning our
       hamburger to the centered nav instead of to the hero corner.
       Disable the animation on mobile so the toggle's absolute origin
       is the .hero element. */
    animation: none;
  }

  .hero nav .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    /* Match the round flag .language-btn box: 36 x 36px square with same
       backdrop. Content = 3 bars * 2px + 2 * 5px gap = 16px, fits comfortably. */
    width: 36px;
    height: 36px;
    padding: 0;
    box-sizing: border-box;
    /* top/left mirror the .hero-lang-switcher mobile rule (top: 1rem;
       right: 1rem) so the hamburger and language pill sit on the same
       horizontal line, one in each corner. */
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .hero nav .nav-toggle:hover,
  .hero nav .nav-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
  }

  .hero nav .nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--snow);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  /* Animate the three bars into an X when the menu is open. The Y offset
     equals (bar gap + bar height) so top/bottom bars meet at the middle. */
  .hero nav .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hero nav .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .hero nav .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Dropdown panel: hangs from the top-left, just below the hamburger.
     The toggle's actual height is published as --nav-toggle-height by JS
     (initBookletNavToggle) so the panel always parks immediately under
     the button regardless of padding/font tweaks. Width is capped so it
     doesn't crowd the language switcher, but it stays comfortably tappable. */
  .hero nav .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(1rem + var(--nav-toggle-height, 38px) + 0.5rem);
    left: 1rem;
    z-index: 10;
    min-width: 12rem;
    max-width: calc(100vw - 2rem);
    padding: 0.5rem;
    gap: 0.25rem;
    background: rgba(20, 30, 50, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  }

  .hero nav.is-open .nav-links {
    display: flex;
  }

  /* Inside the dropdown the pill links lay out as a vertical list with a
     subtler border so they don't fight the panel chrome. */
  .hero nav.is-open .nav-links a {
    padding: 0.55rem 0.85rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    text-align: left;
  }

  .hero nav.is-open .nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: none;
  }

  h2 {
    font-size: 2rem;
  }

  .emergency-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

/* Language Switcher — flag-only round button, used everywhere */
.language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hero-lang-switcher {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 10;
}

.language-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.language-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.lang-flag {
  font-size: 1.15rem;
  line-height: 1;
  filter: saturate(1.1);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 100;
}

.language-switcher.open .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.lang-option:hover {
  background: var(--ice);
}

.lang-option.active {
  background: var(--alpine-blue);
}

/* Language Switcher - Mobile */
@media (max-width: 600px) {
  .hero-lang-switcher {
    top: 1rem;
    right: 1rem;
  }

  #loginLanguageSwitcher {
    top: 1rem !important;
    right: 1rem !important;
  }
}

/* Inventaire Search */
.search-box {
  margin-bottom: 1.5rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.inventaire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.inventaire-category-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  border: 1px solid var(--ice);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inventaire-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.inventaire-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ice);
}

.inventaire-category-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  border-radius: 12px;
  flex-shrink: 0;
}

.inventaire-category-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0;
}

.inventaire-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.inventaire-list li {
  padding: 0.65rem 0 0.65rem 1.25rem;
  color: var(--slate);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--ice);
  transition: color 0.2s ease, padding-left 0.2s ease;
  position: relative;
}

.inventaire-list li:last-child {
  border-bottom: none;
}

.inventaire-list li:hover {
  color: var(--alpine-blue);
  padding-left: 1.5rem;
}

.inventaire-list li::before {
  content: '•';
  color: var(--alpine-blue);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.inventaire-list li.hidden {
  display: none;
}

.no-results {
  text-align: center;
  color: var(--slate);
  font-style: italic;
  padding: 2rem;
  background: var(--ice);
  border-radius: 12px;
  margin-top: 1.5rem;
}

/* Access Control / Login */
.access-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 50%, var(--charcoal) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 9999;
  overflow-y: auto;
}

.access-overlay::before,
.access-overlay::after {
  content: '';
  min-height: 2rem;
  flex-shrink: 0;
}

.access-overlay.hidden {
  display: none;
}

/* Token-load splash: shown only when URL has ?token=, before auth resolves */
.token-loading-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 50%, var(--charcoal) 100%);
  align-items: center;
  justify-content: center;
}

.token-loading-screen .populate-loader-dots span {
  background: white;
}

html.token-loading #accessOverlay,
html.token-loading #loginLanguageSwitcher {
  display: none !important;
}

html.token-loading .token-loading-screen {
  display: flex;
}

.access-card {
  background: white;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 450px;
  width: 100%;
  margin: auto;
  flex-shrink: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.access-card h2 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--alpine-blue);
  font-size: 2rem;
  margin-bottom: 1rem;
  border: none;
  padding: 0;
  display: block;
}

.access-card p {
  color: var(--slate);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.access-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.access-form input {
  padding: 1rem;
  border: 2px solid var(--ice);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.access-form input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.access-form button {
  padding: 1rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.access-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.access-form button:active {
  transform: translateY(0);
}

.access-error {
  color: #c0392b;
  background: #ffeaea;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.access-error.show {
  display: block;
}

.access-help {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ice);
  font-size: 0.85rem;
  color: var(--slate);
  text-align: center;
}

.access-help a {
  color: var(--alpine-blue);
  text-decoration: none;
  border-bottom: 1px solid var(--alpine-blue);
}

.access-separator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  color: var(--slate);
  font-size: 0.85rem;
}

.access-separator::before,
.access-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ice);
}

.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: white;
  color: #3c4043;
  border: 2px solid var(--ice);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.google-signin-btn:hover {
  background: #f8f9fa;
  border-color: #dadce0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.google-signin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Owner auth tabs (email sign-in / sign-up) */
.owner-auth-section {
  margin-top: 0.5rem;
}

.owner-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--ice);
}

.owner-auth-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.owner-auth-tab.active {
  color: var(--alpine-blue);
  border-bottom-color: var(--alpine-blue);
}

.owner-auth-tab:hover:not(.active) {
  color: var(--charcoal);
}

.owner-auth-panel {
  display: none;
}

.owner-auth-panel.active {
  display: block;
}

.owner-auth-panel form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.owner-auth-panel input {
  padding: 0.85rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.owner-auth-panel input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.owner-auth-panel button[type="submit"] {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.owner-auth-panel button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.owner-auth-panel button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

#forgotPasswordLink {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--alpine-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

#forgotPasswordLink:hover {
  border-bottom-color: var(--alpine-blue);
}

.access-success {
  color: #27ae60;
  background: #eafaf1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.access-success.show {
  display: block;
}

.owner-auth-or {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.75rem;
  color: var(--slate);
  font-size: 0.8rem;
}

.owner-auth-or::before,
.owner-auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ice);
}

/* Sign-out button in admin header */
.sign-out-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: background 0.2s ease;
}

.sign-out-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Guided Setup Wizard */
.setup-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.setup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.progress-step {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ice);
  color: var(--slate);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.progress-step.active {
  background: var(--alpine-blue);
  color: white;
}

.progress-step.done {
  background: var(--pine);
  color: white;
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--ice);
  max-width: 4rem;
}

.setup-step {
  display: none;
}

.setup-step.active {
  display: block;
}

.setup-step h3 {
  color: var(--alpine-blue);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: none;
  padding: 0;
}

.setup-field {
  margin-bottom: 1.25rem;
}

.setup-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.setup-field input,
.setup-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.setup-field textarea {
  resize: vertical;
}

.setup-field input:focus,
.setup-field textarea:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.setup-field input[readonly] {
  background: var(--snow);
  color: var(--slate);
}

.setup-field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  background: white;
  transition: border-color 0.2s ease;
}

.setup-field select:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.setup-field small {
  display: block;
  font-size: 0.78rem;
  color: var(--slate);
  margin-top: 0.3rem;
}

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

.setup-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.setup-btn-primary {
  flex: 1;
  padding: 1rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.setup-btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.setup-btn-secondary {
  padding: 1rem 1.5rem;
  background: white;
  color: var(--alpine-blue);
  border: 2px solid var(--alpine-blue);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.setup-error {
  color: #c0392b;
  background: #ffeaea;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 1rem;
  display: none;
}

.setup-error.show {
  display: block;
}

/* Setup: Beds24 connection */
.setup-step-intro {
  color: var(--slate);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.setup-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
}

.setup-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--alpine-blue);
}

.setup-field-hint {
  color: var(--slate);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.setup-period-group {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--snow);
  border-radius: 10px;
}

.beds24-status {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.beds24-status.loading {
  background: var(--ice);
  color: var(--slate);
}

.beds24-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.beds24-status.error {
  background: #fce4ec;
  color: #c62828;
}

.beds24-verify {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ice);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Listing Import (setup wizard) */
.setup-import-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.setup-import-input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.setup-import-input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.setup-import-status {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.setup-import-status.loading {
  background: var(--ice);
  color: var(--slate);
}

.setup-import-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.setup-import-status.warning {
  background: #fff8e1;
  color: #f57f17;
}

.setup-import-status.error {
  background: #fce4ec;
  color: #c62828;
}

/* Multi-URL import list */
.import-url-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.import-url-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--snow);
  border-radius: 8px;
  font-size: 0.9rem;
}

.import-url-item .url-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--charcoal);
}

.import-url-item .url-platform {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--ice);
  color: var(--alpine-blue);
  font-weight: 500;
  flex-shrink: 0;
}

.import-url-item .url-status {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.import-url-item .url-status.fetching { color: var(--slate); }
.import-url-item .url-status.fetched { color: #2e7d32; }
.import-url-item .url-status.failed { color: #c62828; }

.import-url-item .url-remove {
  background: none;
  border: none;
  color: var(--slate);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.25rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.import-url-item .url-remove:hover { opacity: 1; }

.import-url-item .url-paste-toggle {
  font-size: 0.8rem;
  color: var(--alpine-blue);
  cursor: pointer;
  text-decoration: underline;
  flex-shrink: 0;
}

.import-url-paste {
  padding: 0.25rem 0.75rem 0.5rem;
}

.import-url-paste textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--ice);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.import-url-paste textarea:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.import-all-btn {
  margin-top: 0.75rem;
  width: 100%;
}

.setup-divider {
  border: none;
  border-top: 1px solid var(--ice);
  margin: 1.5rem 0;
}

/* Searchable select component */
.searchable-select {
  position: relative;
}

.searchable-select .ss-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  background: white;
}

.searchable-select .ss-input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.searchable-select .ss-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  border: 2px solid var(--alpine-blue);
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.searchable-select .ss-dropdown.open {
  display: block;
}

.searchable-select .ss-option {
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.searchable-select .ss-option:hover {
  background: var(--ice);
}

.searchable-select .ss-option.selected {
  background: #e3f0ff;
  font-weight: 500;
}

.searchable-select .ss-option.ss-empty {
  color: var(--slate);
  cursor: default;
}

/* Setup: Import method cards */
.setup-method-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.setup-method-card {
  padding: 1.25rem;
  border: 2px solid var(--ice);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  text-align: center;
}

.setup-method-card:hover {
  border-color: var(--alpine-blue);
  background: var(--snow);
}

.setup-method-card.active {
  border-color: var(--alpine-blue);
  background: #e3f0ff;
}

.setup-method-card h4 {
  color: var(--alpine-blue);
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.setup-method-card p {
  color: var(--slate);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.setup-method-skip {
  text-align: center;
  margin-bottom: 1.5rem;
}

.setup-btn-link {
  background: none;
  border: none;
  color: var(--slate);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem;
}

.setup-btn-link:hover {
  color: var(--alpine-blue);
}

/* Setup: Location audit */
.location-audit {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--snow);
  border-radius: 12px;
}

.location-audit h4 {
  color: var(--alpine-blue);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.audit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.audit-icon {
  font-size: 1rem;
}

.audit-label {
  flex: 1;
  color: var(--charcoal);
}

.audit-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.audit-complete .audit-status {
  background: #e8f5e9;
  color: #2e7d32;
}

.audit-partial .audit-status {
  background: #fff8e1;
  color: #f57f17;
}

.audit-empty .audit-status {
  background: #fce4ec;
  color: #c62828;
}

.audit-loading {
  color: var(--slate);
  font-size: 0.9rem;
  margin: 0;
}

/* Setup: Populate status */
.setup-populate-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.setup-populate-status.loading {
  background: var(--ice);
  color: var(--slate);
  text-align: center;
}

/* Animated 3-dot loader */
.populate-loader-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.populate-loader-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate);
  opacity: 0.3;
  animation: dotPulse 1.2s ease-in-out infinite;
}

.populate-loader-dots span:nth-child(2) {
  animation-delay: 0.4s;
}

.populate-loader-dots span:nth-child(3) {
  animation-delay: 0.8s;
}

/* Compact inline variant for table cells / buttons */
.populate-loader-dots--inline {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 0;
  vertical-align: middle;
}

.populate-loader-dots--inline span {
  width: 6px;
  height: 6px;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.populate-loader-warning {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.populate-loader-info {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.85rem;
  font-style: italic;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.populate-loader-info.fade-out {
  opacity: 0;
}

.setup-populate-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.setup-populate-status.warning {
  background: #fff8e1;
  color: #f57f17;
}

.setup-populate-status.error {
  background: #fce4ec;
  color: #c62828;
}

/* Setup: Review sections */
.setup-section {
  border: 1px solid var(--ice);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.setup-section legend {
  color: var(--alpine-blue);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 0.5rem;
}

/* Setup: Sample booklet banner */
.sample-booklet-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f0ff 100%);
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem auto;
  max-width: 900px;
}

.sample-booklet-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.sample-booklet-link {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.sample-booklet-link:hover {
  opacity: 0.9;
}

.sample-booklet-dismiss {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--slate);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.sample-booklet-dismiss:hover {
  opacity: 1;
}

/* Add Booking Form */
.add-booking-bar {
  margin-bottom: 1rem;
}

.add-booking-btn {
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.add-booking-btn:hover {
  opacity: 0.9;
}

.add-booking-form {
  max-width: 700px;
}

.add-booking-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.add-booking-field-full {
  grid-column: 1 / -1;
}

.add-booking-fields label span {
  display: block;
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 0.25rem;
}

.add-booking-fields input,
.add-booking-fields select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--cloud);
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.add-booking-error {
  color: var(--error-red, #dc3545);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.add-booking-submit {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.add-booking-submit:hover {
  opacity: 0.9;
}

.add-booking-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .add-booking-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .setup-method-cards {
    grid-template-columns: 1fr;
  }
  .audit-grid {
    grid-template-columns: 1fr;
  }
}

/* Phone Registration Form */
#phoneRegistration {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--snow);
  border-radius: 16px;
  border: 1px solid var(--ice);
}

#phoneRegistration h3 {
  color: var(--alpine-blue);
  margin-bottom: 0.5rem;
}

#phoneRegistration p {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 1rem;
}

.phone-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.phone-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.phone-input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.phone-remove-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #ffeaea;
  color: #c0392b;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.phone-remove-btn:hover {
  background: #fdd;
}

.phone-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.phone-add-btn {
  padding: 0.5rem 1rem;
  background: none;
  border: 2px dashed var(--alpine-blue);
  color: var(--alpine-blue);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.phone-add-btn:hover {
  background: rgba(44, 82, 130, 0.05);
}

.phone-submit-btn {
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phone-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.phone-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.phone-success {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #eafbea;
  color: #27ae60;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Pet Registration Form */
#petRegistration {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--snow);
  border-radius: 16px;
  border: 1px solid var(--ice);
}

.pet-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pet-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--ice);
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.pet-input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.pet-name {
  flex: 2;
}

.pet-type {
  flex: 1;
  min-width: 100px;
  background: white;
  cursor: pointer;
}

.pet-breed {
  flex: 2;
}

.pet-remove-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #ffeaea;
  color: #c0392b;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.pet-remove-btn:hover {
  background: #fdd;
}

.pet-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.pet-add-btn {
  padding: 0.5rem 1rem;
  background: none;
  border: 2px dashed var(--alpine-blue);
  color: var(--alpine-blue);
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.pet-add-btn:hover {
  background: rgba(44, 82, 130, 0.05);
}

.pet-submit-btn {
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pet-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.pet-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Pet icon badge in admin */
.pet-badge {
  font-size: 0.85rem;
  margin-left: 0.25rem;
  cursor: help;
}

@media (max-width: 600px) {
  .pet-input-row {
    flex-wrap: wrap;
  }

  .pet-name,
  .pet-breed {
    flex: 1 1 100%;
  }

  .pet-type {
    flex: 1;
  }
}

#mainContent {
  display: none;
}

#mainContent.visible {
  display: block;
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.listing-selector-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--ice);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.listing-selector-container label {
  font-weight: 600;
  color: var(--slate);
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.listing-selector-container select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--alpine-blue-light, #b0c4de);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--charcoal);
  background: white;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.listing-selector-container select:disabled {
  opacity: 0.7;
  cursor: default;
}

.listing-edit-btn {
  background: none;
  border: 1px solid var(--alpine-blue-light, #b0c4de);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--slate);
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.listing-edit-btn:hover {
  background: var(--ice);
  color: var(--alpine-blue);
}
.listing-add-btn {
  background: none;
  border: 1px solid var(--alpine-blue-light, #b0c4de);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--slate);
  transition: background 0.2s, color 0.2s;
}
.listing-add-btn:hover {
  background: var(--ice);
  color: var(--alpine-blue);
}

.listing-delete-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.listing-delete-section h4 {
  color: #c0392b;
  margin: 0 0 0.5rem;
}
.listing-delete-section p {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.listing-delete-btn {
  background: #c0392b;
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.listing-delete-btn:hover:not(:disabled) {
  background: #a93226;
}
.listing-delete-btn:disabled {
  background: #d5d5d5;
  color: #999;
  cursor: not-allowed;
}
.listing-delete-note {
  color: #999;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

/* Integration cards (Casamast, etc.) */
.integration-card {
  background: var(--ice, #f0f4f8);
  border: 1px solid var(--ice-deep);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.integration-card + .integration-card,
[id^="integration-"] + [id^="integration-"] .integration-card {
  margin-top: 0.75rem;
}
.integration-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.integration-card-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.integration-status {
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}
.integration-status.connected {
  background: #d4edda;
  color: #155724;
}
.integration-status.disconnected {
  background: #e2e3e5;
  color: #6c757d;
}
.integration-reconnect-btn {
  background: none;
  border: 1px solid var(--alpine-blue-light, #b0c4de);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}
.integration-reconnect-btn:hover {
  background: white;
}
.integration-disconnect-btn {
  color: var(--sunset, #c0392b);
  border-color: var(--sunset, #c0392b);
}
.integration-disconnect-btn:hover {
  background: #fdf0ef;
}
.integration-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.75rem;
}
.integration-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
  margin-top: 0.35rem;
}
.integration-form label:first-child {
  margin-top: 0;
}
.integration-input {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--alpine-blue-light, #b0c4de);
  border-radius: 4px;
  background: var(--snow, #fff);
  font-size: 0.85rem;
  font-family: inherit;
}
.integration-input:focus {
  outline: none;
  border-color: var(--alpine-blue, #4a90d9);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}
.integration-connect-btn {
  background: var(--alpine-blue, #4a90d9);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  align-self: flex-start;
  transition: background 0.2s;
}
.integration-connect-btn:hover:not(:disabled) {
  background: var(--pine, #2e7d32);
}
.integration-connect-btn:disabled {
  background: #b0c4de;
  cursor: wait;
}
.integration-message {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}
.integration-message.success {
  background: #d4edda;
  color: #155724;
}
.integration-message.error {
  background: #f8d7da;
  color: #721c24;
}

/* ==========================================================================
   Booking Email Creation (BEC) — listingEdit card
   ========================================================================== */

.bec-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Intro paragraph above the address chip — explains why this address exists. */
.bec-intro {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--slate, #2d3748);
}

/* Address chip — the hero element. Long inbound addresses must wrap, never
   overflow into / under the copy button. */
.bec-address-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid var(--ice-deep);
  border-radius: 8px;
}
.bec-address-chip .bec-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--accent, #1a3c4a);
}
.bec-address {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--charcoal, #1a202c);
  /* Prefer breaking at non-letter boundaries (- + @ .) when the address
     overflows; only break inside a word as a last resort. */
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.4;
}
.bec-address-loading {
  font-family: inherit;
  font-size: 1.2rem;
  color: var(--ice-deep);
  letter-spacing: 0.15em;
}

/* Copy: small icon button, expands to a labelled "Copied!" state on click */
.bec-copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  background: var(--accent, #1a3c4a);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, transform 0.05s;
}
.bec-copy-btn:hover:not(:disabled) {
  background: #14323d;
}
.bec-copy-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.bec-copy-btn:disabled {
  background: var(--ice-deep);
  cursor: wait;
}
.bec-copy-btn.is-copied {
  background: #2d5a47; /* --pine */
}
.bec-copy-btn .bec-copy-label {
  /* Hidden on narrow widths, shown on wider — keeps the chip compact when the
     address is long. */
  display: inline;
}
.bec-icon-sm {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Save-as-contact: lead text + mini procedure + link */
.bec-vcard-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: -0.25rem;
}
.bec-vcard-lead {
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate, #2d3748);
  line-height: 1.5;
}
/* Mini-steps — same idea as .bec-steps but lighter so it doesn't compete
   visually with the "Configurer le transfert" tabs further down. */
.bec-mini-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bec-mini-step;
}
.bec-mini-steps li {
  counter-increment: bec-mini-step;
  position: relative;
  padding: 0.05rem 0 0.05rem 1.5rem;
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--slate, #2d3748);
  line-height: 1.5;
  /* Reset the global ol li (line ~351) which adds vertical padding and a
     bottom border that don't belong on this compact list. */
  border-bottom: none;
}
.bec-mini-steps li:last-child {
  margin-bottom: 0;
}
.bec-mini-steps li::before {
  content: counter(bec-mini-step) ".";
  position: absolute;
  left: 0;
  top: 0;
  /* Reset the global ol li::before (line ~359) which paints a filled
     alpine-blue pill — not what we want for a lightweight numeric marker. */
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  display: inline;
  /* Our actual styling */
  min-width: 1.2rem;
  font-weight: 600;
  color: var(--accent, #1a3c4a);
  font-variant-numeric: tabular-nums;
}
.bec-vcard-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  color: var(--accent, #1a3c4a);
  text-decoration: none;
  border: 1px solid var(--ice-deep);
  border-radius: 6px;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.bec-vcard-link:hover {
  background: rgba(26, 60, 74, 0.06);
  border-color: var(--accent, #1a3c4a);
}

/* Sections */
.bec-section {
  margin: 0;
  padding: 0;
}
.bec-section-title {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal, #1a202c);
}

/* Tabs */
.bec-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--ice-deep);
  margin-bottom: 0.85rem;
}
.bec-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate, #2d3748);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.bec-tab:hover {
  color: var(--accent, #1a3c4a);
}
.bec-tab.is-active {
  color: var(--accent, #1a3c4a);
  border-bottom-color: var(--accent, #1a3c4a);
}
.bec-tab-panel.is-hidden {
  display: none;
}
.bec-panel-lead {
  margin: 0;
  font-size: 0.9rem;
  color: var(--slate, #2d3748);
  line-height: 1.5;
}
/* Small clarifier above each tab's step list — lists the addresses the
   instructions apply to (Outlook covers Hotmail/Live/MSN, etc.). */
.bec-tab-note {
  margin: 0 0 0.75rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #6c757d;
  background: rgba(26, 60, 74, 0.04);
  border-left: 2px solid var(--accent, #1a3c4a);
  border-radius: 3px;
}

/* Steps list — numbered circle as an absolutely positioned ::before so the
   text content can flow as a normal block. (Earlier `display: grid` with
   `grid-template-columns: 1.5rem 1fr` collapsed in narrow containers because
   `1fr`'s implicit `min-width: auto` resolves to min-content, forcing every
   word onto its own line.) */
.bec-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bec-step;
}
.bec-steps li {
  counter-increment: bec-step;
  position: relative;
  padding: 0.15rem 0 0.15rem 2.2rem;
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--slate, #2d3748);
  line-height: 1.45;
}
.bec-steps li:last-child {
  margin-bottom: 0;
}
.bec-steps li::before {
  content: counter(bec-step);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent, #1a3c4a);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-sans, inherit);
}

/* Recent emails */
.bec-recent-emails .bec-audit-loading {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}
.bec-loading-dots {
  display: inline-flex;
  gap: 0.3rem;
}
.bec-loading-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #1a3c4a);
  opacity: 0.4;
  animation: bec-dot-pulse 1.2s infinite ease-in-out;
}
.bec-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.bec-loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bec-dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40%           { opacity: 1;    transform: scale(1); }
}
.bec-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.bec-audit-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  font-weight: 600;
  color: var(--slate, #2d3748);
  border-bottom: 1px solid var(--ice-deep);
}
.bec-audit-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: top;
}
.bec-status-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #e2e3e5;
  color: #495057;
}
.bec-status-badge.status-enriched { background: #d4edda; color: #155724; }
.bec-status-badge.status-created  { background: #cce5ff; color: #004085; }
.bec-status-badge.status-rejected { background: #f8d7da; color: #721c24; }
.bec-status-badge.status-pending  { background: #fff3cd; color: #856404; }

/* Empty state */
.bec-audit-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--slate, #2d3748);
}
.bec-audit-empty .bec-empty-icon {
  width: 36px;
  height: 36px;
  color: var(--ice-deep);
  margin-bottom: 0.6rem;
}
.bec-audit-empty .bec-empty-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.bec-audit-empty .bec-empty-hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #6c757d;
}

/* Danger zone */
.bec-danger-zone {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ice-deep);
}
.bec-danger-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c0392b; /* --sunset */
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bec-danger-help {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.5;
}
.bec-rotate-btn {
  background: #fff;
  color: #c0392b;
  border: 1px solid #c0392b;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bec-rotate-btn:hover:not(:disabled) {
  background: #c0392b;
  color: #fff;
}
.bec-rotate-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Beds24 admin card — inline label/dropdown and inline action buttons need
   their own spacing because the parent .integration-form is column-flex and
   doesn't apply gaps to children of these wrappers. */
.beds24-admin-form .beds24-linked-property,
.beds24-admin-form .beds24-property-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.beds24-admin-form .beds24-linked-property > label,
.beds24-admin-form .beds24-property-section > label {
  margin: 0;
}
.beds24-admin-form .beds24-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.beds24-admin-form .beds24-action-row > .integration-connect-btn,
.beds24-admin-form .beds24-action-row > .integration-reconnect-btn {
  margin-top: 0;
  margin-bottom: 0;
  align-self: auto;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
}
.beds24-admin-form .beds24-token-hint {
  opacity: 0.7;
  font-weight: 400;
}

.admin-placeholder {
  background: var(--ice);
  border: 2px dashed var(--alpine-blue-light);
  border-radius: 12px;
  padding: 2rem;
  color: var(--slate);
  margin: 1.5rem 0;
}

.admin-placeholder ul {
  margin: 1rem 0;
}

.admin-placeholder li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-bottom: none;
}

.admin-info-box {
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.admin-info-box h3 {
  color: rgba(255,255,255,0.9);
  margin-top: 0;
  margin-bottom: 1rem;
}

.admin-info-box p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.5rem;
}

.admin-info-box code {
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

.admin-error {
  background: #ffeaea;
  color: #c0392b;
  padding: 2rem;
  text-align: center;
  border-radius: 12px;
  margin: 2rem;
}

/* ============================================
   BOOKINGS STYLES
   ============================================ */

.bookings-loading:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--slate);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ice);
  border-top-color: var(--alpine-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bookings-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #ffeaea;
  border-radius: 12px;
  color: #c0392b;
  text-align: center;
}

.retry-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--alpine-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.retry-btn:hover {
  background: var(--pine);
}

.bookings-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.summary-number {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
}

.summary-label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Admin Charts */
.admin-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--ice);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chart-card h4 {
  margin: 0 0 0.75rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.chart-card canvas {
  max-height: 280px;
}

.bookings-filters {
  background: white;
  border: 1px solid var(--ice);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.bookings-filters > label {
  display: block;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.status-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.status-filter-options label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--slate);
  cursor: pointer;
}

.status-filter-options input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--alpine-blue);
  cursor: pointer;
}

.past-bookings-toggle {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ice);
}

.past-bookings-toggle label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--slate);
  cursor: pointer;
}

.past-bookings-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--alpine-blue);
  cursor: pointer;
}

.season-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--alpine-blue);
  display: flex;
  align-items: center;
}

.season-heading:first-of-type {
  margin-top: 0;
}

.season-line-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  margin-left: 0.5rem;
  height: 8px;
  cursor: help;
}

.season-seg {
  height: 100%;
}

.season-seg:first-child {
  border-radius: 4px 0 0 4px;
}

.season-seg:last-of-type {
  border-radius: 0 4px 4px 0;
}

.season-seg:first-child:last-of-type {
  border-radius: 4px;
}

.season-seg-booked {
  background: var(--alpine-blue);
}

.season-seg-avail {
  background: var(--sunset);
}

.season-seg-closed {
  background: var(--ice);
  opacity: 0.5;
}

.season-seg:hover {
  filter: brightness(1.2);
}

.season-seg-tip {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--charcoal);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.bookings-table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -1rem;
  padding: 0 1rem;
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bookings-table th,
.bookings-table td {
  padding: 0.875rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--ice);
}

.bookings-table th {
  background: var(--ice);
  font-weight: 500;
  color: var(--charcoal);
  white-space: nowrap;
}

.bookings-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.bookings-table th:last-child {
  border-radius: 0 8px 8px 0;
}

/* ──────────────────────────────────────────────────────────
   Sticky first two columns (guest name + check-in date).
   When the user scrolls the .bookings-table-wrapper horizontally,
   those two columns stay fixed on the left. The second column's
   left offset is --guest-col-width, measured by JS after render
   via ResizeObserver (see setupStickyColumns() in app.js).

   The totals row is intentionally excluded — its first cell has
   colspan=5, which would make sticky positioning collide with
   the second sticky column.
   ────────────────────────────────────────────────────────── */
.bookings-table thead th:first-child,
.bookings-table tbody .booking-row > td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

.bookings-table thead th:nth-child(2),
.bookings-table tbody .booking-row > td:nth-child(2) {
  position: sticky;
  left: var(--guest-col-width, 0);
  z-index: 2;
}

/* Headers need a higher z-index so they sit above body sticky cells. */
.bookings-table thead th:first-child,
.bookings-table thead th:nth-child(2) {
  z-index: 3;
}

/* Sticky body cells need opaque backgrounds so scrolled-under
   content doesn't bleed through. Expose --row-bg per row state
   and paint the sticky cells with it. Non-sticky cells keep the
   row's native rgba overlay so nothing else looks different. */
.booking-row {
  --row-bg: #fff;
}
.booking-row.booking-upcoming {
  --row-bg: rgb(248, 251, 252);
}
.booking-row.booking-current {
  --row-bg: rgb(237, 242, 240);
}
.booking-row:hover {
  --row-bg: rgb(246, 248, 251);
}

.bookings-table tbody .booking-row > td:first-child,
.bookings-table tbody .booking-row > td:nth-child(2) {
  background: var(--row-bg);
}

/* Subtle shadow on the right edge of the sticky block to give a
   visual cue that the first two columns are fixed. */
.bookings-table thead th:nth-child(2),
.bookings-table tbody .booking-row > td:nth-child(2) {
  box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.08);
}

.booking-row {
  transition: background 0.2s ease;
}

.booking-row:hover {
  background: rgba(74, 111, 165, 0.05);
}

.booking-upcoming {
  background: rgba(74, 111, 165, 0.03);
}

.booking-current {
  background: rgba(45, 90, 71, 0.08);
}

.booking-current td:first-child::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--pine);
  border-radius: 50%;
  margin-right: 0.5rem;
}

.booking-past {
  display: none;
}

.show-past-bookings .booking-past {
  display: table-row;
}

.booking-past-hint td {
  text-align: center;
  color: var(--slate);
  opacity: 0.5;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
}

.show-past-bookings .booking-past-hint {
  display: none;
}

.booking-past > td {
  opacity: 0.6;
}

.booking-past > td.guest-name {
  opacity: 1;
}

.booking-past .guest-name-text {
  opacity: 0.6;
}

.guest-name {
  position: relative;
  font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
}

.guest-name-text {
  border-bottom: 1px dashed var(--alpine-blue);
}

.booking-popup {
  position: fixed;
  z-index: 1000;
  min-width: 280px;
  max-width: 360px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: all 0.25s ease;
  pointer-events: none;
  text-align: left;
}

.booking-popup.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.booking-popup-header {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ice);
  color: var(--charcoal);
}

.booking-popup-details {
  padding: 0.6rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--slate);
}

.booking-popup-details div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-popup-copyable {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.booking-popup-copyable span,
.booking-popup-copyable a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-popup-copyable a {
  color: var(--alpine-blue);
  text-decoration: none;
}

.booking-popup-copyable a:hover {
  text-decoration: underline;
}

.booking-popup-copy-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease;
  line-height: 1;
}

.booking-popup-copy-btn:hover {
  opacity: 1;
  background: var(--ice);
}

.booking-popup-id {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #999;
}

.booking-source {
  color: var(--slate);
  font-size: 0.85rem;
}

.booking-net {
  font-weight: 500;
  white-space: nowrap;
  color: var(--pine);
}

.booking-lai,
.booking-firebase,
.booking-key,
.booking-edit {
  text-align: center;
}

/* Hide integration columns when the integration is not configured for this listing */
#admin-bookings.hide-lai-col .booking-lai,
#admin-bookings.hide-lai-col .integration-col-lai { display: none; }
#admin-bookings.hide-keys-col .booking-key,
#admin-bookings.hide-keys-col .integration-col-casamast { display: none; }
#admin-bookings.hide-booking-notification-col .integration-col-booking-notification { display: none; }
#admin-bookings.hide-whatsapp-col .integration-col-whatsapp { display: none; }
#admin-bookings.hide-etat-des-lieux-col .integration-col-etat-des-lieux { display: none; }

.booking-lai input[type="checkbox"],
.booking-firebase input[type="checkbox"],
.booking-key input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  cursor: default;
  accent-color: var(--pine);
}

.booking-row.editing .booking-lai input[type="checkbox"],
.booking-row.editing .booking-firebase input[type="checkbox"],
.booking-row.editing .booking-key input[type="checkbox"] {
  cursor: pointer;
}

.create-token-btn,
.create-lai-btn {
  background: var(--alpine-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: default;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.55;
  pointer-events: none;
}

.create-lai-btn {
  background: var(--pine);
}

.booking-row.editing .create-token-btn,
.booking-row.editing .create-lai-btn:not(:disabled) {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

.booking-row.editing .create-token-btn:hover {
  background: var(--alpine-blue-light);
  transform: scale(1.1);
}

.booking-row.editing .create-lai-btn:not(:disabled):hover {
  filter: brightness(1.2);
  transform: scale(1.1);
}

.create-token-btn.loading,
.create-lai-btn.loading {
  background: var(--slate);
  cursor: wait;
  opacity: 1;
}

.lai-cancel-pending {
  opacity: 0.6;
}

.edit-row-btn {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.booking-row:hover .edit-row-btn {
  opacity: 1;
}

.edit-row-btn:hover {
  background: rgba(74, 111, 165, 0.1);
}

/* When any row is being edited, hide edit buttons on other rows */
.bookings-table.has-editing .booking-row:not(.editing) .edit-row-btn {
  opacity: 0 !important;
  pointer-events: none;
}

.booking-row.editing {
  background: rgba(74, 111, 165, 0.08);
  border-left: 3px solid var(--alpine-blue, #4a6fa5);
}

.booking-row.editing .edit-row-btn {
  opacity: 1;
  background: var(--pine);
  color: white;
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}

/* Expanded edit row */
.booking-edit-expanded {
  background: rgba(74, 111, 165, 0.08);
  border-left: 3px solid var(--alpine-blue, #4a6fa5);
  border-top: 1px dashed rgba(74, 111, 165, 0.2);
}

.booking-edit-expanded td {
  padding: 0.5rem 0.75rem 0.75rem;
}

.booking-edit-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.booking-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.booking-edit-field label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--slate, #6c757d);
  letter-spacing: 0.05em;
}

.booking-edit-field input,
.booking-edit-field select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--alpine-blue, #4a6fa5);
  border-radius: 4px;
  background: var(--snow, #fff);
  font-size: 0.85rem;
  color: var(--charcoal, #2c3e50);
}

.booking-edit-field input:focus,
.booking-edit-field select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.3);
}

.booking-edit-field input:disabled,
.booking-edit-field select:disabled {
  background: var(--cloud, #f1f3f5);
  border-color: var(--mist, #c7ced6);
  color: var(--slate, #6c757d);
  cursor: not-allowed;
  opacity: 0.85;
}

/* Inline editable cells in main row */
.booking-row.editing .booking-inline-input {
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--alpine-blue, #4a6fa5);
  border-radius: 3px;
  font-size: 0.85rem;
  background: var(--snow, #fff);
  color: var(--charcoal, #2c3e50);
  width: 100%;
  box-sizing: border-box;
}

.booking-row.editing .booking-inline-select {
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--alpine-blue, #4a6fa5);
  border-radius: 3px;
  font-size: 0.75rem;
  background: var(--snow, #fff);
  color: var(--charcoal, #2c3e50);
}

.booking-row.editing td.field-locked {
  opacity: 0.5;
}

/* Token locked note */
.booking-edit-token-note {
  font-size: 0.75rem;
  color: var(--alpine-blue, #4a6fa5);
  font-style: italic;
  padding: 0.25rem 0;
}

/* Casamast phones (read-only) */
.booking-edit-phones {
  font-size: 0.8rem;
  color: var(--slate, #6c757d);
}

.booking-edit-phones span {
  display: inline-block;
  margin-right: 0.75rem;
}

/* Save/Cancel/Delete buttons in edit mode */
.booking-edit-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.booking-edit-save,
.booking-edit-cancel {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
}

.booking-edit-save {
  background: var(--pine, #2d5a47);
  color: white;
}

.booking-edit-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.booking-edit-cancel {
  background: transparent;
  border: 1px solid var(--slate, #6c757d);
  color: var(--slate, #6c757d);
}

.booking-edit-delete {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  border: none;
  background: #c0392b;
  color: white;
  margin-right: auto;
}

.booking-edit-delete:hover {
  background: #a93226;
}

/* Delete confirmation */
.booking-delete-confirm {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: #c0392b;
}

.booking-delete-confirm button {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  cursor: pointer;
  border: none;
}

.booking-delete-yes {
  background: #c0392b;
  color: white;
}

.booking-delete-no {
  background: transparent;
  border: 1px solid var(--slate, #6c757d);
  color: var(--slate, #6c757d);
}

/* Validation error */
.booking-edit-error {
  font-size: 0.75rem;
  color: #c0392b;
  padding: 0.25rem 0;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-confirmed,
.status-new {
  background: rgba(45, 90, 71, 0.15);
  color: var(--pine);
}

.status-cancelled {
  background: rgba(192, 57, 43, 0.15);
  color: #c0392b;
}

.status-black {
  background: rgba(0, 0, 0, 0.1);
  color: var(--charcoal);
}

.status-inquiry {
  background: rgba(212, 168, 83, 0.2);
  color: #b8860b;
}

.status-unknown {
  background: var(--ice);
  color: var(--slate);
}

.status-refused {
  background: #f5f5f5;
  color: #757575;
  border: 1px solid #e0e0e0;
}

.status-unpaid {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffcc80;
}

/* Booking row actions — visible on hover only */
.booking-actions {
  display: inline-flex;
  gap: 2px;
  visibility: hidden;
  white-space: nowrap;
}

tr:hover .booking-actions,
tr:focus-within .booking-actions {
  visibility: visible;
}

.inquiry-accept-btn, .inquiry-refuse-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
}

.inquiry-action-panel {
  background: #fafafa;
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
}

.inquiry-action-panel input,
.inquiry-action-panel textarea {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 8px;
}

.inquiry-action-confirm {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  background: var(--alpine-blue);
  color: #fff;
  margin-right: 4px;
}

.inquiry-action-cancel {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  background: #eee;
  color: #333;
}

.booking-totals {
  background: var(--ice);
  font-weight: 500;
}

.booking-totals td {
  border-bottom: none;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.totals-label {
  text-align: right;
  color: var(--charcoal);
}

.totals-price {
  color: var(--pine);
  font-size: 1rem;
}

.totals-net {
  color: var(--pine);
  font-size: 1rem;
  font-weight: 600;
}

.bookings-updated {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--slate);
  text-align: center;
  font-style: italic;
}

@media (max-width: 768px) {
  .bookings-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
  }

  .summary-number {
    font-size: 1.5rem;
  }

  .admin-charts {
    grid-template-columns: 1fr;
  }

  .bookings-table {
    font-size: 0.8rem;
  }

  .bookings-table th,
  .bookings-table td {
    padding: 0.625rem 0.5rem;
  }

  /* Don't hide columns on narrow screens — the .bookings-table-wrapper has
     overflow-x: auto so the table scrolls horizontally instead. Hiding the
     integration columns previously caused misalignment between header,
     body, and totals row, and the owner needs the cleaning/key/notif
     columns visible at all sizes. */
}

/* App download QR codes */
.app-download {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

.app-download-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.qr-code {
  border: 1px solid var(--ice);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

@media (max-width: 600px) {
  .app-download {
    gap: 1rem;
  }

  .qr-code {
    width: 120px;
    height: 120px;
  }
}

/* ============================================
   SUPER ADMIN STYLES
   ============================================ */

/* Owners table */
.owners-table .owners-actions-th {
  width: 120px;
}

.owners-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  text-align: right;
}

.owner-row:hover .owners-actions {
  opacity: 1;
}

.owner-row {
  cursor: pointer;
}

.owner-row.owner-disabled > td {
  opacity: 0.5;
}

.owner-row.owner-disabled > td:last-child {
  opacity: 1;
}

.owner-action-btn {
  background: none;
  border: 1px solid var(--ice);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  margin-left: 0.25rem;
}

.owner-action-btn:hover {
  background: var(--ice);
  border-color: var(--alpine-blue);
}

.owner-action-delete:hover {
  background: #ffeaea;
  border-color: #c0392b;
}

/* Status badges */
.owner-status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background: rgba(45, 90, 71, 0.1);
  color: var(--pine);
}

.status-inactive {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

/* Owner detail panel */
.owner-detail-panel {
  margin-top: 1rem;
}

.owner-detail-back {
  background: none;
  border: none;
  color: var(--alpine-blue);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem 0;
  font-family: 'Outfit', sans-serif;
}

.owner-detail-back:hover {
  text-decoration: underline;
}

.owner-detail-info {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--ice);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.owner-detail-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.owner-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--alpine-blue) 0%, var(--pine) 100%);
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
}

.owner-detail-fields h3 {
  margin: 0 0 0.75rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--charcoal);
}

.owner-detail-fields p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--slate);
}

.owner-detail-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--alpine-blue);
}

/* ── Admin Tabs (shared between owner admin and super-admin) ─────── */
.admin-tabs:not([hidden]) {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ice);
  margin-bottom: 1.5rem;
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--slate);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
}

.admin-tab:hover {
  color: var(--alpine-blue);
}

.admin-tab.active {
  color: var(--alpine-blue);
  border-bottom-color: var(--alpine-blue);
  font-weight: 700;
}

/* ── Location Management ─────────────────────────────── */
.location-add-btn {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-color: var(--alpine-blue);
  color: var(--alpine-blue);
}

.location-add-btn:hover {
  background: var(--alpine-blue);
  color: white;
}

.location-section {
  margin-bottom: 0.5rem;
}

.location-section.collapsed .location-section-body {
  display: none;
}

.location-section-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.location-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.location-section.collapsed .location-chevron {
  transform: rotate(-90deg);
}

.location-array-editor {
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
}

.location-array-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate);
  margin: 0.75rem 0 0.5rem;
}

.location-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--ice);
  font-size: 0.9rem;
}

.location-entry-row:hover {
  background: rgba(52, 152, 219, 0.04);
}

.location-entry-summary {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-entry-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.location-entry-row:hover .location-entry-actions {
  opacity: 1;
}

.location-entry-form {
  background: var(--snow);
  border: 1px solid var(--ice);
  border-radius: 8px;
  padding: 1rem;
  margin: 0.5rem 0;
  display: none;
}

.location-form-field {
  margin-bottom: 0.5rem;
}

.location-form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 0.2rem;
}

.location-form-field input,
.location-form-field select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--ice);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
}

.location-form-field input:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.location-form-boolean label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.location-form-boolean input[type="checkbox"] {
  width: auto;
}

.location-form-bilingual .bilingual-inputs {
  display: flex;
  gap: 0.5rem;
}

.location-form-bilingual .bilingual-inputs input {
  flex: 1;
}

/* Rich text editor */
.richtext-toolbar {
  display: flex;
  gap: 2px;
  padding: 0.3rem;
  border: 1px solid var(--ice);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--snow);
  align-items: center;
}

.richtext-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--slate);
}

.richtext-btn:hover {
  background: var(--ice);
  border-color: var(--ice);
}

.richtext-sep {
  width: 1px;
  height: 1.1rem;
  background: var(--ice);
  margin: 0 0.2rem;
}

.richtext-editor {
  width: 100%;
  min-height: 8rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--ice);
  border-radius: 0 0 6px 6px;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
  line-height: 1.5;
  overflow-y: auto;
}

.richtext-editor:focus {
  outline: none;
  border-color: var(--alpine-blue);
}

.richtext-editor ul, .richtext-editor ol {
  margin: 0.3rem 0;
  padding-left: 1.5rem;
}

.richtext-editor a {
  color: var(--alpine-blue);
}

.location-save-btn {
  background: var(--alpine-blue) !important;
  color: white !important;
  border-color: var(--alpine-blue) !important;
}

.location-save-btn:hover {
  opacity: 0.9;
}

.location-add-entry-btn {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* Listing object editor */
.listing-object-editor {
  margin-bottom: 1.5rem;
}

.listing-object-values {
  margin-bottom: 0.5rem;
}

.listing-object-value-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.25rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--ice);
}

.listing-object-label {
  color: var(--slate);
  opacity: 0.7;
  min-width: 120px;
  font-size: 0.8rem;
}

.listing-object-value {
  color: var(--charcoal);
  flex: 1;
}

.listing-object-display .owner-action-btn {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .owner-detail-info {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .owners-actions {
    opacity: 1;
  }

  .location-entry-actions {
    opacity: 1;
  }

  .admin-tab {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .location-form-bilingual .bilingual-inputs {
    flex-direction: column;
  }
}

/* Booking sync banner */
.sync-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 8px 16px;
  text-align: center;
  font-size: 0.85rem;
  background: var(--accent-blue, #2196F3);
  color: white;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sync-banner.cached {
  background: var(--accent-orange, #FF9800);
}

.sync-banner.fade-out {
  opacity: 0;
  transform: translateY(-100%);
}

/* Cancelled booking row */
.booking-row.cancelled {
  opacity: 0.5;
  text-decoration: line-through;
}

.booking-row.cancelled .status-badge {
  background: #e53935;
  color: white;
}

/* ── Toast notifications ────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2e7d32;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: Outfit, sans-serif;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10000;
  pointer-events: none;
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast--error {
  background: #c62828;
}

/* WhatsApp launcher plugin */
.integration-col-whatsapp {
  width: 40px;
  text-align: center;
}
.integration-col-whatsapp .whatsapp-launcher-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.integration-col-whatsapp .whatsapp-launcher-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}
.integration-col-whatsapp .whatsapp-launcher-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.booking-whatsapp-expanded > td {
  background: var(--surface-muted, #f7f7f7);
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
}
.whatsapp-launcher-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem 1.5rem;
}
.whatsapp-launcher-preview-field,
.whatsapp-launcher-actions {
  grid-column: 1 / -1;
}
.whatsapp-launcher-template-select {
  max-width: 240px;
}
.whatsapp-launcher-lang-select {
  max-width: 120px;
}
.whatsapp-launcher-token-hint {
  font-size: 0.8rem;
  color: var(--text-muted, #777);
  margin-top: 0.25rem;
}
.whatsapp-launcher-phone-select {
  max-width: 260px;
}
.whatsapp-launcher-preview {
  background: #fff;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  white-space: pre-wrap;
  margin: 0.25rem 0 0 0;
  min-height: 6rem;
  opacity: 1;
  transition: opacity 150ms ease;
}
.whatsapp-launcher-preview-fade {
  animation: whatsapp-preview-cross-fade 150ms ease;
}
@keyframes whatsapp-preview-cross-fade {
  0%   { opacity: 0.35; }
  100% { opacity: 1; }
}
.whatsapp-launcher-actions {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}
.whatsapp-launcher-open-btn {
  background: var(--accent, #1a3c4a);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}
.whatsapp-launcher-cancel-btn {
  background: transparent;
  border: 1px solid var(--border-color, #ccc);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

/* ============================================
   INTEGRATION GROUPS RENDERER
   ============================================ */
.int-group-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--slate, #2d3748);
  opacity: 0.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1rem 0 0.5rem;
}
.int-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.int-card {
  background: var(--ice, #e8eff5);
  border: 1px solid var(--ice-deep);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
}
.int-card.expanded {
  background: #fff;
  box-shadow: 0 2px 6px rgba(74, 111, 165, 0.1);
}
.int-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.int-card-icon {
  font-size: 1.4rem;
}
.int-card-title-block {
  flex: 1;
  min-width: 0;
}
.int-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal, #1a202c);
}
.int-card-desc {
  font-size: 0.8rem;
  color: var(--slate, #2d3748);
  opacity: 0.8;
  margin-top: 0.15rem;
}
.int-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.int-pill.status-active { background: #d4edda; color: #155724; }
.int-pill.status-always { background: #e0ecef; color: var(--alpine-blue, #4a6fa5); }
.int-pill.status-available { background: #e2e3e5; color: #6c757d; }
.int-pill.status-disabled,
.integration-status.status-disabled { background: #e9ecef; color: #495057; }

/* Owner-facing disable toggle (admin tile head). */
.int-card-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}
.int-card-toggle {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 20px;
  background: #ced4da;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
  margin: 0;
  flex-shrink: 0;
}
.int-card-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.int-card-toggle:checked {
  background: #1a3c4a;
}
.int-card-toggle:checked::after {
  transform: translateX(16px);
}
.int-card-toggle:disabled {
  opacity: 0.5;
  cursor: wait;
}
.int-card-toggle-loader {
  width: 24px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Hidden state keeps the layout: width is preserved, only visibility flips. */
.int-card-toggle-loader.is-hidden {
  visibility: hidden;
}
.int-card-toggle-error {
  margin-left: 8px;
  font-size: 0.8rem;
  color: #c0392b;
  flex-shrink: 0;
}
.int-card-body[hidden] { display: none; }
.int-card.expanded .int-card-body {
  display: block;
  margin-top: 0.75rem;
}
.int-empty-note {
  font-size: 0.9rem;
  color: var(--slate, #2d3748);
  opacity: 0.75;
  padding: 1.5rem 0;
  text-align: center;
}

/* Zero-listings empty state (owner has no listings yet) */
.empty-listings-block {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--slate, #2d3748);
  max-width: 32rem;
  margin: 2rem auto;
}
.empty-listings-block h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--charcoal, #1a202c);
  margin: 0 0 0.5rem;
}
.empty-listings-block p {
  margin: 0 auto 1.25rem;
  opacity: 0.85;
}
.empty-listings-cta {
  background: var(--alpine-blue, #4a6fa5);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.empty-listings-cta:hover {
  background: var(--pine, #2d5a47);
}

/* ============================================================
   Super-admin location integrations panel (Task 10)
   ============================================================ */
.location-subtabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--ice-deep, #d0d8e0);
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}
.location-subtab {
  background: none;
  border: none;
  padding: 0.6rem 0;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate, #2d3748);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  opacity: 0.7;
}
.location-subtab.active {
  color: var(--alpine-blue, #4a6fa5);
  border-bottom-color: var(--alpine-blue, #4a6fa5);
  opacity: 1;
  font-weight: 600;
}
.location-subtab-panel.hidden {
  display: none;
}
.loc-int-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.loc-int-row {
  background: #fff;
  border: 1px solid var(--ice-deep, #d0d8e0);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.loc-int-row.readonly {
  background: #fafbfc;
  border-style: dashed;
}
.loc-int-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}
.loc-int-title-block {
  flex: 1;
  min-width: 0;
}
.loc-int-name {
  font-weight: 600;
  color: var(--charcoal, #1a202c);
}
.loc-int-meta {
  font-size: 0.8rem;
  color: var(--slate, #2d3748);
  opacity: 0.85;
  margin-top: 0.15rem;
}
.loc-int-meta em {
  font-style: italic;
  opacity: 0.9;
}
.loc-int-toggle-label {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
  flex-shrink: 0;
}
.loc-int-toggle-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.loc-int-toggle-slider {
  position: absolute;
  inset: 0;
  background: #c4ccd4;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.loc-int-toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background: #fff;
  transition: transform 0.2s;
}
.loc-int-toggle-label input:checked + .loc-int-toggle-slider {
  background: var(--alpine-blue, #4a6fa5);
}
.loc-int-toggle-label input:checked + .loc-int-toggle-slider::after {
  transform: translateX(20px);
}

/* ============================================
   ADMIN TOPBAR (replaces the old admin-hero)
   ============================================ */

.admin-topbar {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--slate) 50%, var(--alpine-blue) 100%);
  color: var(--snow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 52px;
  padding: 0 1rem;
  position: relative;
  font-family: 'Outfit', sans-serif;
}

.admin-topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  flex-shrink: 0;
}
.admin-topbar__brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: var(--snow);
}
.admin-topbar__brand-slash {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}
.admin-topbar__brand-role {
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--alpine-blue-light, #7ba3d8);
}

.admin-topbar__listing {
  display: flex !important; /* override inline display:none from the HTML once JS reveals it */
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
}
.admin-topbar__listing[style*="display: none"] {
  display: none !important;
}
.admin-topbar__listing-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--snow);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 1.8rem 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='white' stroke-width='1.3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}
.admin-topbar__listing-select:focus {
  outline: 2px solid var(--alpine-blue-light, #7ba3d8);
  outline-offset: 1px;
}
.admin-topbar__listing-select option {
  background: #fff;
  color: var(--charcoal);
}
.admin-topbar__icon-btn {
  background: none;
  border: none;
  color: var(--snow);
  opacity: 0.7;
  font-size: 0.9rem;
  padding: 0.2rem 0.35rem;
  cursor: pointer;
  border-radius: 6px;
}
.admin-topbar__icon-btn:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

.admin-topbar__spacer { flex: 1 1 auto; }

.admin-topbar__profile {
  position: relative;
}

.admin-topbar__round-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.admin-topbar__round-btn:hover { background: rgba(255, 255, 255, 0.14); transform: scale(1.05); }
.admin-topbar__round-btn:focus { outline: 2px solid var(--alpine-blue-light, #7ba3d8); outline-offset: 2px; }
/* Avatar button hook — reserved for future photo-based styling. Inherits round-btn base. */
.admin-topbar__avatar-btn { padding: 0; }

.admin-topbar__avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--alpine-blue-light, #7ba3d8) 0%, var(--alpine-blue) 100%);
  color: #fff;
}
.admin-topbar__avatar svg { width: 20px; height: 20px; fill: currentColor; }
.admin-topbar__avatar--lg { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.admin-topbar__avatar--lg svg { width: 24px; height: 24px; }

.admin-topbar__dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: #fff;
  color: var(--charcoal);
  border: 1px solid var(--ice-deep, #d0d8e0);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(26, 32, 44, 0.18);
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 100;
}
.admin-topbar__dropdown[hidden] { display: none; }
.admin-topbar__dropdown--profile { min-width: 240px; }

.admin-topbar__menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--charcoal);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.admin-topbar__menu-item:hover { background: var(--ice, #e8eff5); }
.admin-topbar__menu-item.active { color: var(--alpine-blue); font-weight: 600; }
.admin-topbar__menu-item.admin-topbar__signout { color: #c0392b; }
.admin-topbar__menu-item.admin-topbar__signout:hover { background: #fdf0ef; }

.admin-topbar__profile-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--ice, #e8eff5);
  margin-bottom: 0.35rem;
}
.admin-topbar__profile-meta { min-width: 0; flex: 1 1 auto; }
.admin-topbar__profile-email {
  font-size: 0.82rem;
  color: var(--charcoal);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-topbar__profile-context {
  font-size: 0.7rem;
  color: var(--slate);
  opacity: 0.75;
  margin-top: 0.1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Minimal topbar variant — used on setup.html where profile + listing clusters are absent. */
.admin-topbar--minimal .admin-topbar__spacer { min-width: 2rem; }

/* Tighten the gap below the topbar — the old hero left a lot of breathing room,
   the compact bar does not need it. Global `main { padding: 4rem 2rem }` stays
   for booklet / landing / minisite; admin pages get a smaller top padding. */
.admin-topbar + main,
.admin-topbar ~ main {
  padding-top: 1.25rem;
}

/* Responsive: narrow viewports hide the brand role label and the add button */
@media (max-width: 640px) {
  .admin-topbar { padding: 0 0.6rem; gap: 0.5rem; }
  .admin-topbar__brand-slash,
  .admin-topbar__brand-role { display: none; }
  .admin-topbar__listing-select { max-width: 140px; text-overflow: ellipsis; }
  #listingAddBtn { display: none !important; }
  .admin-topbar + main,
  .admin-topbar ~ main { padding-top: 0.75rem; }
}

/* ============================================
   ÉTAT DES LIEUX — Inspection Integration
   ============================================ */

/* Banner in guest booklet */
.edl-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--alpine-blue);
  color: white;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.edl-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  color: white;
}
.edl-banner-text strong {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}
.edl-banner-text p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: white;
  opacity: 0.9;
}
.edl-banner-done {
  background: var(--pine);
}
.edl-banner button {
  background: white;
  color: var(--alpine-blue);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.edl-banner-done button {
  color: var(--pine);
}

/* Issue reporting CTA */
.edl-issue-cta {
  text-align: center;
  margin: 1rem 0;
}
.edl-issue-cta-desc {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--slate);
}
.edl-issue-cta button {
  background: transparent;
  border: 1px solid var(--sunset);
  color: var(--sunset);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.edl-issue-closed {
  text-align: center;
  color: var(--slate);
  font-size: 0.85rem;
  margin: 0.5rem 0;
  opacity: 0.7;
}

/* Full-screen inspection form overlay */
.edl-form-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.edl-form-container,
.edl-detail-panel {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}
.edl-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.edl-room-header h3 {
  font-size: 1.1rem;
  color: var(--charcoal);
}
.edl-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--slate);
  line-height: 1;
}

/* Prefill notice */
.edl-prefill-notice {
  background: var(--ice);
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
}
.edl-prefill-notice p {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0.5rem;
}
.edl-prefill-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.edl-prefill-actions button {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--alpine-blue);
  cursor: pointer;
  font-size: 0.9rem;
}
.edl-prefill-same {
  background: var(--alpine-blue);
  color: white;
}
.edl-prefill-modify {
  background: white;
  color: var(--alpine-blue);
}

/* Radio groups */
.edl-radio-group {
  border: none;
  margin-bottom: 1rem;
}
.edl-radio-group legend {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.edl-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Photo grid */
.edl-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.edl-photo-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
}
.edl-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edl-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.edl-add-photo-btn {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border: 1px dashed var(--ice-deep);
  border-radius: 6px;
  color: var(--alpine-blue);
  cursor: pointer;
  font-size: 0.85rem;
}
.edl-max-photos {
  color: var(--ice-deep);
  font-size: 0.8rem;
}

/* Notes */
.edl-notes {
  margin-bottom: 1rem;
}
.edl-notes label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.edl-notes-input {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  border: 1px solid var(--ice-deep);
  border-radius: 6px;
  font-size: 0.9rem;
  resize: vertical;
}

/* Navigation buttons */
.edl-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 0.5rem;
}
.edl-nav button {
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
}
.edl-prev-btn {
  background: var(--ice);
  color: var(--charcoal);
}
.edl-next-btn,
.edl-summary-btn {
  background: var(--alpine-blue);
  color: white;
}

/* Summary screen */
.edl-summary {
  margin-top: 0.5rem;
}
.edl-summary-rooms {
  margin-bottom: 1rem;
}
.edl-summary-room {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ice);
  font-size: 0.9rem;
}
.edl-summary-room-name {
  flex: 1;
  font-weight: 500;
}
.edl-summary-room-status {
  color: var(--slate);
}
.edl-summary-room-photos {
  color: var(--ice-deep);
  font-size: 0.85rem;
}
.edl-edit-room-btn {
  background: none;
  border: none;
  color: var(--alpine-blue);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

/* Full name + consent */
.edl-fullname,
.edl-consent {
  margin-bottom: 1rem;
}
.edl-fullname label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.edl-fullname-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--ice-deep);
  border-radius: 6px;
  font-size: 0.95rem;
}
.edl-consent label {
  font-size: 0.85rem;
  color: var(--slate);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
.edl-consent a {
  color: var(--alpine-blue);
}

/* Signature pad */
.edl-signature {
  margin-bottom: 1rem;
}
.edl-signature label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.edl-signature-canvas {
  width: 100%;
  height: 150px;
  border: 1px solid var(--ice-deep);
  border-radius: 6px;
  touch-action: none;
  cursor: crosshair;
}
.edl-clear-sig-btn {
  background: none;
  border: none;
  color: var(--sunset);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.25rem;
}
.edl-signature-img {
  max-width: 200px;
  border: 1px solid var(--ice);
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* Submit area */
.edl-submit-area {
  text-align: center;
}
.edl-submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--pine);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.edl-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.edl-submit-error,
.edl-issue-error {
  color: var(--sunset);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Thank you screen */
.edl-thank-you {
  text-align: center;
  padding: 2rem 1rem;
}
.edl-thank-you h3 {
  color: var(--pine);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.edl-thank-you p {
  color: var(--slate);
  margin-bottom: 1.5rem;
}
.edl-close-thank-btn {
  background: var(--alpine-blue);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Issue modal */
.edl-issue-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.edl-issue-form {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}
.edl-issue-field {
  margin-bottom: 1rem;
}
.edl-issue-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.edl-issue-room-select,
.edl-issue-desc {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--ice-deep);
  border-radius: 6px;
  font-size: 0.9rem;
}
.edl-issue-desc {
  min-height: 80px;
  resize: vertical;
}
.edl-issue-actions {
  text-align: center;
}
.edl-issue-submit-btn {
  width: 100%;
  padding: 0.65rem;
  background: var(--sunset);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.edl-issue-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Admin detail panel */
.edl-detail-overlay {
  z-index: 10001;
}
.edl-detail-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--ice);
}
.edl-tab-btn {
  flex: 1;
  padding: 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--slate);
}
.edl-tab-btn.active {
  border-bottom-color: var(--alpine-blue);
  color: var(--alpine-blue);
}
.edl-detail-content {
  min-height: 200px;
}

/* Inspection detail rooms */
.edl-inspection-detail {}
.edl-detail-room {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ice);
}
.edl-detail-room h4 {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}
.edl-detail-room p {
  font-size: 0.85rem;
  color: var(--slate);
}
.edl-detail-notes {
  font-style: italic;
}
.edl-prefill-tag {
  color: var(--alpine-blue);
  font-size: 0.8rem;
}
.edl-detail-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.edl-detail-photo-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}
.edl-detail-signature {
  padding: 1rem 0;
  border-top: 1px solid var(--ice);
  margin-top: 0.5rem;
}
.edl-readonly-body {
  padding: 0.5rem 0;
  overflow-y: auto;
}
.edl-readonly-loader {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

/* Click-to-zoom photo lightbox (booklet + admin detail) */
.edl-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
  animation: fadeIn 0.15s ease-out;
}
.edl-photo-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  /* Allow native pinch-to-zoom on touch devices */
  touch-action: pinch-zoom;
}
.edl-photo-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.edl-photo-lightbox-close:hover,
.edl-photo-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}

/* Tactile affordance — let users see the thumbnails are interactive */
.edl-detail-photo-thumb {
  cursor: zoom-in;
  transition: transform 0.1s ease-out;
}
.edl-detail-photo-thumb:hover {
  transform: scale(1.04);
}

/* Issues list */
.edl-issues-list {}
.edl-issue-card {
  padding: 0.75rem;
  border: 1px solid var(--ice);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.edl-issue-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.edl-badge-open {
  background: var(--sunset);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.edl-badge-resolved {
  background: var(--pine);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.edl-issue-room {
  color: var(--slate);
  font-size: 0.85rem;
}
.edl-issue-description {
  font-size: 0.9rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}
.edl-issue-date {
  font-size: 0.8rem;
  color: var(--ice-deep);
}
.edl-resolution-note {
  font-size: 0.85rem;
  color: var(--pine);
  font-style: italic;
  margin-top: 0.25rem;
}
.edl-resolve-area {
  margin-top: 0.5rem;
}
.edl-resolve-note {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--ice-deep);
  border-radius: 4px;
  font-size: 0.85rem;
  min-height: 40px;
  resize: vertical;
  margin-bottom: 0.5rem;
}
.edl-resolve-btn {
  background: var(--pine);
  color: white;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Booking cell status icons */
.edl-status-signed {
  color: var(--pine);
  font-weight: bold;
}
.edl-status-pending {
  color: var(--ice-deep);
}
.edl-issue-badge {
  color: var(--sunset);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Listing edit panel */
.edl-listing-edit {}
.edl-config-notice {
  padding: 1rem;
  background: var(--ice);
  border-radius: 8px;
  text-align: center;
}
.edl-config-notice p {
  color: var(--slate);
  font-size: 0.9rem;
}
.edl-room-template h4 {
  font-size: 0.95rem;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}
.edl-room-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.edl-room-toggle {
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.edl-room-toggle input:disabled {
  opacity: 0.5;
}
.edl-actions {
  text-align: center;
}
.edl-save-btn {
  padding: 0.5rem 1.5rem;
}
.edl-message {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Loader */
.edl-loader {
  text-align: center;
  padding: 2rem;
}

.performance-empty {
  max-width: 56ch;
  margin: 3rem auto;
  text-align: center;
  color: var(--slate);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
}

.performance-empty a {
  color: var(--alpine-blue);
  text-decoration: none;
  border-bottom: 1px dashed var(--alpine-blue);
  transition: border-bottom-color 0.15s ease, color 0.15s ease;
}

.performance-empty a:hover {
  color: var(--slate);
  border-bottom-style: solid;
}

@keyframes integration-group-highlight {
  0%   { background-color: var(--alpine-blue-light); }
  100% { background-color: transparent; }
}

.integration-group--highlight {
  animation: integration-group-highlight 1.5s ease-out;
}
