/*
   global.css — dkcleanedit
   load order: token.css → global.css → page-specific css

   changes from previous version:
     - hamburger: duplicate block removed from bottom of file.
       the definitive hamburger lives in home.css only, which is
       the only page that uses the mobile menu. having two conflicting
       implementations (translateX slide here vs opacity/slide in home.css)
       caused the menu to fight itself on mobile.
     - btn width: the @media (max-width: 560px) rule no longer sets
       .btn { width: 100% } globally. that was making every button on
       admin pages, order cards, and inline rows go full-width.
       only .hero-actions .btn and .popup-actions .btn go full-width.
     - body background: now uses var(--bg) / var(--bg-2) so it adapts
       to the light theme token override on the homepage.
     - all other rules are unchanged.
*/

[hidden],
.overlay[hidden] {
  display:        none !important;
  pointer-events: none !important;
}

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

html {
  scroll-behavior: smooth;
}

html, body {
  min-height:  100%;
  max-width:   100%;
  overflow-x:  hidden;
}

body {
  margin:                 0;
  font-family:            var(--font);
  background-color:       var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering:         optimizeLegibility;
}

/* dark-system pages keep the gradient background */
body:not([data-theme="light"]) {
  background:
    radial-gradient(900px 360px at 100% -10%, rgba(74, 144, 232, 0.06), transparent 60%),
    radial-gradient(700px 260px at 0%   0%,   rgba(74, 144, 232, 0.05), transparent 58%),
    linear-gradient(180deg, #0a1120 0%, #0d1726 100%);
}

img,
video {
  max-width: 100%;
  display:   block;
}

a {
  color:           inherit;
  text-decoration: none;
  transition:
    color            var(--ease),
    background-color var(--ease),
    border-color     var(--ease),
    box-shadow       var(--ease),
    transform        var(--ease),
    opacity          var(--ease);
}

button,
input,
select,
textarea {
  font: inherit;
}

button { cursor: pointer; }

:focus-visible {
  outline:    none;
  box-shadow: var(--focus);
}

::selection {
  background: rgba(74, 144, 232, 0.25);
}


/* ── typography ─────────────────────────────────────────────────────── */

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1 {
  font-family:    var(--font-display, system-ui, sans-serif);
  font-size:      clamp(2rem, 4vw + 0.5rem, 3.25rem);
  font-weight:    800;
  line-height:    1.1;
  letter-spacing: -0.02em;
  color:          var(--text, #e6f2ff);
  margin-bottom:  var(--s-3, 1rem);
  text-wrap:      balance;
  max-width:      22ch;
}

h2 {
  font-family:    var(--font-display, system-ui, sans-serif);
  font-size:      clamp(1.4rem, 2.5vw + 0.3rem, 2.2rem);
  font-weight:    700;
  line-height:    1.16;
  letter-spacing: -0.015em;
  color:          var(--text, #e6f2ff);
  margin-bottom:  var(--s-3, 1rem);
  text-wrap:      balance;
  max-width:      30ch;
}

h3 {
  font-size:     1.05rem;
  font-weight:   700;
  line-height:   1.3;
  color:         var(--text-2);
  margin-bottom: var(--s-2);
}

p {
  color:       var(--text-2);
  line-height: 1.72;
}

.sub {
  max-width:   62ch;
  color:       var(--text-3);
  line-height: 1.78;
  font-size:   1rem;
}

.eyebrow {
  display:        inline-flex;
  align-items:    center;
  gap:            8px;
  height:         28px;
  padding:        0 12px;
  border-radius:  var(--r-pill);
  border:         1px solid var(--primary-border);
  background:     var(--primary-050);
  color:          var(--primary-400);
  font-size:      0.72rem;
  font-weight:    700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ── layout utilities ───────────────────────────────────────────────── */

.container {
  width:          min(var(--max), calc(100% - 48px));
  margin:         0 auto;
  padding-bottom: var(--s-8);
}

.page-shell {
  display:     grid;
  gap:         var(--s-9);
  padding-top: var(--s-7);
}

.section-head {
  display:         flex;
  align-items:     flex-end;
  justify-content: space-between;
  gap:             var(--s-4);
  margin-bottom:   var(--s-6);
  flex-wrap:       wrap;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }

.stack-sm > * + * { margin-top: var(--s-3); }
.stack-md > * + * { margin-top: var(--s-5); }
.stack-lg > * + * { margin-top: var(--s-7); }

.full { width: 100%; }

.gradient-line {
  border:     none;
  height:     1px;
  background: linear-gradient(
    90deg,
    transparent    0%,
    var(--line-2) 30%,
    var(--line-2) 70%,
    transparent  100%
  );
  margin: var(--s-2) 0;
}


/* ── navbar ─────────────────────────────────────────────────────────── */

.navbar {
  position:                sticky;
  top:                     0;
  z-index:                 120;
  backdrop-filter:         blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background:              rgba(10, 17, 32, 0.92);
  border-bottom:           1px solid rgba(255, 255, 255, 0.07);
}

/* nav always dark regardless of page theme — hardcode navy */
[data-theme="light"] .navbar {
  background:   #0a1120;
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-links,
.nav-inner {
  list-style:  none;
  margin:      0 auto;
  padding:     0 24px;
  width:       min(var(--max), calc(100% - 48px));
  display:     flex;
  align-items: center;
  gap:         4px;
  flex-wrap:   wrap;
  min-height:  var(--nav-h);
}

.nav-links li,
.nav-inner li {
  min-width: 0;
}

.nav-logo {
  display:      flex;
  align-items:  center;
  margin-right: auto;
}

.logo {
  width:  88px;
  height: auto;
}

.nav-links a,
.nav-inner a {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-height:      40px;
  padding:         8px 14px;
  border-radius:   var(--r-pill);
  border:          1px solid transparent;
  font-size:       0.9rem;
  font-weight:     600;
  /* nav links always light text — nav is always dark */
  color:           rgba(255, 255, 255, 0.60);
  background:      transparent;
  white-space:     nowrap;
  transition:
    background   var(--ease),
    color        var(--ease),
    border-color var(--ease);
}

.nav-links a:hover,
.nav-inner a:hover {
  color:        #fff;
  background:   rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-links a[aria-current="page"],
.nav-inner a[aria-current="page"] {
  color:        #93c5fd;
  background:   rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.35);
}

.PicSettings {
  width:      20px;
  height:     20px;
  object-fit: contain;
  opacity:    0.60;
}


/* ── buttons ────────────────────────────────────────────────────────── */

.btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             var(--s-2);
  min-height:      46px;
  padding:         11px 22px;
  border-radius:   var(--r-sm);
  border:          1px solid var(--line-2);
  background:      var(--surface-3);
  color:           var(--text);
  font-size:       0.92rem;
  font-weight:     700;
  line-height:     1;
  letter-spacing:  0.01em;
  transition:
    transform        var(--ease),
    box-shadow       var(--ease),
    background-color var(--ease),
    border-color     var(--ease),
    color            var(--ease);
}

.btn:hover {
  transform:    translateY(-1px);
  border-color: var(--line-strong);
  background:   var(--surface-hover);
  box-shadow:   var(--shadow-1);
}

.btn:focus-visible { box-shadow: var(--focus); }

.btn.primary {
  border-color: var(--primary-700);
  background:   var(--primary);
  color:        #fff;
  box-shadow:   0 4px 14px rgba(37, 99, 235, 0.30);
}

.btn.primary:hover {
  background: var(--primary-700);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.42);
}

.btn.secondary {
  border-color: var(--primary-border);
  background:   var(--primary-050);
  color:        var(--primary);
}

.btn.secondary:hover {
  background:   var(--primary-100);
  border-color: rgba(37, 99, 235, 0.35);
}

.btn.danger {
  border-color: rgba(224, 85, 85, 0.35);
  background:   var(--danger-100);
  color:        #f07777;
}

.btn.danger:hover {
  background:   rgba(224, 85, 85, 0.20);
  border-color: rgba(224, 85, 85, 0.50);
}

.btn[disabled],
.btn:disabled {
  opacity:    0.40;
  cursor:     not-allowed;
  transform:  none;
  box-shadow: none;
}


/* ── card base ──────────────────────────────────────────────────────── */

.card {
  position:   relative;
  background: transparent;
  overflow:   hidden;
}

.card::before {
  content:    "";
  position:   absolute;
  inset:      0 0 auto 0;
  height:     2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-300));
  opacity:    0;
  transition: opacity var(--ease);
}

.card:hover::before {
  opacity: 0.8;
}

.card.soft {
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.card-header {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  gap:             var(--s-4);
  margin-bottom:   var(--s-5);
  flex-wrap:       wrap;
}

.card-title {
  font-size:   1.05rem;
  font-weight: 700;
  color:       var(--text);
  margin:      0;
}


/* ── form inputs ────────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width:         100%;
  min-height:    46px;
  padding:       10px 14px;
  border:        1px solid var(--line-2);
  border-radius: var(--r-sm);
  background:    var(--surface-3);
  color:         var(--text);
  transition:
    border-color     var(--ease),
    box-shadow       var(--ease),
    background-color var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-4);
}

select option {
  background: var(--surface-3);
  color:      var(--text-2);
}

textarea {
  min-height: 120px;
  resize:     vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline:      none;
  border-color: var(--primary);
  box-shadow:   0 0 0 3px rgba(37, 99, 235, 0.14);
  background:   var(--surface-2);
}


/* ── badges ─────────────────────────────────────────────────────────── */

.badge {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  min-height:      26px;
  padding:         3px 10px;
  border-radius:   var(--r-pill);
  font-size:       0.76rem;
  font-weight:     700;
  border:          1px solid var(--line-2);
  background:      var(--surface-3);
  color:           var(--text-2);
  white-space:     nowrap;
}

.badge.info    { color: var(--primary);  background: var(--primary-050);  border-color: var(--primary-border); }
.badge.success { color: var(--success);  background: var(--success-100);  border-color: rgba(52,  196, 122, 0.28); }
.badge.warning { color: var(--gold);     background: var(--gold-bg);      border-color: var(--gold-border); }
.badge.danger  { color: #f07777;         background: var(--danger-100);   border-color: rgba(224, 85,  85,  0.28); }

.points-badge {
  color:        var(--gold);
  background:   var(--gold-bg-strong);
  border-color: var(--gold-border);
}


/* ── overlay / popup ────────────────────────────────────────────────── */

.overlay {
  position:                fixed;
  inset:                   0;
  z-index:                 9999;
  display:                 grid;
  place-items:             center;
  padding:                 24px;
  background:              rgba(0, 0, 0, 0.72);
  backdrop-filter:         blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.popup {
  position:       relative;
  z-index:        10000;
  width:          min(500px, 100%);
  background:     var(--surface-2);
  border:         1px solid var(--line-2);
  border-radius:  var(--r-lg);
  padding:        var(--s-7);
  box-shadow:     var(--shadow-3);
  text-align:     center;
  pointer-events: auto;
}

.popup h2 { margin-bottom: var(--s-3); color: var(--text);   }
.popup p  { margin-bottom: var(--s-5); color: var(--text-2); }

.popup-actions {
  display:         flex;
  gap:             var(--s-3);
  flex-wrap:       wrap;
  justify-content: center;
  pointer-events:  auto;
}


/* ── toasts ─────────────────────────────────────────────────────────── */

#toastHost {
  position:       fixed;
  right:          20px;
  bottom:         80px; /* clear sticky booking bar on homepage */
  z-index:        9999;
  display:        flex;
  flex-direction: column;
  gap:            var(--s-2);
  pointer-events: none;
}

.toast {
  min-width:      220px;
  max-width:      320px;
  padding:        12px 16px;
  border-radius:  var(--r-md);
  border:         1px solid var(--line-2);
  background:     var(--surface-2);
  color:          var(--text);
  font-size:      0.875rem;
  font-weight:    600;
  box-shadow:     var(--shadow-2);
  opacity:        0;
  transform:      translateY(12px);
  transition:     transform 240ms var(--ease-decelerate), opacity 240ms var(--ease-decelerate);
  pointer-events: auto;
}

.toast.show      { opacity: 1; transform: translateY(0); }

.toast--success {
  background:   rgba(52, 196, 122, 0.14);
  border-color: rgba(52, 196, 122, 0.30);
  color:        var(--success);
}

.toast--error {
  background:   var(--danger-100);
  border-color: rgba(224, 85, 85, 0.30);
  color:        #f07777;
}


/* ── keyframes ──────────────────────────────────────────────────────── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}

.skeleton {
  border-radius:   var(--r-xs);
  background:      linear-gradient(
    90deg,
    var(--surface-3)     25%,
    var(--surface-hover) 50%,
    var(--surface-3)     75%
  );
  background-size: 1200px 100%;
  animation:       shimmer 1.6s ease-in-out infinite;
}


/* ── service flip cards (non-home pages) ────────────────────────────── */

.serviceShowcase {
  display: grid;
  gap:     var(--s-6);
}

.serviceFlipGrid {
  display:               grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   var(--s-5);
}

.serviceFlipCard {
  perspective: 1400px;
  min-height:  430px;
}

.serviceFlipInner {
  position:        relative;
  width:           100%;
  min-height:      430px;
  height:          100%;
  transform-style: preserve-3d;
  transition:      transform var(--duration-slower) var(--ease-spring);
}

.serviceFlipCard:hover .serviceFlipInner,
.serviceFlipCard:focus-within .serviceFlipInner {
  transform: rotateY(180deg);
}

.serviceFlipFront,
.serviceFlipBack {
  position:                    absolute;
  inset:                       0;
  border-radius:               var(--r-xl);
  overflow:                    hidden;
  border:                      1px solid var(--line-2);
  box-shadow:                  var(--shadow-2);
  backface-visibility:         hidden;
  -webkit-backface-visibility: hidden;
}

.serviceFlipFront {
  display:       grid;
  align-content: start;
  gap:           var(--s-4);
  padding:       24px;
  color:         #fff;
}

.serviceFlipBack {
  transform:   rotateY(180deg);
  display:     grid;
  place-items: center;
  padding:     24px;
  color:       #fff;
}

.serviceFlipTop {
  display:       grid;
  gap:           12px;
  justify-items: start;
}

.serviceFlipTop h3 { margin: 0; font-size: 1.35rem; color: #fff; }

.serviceFlipText {
  margin:      0;
  color:       rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  max-width:   28ch;
}

.serviceFlipBackInner {
  width:         100%;
  max-width:     250px;
  display:       grid;
  gap:           14px;
  justify-items: center;
  text-align:    center;
}

.serviceFlipPriceLabel {
  margin:         0;
  font-size:      0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          rgba(255, 255, 255, 0.82);
}

.serviceFlipPrice {
  margin:         0;
  font-size:      2.8rem;
  font-weight:    800;
  line-height:    1;
  letter-spacing: -0.03em;
  color:          #fff;
}

.serviceFlipList {
  list-style: none;
  margin:     0;
  padding:    0;
  width:      100%;
  display:    grid;
  gap:        10px;
}

.serviceFlipList li {
  padding-bottom: 10px;
  border-bottom:  1px solid rgba(255, 255, 255, 0.18);
  font-size:      0.95rem;
  color:          rgba(255, 255, 255, 0.92);
}

.serviceFlipBack .btn { margin-top: 6px; width: 100%; }

.serviceFlipFrontStandard { background: linear-gradient(135deg, #2563eb 0%, rgba(37, 99, 235, 0.65) 100%); }
.serviceFlipBackStandard  { background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, #2563eb 100%); }
.serviceFlipFrontExpress  { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); }
.serviceFlipBackExpress   { background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%); }
.serviceFlipFrontNextDay  { background: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%); }
.serviceFlipBackNextDay   { background: linear-gradient(135deg, #06b6d4 0%, #22c55e 100%); }


/* ── hamburger base (shown/animated in home.css) ────────────────────── */

.nav-hamburger {
  display:        none; /* home.css shows it at ≤768px */
  flex-direction: column;
  gap:            5px;
  cursor:         pointer;
  padding:        8px 10px;
  margin-left:    auto;
  background:     none;
  border:         1px solid rgba(255, 255, 255, 0.15);
  border-radius:  var(--r-sm);
  min-height:     unset;
  width:          42px;
  height:         42px;
  flex-shrink:    0;
  z-index:        130;
  transition:     border-color var(--ease), background var(--ease);
}

.nav-hamburger:hover {
  border-color: rgba(255, 255, 255, 0.30);
  background:   rgba(255, 255, 255, 0.08);
}

.nav-hamburger span {
  display:          block;
  width:            100%;
  height:           2px;
  background:       rgba(255, 255, 255, 0.75);
  border-radius:    2px;
  transition:       transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}


/* ── responsive — shared breakpoints ───────────────────────────────── */

@media (max-width: 760px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section-head,
  .card-header {
    flex-direction: column;
    align-items:    flex-start;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  /* only stack action groups — not every button on every page */
  .hero-actions,
  .popup-actions,
  .order-actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .popup-actions .btn {
    width: 100%;
  }

  #toastHost {
    right:  10px;
    left:   10px;
    bottom: 70px;
  }

  .toast {
    max-width: none;
    width:     100%;
  }
}


/* ── print ──────────────────────────────────────────────────────────── */

@media print {
  body    { background: #fff !important; color: #000 !important; }
  .navbar { position: static; background: #fff !important;       }
}


/* ── reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto   !important;
  }
}