/* Bani u Dani PWA - Modern 2-Click Clean Luxury UI */

@font-face {
  font-family: 'Skiff';
  src: url('assets/fonts/Skiff-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Skiff';
  src: url('assets/fonts/Skiff-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Skiff';
  src: url('assets/fonts/Skiff-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TDVolshebstvo';
  src: url('assets/fonts/TDVolshebstvo.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Medium.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/Montserrat-Black.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-dark: #0f0d0c;
  --bg-card: #1c1714;
  --bg-card-elevated: #261f1b;
  --bg-glass: rgba(18, 15, 13, 0.92);
  --gold-primary: #d8a85e;
  --gold-light: #f3ce8a;
  --gold-glow: rgba(216, 168, 94, 0.3);
  --text-main: #ffffff;
  --text-secondary: #e2dad2;
  --text-muted: #9e9186;
  --border-gold: rgba(216, 168, 94, 0.28);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.45;
  padding-bottom: calc(75px + var(--safe-bottom));
  -webkit-font-smoothing: antialiased;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.header-title-wrap {
  display: flex;
  flex-direction: column;
}

.header-app-title {
  font-family: 'TDVolshebstvo', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gold-light);
  line-height: 1.1;
}

.header-app-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.header-btn-install {
  background: linear-gradient(135deg, #d8a85e 0%, #b8863b 100%);
  color: #12100e !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 10px var(--gold-glow);
}

/* Standalone Mode: Hide install button */
@media all and (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  #header-install-btn,
  .profile-install-card {
    display: none !important;
  }
}

/* Main Container */
.app-content {
  padding: 14px 16px;
  max-width: 640px;
  margin: 0 auto;
}

/* Stories Bar (Compact) */
.stories-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 14px 0;
}

.stories-carousel::-webkit-scrollbar {
  display: none;
}

.story-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 68px;
  flex-shrink: 0;
  cursor: pointer;
}

.story-avatar-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #d8a85e, #f3ce8a, #784e1c);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.story-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-dark);
  background: #25201c;
}

.story-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  max-width: 68px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Action Strip (Fast 1-click calls) */
.quick-action-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.action-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.action-pill-btn:active {
  transform: scale(0.97);
  background: var(--bg-card-elevated);
}

.action-pill-icon {
  font-size: 22px;
}

.action-pill-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
}

/* Section Header (Clean modern typography) */
.section-headline {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-headline span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* 3 Complexes - Clean Interactive Cards */
.complexes-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.complex-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.complex-tile:active {
  transform: scale(0.99);
}

.complex-tile:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.complex-tile-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: #2a221d;
  border: 1px solid var(--border-gold);
}

.complex-tile-info {
  flex: 1;
  min-width: 0;
}

.complex-tile-name {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.complex-tile-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
  margin-top: 2px;
}

.complex-tile-address {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.complex-tile-arrow {
  color: var(--gold-primary);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  padding: 8px;
}

/* 2-Click Navigation Tiles (2x2 Grid) */
.quick-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.service-tile {
  background: linear-gradient(145deg, #221c17 0%, #171310 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 110px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.service-tile:active {
  transform: scale(0.97);
}

.service-tile:hover {
  box-shadow: 0 8px 24px rgba(216, 168, 94, 0.2);
}

.service-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.service-tile-icon {
  font-size: 26px;
}

.service-tile-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(216, 168, 94, 0.18);
  color: var(--gold-light);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.service-tile-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.service-tile-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Quick Card Teaser (1 Tap to QR) */
.card-teaser-banner {
  background: linear-gradient(135deg, #2c221a 0%, #15110e 100%);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--gold-glow);
}

.card-teaser-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-teaser-chip {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f3ce8a, #c49647);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.card-teaser-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-light);
}

.card-teaser-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.card-teaser-btn {
  background: var(--gold-primary);
  color: #12100e;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: none;
  white-space: nowrap;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 13, 12, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-gold);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px calc(8px + var(--safe-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 90px;
}

.nav-icon {
  font-size: 20px;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
}

.nav-item.active {
  color: var(--gold-light);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
}

/* Modals & Bottom Sheets */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: flex-end; /* Mobile Bottom Sheet feel */
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: #1a1613;
  border-top: 1px solid var(--gold-primary);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 20px calc(24px + var(--safe-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-drag-pill {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin: -10px auto 16px auto;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Tariffs inside Modal */
.tariffs-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-row-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tariff-row-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.tariff-row-days {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tariff-row-prices {
  text-align: right;
}

.tariff-row-price-main {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-light);
}

.tariff-row-price-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Programs inside Modal */
.programs-modal-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.program-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
}

.program-modal-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #25201b;
  flex-shrink: 0;
}

.program-modal-info {
  flex: 1;
}

.program-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.program-modal-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 8px 0;
  line-height: 1.35;
}

.program-modal-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.program-modal-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-light);
}

/* Kitchen inside Modal */
.kitchen-modal-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 4px;
}

.kitchen-modal-tabs::-webkit-scrollbar {
  display: none;
}

.kitchen-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.kitchen-tab-btn.active {
  background: var(--gold-primary);
  color: #12100e;
  font-weight: 700;
  border-color: var(--gold-primary);
}

.kitchen-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 55vh;
  overflow-y: auto;
}

.kitchen-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.kitchen-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.kitchen-item-weight {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.kitchen-item-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-light);
}

