/* V4.0 — Dammam Sports Hall premium product system */
:root{
  --v4-bg:#f2f7f6;--v4-surface:#ffffff;--v4-ink:#0e2b31;--v4-muted:#647b7e;--v4-line:#d9e8e5;
  --v4-teal:#087f78;--v4-teal2:#12a597;--v4-navy:#0d4051;--v4-cyan:#58c7bf;--v4-green:#12b76a;--v4-amber:#f79009;--v4-red:#e5484d;
  --v4-shadow:0 14px 36px rgba(8,72,72,.08);--v4-shadow-lg:0 24px 70px rgba(5,58,62,.14);
  --v4-r:22px;--v4-r-sm:14px;
}
html{background:var(--v4-bg)}body{background:radial-gradient(circle at 92% 0%,rgba(89,200,190,.09),transparent 28%),linear-gradient(180deg,#f7fbfa 0,#f1f7f6 35%,#edf5f4 100%);color:var(--v4-ink)}
main{max-width:1480px;padding:24px 28px 38px}.app-shell{overflow-x:hidden}.topbar{height:86px;border-bottom:1px solid rgba(8,127,120,.10);background:rgba(255,255,255,.94);box-shadow:0 8px 30px rgba(16,65,67,.04)}
.brand img{width:56px;height:56px}.brand strong{font-size:20px;font-weight:850}.brand small{font-size:12px}.top-meta{font-variant-numeric:tabular-nums}.pill{border:1px solid rgba(15,83,83,.05)}
h1,h2,h3{color:var(--v4-ink);font-weight:850}.eyebrow{color:#3eb5aa;font-weight:900}.muted{color:var(--v4-muted)}
.btn{border-radius:14px;padding:11px 18px}.btn.primary{background:linear-gradient(135deg,#087f78,#0ca194);box-shadow:0 10px 24px rgba(8,127,120,.19)}.btn.secondary{background:#e8f6f3;color:#08766f}.btn.ghost{background:rgba(255,255,255,.82);border-color:#d9e8e5}.btn.danger{background:#fff7f6}.btn.sm{border-radius:11px}
.panel,.game,.resource-card,.operation,.stat,.mini,.table-wrap{border-color:var(--v4-line);box-shadow:var(--v4-shadow)}.panel{border-radius:24px;padding:25px}.section{margin-top:24px}.section-head{margin-bottom:16px}.section-head h2{font-size:30px}.panel-head h2{font-size:24px}.panel-head h3{font-size:20px}

/* Public hero */
.premium-hero{min-height:405px!important;padding:50px 58px!important;border-radius:34px!important;grid-template-columns:1.05fr .95fr!important;background:radial-gradient(circle at 82% 8%,rgba(89,217,203,.28),transparent 24%),radial-gradient(circle at 18% 80%,rgba(35,167,159,.18),transparent 28%),linear-gradient(130deg,#082f3d 0%,#075b5c 46%,#0a9185 100%)!important;box-shadow:0 28px 80px rgba(3,58,63,.19)!important;overflow:hidden}
.premium-hero:before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,rgba(255,255,255,.03),transparent 38%,rgba(255,255,255,.05));pointer-events:none}.premium-hero:after{width:520px;height:520px;right:-190px;bottom:-290px;background:rgba(255,255,255,.08)}
.premium-hero h1{font-size:48px!important;line-height:1.22!important;letter-spacing:-.04em;max-width:800px}.premium-hero p{font-size:16px!important;max-width:710px}.hero-primary{min-width:175px;padding:14px 24px!important;border-radius:16px!important;font-size:16px!important}.hero-trust span{padding:8px 13px;font-size:11px;background:rgba(255,255,255,.09)}
.premium-visual{min-height:300px}.hero-campus{width:126%;left:-7%;bottom:-58px;opacity:.92;filter:drop-shadow(0 26px 32px rgba(0,0,0,.18))}.visual-glow{width:340px;height:340px;left:8%;top:0;background:rgba(78,207,194,.24)}.floating-sport{width:72px;height:72px;border-radius:24px;box-shadow:0 18px 45px rgba(2,41,44,.22)}
.premium-live{padding:16px 22px!important;border-radius:20px!important;background:rgba(255,255,255,.92);backdrop-filter:blur(16px)}.live-state b{font-size:15px}.live-metrics b{font-size:14px}

/* Premium game cards */
.premium-games{gap:18px}.v4-game{position:relative;overflow:hidden;min-height:270px!important;border-radius:24px!important;padding:20px 20px 18px!important;background:linear-gradient(180deg,#fff 0%,#fbfefd 100%)!important;isolation:isolate}.v4-game:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:var(--game-accent,#0b9a91)}.v4-game:after{content:"";position:absolute;width:155px;height:155px;border-radius:50%;left:-55px;top:-65px;background:color-mix(in srgb,var(--game-accent,#0b9a91) 10%,transparent);z-index:-1}.v4-game:hover{transform:translateY(-5px)!important;box-shadow:0 24px 55px rgba(4,80,78,.13)!important}.v4-game .sport-icon{width:62px;height:62px;border-radius:19px;background:linear-gradient(145deg,#f8fffe,#e8f7f4);border-color:color-mix(in srgb,var(--game-accent,#0b9a91) 22%,#e3efed)}.v4-game .sport-icon img{width:39px;height:39px}.v4-game .game-copy h3{font-size:22px;margin-top:18px}.v4-game .game-copy p{font-size:12.5px;line-height:1.75;min-height:44px}.v4-game .game-facts span{background:#f6fbfa;border-color:#e3efec}.v4-game .game-live{font-weight:700}.v4-game .capacity-track{height:6px}.v4-game .capacity-track i{background:linear-gradient(90deg,var(--game-accent,#0b9a91),color-mix(in srgb,var(--game-accent,#0b9a91) 62%,#67d5c9))}
.game-ps5{--game-accent:#2563eb}.game-billiards{--game-accent:#0891b2}.game-table-tennis{--game-accent:#e87926}.game-baloot{--game-accent:#8b5cf6}.game-jakaro{--game-accent:#dc3f68}.game-foosball{--game-accent:#16a34a}.game-generic{--game-accent:#0b9a91}
.game-ps5 .sport-icon{background:linear-gradient(145deg,#f7faff,#e9f0ff)}.game-baloot .sport-icon{background:linear-gradient(145deg,#fcfaff,#f1ebff)}.game-foosball .sport-icon{background:linear-gradient(145deg,#f6fff9,#e8f7ed)}
.availability-pill{font-size:10px;padding:7px 10px}
.system-portals{border-radius:24px;padding:26px 28px;background:linear-gradient(135deg,#ffffff,#eff9f7);box-shadow:var(--v4-shadow)}.portal-card{border-radius:18px;padding:17px}.portal-copy h2{font-size:23px}

/* Trainee */
.v4-welcome{background:linear-gradient(145deg,#ffffff,#f7fcfb)}.v4-welcome h1{font-size:31px}.trainee-kpis .mini{padding:16px;background:#fff;border:1px solid #e1eeec}.trainee-kpis .mini small{font-size:11px}.trainee-kpis .mini b{font-size:23px}.v4-booking-panel{background:linear-gradient(180deg,#fff,#fbfefd)}.quick-dates{display:flex;gap:8px;overflow:auto;margin:4px 0 16px;padding-bottom:2px}.date-chip{min-width:105px;border:1px solid #dbe9e7;background:#fff;border-radius:14px;padding:10px 12px;text-align:right;color:var(--v4-ink)}.date-chip span,.date-chip b{display:block}.date-chip span{font-size:10px;color:var(--v4-muted)}.date-chip b{font-size:13px;margin-top:3px}.date-chip:hover,.date-chip.selected{border-color:#73cfc6;background:#effaf7}.date-chip.today{box-shadow:inset 0 0 0 1px rgba(8,127,120,.08)}
.booking-fields{margin-bottom:4px}.booking-slots{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.booking-slots .slot{min-height:70px;border-radius:15px}.booking-slots .slot.available{background:linear-gradient(180deg,#fff,#fbfefd)}.booking-slots .slot.selected{background:#e9f8f5}.booking-empty{min-height:150px;padding:26px}.v4-instruction{background:linear-gradient(180deg,#fbfefd,#f6fbfa)}.instruction-list.compact li{margin-bottom:8px}.participation-panel{padding:25px 28px}

/* Admin navigation */
.dashboard{grid-template-columns:248px minmax(0,1fr);gap:22px}.premium-side{position:static!important;max-height:none!important;overflow:visible!important;padding:13px 10px 16px;border-radius:24px;background:rgba(255,255,255,.95)}.premium-side .nav-label{padding:17px 13px 7px;color:#7d9497;font-size:9px}.premium-side button{min-height:44px;margin-bottom:4px;border-radius:13px;font-size:13px}.premium-side button.active{background:linear-gradient(135deg,#dff3f0,#eff9f7);box-shadow:inset 4px 0 0 #0b9a91}.content{padding-bottom:20px}.content>.section-head{padding-top:6px}.content>.section-head h2{font-size:32px}.v3-stats{gap:12px}.v3-stats .stat{border-radius:19px;padding:17px;background:linear-gradient(180deg,#fff,#f9fcfb)}.v3-stats .stat b{font-size:29px}.dashboard-alert{border-radius:16px;padding:13px 15px}.game-status-grid{gap:14px}.game-status-card{border-radius:22px!important;padding:17px!important;background:linear-gradient(180deg,#fff,#fbfefd)!important}.game-status-card:before{width:5px}.game-status-icon{width:58px!important;height:58px!important;border-radius:18px!important}.game-status-copy b{font-size:17px}.game-status-metrics small{padding:6px 9px}

/* Operations cards */
.operation{border-radius:20px;padding:18px;background:linear-gradient(180deg,#fff,#fbfefd)}.operation>div:first-child>b{font-size:16px}.participant-chip{border-radius:999px;padding:7px 10px}.operation-actions{gap:8px}.notice{border-radius:15px;padding:13px 15px}.student-input-camera{display:grid;grid-template-columns:1fr 48px;gap:8px}.camera-btn{display:grid;place-items:center;border:1px solid #d7e7e4;background:#eef8f6;color:#087f78;border-radius:13px}.camera-btn .ui-icon{width:22px;height:22px}

/* Resources */
.resource-grid{gap:16px}.resource-card{position:relative;overflow:hidden;border-radius:24px;padding:19px;background:linear-gradient(180deg,#fff,#fbfefd)}.resource-card:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:var(--game-accent,#0b9a91)}.resource-title .sport-icon{width:48px;height:48px;border-radius:16px}.capacity-inline{margin-top:16px;padding:12px;border-radius:14px;background:#f7fbfa}.units{gap:9px!important;margin-top:14px!important}.unit{min-height:58px;border-radius:14px!important;padding:8px 10px!important}

/* Tables */
.table-wrap{border-radius:19px;overflow:auto;max-width:100%;box-shadow:0 8px 24px rgba(11,77,76,.04)}.table{min-width:760px}.table th{font-size:10px!important;padding:13px 14px!important;background:#f4f9f8!important;position:sticky;top:0;z-index:2}.table td{font-size:11.5px!important;padding:13px 14px!important;vertical-align:top}.table td small{white-space:normal;word-break:break-word;line-height:1.65}.table tbody tr:hover{background:#f8fcfb}.table.compact{min-width:max-content}.table.compact td,.table.compact th{max-width:240px;white-space:normal}

/* Audit */
.audit-details{max-width:440px;white-space:normal;word-break:break-word;color:#60757a;line-height:1.6}.audit-action{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef7f5;color:#087f78;font-weight:800;font-size:10px}

/* Empty states */
.empty-state{min-height:170px;border:1px dashed #cfe3df;background:linear-gradient(180deg,#fbfefd,#f5faf9);border-radius:18px;display:grid;place-items:center;text-align:center;padding:30px;color:var(--v4-muted)}.empty-state>div{width:48px;height:48px;border-radius:14px;background:#e8f5f2;color:#087f78;display:grid;place-items:center}.empty-state b{display:block;color:var(--v4-ink);font-size:16px;margin:10px 0 4px}.empty-state span{font-size:12px}

/* Import workflow */
.import-hero{padding:26px}.import-drop{border:2px dashed #b9dcd6;background:linear-gradient(135deg,#fbfefd,#eef9f7);border-radius:22px;padding:30px;display:flex;align-items:center;gap:16px;cursor:pointer;transition:.16s}.import-drop:hover{border-color:#69c7be;transform:translateY(-1px)}.import-drop-icon{width:58px;height:58px;border-radius:17px;background:#e3f4f1;color:#087f78;display:grid;place-items:center}.import-drop-icon .ui-icon{width:28px;height:28px}.import-drop b,.import-drop span{display:block}.import-drop b{font-size:17px}.import-drop span{font-size:12px;color:var(--v4-muted);margin-top:4px}.import-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:18px}.import-summary>div{border:1px solid #ddebe8;background:#fff;border-radius:16px;padding:14px}.import-summary small,.import-summary b{display:block}.import-summary small{font-size:10px;color:var(--v4-muted)}.import-summary b{font-size:17px;margin-top:5px}.import-step{margin-top:22px;padding-top:20px;border-top:1px solid #e2eeec}.import-mapping{grid-template-columns:repeat(3,1fr)}.import-mode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.import-mode{position:relative;border:1px solid #dbe9e7;border-radius:17px;padding:16px;background:#fff;cursor:pointer}.import-mode input{position:absolute;top:15px;left:15px}.import-mode b,.import-mode span{display:block}.import-mode b{font-size:15px}.import-mode span{font-size:11px;color:var(--v4-muted);line-height:1.6;margin-top:5px}.import-mode.selected{border-color:#65c8be;background:#f0faf8;box-shadow:0 0 0 3px rgba(11,154,145,.08)}.import-mode.danger-zone.selected{border-color:#f3a6a8;background:#fff8f7}.toggle-line{display:flex;gap:9px;align-items:center;margin:16px 0;font-size:12px;font-weight:700}.import-loading{padding:18px;text-align:center;color:var(--v4-muted)}

/* Forms & settings */
.form-grid{gap:15px}.field>span{font-size:12px}.field>input,.field>select,.field>textarea,.search{min-height:47px;border-radius:13px;background:#fff}.toggle-grid label{border-radius:15px;padding:13px;background:#f8fbfa}.schedule-row{padding:11px 0}.schedule-row>input{min-height:46px;border-radius:13px}

/* Modals */
.modal{background:rgba(6,29,33,.60);backdrop-filter:blur(12px)}.modal-box{border-radius:26px;padding:24px 26px;box-shadow:0 34px 110px rgba(3,33,36,.30)}.modal-box>.panel-head{padding-bottom:14px}.modal-box h2{font-size:26px}.wide-modal{width:min(1000px,calc(100vw - 40px))}.scanner-modal{border:1px solid rgba(255,255,255,.7)}

/* Presentation */
.presentation-screen{background:radial-gradient(circle at 86% 0%,rgba(85,222,207,.28),transparent 30%),linear-gradient(145deg,#062e3b,#075e60 50%,#087e75);border-radius:34px;box-shadow:var(--v4-shadow-lg)}.presentation-games .present-game{border-radius:19px;background:rgba(255,255,255,.11)}

/* App finishing */
footer{padding-top:34px;color:#8ba0a3}.status{font-weight:850}.status.neutral{background:#f2f4f7;color:#475467}.toolbar{padding:2px}.pager .pill{font-weight:800}
[data-theme="midnight"] .v4-game,[data-theme="graphite"] .v4-game,[data-theme="midnight"] .resource-card,[data-theme="graphite"] .resource-card{background:linear-gradient(180deg,var(--surface),var(--soft2))!important}

@media(max-width:1180px){.dashboard{grid-template-columns:220px 1fr}.premium-hero{padding:42px!important}.premium-hero h1{font-size:40px!important}.booking-slots{grid-template-columns:repeat(4,1fr)}.import-mapping{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.dashboard{grid-template-columns:1fr}.premium-side{display:flex!important;overflow:auto!important;position:static!important;padding:8px;gap:5px}.premium-side .nav-label{display:none}.premium-side button{min-width:max-content}.premium-games{grid-template-columns:repeat(2,1fr)}.import-summary,.import-mode-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){main{padding:12px}.topbar{height:72px}.premium-hero{padding:28px 22px!important;border-radius:25px!important}.premium-hero h1{font-size:31px!important}.premium-visual{min-height:200px}.premium-games{grid-template-columns:1fr}.booking-slots{grid-template-columns:repeat(2,1fr)}.quick-dates{margin-inline:-4px}.import-summary,.import-mode-grid,.import-mapping{grid-template-columns:1fr}.v4-welcome h1{font-size:24px}.section-head h2{font-size:25px}.modal-box{border-radius:20px}.table{min-width:680px}}
.audit-table{min-width:0!important;table-layout:fixed}.audit-table th:nth-child(1){width:15%}.audit-table th:nth-child(2){width:16%}.audit-table th:nth-child(3){width:13%}.audit-table th:nth-child(4){width:16%}.audit-table th:nth-child(5){width:15%}.audit-table th:nth-child(6){width:25%}.audit-table td{white-space:normal!important;word-break:break-word}.audit-table-wrap{overflow-x:hidden}@media(max-width:900px){.audit-table{min-width:900px!important;table-layout:auto}.audit-table-wrap{overflow-x:auto}}
/* Keep the launch headline readable and long navigation reachable. */
.premium-hero h1{color:#fff!important}
@media(min-width:901px){.premium-side{position:sticky!important;top:96px;max-height:calc(100vh - 112px)!important;overflow-y:auto!important;overflow-x:hidden!important;align-self:start;scrollbar-width:thin}}

/* V4.0.1 visual hotfix: visual rhythm only; no functional selectors or state rules. */
.premium-hero{column-gap:42px!important}
.premium-hero .hero-copy{align-self:center;max-width:760px}
.premium-hero .hero-eyebrow{display:inline-flex;margin-bottom:4px;color:#bfeee8}
.premium-hero .hero-trust{gap:8px;margin-top:18px}
.premium-hero .premium-visual{align-self:stretch;isolation:isolate}
.premium-hero .floating-sport{display:grid;place-items:center;border:1px solid rgba(255,255,255,.82);background:rgba(255,255,255,.94);backdrop-filter:blur(12px)}
.premium-hero .floating-sport .sport-icon{width:54px;height:54px;border:0;background:transparent}
.premium-hero .floating-sport .sport-icon img{width:38px;height:38px}
.premium-hero .floating-a{top:28px;right:12%}
.premium-hero .floating-b{top:96px;left:8%}
.premium-hero .floating-c{bottom:16px;right:25%}
.premium-games{align-items:stretch}
.v4-game{display:grid!important;grid-template-rows:auto 1fr auto;row-gap:0}
.v4-game .game-top{align-items:center;min-height:62px}
.v4-game .sport-icon{display:grid;place-items:center;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.v4-game .sport-icon img{display:block;object-fit:contain}
.v4-game .game-copy{display:flex;min-width:0;flex-direction:column}
.v4-game .game-copy h3{margin:16px 0 7px;line-height:1.35}
.v4-game .game-copy p{margin:0;color:#667b7d}
.v4-game .game-facts{margin:13px 0 14px;gap:7px}
.v4-game .game-facts span{display:inline-flex;align-items:baseline;gap:3px;padding:6px 9px}
.v4-game .game-live{align-self:end;width:100%;padding-top:13px}
.v4-game .capacity-track{margin-top:9px}
.presentation-screen{min-height:calc(100vh - 226px);padding:32px 38px;gap:20px;overflow:hidden}
.presentation-top h1{color:#fff!important;line-height:1.28;margin:5px 0 4px}
.presentation-top .eyebrow{color:#bfeee8!important}
.presentation-top p{margin:0;color:#d8efec!important}
.presentation-kpis{gap:12px}
.presentation-kpis>div{padding:14px 17px}
.presentation-kpis b{font-size:32px}
.presentation-games{gap:10px}
.presentation-games .present-game{padding:12px 14px;align-items:center}
.presentation-games .present-game .sport-icon{width:42px;height:42px;border:0;background:rgba(255,255,255,.94)}
.presentation-games .present-game .sport-icon img{width:29px;height:29px}
.presentation-foot{padding-top:10px}
@media(max-width:900px){.premium-hero{column-gap:24px!important}.premium-hero .floating-sport{transform:scale(.92)}.presentation-screen{overflow:visible}}
@media(max-width:680px){.premium-hero .hero-copy{max-width:none}.premium-hero .hero-trust{margin-top:14px}.premium-hero .floating-a{top:12px;right:9%}.premium-hero .floating-b{top:64px;left:4%}.premium-hero .floating-c{bottom:8px;right:22%}.v4-game{min-height:252px!important}.presentation-screen{padding:24px;gap:18px}}
/* V4.2 tournament workspace */
.tournament-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}.tournament-card{display:grid;gap:14px}.tournament-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.tournament-metrics span{background:var(--surface-soft,#f2f7f7);padding:10px;border-radius:12px;text-align:center}.tournament-metrics b{display:block;font-size:1.2rem}.bracket-scroll{overflow-x:auto;max-width:100%;padding:8px 2px 18px}.bracket{display:flex;gap:24px;min-width:max-content;align-items:stretch}.bracket-round{width:250px;display:flex;flex-direction:column;gap:14px}.bracket-match{border:1px solid rgba(14,91,91,.18);border-radius:14px;background:var(--surface,#fff);padding:10px;display:grid;gap:7px;box-shadow:0 6px 18px rgba(0,0,0,.04)}.bracket-match.mine{outline:3px solid rgba(10,145,135,.24)}.bracket-match>div:not(.actions){padding:8px;border-radius:9px;background:rgba(15,110,105,.06)}.bracket-match .winner{font-weight:800;background:rgba(28,171,112,.14)!important}.bracket-round:nth-child(n+2){padding-top:36px}@media(max-width:700px){.tournament-grid{grid-template-columns:1fr}.bracket-round{width:210px}.tournament-metrics{font-size:.85rem}}
