
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #0f172a;
  --green: #16a34a;
  --orange: #f59e0b;
  --red: #dc2626;
  --blue: #2563eb;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
.logo-img { height: 46px; width: auto; object-fit: contain; display:block; }
.logo-img.small { height: 62px; }
.logo-img.large { height: 82px; }
.landing {
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.13), transparent 32%),
              linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
}
.nav {
  height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 7vw;
}
.brand { display:flex; align-items:center; gap:12px; font-weight:800; }
.nav-links { display:flex; align-items:center; gap:26px; color:var(--muted); font-weight:600; }
.btn {
  border:0; background:var(--dark); color:#fff; padding:12px 18px; border-radius:999px;
  font-weight:800; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn.secondary { background:#fff; color:var(--dark); border:1px solid var(--line); }
.btn.green { background:var(--green); }
.hero { padding:80px 7vw 50px; display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.hero h1 { font-size:clamp(48px,6vw,86px); line-height:.94; letter-spacing:-.075em; margin:0 0 24px; }
.hero p { font-size:20px; line-height:1.6; color:var(--muted); max-width:680px; }
.hero-actions { display:flex; gap:14px; margin-top:32px; flex-wrap:wrap; }
.hero-card, .card {
  background:#fff; border:1px solid var(--line); border-radius:34px; box-shadow:var(--shadow); padding:24px;
}
.demo-window { background:#f8fafc; border-radius:28px; border:1px solid var(--line); padding:18px; }
.window-top { display:flex; gap:7px; margin-bottom:18px; }
.dot { width:10px; height:10px; border-radius:99px; background:#d1d5db; }
.hero-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.mini-card { background:#fff; border-radius:20px; border:1px solid var(--line); padding:18px; }
.mini-card strong { font-size:28px; letter-spacing:-.04em; }
.mini-card span { display:block; color:var(--muted); margin-top:6px; }
.section { padding:40px 7vw 80px; }
.section-title { font-size:36px; letter-spacing:-.05em; margin-bottom:22px; }
.modules-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.module-card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:24px; box-shadow:0 10px 30px rgba(15,23,42,.04); }
.module-card h3 { margin:0 0 8px; }
.module-card p { color:var(--muted); line-height:1.55; }

.login-page { min-height:100vh; display:grid; grid-template-columns:1fr 1fr; }
.login-left { padding:70px; background:#fff; display:flex; flex-direction:column; justify-content:center; }
.login-left h1 { font-size:54px; letter-spacing:-.07em; margin:22px 0 12px; }
.login-left p { color:var(--muted); font-size:17px; line-height:1.6; }
.login-box { margin-top:30px; max-width:420px; }
.field { display:block; width:100%; padding:15px 16px; border:1px solid var(--line); border-radius:14px; margin-bottom:12px; font-size:15px; }
.login-right { background:radial-gradient(circle at top right, rgba(22,163,74,.28), transparent 35%), linear-gradient(135deg,#0f172a,#111827); color:#fff; padding:70px; display:flex; flex-direction:column; justify-content:center; }
.login-preview { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:30px; padding:24px; }
.login-preview h2 { font-size:36px; letter-spacing:-.05em; margin:0 0 18px; }
.preview-row { display:flex; justify-content:space-between; border-bottom:1px solid rgba(255,255,255,.12); padding:14px 0; color:rgba(255,255,255,.78); }

.app-shell { display:grid; grid-template-columns:280px 1fr; min-height:100vh; }
.sidebar { background:#fff; border-right:1px solid var(--line); padding:24px; position:sticky; top:0; height:100vh; }
.sidebar .brand { margin-bottom:28px; }
.side-nav { display:flex; flex-direction:column; gap:7px; }
.side-nav a { color:#4b5563; padding:12px 14px; border-radius:14px; font-weight:700; }
.side-nav a.active, .side-nav a:hover { background:#f1f5f9; color:var(--dark); }
.sidebar-bottom { position:absolute; left:24px; right:24px; bottom:24px; }
.main { min-width:0; }
.topbar { height:74px; display:flex; justify-content:space-between; align-items:center; padding:0 34px; border-bottom:1px solid var(--line); background:rgba(246,247,249,.78); backdrop-filter: blur(12px); position:sticky; top:0; z-index:10; }
.search { background:#fff; border:1px solid var(--line); border-radius:999px; padding:11px 16px; width:320px; }
.content { padding:34px; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.page-title h1 { margin:0; font-size:38px; letter-spacing:-.06em; }
.page-title p { color:var(--muted); margin:8px 0 0; }
.kpi-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-bottom:22px; }
.kpi-card { background:#fff; border:1px solid var(--line); border-radius:22px; padding:18px; box-shadow:0 8px 22px rgba(15,23,42,.04); }
.kpi-card .label { color:var(--muted); font-weight:700; font-size:13px; }
.kpi-card .value { font-size:30px; letter-spacing:-.05em; font-weight:900; margin-top:8px; }
.kpi-card .sub { color:var(--muted); font-size:12px; margin-top:5px; }
.grid-2 { display:grid; grid-template-columns:1.25fr .75fr; gap:18px; margin-bottom:18px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:18px; }
.panel { background:#fff; border:1px solid var(--line); border-radius:26px; padding:22px; box-shadow:0 10px 30px rgba(15,23,42,.04); }
.panel h2 { margin:0 0 16px; font-size:20px; letter-spacing:-.03em; }
.chart { height:245px; display:flex; align-items:end; gap:10px; padding:18px 6px 4px; border-top:1px solid var(--line); }
.bar { flex:1; background:linear-gradient(180deg,#111827,#64748b); border-radius:10px 10px 3px 3px; min-height:28px; position:relative; }
.bar span { position:absolute; bottom:-24px; left:50%; transform:translateX(-50%); font-size:11px; color:var(--muted); }
.status-list { display:flex; flex-direction:column; gap:12px; }
.status-item { display:flex; justify-content:space-between; align-items:center; border:1px solid var(--line); border-radius:16px; padding:13px 14px; }
.pill { padding:6px 10px; border-radius:999px; font-size:12px; font-weight:800; background:#f1f5f9; }
.pill.green { color:#166534; background:#dcfce7; }
.pill.orange { color:#92400e; background:#fef3c7; }
.pill.red { color:#991b1b; background:#fee2e2; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { text-align:left; padding:14px 12px; border-bottom:1px solid var(--line); font-size:14px; }
.table th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.suggestion { padding:14px; background:#f8fafc; border:1px solid var(--line); border-radius:18px; margin-bottom:10px; color:#374151; }
.screen-preview { aspect-ratio:16/9; background:linear-gradient(135deg,#0f172a,#1e293b); border-radius:24px; color:white; padding:22px; display:grid; grid-template-columns:1.2fr .8fr; gap:16px; }
.screen-card { background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.14); border-radius:18px; padding:16px; }
.member-shell { min-height:100vh; background:#f6f7f9; }
.member-top { background:#fff; border-bottom:1px solid var(--line); padding:18px 7vw; display:flex; justify-content:space-between; align-items:center; }
.member-nav { display:flex; gap:18px; color:#4b5563; font-weight:700; }
.member-content { padding:34px 7vw; }
.member-hero { background:linear-gradient(135deg,#0f172a,#1e293b); color:white; border-radius:34px; padding:34px; display:flex; justify-content:space-between; align-items:center; margin-bottom:22px; }
.member-hero h1 { margin:0 0 8px; font-size:38px; letter-spacing:-.06em; }
.offer-card { background:#fff; border:1px solid var(--line); border-radius:24px; padding:22px; box-shadow:0 10px 30px rgba(15,23,42,.04); }
.signage-body { width:100vw; height:100vh; overflow:hidden; background:#07111f; color:white; font-family:Inter, system-ui, sans-serif; }
.signage { height:100vh; display:grid; grid-template-columns:1.2fr 1fr .85fr; gap:24px; padding:34px; }
.signage-section { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:30px; padding:26px; }
.signage h1 { font-size:54px; letter-spacing:-.06em; margin:0 0 20px; }
.match-big { font-size:42px; font-weight:900; letter-spacing:-.04em; }
.ticker { position:fixed; left:34px; right:34px; bottom:24px; height:58px; border-radius:999px; background:#fff; color:#0f172a; display:flex; align-items:center; padding:0 28px; font-weight:900; }

@media (max-width: 1050px) {
  .hero, .login-page, .app-shell, .grid-2, .grid-3 { grid-template-columns:1fr; }
  .sidebar { position:relative; height:auto; }
  .sidebar-bottom { position:static; margin-top:24px; }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .modules-grid { grid-template-columns:1fr; }
  .nav-links, .member-nav { display:none; }
  .login-left, .login-right { padding:34px; }
}


/* V2 refinements */
.sidebar .brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 38px;
}

.sidebar .brand img {
  display: block;
  margin: 0 auto;
}

.mobile-menu-btn {
  display: none;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.calendar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 86px repeat(5, minmax(130px, 1fr));
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
}

.calendar-cell {
  min-height: 86px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
  background: #fff;
}

.calendar-cell:nth-child(6n) {
  border-right: 0;
}

.calendar-head {
  min-height: auto;
  background: #f8fafc;
  font-weight: 900;
  color: #111827;
}

.calendar-time {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.booking-block {
  border-radius: 14px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.booking-block.booked {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.booking-block.training {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.booking-block.tournament {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.booking-block.waiting {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.booking-block.automation {
  margin-top: 7px;
  background: #f8fafc;
  color: #475569;
}

@media (max-width: 1050px) {
  .mobile-menu-btn {
    display: inline-flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    padding: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -305px;
    top: 0;
    width: 290px;
    height: 100vh;
    z-index: 9998;
    transition: left 0.25s ease;
    box-shadow: 20px 0 50px rgba(15,23,42,.18);
  }

  .sidebar.open {
    left: 0;
  }

  .topbar {
    padding-left: 82px;
  }

  .search {
    width: 190px;
  }

  .calendar-grid {
    grid-template-columns: 70px repeat(5, 170px);
    overflow-x: auto;
    display: grid;
    width: max-content;
    min-width: 100%;
  }

  .calendar-scroll {
    overflow-x: auto;
    border-radius: 24px;
  }
}


/* FINAL MOBILE SIDEBAR FIX - V3 */
.mobile-menu-btn {
  display: none !important;
}

.sidebar-overlay {
  display: none;
}

@media (min-width: 1051px) {
  .mobile-menu-btn {
    display: none !important;
  }

  .sidebar {
    transform: none !important;
    left: auto !important;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 1050px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    display: block !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
    position: fixed !important;
    top: 16px !important;
    left: 16px !important;
    z-index: 10001 !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    padding: 0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: min(86vw, 310px) !important;
    height: 100vh !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
    transform: translateX(-110%) !important;
    transition: transform 0.25s ease !important;
    box-shadow: 22px 0 70px rgba(15, 23, 42, 0.25) !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    width: 100% !important;
  }

  .topbar {
    min-height: 74px !important;
    padding-left: 84px !important;
    padding-right: 16px !important;
  }

  .topbar > div {
    font-size: 13px !important;
  }

  .content {
    padding: 24px 16px !important;
  }

  .page-title h1 {
    font-size: 34px !important;
  }
}


/* BOOKING CALENDAR V5 */
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.booking-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.booking-calendar-header h2 {
  margin: 0 0 6px;
}

.booking-calendar-header p {
  margin: 0;
  color: var(--muted);
}

.booking-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.real-calendar-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
}

.real-calendar {
  min-width: 980px;
  display: grid;
  grid-template-columns: 84px repeat(4, 1fr);
}

.real-calendar > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.real-calendar > div:nth-child(5n) {
  border-right: 0;
}

.cal-head {
  background: #f8fafc;
  padding: 16px 14px;
  font-weight: 900;
  color: #111827;
  position: sticky;
  top: 0;
  z-index: 2;
}

.cal-head small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}

.cal-time {
  background: #f8fafc;
  padding: 18px 12px;
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
}

.cal-slot {
  min-height: 116px;
  padding: 10px;
  background: #fff;
}

.cal-event {
  height: 100%;
  border-radius: 18px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.cal-event strong {
  font-size: 14px;
  color: #111827;
}

.cal-event span {
  color: #475569;
  font-weight: 700;
}

.cal-event.blue { background: #eff6ff; border-color: #bfdbfe; }
.cal-event.green { background: #ecfdf5; border-color: #bbf7d0; }
.cal-event.orange { background: #fff7ed; border-color: #fed7aa; }
.cal-event.yellow { background: #fefce8; border-color: #fde68a; }
.cal-event.gray { background: #f8fafc; border-color: #e2e8f0; }

.cal-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-mini {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,23,42,.08);
  color: #334155;
}

.booking-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15,23,42,.04);
}

.side-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.side-row:last-child { border-bottom: 0; }

/* LIVE CLUB + EQUIPMENT VISUAL MAPS V5 */
.visual-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.club-floor {
  position: relative;
  min-height: 650px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 28%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 18px;
  overflow: hidden;
}

.floor-grid {
  height: 100%;
  min-height: 610px;
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  grid-template-rows: .72fr 1.15fr 1.15fr .85fr;
  gap: 14px;
}

.zone-box {
  position: relative;
  border: 1px solid #dbe3ee;
  background: rgba(255,255,255,.86);
  border-radius: 26px;
  padding: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15,23,42,.05);
}

.zone-box h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.04em;
  color: #111827;
}

.zone-box p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.zone-reception { grid-column: 1 / 2; grid-row: 1 / 2; }
.zone-lobby { grid-column: 2 / 4; grid-row: 1 / 2; }
.zone-court1 { grid-column: 1 / 2; grid-row: 2 / 4; }
.zone-court2 { grid-column: 2 / 3; grid-row: 2 / 4; }
.zone-court3 { grid-column: 3 / 4; grid-row: 2 / 3; }
.zone-lounge { grid-column: 3 / 4; grid-row: 3 / 4; }
.zone-storage { grid-column: 1 / 2; grid-row: 4 / 5; }
.zone-gym { grid-column: 2 / 4; grid-row: 4 / 5; }

.people-dots,
.asset-icons {
  position: absolute;
  inset: 62px 14px 14px 14px;
}

.person-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #111827;
  position: absolute;
  box-shadow: 0 0 0 5px rgba(17,24,39,.08);
}

.person-dot.green { background: #16a34a; }
.person-dot.orange { background: #f59e0b; }
.person-dot.blue { background: #2563eb; }

.asset-pin {
  position: absolute;
  min-width: 42px;
  height: 42px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dbe3ee;
  box-shadow: 0 12px 26px rgba(15,23,42,.12);
  font-size: 19px;
  font-weight: 900;
}

.asset-pin.available { border-color: #bbf7d0; background: #ecfdf5; }
.asset-pin.inuse { border-color: #bfdbfe; background: #eff6ff; }
.asset-pin.missing { border-color: #fecaca; background: #fee2e2; }
.asset-pin.maintenance { border-color: #fed7aa; background: #fff7ed; }

.zone-heat-low { background: linear-gradient(135deg, rgba(22,163,74,.07), #fff); }
.zone-heat-mid { background: linear-gradient(135deg, rgba(245,158,11,.11), #fff); }
.zone-heat-high { background: linear-gradient(135deg, rgba(220,38,38,.10), #fff); }

.map-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #111827;
}

.legend-dot.green { background: #16a34a; }
.legend-dot.orange { background: #f59e0b; }
.legend-dot.red { background: #dc2626; }
.legend-dot.blue { background: #2563eb; }

.map-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (max-width: 1200px) {
  .booking-layout,
  .visual-layout {
    grid-template-columns: 1fr;
  }

  .booking-side,
  .map-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .floor-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, minmax(150px, auto));
  }

  .zone-reception,
  .zone-lobby,
  .zone-court1,
  .zone-court2,
  .zone-court3,
  .zone-lounge,
  .zone-storage,
  .zone-gym {
    grid-column: auto;
    grid-row: auto;
  }

  .club-floor {
    min-height: auto;
  }

  .floor-grid {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .booking-side,
  .map-side {
    grid-template-columns: 1fr;
  }

  .booking-calendar-header {
    display: block;
  }

  .booking-controls {
    margin-top: 16px;
  }

  .real-calendar {
    min-width: 880px;
  }
}