/* Masters inside Modal */
.masters-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.master-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.master-tile-photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #25201b;
}

.master-tile-body {
  padding: 10px;
}

.master-tile-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.master-tile-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Loyalty Card View */
.loyalty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.guest-card {
  width: 100%;
  max-width: 380px;
  min-height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #28201a 0%, #15110e 55%, #32251c 100%);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7), 0 0 25px rgba(216, 168, 94, 0.22);
  padding: 20px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

.card-brand {
  font-family: 'TDVolshebstvo', serif;
  font-size: 21px;
  color: var(--gold-light);
  letter-spacing: 1px;
}

.card-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  font-weight: 700;
  margin-top: 3px;
}

.card-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #e5b869 0%, #c49647 50%, #8c6328 100%);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.card-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  margin: 6px 0 14px 0;
}

.card-qr-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 140px;
}

.card-qr-box canvas, .card-qr-box img {
  display: block;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(216, 168, 94, 0.22);
  padding-top: 12px;
  margin-top: auto;
}

.card-number {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  margin-top: 2px;
}

.card-holder {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #55efc4;
}

.card-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55efc4;
  box-shadow: 0 0 8px #55efc4;
}

.card-rules-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  width: 100%;
  max-width: 380px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #d8a85e 0%, #b8863b 100%);
  color: #12100e;
  border: none;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px var(--gold-glow);
  transition: opacity 0.2s ease;
}

.btn-primary:active {
  opacity: 0.9;
}

/* Stories Fullscreen Player */
.story-player-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.story-player-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.story-progress-bar-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 310;
}

.story-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.story-progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  transition: width 0.1s linear;
}

.story-player-header {
  position: absolute;
  top: 24px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 310;
}

.story-player-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.story-player-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.story-player-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.story-nav-touch-left, .story-nav-touch-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 305;
}

.story-nav-touch-left { left: 0; }
.story-nav-touch-right { right: 0; }

/* ========================================================
   TARIFF CONSTRUCTOR & BOOKING STYLES (Clean Dark Luxury)
   ======================================================== */

.constructor-container {
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 90px;
}

.constructor-header {
  margin-top: 4px;
}

.constructor-title {
  font-family: 'TDVolshebstvo', serif;
  font-size: 26px;
  color: var(--gold-primary);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.constructor-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 1. TARIFF MATRIX */
.tariff-matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.05fr 1.05fr;
}

.matrix-corner-cell {
  background: #14100d;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.matrix-corner-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Time Slot Headers (Interactive Radio Selection) */
.matrix-time-slot {
  background: #191410;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.matrix-time-slot:hover {
  background: rgba(216, 168, 94, 0.08);
}

.matrix-time-slot.active-slot {
  background: rgba(216, 168, 94, 0.16);
  border-bottom-color: var(--gold-primary);
}

.slot-radio-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.matrix-radio.active {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.matrix-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.matrix-radio.active .matrix-radio-dot {
  background: var(--gold-primary);
}

.slot-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.active-slot .slot-title {
  color: var(--gold-light);
}

.slot-sub {
  font-size: 10px;
  color: var(--text-muted);
}

/* Matrix Rows */
.matrix-day-cell {
  background: var(--bg-card);
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.matrix-day-cell:last-of-type {
  border-bottom: none;
}

.matrix-day-cell.active-row {
  background: rgba(216, 168, 94, 0.08);
  border-left: 3px solid var(--gold-primary);
}

.day-group-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.day-group-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  width: fit-content;
}

.tag-green {
  background: rgba(46, 125, 50, 0.25);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.tag-amber {
  background: rgba(239, 108, 0, 0.22);
  color: #ffb74d;
  border: 1px solid rgba(255, 183, 77, 0.3);
}

.tag-red {
  background: rgba(198, 40, 40, 0.25);
  color: #ef5350;
  border: 1px solid rgba(239, 83, 80, 0.3);
}

/* Price Cells */
.matrix-price-cell {
  background: var(--bg-card);
  padding: 14px 8px;
  border-bottom: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: center;
}

.matrix-price-cell:hover {
  background: rgba(216, 168, 94, 0.06);
}

.matrix-price-cell.active-col {
  background: rgba(216, 168, 94, 0.05);
}

/* Strong Intersection Highlight */
.matrix-price-cell.active-cell {
  background: rgba(216, 168, 94, 0.22) !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 800;
  border-color: var(--gold-primary) !important;
  box-shadow: inset 0 0 10px rgba(216, 168, 94, 0.3), 0 0 12px var(--gold-glow);
  position: relative;
  z-index: 1;
}

.matrix-price-cell.active-cell .price-val {
  color: var(--gold-light);
  transform: scale(1.06);
  display: inline-block;
  transition: transform 0.2s ease;
}

/* 2. DURATION SCENARIO SELECTOR */
.duration-selector-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.duration-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  user-select: none;
  position: relative;
}

.duration-card:hover {
  border-color: rgba(216, 168, 94, 0.4);
}

.duration-card.active {
  border-color: var(--gold-primary);
  background: #231b15;
  box-shadow: 0 0 14px rgba(216, 168, 94, 0.25);
}

.duration-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.duration-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.duration-card.active .duration-radio {
  border-color: var(--gold-primary);
}

.duration-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.duration-card.active .duration-radio-dot {
  background: var(--gold-primary);
}

.duration-badge {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.duration-card.active .duration-badge {
  color: var(--gold-light);
  background: rgba(216, 168, 94, 0.15);
}

.duration-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.duration-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* 3. CALENDAR "Планируем день посещения" */
.calendar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.calendar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cal-month-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #261f1a;
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover {
  background: #362a22;
  border-color: var(--gold-primary);
}

.cal-month-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  min-width: 105px;
  text-align: center;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.cal-weekend-hdr {
  color: #ef9a9a;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
  border: 1px solid transparent;
}

.cal-day-cell.cal-empty {
  visibility: hidden;
  pointer-events: none;
}

/* 3 Price Category Bands */
.cal-day-cell.cal-mon-tue {
  background: rgba(46, 125, 50, 0.18);
  border-color: rgba(76, 175, 80, 0.3);
  color: #a5d6a7;
}

.cal-day-cell.cal-wed-fri {
  background: rgba(239, 108, 0, 0.15);
  border-color: rgba(255, 183, 77, 0.25);
  color: #ffe082;
}

.cal-day-cell.cal-weekend {
  background: rgba(198, 40, 40, 0.18);
  border-color: rgba(239, 83, 80, 0.3);
  color: #ef9a9a;
}

.cal-day-cell:hover:not(.is-past) {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.cal-day-cell.is-past {
  opacity: 0.35;
  filter: grayscale(0.5);
  cursor: not-allowed;
}

.cal-day-cell.is-today {
  box-shadow: inset 0 0 0 1.5px var(--gold-primary);
}

.cal-today-dot {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-primary);
}

/* Selected Date */
.cal-day-cell.is-selected {
  background: var(--gold-primary) !important;
  color: #110e0c !important;
  font-weight: 800 !important;
  border: 2px solid #fff !important;
  transform: scale(1.06);
  box-shadow: 0 0 14px var(--gold-glow);
  z-index: 2;
}

.cal-day-cell.is-selected .cal-today-dot {
  background: #110e0c;
}

/* Legend */
.cal-legend {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-green {
  background: #81c784;
}

.dot-amber {
  background: #ffb74d;
}

.dot-red {
  background: #ef5350;
}

/* 4. BOOKING SUMMARY BLOCK */
.booking-summary-card {
  background: #181310;
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.summary-top-row {
  display: flex;
  align-items: center;
}

.summary-badges-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-badge {
  background: #241c16;
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.summary-main-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.guests-counter-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guests-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.counter-control {
  display: flex;
  align-items: center;
  background: #261f1a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
}

.counter-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.counter-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.counter-value {
  min-width: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.total-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.total-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-light);
  font-family: 'Skiff', sans-serif;
  line-height: 1.1;
}

.total-subtext {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.25;
}

.btn-book-tariff {
  background: linear-gradient(135deg, #d8a85e 0%, #b8863b 100%);
  color: #110e0c;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 22px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 16px var(--gold-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-book-tariff:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(216, 168, 94, 0.45);
}

.btn-book-tariff:active {
  transform: scale(0.97);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .constructor-container {
    padding: 12px;
    gap: 14px;
  }
  .constructor-title {
    font-size: 23px;
  }
  .matrix-grid {
    grid-template-columns: 1.35fr 1fr 1fr;
  }
  .matrix-day-cell {
    padding: 12px 6px;
  }
  .day-group-name {
    font-size: 12px;
  }
  .matrix-price-cell {
    font-size: 14px;
    padding: 12px 4px;
  }
  .duration-selector-row {
    gap: 6px;
  }
  .duration-card {
    padding: 10px 8px;
  }
  .duration-title {
    font-size: 12px;
  }
  .duration-desc {
    font-size: 10px;
  }
  .summary-main-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    row-gap: 12px;
  }
  .guests-counter-wrap {
    grid-column: 1;
  }
  .total-price-wrap {
    grid-column: 2;
    text-align: right;
  }
  .booking-action-wrap {
    grid-column: 1 / -1;
  }
  .btn-book-tariff {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }
}
