
:root{
  --bg0:#14110d;
  --parch:#f7f1e3;
  --parch2:#f1e7d1;
  --ink:#1b140d;
  --muted:#6f5e4d;
  --gold:#b8892f;
  --gold2:#d6b15d;
  --accent1: rgba(184,137,47,.95);
  --accent2: rgba(153,104,24,.95);
  --accentSoft: rgba(214,177,93,.25);
  --accentBorder: rgba(184,137,47,.18);
  --red:#b33a2b;
  --blue:#2b61b3;
  --green:#2e8b57;
  --card:#fffaf0;
  --shadow: 0 14px 40px rgba(0,0,0,.18);
  --shadow2: 0 10px 22px rgba(0,0,0,.12);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--ink);
  background: radial-gradient(1200px 800px at 20% 0%, rgba(214,177,93,.12), transparent 50%),
              radial-gradient(900px 700px at 100% 30%, rgba(179,58,43,.10), transparent 55%),
              linear-gradient(135deg, #0f0c08, #1b140d 70%, #130f0b);
  overflow:hidden;
}

.bg-ornaments{
  position:fixed;
  inset:-60px;
  z-index:0;
  background:
    radial-gradient(700px 500px at 10% 20%, rgba(184,137,47,.08), transparent 60%),
    radial-gradient(800px 600px at 95% 85%, rgba(43,97,179,.08), transparent 55%),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="420" height="420" viewBox="0 0 420 420"><g fill="none" stroke="rgba(214,177,93,0.08)" stroke-width="2"><path d="M210 24c64 56 128 56 186 20-18 78-18 156 0 234-58-36-122-36-186 20-64-56-128-56-186-20 18-78 18-156 0-234 58 36 122 36 186-20z"/><path d="M210 72c48 42 96 42 140 15-13 59-13 118 0 176-44-27-92-27-140 15-48-42-96-42-140-15 13-59 13-118 0-176 44 27 92 27 140-15z"/></g></svg>');
  opacity:.9;
  pointer-events:none;
  filter: blur(.3px);
}

.app{
  position:relative;
  z-index:1;
  height:100%;
  display:flex;
  gap:14px;
  padding:14px;
}

.sidebar{
  width:270px;
  flex:0 0 270px;
  background: linear-gradient(180deg, rgba(247,241,227,.98), rgba(241,231,209,.96));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border:1px solid rgba(184,137,47,.22);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 16px 10px;
  border-bottom:1px solid rgba(184,137,47,.18);
}
.brand-badge{
  width:46px; height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: radial-gradient(circle at 30% 30%, #ffffff, #f0e3c2);
  box-shadow: inset 0 0 0 1px rgba(184,137,47,.18), 0 10px 18px rgba(0,0,0,.12);
  font-size:22px;
}
.brand-title{ font-weight:800; letter-spacing:.2px; font-size:16px; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:2px; }

.nav{
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.nav-item{
  text-decoration:none;
  color:var(--ink);
  padding:10px 12px;
  border-radius:14px;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:650;
  background: rgba(255,255,255,.65);
  border:1px solid rgba(184,137,47,.14);
  box-shadow: 0 6px 12px rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.nav-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,.09);
  background: rgba(255,255,255,.85);
}
.nav-item.active{
  background: linear-gradient(180deg, rgba(214,177,93,.33), rgba(255,255,255,.85));
  border-color: rgba(184,137,47,.35);
}

.sidebar-footer{
  margin-top:auto;
  padding:12px 14px;
  border-top:1px solid rgba(184,137,47,.18);
  color: var(--muted);
  font-size:12px;
  line-height:1.35;
}

.shell{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
  background: linear-gradient(180deg, rgba(247,241,227,.96), rgba(241,231,209,.94));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border:1px solid rgba(184,137,47,.22);
  overflow:hidden;
}

.topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid rgba(184,137,47,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.55));
}
.crumb{ font-weight:900; font-size:16px; }
.subcrumb{ color:var(--muted); font-size:12px; margin-top:3px; }

.topbar-right{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.view{
  padding:16px;
  overflow:auto;
  height:100%;
}

/* Buttons */
.btn{
  border:none;
  border-radius:14px;
  padding:10px 12px;
  font-weight:750;
  cursor:pointer;
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.12); }
.btn:active{ transform: translateY(0px); box-shadow: 0 8px 14px rgba(0,0,0,.10); }

.btn-primary{
  background: linear-gradient(180deg, var(--accent1), var(--accent2));
  color: white;
}
.btn-ghost{
  background: rgba(255,255,255,.75);
  border:1px solid rgba(184,137,47,.20);
}
.btn-danger{
  background: linear-gradient(180deg, rgba(179,58,43,.95), rgba(140,35,25,.95));
  color:white;
}
.btn-success{
  background: linear-gradient(180deg, rgba(46,139,87,.95), rgba(28,110,67,.95));
  color:white;
}

.icon-btn{
  border:none;
  background: rgba(255,255,255,.8);
  border:1px solid rgba(184,137,47,.18);
  border-radius:12px;
  width:38px; height:38px;
  cursor:pointer;
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
}
.icon-btn:hover{ transform: translateY(-1px); }

/* Inputs */
.input, .textarea, .select{
  position: relative;
  z-index: 2;
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(184,137,47,.25);
  background: rgba(255,255,255,.85);
  outline:none;
  box-shadow: 0 10px 18px rgba(0,0,0,.05);
  color: var(--ink);
}
.textarea{ min-height:120px; resize:vertical; }
.field{ display:flex; flex-direction:column; gap:6px; }
.label{ font-size:12px; color:var(--muted); font-weight:700; }

/* Layout helpers */
.row{ display:flex; gap:12px; flex-wrap:wrap; }
.row > *{ flex:1; min-width: 180px; }

.panel{
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.70);
  border:1px solid rgba(184,137,47,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding:14px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap:14px;
}
@media (max-width: 1200px){ .grid{ grid-template-columns: repeat(2, minmax(260px, 1fr)); } }
@media (max-width: 900px){
  body{ overflow:auto; }
  .app{ flex-direction:column; overflow:auto; }
  .sidebar{ width:auto; flex:0 0 auto; }
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--card);
  border:1px solid rgba(184,137,47,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 210px;
}

/* PATCH: Sessions - fond orange quand table complete */
.card.is-full{
  background: rgba(255, 164, 66, .18);
  border-color: rgba(255, 140, 0, .38);
}
.card.is-full .card-head{
  background: rgba(255, 164, 66, .10);
}
.card.is-full .card-foot{
  background: rgba(255, 164, 66, .08);
}
.card-head{
  padding:12px 12px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.card-head-right{
  display:flex;
  align-items:center;
  gap:10px;
}
.mini-illus{
  width:28px;
  height:28px;
  opacity:.9;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}

.detail-illus{
  width:46px;
  height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background: var(--accentSoft);
  border:1px solid var(--accentBorder);
  box-shadow: 0 12px 20px rgba(0,0,0,.10);
}
.detail-illus img{ width:32px; height:32px; opacity:.95; }
.dot{ width:6px; height:6px; border-radius:999px; background: rgba(0,0,0,.25); display:inline-block; }
body.kiosk .dot{ background: rgba(247,241,227,.35); }

.card-title{ font-weight:900; font-size:14px; }
.card-sub{ color:var(--muted); font-size:12px; margin-top:4px; line-height:1.25; }
.session-synopsis{
  font-weight:950;
  color:var(--ink);
}
.pills{ display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.pill{
  font-size:11px;
  font-weight:800;
  color: rgba(0,0,0,.78);
  background: var(--accentSoft);
  border:1px solid var(--accentBorder);
  padding:5px 8px;
  border-radius:999px;
}
.pill.red{ background: rgba(179,58,43,.14); border-color: rgba(179,58,43,.22); }
.pill.blue{ background: rgba(43,97,179,.14); border-color: rgba(43,97,179,.22); }
.pill.green{ background: rgba(46,139,87,.14); border-color: rgba(46,139,87,.22); }

.card-img{
  height:220px;
  background: linear-gradient(135deg, rgba(214,177,93,.18), rgba(179,58,43,.12));
  border-top:1px solid rgba(184,137,47,.18);
  position:relative;
  overflow:hidden;
}
.card-img img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  filter: saturate(1.05) contrast(1.02);
  background: rgba(0,0,0,.04);
}
.card-img .fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:34px;
  opacity:.85;
}
.card-foot{
  margin-top:auto;
  padding:12px;
  display:flex;
  gap:10px;
}

.kpi{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.kpi .kpi-card{
  background: rgba(255,255,255,.75);
  border:1px solid rgba(184,137,47,.18);
  border-radius: 16px;
  padding:12px 14px;
  box-shadow: var(--shadow2);
  min-width: 160px;
}
.kpi .kpi-title{ font-size:12px; color:var(--muted); font-weight:800; }
.kpi .kpi-value{ font-size:22px; font-weight:950; margin-top:6px; }

.table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid rgba(184,137,47,.18);
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(184,137,47,.12);
  font-size:13px;
}
.table th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  background: rgba(214,177,93,.18);
}

/* Modal */
.modal-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.45);
  display:grid;
  place-items:center;
  padding:18px;
  z-index: 9999;
}
.hidden{ display:none; }
.modal{
  width: min(920px, 100%);
  max-height: min(82vh, 820px);
  overflow:auto;
  position: relative;
  z-index: 10000;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border-radius: 22px;
  border:1px solid rgba(184,137,47,.25);
  box-shadow: var(--shadow);
}

/* PATCH: KIOSK - modal "Details" lisible (texte sombre sur fond clair) */
body.kiosk .modal{
  color: rgba(20,17,13,.92);
  --muted: rgba(20,17,13,.62);
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid rgba(184,137,47,.18);
  position:sticky;
  top:0;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.78));
}
.modal-title{ font-weight:950; }
.modal-body{ padding:16px; }
.modal-foot{
  padding:14px 16px;
  border-top:1px solid rgba(184,137,47,.18);
  display:flex;
  gap:10px;
  justify-content:flex-end;
  position:sticky;
  bottom:0;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.92));
}

.toast{
  position:fixed;
  bottom:16px;
  right:16px;
  padding:12px 14px;
  border-radius:16px;
  background: rgba(20,17,13,.92);
  color: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  border:1px solid rgba(214,177,93,.22);
  opacity:0;
  transform: translateY(8px);
  transition: opacity .14s ease, transform .14s ease;
  max-width: 520px;
}
.toast.show{
  opacity:1;
  transform: translateY(0px);
}
.small{
  font-size:12px;
  color:var(--muted);
}
.hr{
  height:1px;
  background: rgba(184,137,47,.18);
  margin: 12px 0;
}


/* Planning grid (heures x tables) */
.plan-wrap{ overflow:auto; }
.plan-table{
  width:100%;
  table-layout: fixed;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--accentBorder);
  border-radius: 16px;
  overflow:hidden;
  background: rgba(255,255,255,.50);
}
.plan-table thead th{
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  font-size:12px;
  color:var(--muted);
}

/* Top-left corner cell must stay above the header row when the time column is sticky */
.plan-table thead th.plan-sticky{ z-index: 6; }
.plan-table th, .plan-table td{
  padding:10px;
  border-bottom:1px solid rgba(184,137,47,.12);
  border-right:1px solid rgba(184,137,47,.10);
  vertical-align: top;
}
.plan-table tr:last-child td{ border-bottom:0; }
.plan-table th:last-child, .plan-table td:last-child{ border-right:0; }

.plan-sticky{
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(6px);
}

/* When there are many columns, a subtle separator helps readability while scrolling */
.plan-wrap.plan-hscroll .plan-sticky{ box-shadow: 10px 0 16px rgba(0,0,0,.06); }
.plan-time{
  width:92px;
  font-weight:950;
  color: rgba(0,0,0,.75);
}
.plan-cell.empty{ background: rgba(0,0,0,.02); }
.plan-stack{ display:flex; flex-direction:column; gap:10px; }

.plan-item{
  display:flex;
  gap:10px;
  align-items:center;
  border:1px solid var(--accentBorder);
  background: rgba(255,255,255,.78);
  border-radius: 14px;
  padding:10px 10px;
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.plan-item:hover{ transform: translateY(-1px); box-shadow: 0 14px 24px rgba(0,0,0,.12); }
.plan-item.full{ outline:2px solid rgba(179,58,43,.30); }

.plan-illus{ width:34px; height:34px; opacity:.95; }
.plan-main{ min-width:0; }
.plan-title{ font-weight:950; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.plan-sub{ color:var(--muted); font-size:12px; margin-top:2px; }
.plan-tag{ margin-top:6px; font-size:11px; font-weight:850; opacity:.85; }

.plan-badge{
  display:inline-block;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:950;
  letter-spacing: .2px;
  border:1px solid rgba(184,137,47,.22);
  background: rgba(184,137,47,.10);
  color: rgba(0,0,0,.70);
  vertical-align: middle;
}
.plan-badge.full{
  border-color: rgba(179,58,43,.45);
  background: rgba(179,58,43,.12);
  color: rgba(179,58,43,.95);
}

.plan-item.theme-fantasy{ background: linear-gradient(135deg, rgba(214,177,93,.20), rgba(255,255,255,.78)); }
.plan-item.theme-eldritch{ background: linear-gradient(135deg, rgba(80,190,160,.16), rgba(255,255,255,.78)); border-color: rgba(40,130,108,.22); }
.plan-item.theme-scifi{ background: linear-gradient(135deg, rgba(74,112,196,.16), rgba(255,255,255,.78)); border-color: rgba(74,112,196,.22); }
.plan-item.theme-cyber{ background: linear-gradient(135deg, rgba(196,64,159,.14), rgba(255,255,255,.78)); border-color: rgba(196,64,159,.22); }
.plan-item.theme-modern{ background: linear-gradient(135deg, rgba(212,92,62,.14), rgba(255,255,255,.78)); border-color: rgba(212,92,62,.22); }

/* Kiosk mode */
body.kiosk{
  --kiosk-accent: 255, 209, 102;
  --kiosk-accent-strong: #ffd166;
  background: #0f0d0a;
  color: rgba(247,241,227,.92);
}
body.kiosk[data-kiosk-color="gold"]{ --kiosk-accent:255, 209, 102; --kiosk-accent-strong:#ffd166; }
body.kiosk[data-kiosk-color="blue"]{ --kiosk-accent:78, 161, 255; --kiosk-accent-strong:#4ea1ff; }
body.kiosk[data-kiosk-color="green"]{ --kiosk-accent:40, 199, 111; --kiosk-accent-strong:#28c76f; }
body.kiosk[data-kiosk-color="rose"]{ --kiosk-accent:255, 91, 159; --kiosk-accent-strong:#ff5b9f; }
body.kiosk .bg-ornaments{ opacity:.22; filter: blur(1px); }
body.kiosk .sidebar,
body.kiosk .topbar{ display:none !important; }
body.kiosk .app{
  padding:0;
  height:100%;
}
body.kiosk #view{
  padding: 18px;
}

/* Ensure kiosk uses dark stage (shell is normally parchment) */
body.kiosk .shell{
  background: transparent;
  border: none;
  box-shadow: none;
}
body.kiosk .view{
  background: transparent;
}
.kiosk-shell{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.kiosk-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding: 6px 4px;
}

.kiosk-brand{ display:flex; align-items:center; gap:14px; min-width:0; }
.kiosk-logo{
  width:68px; height:68px;
  object-fit:contain;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  padding:8px;
}
.kiosk-logo.placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
}
.kiosk-event{ display:flex; flex-direction:column; min-width:0; }
.kiosk-event-title{
  font-weight: 990;
  font-size: 28px;
  letter-spacing: .3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.kiosk-event-sub{
  font-size: 13px;
  color: rgba(247,241,227,.72);
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.kiosk-controls{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.kiosk-dayline{ font-weight: 900; color: rgba(247,241,227,.90); }
.kiosk-j{
  display:inline-block;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(var(--kiosk-accent), .42);
  background: rgba(var(--kiosk-accent), .14);
  color: rgba(247,241,227,.92);
}
.kiosk-date{
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.14) !important;
  color: rgba(247,241,227,.92) !important;
}
.kiosk-switch{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(247,241,227,.82);
}
.kiosk-switch input{ transform: scale(1.1); }
.kiosk-color-picker{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border-radius:999px;
  border:1px solid rgba(var(--kiosk-accent), .28);
  background:rgba(255,255,255,.06);
}
.kiosk-color-btn{
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.08);
  display:grid;
  place-items:center;
  cursor:pointer;
  padding:0;
}
.kiosk-color-btn span{
  width:18px;
  height:18px;
  border-radius:999px;
  display:block;
  background:var(--swatch, var(--kiosk-accent-strong));
  box-shadow:0 0 16px rgba(var(--kiosk-accent), .38);
}
.kiosk-color-btn[data-color="gold"]{ --swatch:#ffd166; }
.kiosk-color-btn[data-color="blue"]{ --swatch:#4ea1ff; }
.kiosk-color-btn[data-color="green"]{ --swatch:#28c76f; }
.kiosk-color-btn[data-color="rose"]{ --swatch:#ff5b9f; }
.kiosk-color-btn[aria-pressed="true"]{
  border-color:rgba(var(--kiosk-accent), .82);
  box-shadow:0 0 0 3px rgba(var(--kiosk-accent), .18);
}
.kiosk-bg-toggle{
  display:flex;
  align-items:center;
  gap:4px;
  padding:5px;
  border-radius:999px;
  border:1px solid rgba(var(--kiosk-accent), .28);
  background:rgba(255,255,255,.06);
}
.kiosk-bg-btn{
  border:0;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  color:rgba(247,241,227,.78);
  background:transparent;
}
.kiosk-bg-btn[aria-pressed="true"]{
  color:#12100a;
  background:var(--kiosk-accent-strong);
  box-shadow:0 0 18px rgba(var(--kiosk-accent), .24);
}
.kiosk-title{
  font-weight: 980;
  font-size: 22px;
  letter-spacing: .2px;
}
.kiosk-hint{
  font-size: 12px;
  color: rgba(247,241,227,.72);
}
body.kiosk .panel{
  position: relative;
  z-index: 1;
  background: rgba(255,250,240,.06);
  border-color: rgba(255,255,255,.10);
}
body.kiosk .plan-table{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
body.kiosk .plan-table th, body.kiosk .plan-table td{
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-right: 1px solid rgba(255,255,255,.06);
}
body.kiosk .plan-table thead th{
  background: rgba(15,13,10,.65);
  color: rgba(247,241,227,.75);
}
body.kiosk .plan-sticky{
  background: rgba(15,13,10,.72);
}

/* PATCH: KIOSK - colonne "Heure" en blanc (doux) */
body.kiosk .plan-time,
body.kiosk .plan-table th.plan-sticky,
body.kiosk .plan-table td.plan-sticky{
  color: rgba(247,241,227,.88) !important; /* blanc moins agressif */
}
body.kiosk .plan-title{ font-size: 15px; }
body.kiosk .plan-sub{ color: rgba(247,241,227,.72); }

body.kiosk .plan-badge{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: rgba(247,241,227,.84);
}
body.kiosk .plan-badge.full{
  background: rgba(179,58,43,.25);
  border-color: rgba(179,58,43,.45);
  color: rgba(255,235,232,.95);
}
body.kiosk .plan-item{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
}
body.kiosk .plan-item:hover{ transform:none; box-shadow:none; }


/* Kiosk paging (columns) */
body.kiosk .kiosk-grid.plan-wrap{
  overflow-x: hidden;
  overflow-y: auto;
}
.kiosk-pagebar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin: 8px 0 10px;
  padding: 0 2px;
  color: rgba(247,241,227,.78);
  font-size: 12px;
}
.kiosk-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(247,241,227,.90);
  font-weight: 850;
  letter-spacing: .2px;
}
.kiosk-small{ opacity:.85; }


/* ================= V1.3.2 - Images grandes, propres, zoom et kiosque ================= */
.card-img{
  min-height:220px;
}
.card-img img,
.session-card img,
.jdr-session-img{
  width:100%;
  max-width:400px;
  height:100%;
  margin:0 auto;
  object-fit:contain;
  object-position:center;
  display:block;
}
.card-img img{
  max-width:100%;
}
.detail-img{
  width:100%;
  max-width:820px;
  height:auto;
  max-height:560px;
  object-fit:contain;
  object-position:center;
  display:block;
  margin:0 auto;
  background:rgba(0,0,0,.05);
  border-radius:18px;
  border:1px solid rgba(184,137,47,.18);
  cursor:zoom-in;
}
.plan-illus{
  width:68px;
  height:68px;
  min-width:68px;
  object-fit:contain;
  object-position:center;
  border-radius:12px;
  background:rgba(0,0,0,.05);
}
.plan-item{
  align-items:center;
}
.jdr-clickable-img{ cursor:zoom-in; }
.is-missing-img{
  object-fit:contain !important;
  filter:none !important;
  opacity:.92;
}
.image-lightbox{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
  background:rgba(0,0,0,.84);
  backdrop-filter:blur(8px);
}
.image-lightbox img{
  max-width:96vw;
  max-height:88vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:18px;
  box-shadow:0 30px 90px rgba(0,0,0,.45);
  background:rgba(255,255,255,.04);
}
.image-lightbox-close{
  position:absolute;
  top:18px;
  right:22px;
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:34px;
  line-height:38px;
  cursor:pointer;
}
.image-lightbox-caption{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  max-width:80vw;
  padding:8px 14px;
  border-radius:999px;
  color:#f7f1e3;
  background:rgba(0,0,0,.45);
  font-weight:800;
  text-align:center;
}
.kiosk-slideshow{
  margin-top:12px;
  min-height:190px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:22px;
  background:rgba(255,255,255,.07);
  overflow:hidden;
  position:relative;
  box-shadow:0 18px 50px rgba(0,0,0,.25);
}
.kiosk-slide{
  position:absolute;
  inset:0;
  display:grid;
  grid-template-columns:minmax(260px, 36%) 1fr;
  gap:16px;
  align-items:center;
  padding:12px 18px;
  opacity:0;
  transform:scale(.985);
  transition:opacity .7s ease, transform .7s ease;
  pointer-events:none;
}
.kiosk-slide.active{
  opacity:1;
  transform:scale(1);
  pointer-events:auto;
}
.kiosk-slide-img{
  width:100%;
  max-width:520px;
  height:166px;
  object-fit:contain;
  object-position:center;
  border-radius:16px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
}
.kiosk-slide-caption{
  color:rgba(247,241,227,.94);
  font-size:26px;
  line-height:1.15;
  font-weight:950;
  text-shadow:0 2px 14px rgba(0,0,0,.35);
}
.kiosk-slideshow.is-empty{
  display:grid;
  grid-template-columns:220px 1fr;
  align-items:center;
  gap:18px;
  padding:12px 18px;
}
body.kiosk .plan-illus{
  width:76px;
  height:76px;
  min-width:76px;
}
@media (max-width: 900px){
  .card-img{ height:180px; }
  .detail-img{ max-height:420px; }
  .kiosk-slide{ grid-template-columns:1fr; }
  .kiosk-slide-caption{ font-size:18px; }
}


/* V1.3.3 - Calendrier responsive + onglet Statistiques */
.calendar-layout{
  display:grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(300px, .85fr);
  gap:14px;
  align-items:start;
}
.calendar-month-panel,
.calendar-day-panel{ min-width:0; }
.cal-toolbar{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
}
.cal-month-title{
  text-align:center;
  font-weight:950;
  font-size:clamp(15px, 1.7vw, 22px);
  text-transform:capitalize;
}
.cal-weekdays{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:clamp(4px, .7vw, 10px);
  margin:12px 0 8px;
}
.cal-weekdays div{
  text-align:center;
  font-size:clamp(10px, 1vw, 13px);
  font-weight:900;
  color:var(--muted);
}
.calendar-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:clamp(4px, .75vw, 10px);
}
.cal-day,
.cal-empty{
  min-height:clamp(64px, 9.5vh, 112px);
  padding:clamp(7px, .9vw, 12px);
  text-align:left;
}
.cal-day{
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
}
.cal-day:hover{ transform:translateY(-1px); }
.cal-day-number{
  font-weight:950;
  font-size:clamp(15px, 1.7vw, 22px);
  line-height:1;
}
.cal-day-label{
  font-size:clamp(10px, .9vw, 12px);
  color:var(--muted);
  font-weight:750;
}
.cal-count{
  align-self:flex-end;
  font-size:clamp(10px, .9vw, 12px);
  padding:4px 7px;
}
.cal-empty{
  border-radius:var(--radius);
  background:rgba(255,255,255,.28);
  border:1px dashed rgba(184,137,47,.14);
  opacity:.55;
}
.calendar-day-title{
  font-weight:950;
  font-size:clamp(16px, 1.6vw, 22px);
  text-transform:capitalize;
}
.calendar-day-list .table{ min-width:560px; }
.calendar-day-list{ overflow:auto; }

.stats-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.stats-title{
  font-weight:950;
  font-size:clamp(20px, 2.4vw, 32px);
}
.kpi-stats .kpi-card{ flex:1 1 170px; }
.stats-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(280px, 1fr));
  gap:14px;
}
.stat-panel-title{
  font-weight:950;
  font-size:16px;
  margin-bottom:10px;
}
.table-scroll{ overflow:auto; }
.stat-table{ min-width:620px; }
.stat-fill{
  width:100%;
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(0,0,0,.08);
  border:1px solid rgba(184,137,47,.16);
}
.stat-fill span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--accent1), var(--accent2));
}
.stats-gauge{
  min-width:140px;
  display:grid;
  justify-items:center;
  gap:8px;
}
.stats-gauge-ring{
  --p:0;
  position:relative;
  width:104px;
  height:104px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(var(--accent1) calc(var(--p) * 1%), rgba(0,0,0,.09) 0);
  box-shadow:var(--shadow2);
}
.stats-gauge-ring::before{
  content:"";
  width:76px;
  height:76px;
  border-radius:50%;
  background:var(--card);
  position:absolute;
}
.stats-gauge-ring span{
  position:relative;
  z-index:1;
  font-weight:950;
  font-size:22px;
}
.alert-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

@media (min-width: 1500px){
  .calendar-layout{ grid-template-columns:minmax(520px, 1.55fr) minmax(380px, .75fr); }
  .cal-day,.cal-empty{ min-height:clamp(90px, 10vh, 136px); }
}
@media (max-width: 1100px){
  .calendar-layout{ grid-template-columns:1fr; }
  .calendar-day-panel{ order:2; }
  .stats-grid{ grid-template-columns:1fr; }
}
@media (max-width: 720px){
  .cal-weekdays div{ font-size:10px; }
  .calendar-grid{ gap:4px; }
  .cal-day,.cal-empty{ min-height:58px; border-radius:12px; }
  .cal-day-label{ display:none; }
  .cal-count{ padding:2px 5px; }
  .stats-header{ flex-direction:column; align-items:flex-start; }
  .stats-gauge{ align-self:center; }
}


/* V1.3.4 - Corrections calendrier responsive + scroll interne + bouton Details visible */
.calendar-layout{
  grid-template-columns:minmax(480px, 1.25fr) minmax(520px, 1fr);
  height:calc(100vh - 185px);
  min-height:560px;
  overflow:hidden;
}
.calendar-month-panel,
.calendar-day-panel{
  height:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.calendar-month-panel .calendar-grid{
  flex:1 1 auto;
  min-height:0;
}
.calendar-day-panel .hr{ flex:0 0 auto; }
.calendar-day-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding-right:8px;
  scrollbar-gutter:stable;
}
.calendar-day-list .table{
  min-width:760px;
  width:100%;
  table-layout:auto;
}
.calendar-day-list .table th:nth-child(1),
.calendar-day-list .table td:nth-child(1){ width:70px; white-space:nowrap; }
.calendar-day-list .table th:nth-child(3),
.calendar-day-list .table td:nth-child(3){ width:110px; white-space:nowrap; }
.calendar-day-list .table th:nth-child(4),
.calendar-day-list .table td:nth-child(4){ width:70px; text-align:center; white-space:nowrap; }
.calendar-day-list .table th:nth-child(5),
.calendar-day-list .table td:nth-child(5){ width:92px; text-align:center; white-space:nowrap; }
.calendar-day-list .table th:nth-child(6),
.calendar-day-list .table td:nth-child(6){ width:105px; text-align:right; white-space:nowrap; }
.calendar-detail-btn{
  padding:7px 10px !important;
  white-space:nowrap;
  min-width:82px;
}
.calendar-grid{
  overflow:hidden;
}
.cal-day,
.cal-empty{
  min-height:clamp(62px, 8.2vh, 104px);
}
#view > .panel:has(#confHint){
  display:none;
}
@media (min-width: 1600px){
  .calendar-layout{ grid-template-columns:minmax(640px, 1.35fr) minmax(620px, 1fr); }
  .cal-day,.cal-empty{ min-height:clamp(74px, 8.8vh, 118px); }
}
@media (max-width: 1280px){
  .calendar-layout{
    grid-template-columns:1fr;
    height:auto;
    min-height:0;
    overflow:visible;
  }
  .calendar-month-panel{ min-height:520px; }
  .calendar-day-panel{ max-height:50vh; min-height:380px; }
}
@media (max-width: 760px){
  .calendar-month-panel{ min-height:420px; }
  .calendar-day-panel{ max-height:55vh; }
  .calendar-day-list .table{ min-width:680px; }
}


/* ================= V1.3.5 - Kiosque colonnes configurables ================= */
body.kiosk .kiosk-grid.plan-wrap{
  width:100%;
  max-width:100%;
}
body.kiosk .plan-table{
  width:100%;
  table-layout: fixed;
}
body.kiosk .plan-col,
body.kiosk .plan-cell{
  width:auto;
}
body.kiosk .empty-kiosk-col{
  background: rgba(255,255,255,.025) !important;
  opacity:.45;
}
body.kiosk .plan-cell.empty-kiosk-col::after{
  content:"";
  display:block;
  min-height:72px;
}

/* V1.4 - themes visuels globaux */
html[data-app-theme="dark"]{
  --parch:#171512;
  --parch2:#211d18;
  --ink:#f5ead6;
  --muted:#c8b89f;
  --card:#242019;
  --gold:#d6a642;
  --gold2:#ffd77a;
  --accent1:rgba(214,166,66,.98);
  --accent2:rgba(172,112,34,.98);
  --accentSoft:rgba(214,166,66,.16);
  --accentBorder:rgba(214,166,66,.24);
}
html[data-app-theme="dark"] body{
  background: radial-gradient(1000px 700px at 20% 0%, rgba(214,166,66,.10), transparent 55%), linear-gradient(135deg,#070604,#14110d 70%,#080706);
}
html[data-app-theme="dark"] .sidebar,
html[data-app-theme="dark"] .topbar,
html[data-app-theme="dark"] .panel,
html[data-app-theme="dark"] .card,
html[data-app-theme="dark"] .modal{
  background:linear-gradient(180deg, rgba(36,32,25,.98), rgba(27,24,20,.96));
  border-color:rgba(214,166,66,.22);
}
html[data-app-theme="dark"] .input,
html[data-app-theme="dark"] select,
html[data-app-theme="dark"] textarea{
  background:#16130f;
  color:var(--ink);
  border-color:rgba(214,166,66,.28);
}

html[data-app-theme="antre"]{
  --parch:#fff4df;
  --parch2:#f4dfb8;
  --ink:#1a1008;
  --muted:#73583f;
  --gold:#f08a24;
  --gold2:#ffc247;
  --accent1:rgba(240,138,36,.98);
  --accent2:rgba(180,62,18,.98);
  --accentSoft:rgba(240,138,36,.20);
  --accentBorder:rgba(240,138,36,.28);
}
html[data-app-theme="antre"] body{
  background: radial-gradient(900px 600px at 15% 0%, rgba(255,194,71,.20), transparent 55%), radial-gradient(900px 600px at 90% 70%, rgba(240,82,24,.16), transparent 60%), linear-gradient(135deg,#100904,#2a1207 70%,#130904);
}
html[data-app-theme="antre"] .brand-badge,
html[data-app-theme="antre"] .btn-primary{
  box-shadow:0 0 0 1px rgba(255,194,71,.35), 0 10px 22px rgba(240,98,24,.28);
}

html[data-app-theme="projection"]{
  --parch:#101014;
  --parch2:#171820;
  --ink:#ffffff;
  --muted:#d9d3c6;
  --gold:#ffcf5a;
  --gold2:#ffe89d;
  --card:#1b1c25;
  --accent1:rgba(255,207,90,.98);
  --accent2:rgba(255,138,36,.98);
  --accentSoft:rgba(255,207,90,.18);
  --accentBorder:rgba(255,207,90,.30);
}
html[data-app-theme="projection"] body{
  background:#050509;
  font-size:1.04rem;
}
html[data-app-theme="projection"] .sidebar,
html[data-app-theme="projection"] .topbar,
html[data-app-theme="projection"] .panel,
html[data-app-theme="projection"] .card,
html[data-app-theme="projection"] .modal{
  background:linear-gradient(180deg, rgba(28,29,38,.98), rgba(17,17,24,.98));
  border-color:rgba(255,207,90,.32);
}
html[data-app-theme="projection"] .nav-item.active,
html[data-app-theme="projection"] .btn-primary{
  filter:saturate(1.15) contrast(1.12);
}

/* V1.4 - blocs export/statistiques */
.stat-panel .table td:last-child,
.stat-panel .table th:last-child{ text-align:right; }
.export-actions{ display:flex; gap:10px; flex-wrap:wrap; }


/* V1.4.1 - finition themes visuels + transitions douces */
html, body, .sidebar, .topbar, .panel, .card, .modal, .input, select, textarea, .btn, .nav-item {
  transition: background-color .22s ease, background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
}

html[data-app-theme="default"]{
  color-scheme: light;
}
html[data-app-theme="dark"],
html[data-app-theme="antre"],
html[data-app-theme="projection"]{
  color-scheme: dark;
}

html[data-app-theme="dark"] .small,
html[data-app-theme="projection"] .small{
  color: var(--muted);
}

html[data-app-theme="antre"] .sidebar,
html[data-app-theme="antre"] .topbar,
html[data-app-theme="antre"] .panel,
html[data-app-theme="antre"] .card,
html[data-app-theme="antre"] .modal{
  background: linear-gradient(180deg, rgba(255,244,223,.96), rgba(244,223,184,.94));
  border-color: rgba(240,138,36,.32);
}

html[data-app-theme="projection"] .view{
  font-size: 1.06rem;
}
html[data-app-theme="projection"] .kiosk-stage,
html[data-app-theme="projection"] body.kiosk{
  background: #050509;
}

.theme-preview-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.theme-chip{
  border:1px solid var(--accentBorder);
  background:var(--accentSoft);
  color:var(--ink);
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
}

/* =====================================================================
   V1.4.2 - UI OVERHAUL : contraste + palette riche + hierarchie visuelle
   ===================================================================== */
:root{
  --ui-black:#070604;
  --ui-obsidian:#0e0c09;
  --ui-coal:#17130e;
  --ui-charcoal:#221b13;
  --ui-parchment:#fff7e6;
  --ui-parchment-2:#f3e4c6;
  --ui-cream:#fffdf6;
  --ui-ink:#15100a;
  --ui-muted:#6d5a43;
  --ui-orange:#ff8a1f;
  --ui-orange-2:#ffb347;
  --ui-amber:#ffd166;
  --ui-gold:#c9962f;
  --ui-red:#e34b3f;
  --ui-ruby:#b8322a;
  --ui-green:#28c76f;
  --ui-teal:#2dd4bf;
  --ui-blue:#4ea1ff;
  --ui-violet:#a78bfa;
  --ui-pink:#ff6bb5;
  --ui-border:rgba(255,179,71,.26);
  --ui-border-strong:rgba(255,179,71,.46);
  --ui-shadow-strong:0 18px 48px rgba(0,0,0,.30);
  --ui-shadow-soft:0 10px 24px rgba(0,0,0,.14);
}

/* Base : rend l'UI plus lisible meme en theme clair */
.shell,
.sidebar{
  box-shadow:var(--ui-shadow-strong);
}
.topbar{
  backdrop-filter: blur(10px);
}
.crumb{ color:var(--ink); text-shadow:0 1px 0 rgba(255,255,255,.25); }
.subcrumb,.small,.label{ color:var(--muted); }
.panel{
  box-shadow:var(--ui-shadow-soft);
}
.kpi .kpi-card,
.kpi-card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(184,137,47,.24);
  background:linear-gradient(180deg, rgba(255,253,246,.94), rgba(255,247,230,.84));
}
.kpi .kpi-card::before,
.kpi-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg, var(--ui-orange), var(--ui-amber));
  opacity:.95;
}
.kpi .kpi-card:nth-child(2)::before{ background:linear-gradient(90deg,var(--ui-blue),var(--ui-teal)); }
.kpi .kpi-card:nth-child(3)::before{ background:linear-gradient(90deg,var(--ui-green),var(--ui-teal)); }
.kpi .kpi-card:nth-child(4)::before{ background:linear-gradient(90deg,var(--ui-red),var(--ui-orange)); }
.kpi .kpi-card:nth-child(5)::before{ background:linear-gradient(90deg,var(--ui-violet),var(--ui-pink)); }
.kpi .kpi-card:nth-child(6)::before{ background:linear-gradient(90deg,var(--ui-amber),var(--ui-gold)); }

.btn{
  letter-spacing:.01em;
  border:1px solid rgba(255,255,255,.18);
}
.btn-primary{
  background:linear-gradient(180deg, var(--ui-orange), #c95113) !important;
  color:#fff !important;
  text-shadow:0 1px 0 rgba(0,0,0,.35);
}
.btn-success{
  background:linear-gradient(180deg, #28c76f, #147b47) !important;
  color:#fff !important;
}
.btn-danger{
  background:linear-gradient(180deg, #e34b3f, #971f18) !important;
  color:#fff !important;
}
.btn-ghost{
  color:var(--ink);
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,247,230,.78));
  border:1px solid rgba(184,137,47,.30);
}
.nav-item{
  font-weight:850;
}
.nav-item.active{
  color:#17100a;
  background:linear-gradient(90deg, rgba(255,179,71,.80), rgba(255,247,230,.90));
  border-color:rgba(255,138,31,.55);
  box-shadow:0 10px 24px rgba(255,138,31,.16);
}

/* Cartes sessions : davantage de contraste + statuts visibles */
.card,
.plan-item,
.cal-day{
  border-width:1px;
  box-shadow:0 12px 28px rgba(0,0,0,.12);
}
.card:hover,
.plan-item:hover,
.cal-day:hover{
  border-color:rgba(255,138,31,.72) !important;
  box-shadow:0 16px 36px rgba(0,0,0,.18), 0 0 0 3px rgba(255,138,31,.10);
}
.card.is-full,
.plan-item.full{
  border-color:rgba(227,75,63,.55) !important;
  background:linear-gradient(135deg, rgba(227,75,63,.16), rgba(255,253,246,.90));
}
.plan-badge.full,
.badge.full,
.status-complete{
  background:rgba(227,75,63,.16) !important;
  border-color:rgba(227,75,63,.55) !important;
  color:#b2231b !important;
  font-weight:950;
}
.badge,
.plan-badge,
.cal-count{
  border:1px solid rgba(78,161,255,.34);
  background:rgba(78,161,255,.14);
  color:#194f91;
  font-weight:900;
}

/* Theme sombre : contraste renforce */
html[data-app-theme="dark"]{
  --parch:#12100d;
  --parch2:#1c1712;
  --ink:#fff4df;
  --muted:#d0bfa4;
  --card:#211b14;
  --gold:#ffb347;
  --gold2:#ffd166;
  --accent1:rgba(255,138,31,.98);
  --accent2:rgba(201,81,19,.98);
  --accentSoft:rgba(255,138,31,.18);
  --accentBorder:rgba(255,179,71,.34);
  --red:#ff6256;
  --blue:#69b3ff;
  --green:#35d981;
}
html[data-app-theme="dark"] body{
  background:radial-gradient(900px 520px at 12% 0%, rgba(255,138,31,.16), transparent 58%),
             radial-gradient(900px 680px at 95% 70%, rgba(78,161,255,.10), transparent 58%),
             linear-gradient(135deg,#050403,#16100b 65%,#080605);
}
html[data-app-theme="dark"] .sidebar,
html[data-app-theme="dark"] .shell,
html[data-app-theme="dark"] .topbar,
html[data-app-theme="dark"] .panel,
html[data-app-theme="dark"] .modal{
  background:linear-gradient(180deg, rgba(30,24,18,.98), rgba(17,14,11,.97)) !important;
  border-color:rgba(255,179,71,.30) !important;
}
html[data-app-theme="dark"] .card,
html[data-app-theme="dark"] .kpi-card,
html[data-app-theme="dark"] .kpi .kpi-card{
  background:linear-gradient(180deg, rgba(43,34,24,.98), rgba(28,23,17,.95)) !important;
  border-color:rgba(255,179,71,.28) !important;
}
html[data-app-theme="dark"] .btn-ghost,
html[data-app-theme="dark"] .icon-btn,
html[data-app-theme="dark"] .nav-item,
html[data-app-theme="dark"] .input,
html[data-app-theme="dark"] select,
html[data-app-theme="dark"] textarea{
  background:rgba(10,8,6,.78) !important;
  color:var(--ink) !important;
  border-color:rgba(255,179,71,.28) !important;
}
html[data-app-theme="dark"] .nav-item.active{
  color:#0a0704 !important;
  background:linear-gradient(90deg, var(--ui-orange), var(--ui-amber)) !important;
}
html[data-app-theme="dark"] .table th,
html[data-app-theme="dark"] .plan-table thead th{
  background:rgba(255,179,71,.14);
  color:#ffe8b8;
}
html[data-app-theme="dark"] .table td,
html[data-app-theme="dark"] .plan-table td{
  border-color:rgba(255,179,71,.14);
}

/* Antre des Gredins V2 : beaucoup plus contraste, palette 15 couleurs */
html[data-app-theme="antre"]{
  color-scheme:dark;
  --parch:#0d0905;
  --parch2:#16100a;
  --ink:#fff5df;
  --muted:#d7bea0;
  --card:#1b130c;
  --gold:#ffb347;
  --gold2:#ffd166;
  --accent1:rgba(255,138,31,.99);
  --accent2:rgba(196,72,18,.99);
  --accentSoft:rgba(255,138,31,.18);
  --accentBorder:rgba(255,179,71,.40);
  --red:#ff5148;
  --blue:#4ea1ff;
  --green:#28c76f;
  --shadow:0 20px 54px rgba(0,0,0,.48);
  --shadow2:0 12px 28px rgba(0,0,0,.36);
}
html[data-app-theme="antre"] body{
  color:var(--ink);
  background:
    radial-gradient(950px 620px at 8% -4%, rgba(255,179,71,.20), transparent 58%),
    radial-gradient(820px 520px at 105% 18%, rgba(167,139,250,.14), transparent 58%),
    radial-gradient(780px 580px at 88% 92%, rgba(227,75,63,.13), transparent 60%),
    linear-gradient(135deg,#050302,#170b04 55%,#080403);
}
html[data-app-theme="antre"] .bg-ornaments{ opacity:.50; filter:contrast(1.15); }
html[data-app-theme="antre"] .sidebar{
  background:linear-gradient(180deg, rgba(31,22,13,.98), rgba(12,8,5,.98)) !important;
  border-color:rgba(255,179,71,.40) !important;
}
html[data-app-theme="antre"] .shell{
  background:linear-gradient(180deg, rgba(20,14,9,.98), rgba(12,8,5,.98)) !important;
  border-color:rgba(255,179,71,.38) !important;
}
html[data-app-theme="antre"] .topbar{
  background:linear-gradient(90deg, rgba(23,16,10,.98), rgba(38,23,12,.98)) !important;
  border-bottom-color:rgba(255,179,71,.34) !important;
}
html[data-app-theme="antre"] .panel,
html[data-app-theme="antre"] .modal{
  background:linear-gradient(180deg, rgba(28,20,13,.96), rgba(17,12,8,.96)) !important;
  border-color:rgba(255,179,71,.32) !important;
}
html[data-app-theme="antre"] .card,
html[data-app-theme="antre"] .kpi-card,
html[data-app-theme="antre"] .kpi .kpi-card,
html[data-app-theme="antre"] .cal-day,
html[data-app-theme="antre"] .plan-item{
  background:linear-gradient(145deg, rgba(41,28,17,.98), rgba(22,15,9,.96)) !important;
  border-color:rgba(255,179,71,.26) !important;
  color:var(--ink) !important;
}
html[data-app-theme="antre"] .kpi-card,
html[data-app-theme="antre"] .kpi .kpi-card{
  min-height:78px;
}
html[data-app-theme="antre"] .kpi-card .value,
html[data-app-theme="antre"] .kpi .value,
html[data-app-theme="antre"] .stat-value{
  color:var(--ui-amber) !important;
  text-shadow:0 0 16px rgba(255,179,71,.20);
}
html[data-app-theme="antre"] .brand-title,
html[data-app-theme="antre"] .crumb,
html[data-app-theme="antre"] .stats-title,
html[data-app-theme="antre"] h1,
html[data-app-theme="antre"] h2,
html[data-app-theme="antre"] h3{
  color:#fff8e8 !important;
}
html[data-app-theme="antre"] .brand-sub,
html[data-app-theme="antre"] .subcrumb,
html[data-app-theme="antre"] .small,
html[data-app-theme="antre"] .label,
html[data-app-theme="antre"] .card-sub,
html[data-app-theme="antre"] .plan-sub{
  color:#d9c1a1 !important;
}
html[data-app-theme="antre"] .nav-item,
html[data-app-theme="antre"] .btn-ghost,
html[data-app-theme="antre"] .icon-btn,
html[data-app-theme="antre"] .input,
html[data-app-theme="antre"] select,
html[data-app-theme="antre"] textarea{
  background:rgba(8,5,3,.72) !important;
  color:#fff5df !important;
  border-color:rgba(255,179,71,.32) !important;
}
html[data-app-theme="antre"] .nav-item:hover,
html[data-app-theme="antre"] .btn-ghost:hover{
  background:rgba(255,138,31,.18) !important;
  border-color:rgba(255,179,71,.60) !important;
}
html[data-app-theme="antre"] .nav-item.active{
  color:#140a04 !important;
  background:linear-gradient(90deg, #ff8a1f, #ffd166) !important;
  border-color:rgba(255,209,102,.75) !important;
  box-shadow:0 12px 30px rgba(255,138,31,.24);
}
html[data-app-theme="antre"] .btn-primary,
html[data-app-theme="antre"] .btn-success,
html[data-app-theme="antre"] .btn-danger{
  box-shadow:0 12px 28px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.12) inset;
}
html[data-app-theme="antre"] .table th,
html[data-app-theme="antre"] .plan-table thead th{
  background:linear-gradient(180deg, rgba(255,138,31,.20), rgba(255,179,71,.10)) !important;
  color:#ffe8b8 !important;
  border-color:rgba(255,179,71,.22) !important;
}
html[data-app-theme="antre"] .table td,
html[data-app-theme="antre"] .plan-table td{
  color:#fff0d4;
  border-color:rgba(255,179,71,.14) !important;
}
html[data-app-theme="antre"] .theme-chip:nth-child(1){ background:rgba(255,209,102,.16); border-color:rgba(255,209,102,.48); }
html[data-app-theme="antre"] .theme-chip:nth-child(2){ background:rgba(78,161,255,.16); border-color:rgba(78,161,255,.48); }
html[data-app-theme="antre"] .theme-chip:nth-child(3){ background:rgba(40,199,111,.16); border-color:rgba(40,199,111,.48); }
html[data-app-theme="antre"] .theme-chip:nth-child(4){ background:rgba(167,139,250,.16); border-color:rgba(167,139,250,.48); }

/* Couleurs fonctionnelles par contexte : donne de la vie sans perdre la lisibilite */
.stat-panel:nth-child(1){ border-top:4px solid var(--ui-orange); }
.stat-panel:nth-child(2){ border-top:4px solid var(--ui-blue); }
.stat-panel:nth-child(3){ border-top:4px solid var(--ui-green); }
.stat-panel:nth-child(4){ border-top:4px solid var(--ui-violet); }
.alert-list .badge:nth-child(4n+1){ background:rgba(227,75,63,.16); border-color:rgba(227,75,63,.42); color:#ffb7b2; }
.alert-list .badge:nth-child(4n+2){ background:rgba(255,209,102,.16); border-color:rgba(255,209,102,.42); color:#ffe7a5; }
.alert-list .badge:nth-child(4n+3){ background:rgba(78,161,255,.16); border-color:rgba(78,161,255,.42); color:#b9dbff; }
.alert-list .badge:nth-child(4n+4){ background:rgba(40,199,111,.16); border-color:rgba(40,199,111,.42); color:#aef5cd; }

/* Projection kiosque : lisibilite ecran + boutons tres visibles */
html[data-app-theme="projection"] body,
body.kiosk{
  background:#020305 !important;
}
html[data-app-theme="projection"] .kiosk-shell,
body.kiosk .kiosk-shell{
  background:linear-gradient(180deg, rgba(12,14,20,.98), rgba(4,5,8,.98));
  border-color:rgba(var(--kiosk-accent),.32);
}
html[data-app-theme="projection"] .plan-item,
body.kiosk .plan-item{
  background:linear-gradient(145deg, rgba(30,34,48,.98), rgba(14,16,24,.97)) !important;
  color:#fff !important;
  border-color:rgba(var(--kiosk-accent),.30) !important;
}
html[data-app-theme="projection"] .plan-title,
body.kiosk .plan-title{
  color:#fff8e8 !important;
  font-size:clamp(16px, 1.2vw, 22px);
}
html[data-app-theme="projection"] .plan-sub,
body.kiosk .plan-sub{
  color:#d7e7ff !important;
}
body.kiosk .plan-badge.full,
html[data-app-theme="projection"] .plan-badge.full{
  background:rgba(255,81,72,.22) !important;
  color:#ffd1ce !important;
  border-color:rgba(255,81,72,.60) !important;
}

/* Formulaires et scrollbar plus propres */
::-webkit-scrollbar{ width:12px; height:12px; }
::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(255,138,31,.75), rgba(201,81,19,.75));
  border-radius:999px;
  border:3px solid rgba(0,0,0,.12);
}
::-webkit-scrollbar-track{ background:rgba(0,0,0,.08); border-radius:999px; }
html[data-app-theme="antre"] ::selection,
html[data-app-theme="dark"] ::selection,
html[data-app-theme="projection"] ::selection{
  background:rgba(255,179,71,.42);
  color:#fff;
}

/* Accessibilite : meilleure visibilite clavier */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-item:focus-visible{
  outline:3px solid rgba(78,161,255,.78);
  outline-offset:2px;
}


.archive-select{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px 0;
  font-size:12px;
  font-weight:900;
  color:var(--muted);
}
.archive-select input{ width:16px; height:16px; }
.card.is-selected{
  border-color: rgba(179,58,43,.72);
  box-shadow: 0 18px 36px rgba(179,58,43,.18);
}


.archive-table-wrap{
  overflow:auto;
  border:1px solid rgba(78,161,255,.28);
  border-radius:8px;
  background:rgba(5,9,15,.42);
}
.archive-table{
  min-width:1080px;
  display:flex;
  flex-direction:column;
}
.archive-row{
  display:grid;
  grid-template-columns:36px minmax(260px, 1.75fr) 132px 150px minmax(150px, .8fr) 92px 92px 178px;
  gap:10px;
  align-items:center;
  padding:9px 12px;
  border-bottom:1px solid rgba(78,161,255,.14);
  background:rgba(11,18,30,.72);
  color:#eef6ff;
}
.archive-row:nth-child(even):not(.archive-row-head){ background:rgba(14,23,38,.78); }
.archive-row:last-child{ border-bottom:0; }
.archive-row:hover:not(.archive-row-head){ background:rgba(28,43,66,.88); }
.archive-row.is-selected{
  background:rgba(37,99,235,.18) !important;
  box-shadow:inset 4px 0 0 #60a5fa;
}
.archive-row.is-full{ box-shadow:inset 4px 0 0 #f59e0b; }
.archive-row.is-selected.is-full{ box-shadow:inset 4px 0 0 #60a5fa, inset 8px 0 0 #f59e0b; }
.archive-row-head{
  position:sticky;
  top:0;
  z-index:1;
  background:#1f2933 !important;
  color:#fff5e5;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.archive-check-cell{ display:flex; align-items:center; justify-content:center; }
.archive-check{ width:16px; height:16px; accent-color:#22c7b8; cursor:pointer; }
.archive-main-cell{ min-width:0; }
.archive-title{
  font-size:13px;
  font-weight:950;
  color:#fffaf0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.archive-sub{
  margin-top:2px;
  font-size:11px;
  font-weight:650;
  color:#bdd7e9;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.archive-cell{ min-width:0; }
.archive-cell span{
  display:none;
  color:#7b8ab8;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.archive-cell b{
  display:block;
  color:#eef6ff;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.archive-players b{ color:#b7f7cc; }
.archive-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  white-space:nowrap;
}
.archive-actions .btn{ padding:7px 10px; font-size:12px; }
.archive-empty{
  padding:18px;
  color:var(--muted);
  font-weight:800;
  background:rgba(11,18,30,.72);
}
@media (max-width: 980px){
  .archive-table{ min-width:0; }
  .archive-row,
  .archive-row-head{
    grid-template-columns:28px minmax(0,1fr);
  }
  .archive-row-head{ display:none; }
  .archive-cell,
  .archive-actions{ grid-column:2; }
  .archive-cell span{ display:block; }
  .archive-actions{ justify-content:flex-start; flex-wrap:wrap; }
}


.stats-period{
  display:flex;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
}
.stats-period .field{
  flex:1 1 180px;
}
.stats-period .btn{
  flex:0 0 auto;
}


.stats-summary{
  display:grid;
  grid-template-columns:repeat(4, minmax(150px, 1fr));
  gap:12px;
}
.stats-simple-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(260px, 1fr));
  gap:14px;
}
.stats-fun-card{
  overflow:hidden;
  position:relative;
}
.stats-fun-card::after{
  content:"";
  position:absolute;
  right:-18px;
  bottom:-24px;
  width:88px;
  height:88px;
  border-radius:999px;
  opacity:.20;
  background:var(--fun-glow, var(--accent));
}
.stats-fun-card[data-tone="amber"]{ --fun-glow:#f2a32f; border-color:rgba(242,163,47,.38); }
.stats-fun-card[data-tone="green"]{ --fun-glow:#2e8b57; border-color:rgba(46,139,87,.38); }
.stats-fun-card[data-tone="blue"]{ --fun-glow:#3b82f6; border-color:rgba(59,130,246,.38); }
.stats-fun-card[data-tone="red"]{ --fun-glow:#b33a2b; border-color:rgba(179,58,43,.38); }
.stats-mood{
  display:grid;
  grid-template-columns:minmax(180px, .8fr) minmax(220px, 1fr) auto;
  align-items:center;
  gap:14px;
  margin-top:14px;
}
.stats-mood-title{
  font-size:18px;
  font-weight:950;
}
.stats-mood-track{
  height:18px;
  border-radius:999px;
  background:rgba(184,137,47,.16);
  overflow:hidden;
  border:1px solid rgba(184,137,47,.18);
}
.stats-mood-track span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #2e8b57, #f2a32f, #b33a2b);
  box-shadow:0 8px 18px rgba(184,137,47,.28);
}
.stats-mood-value{
  font-size:22px;
  font-weight:950;
  color:var(--red);
}
.simple-stats-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.simple-stat-row{
  display:grid;
  grid-template-columns:42px minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid rgba(184,137,47,.14);
  border-radius:12px;
  background:rgba(255,255,255,.44);
}
.simple-stat-rank{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:999px;
  font-weight:950;
  color:white;
  background:linear-gradient(180deg, rgba(184,137,47,.95), rgba(140,86,31,.95));
}
.simple-stat-main{ min-width:0; }
.simple-stat-label{
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.simple-stat-bar{
  height:7px;
  margin-top:7px;
  border-radius:999px;
  background:rgba(184,137,47,.16);
  overflow:hidden;
}
.simple-stat-bar span{
  display:block;
  width:var(--row-fill);
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(46,139,87,.9), rgba(59,130,246,.9));
}
.simple-stat-score{
  text-align:right;
  white-space:nowrap;
}
.simple-stat-score b{
  display:block;
  font-size:18px;
}
.simple-stat-score span{
  display:block;
  font-size:11px;
  color:var(--muted);
  font-weight:800;
}
.stat-alert-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}
.stat-alert-item{
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(184,137,47,.16);
  background:rgba(255,255,255,.50);
}
.stat-alert-item b{
  display:block;
  font-size:24px;
  line-height:1;
}
.stat-alert-item span{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}
.stat-alert-item[data-level="warn"]{ border-color:rgba(179,58,43,.35); background:rgba(179,58,43,.10); }
.stat-alert-item[data-level="info"]{ border-color:rgba(59,130,246,.35); background:rgba(59,130,246,.10); }
.stat-alert-item[data-level="ok"]{ border-color:rgba(46,139,87,.35); background:rgba(46,139,87,.10); }
.alert-list.compact{ gap:8px; }
@media (max-width: 1100px){
  .stats-summary{ grid-template-columns:repeat(2, minmax(150px, 1fr)); }
}
@media (max-width: 760px){
  .stats-summary,
  .stats-simple-grid,
  .stats-mood{ grid-template-columns:1fr; }
  .stats-mood-value{ justify-self:start; }
}


body.kiosk .kiosk-top{
  border-bottom:1px solid rgba(var(--kiosk-accent), .28);
  box-shadow:0 10px 28px rgba(var(--kiosk-accent), .08);
}
body.kiosk .kiosk-logo,
body.kiosk .kiosk-pill,
body.kiosk .kiosk-pagebar{
  border-color:rgba(var(--kiosk-accent), .36) !important;
}
body.kiosk .kiosk-event-title,
body.kiosk .kiosk-mood-value{
  text-shadow:0 0 18px rgba(var(--kiosk-accent), .22);
}
body.kiosk .plan-badge,
body.kiosk .kiosk-pill{
  background:rgba(var(--kiosk-accent), .12) !important;
  border-color:rgba(var(--kiosk-accent), .34) !important;
}
body.kiosk .plan-item{
  box-shadow:inset 0 0 0 1px rgba(var(--kiosk-accent), .08), 0 12px 24px rgba(var(--kiosk-accent), .05);
}


body.kiosk[data-kiosk-bg="day"]{
  background:#f7f1e3 !important;
  color:#24180d;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-shell{
  background:linear-gradient(180deg, rgba(255,250,240,.98), rgba(238,224,196,.98)) !important;
  color:#24180d;
  border-color:rgba(var(--kiosk-accent), .38);
}
body.kiosk[data-kiosk-bg="day"] .kiosk-event-title,
body.kiosk[data-kiosk-bg="day"] .kiosk-dayline,
body.kiosk[data-kiosk-bg="day"] .kiosk-title,
body.kiosk[data-kiosk-bg="day"] .plan-title{
  color:#24180d !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-event-sub,
body.kiosk[data-kiosk-bg="day"] .kiosk-hint,
body.kiosk[data-kiosk-bg="day"] .plan-sub,
body.kiosk[data-kiosk-bg="day"] .kiosk-small{
  color:rgba(36,24,13,.72) !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-date,
body.kiosk[data-kiosk-bg="day"] .kiosk-switch,
body.kiosk[data-kiosk-bg="day"] .kiosk-color-picker,
body.kiosk[data-kiosk-bg="day"] .kiosk-bg-toggle{
  background:rgba(255,255,255,.72) !important;
  color:#24180d !important;
  border-color:rgba(var(--kiosk-accent), .30) !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-bg-btn{ color:rgba(36,24,13,.68); }
body.kiosk[data-kiosk-bg="day"] .kiosk-bg-btn[aria-pressed="true"]{ color:#24180d; }
body.kiosk[data-kiosk-bg="day"] .panel,
body.kiosk[data-kiosk-bg="day"] .plan-table{
  background:rgba(255,255,255,.68) !important;
  border-color:rgba(var(--kiosk-accent), .24) !important;
  color:#24180d !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table thead th,
body.kiosk[data-kiosk-bg="day"] .plan-sticky{
  background:rgba(248,237,212,.92) !important;
  color:#4a3520 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-item{
  background:linear-gradient(145deg, rgba(255,255,255,.96), rgba(246,235,211,.96)) !important;
  color:#24180d !important;
  border-color:rgba(var(--kiosk-accent), .32) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-badge,
body.kiosk[data-kiosk-bg="day"] .kiosk-pill,
body.kiosk[data-kiosk-bg="day"] .kiosk-j{
  color:#24180d !important;
  background:rgba(var(--kiosk-accent), .18) !important;
}


/* Kiosk day mode contrast pass */
body.kiosk[data-kiosk-bg="day"] .plan-time,
body.kiosk[data-kiosk-bg="day"] .plan-table th.plan-sticky,
body.kiosk[data-kiosk-bg="day"] .plan-table td.plan-sticky{
  color:#2a1708 !important;
  background:#ead7a8 !important;
  font-weight:950 !important;
  text-shadow:none !important;
  border-right:2px solid rgba(92,56,18,.28) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table thead th{
  color:#2a1708 !important;
  background:#ead7a8 !important;
  font-weight:950 !important;
  border-bottom:2px solid rgba(92,56,18,.24) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table td{
  border-bottom:1px solid rgba(92,56,18,.14) !important;
  border-right:1px solid rgba(92,56,18,.10) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-col,
body.kiosk[data-kiosk-bg="day"] .plan-cell{
  background:rgba(255,252,245,.74) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table tbody tr:nth-child(even) .plan-col,
body.kiosk[data-kiosk-bg="day"] .plan-table tbody tr:nth-child(even) .plan-cell{
  background:rgba(246,238,220,.82) !important;
}
body.kiosk[data-kiosk-bg="day"] .empty-kiosk-col{
  background:rgba(238,226,202,.72) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-item{
  background:#fff7e8 !important;
  border-color:rgba(var(--kiosk-accent), .55) !important;
  box-shadow:0 10px 22px rgba(92,56,18,.10), inset 0 0 0 1px rgba(92,56,18,.06) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-title{
  color:#1d1007 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-sub,
body.kiosk[data-kiosk-bg="day"] .plan-badge{
  color:#3d2a17 !important;
}


/* Kiosk day mode stronger contrast pass */
body.kiosk[data-kiosk-bg="day"]{
  background:#ead7a8 !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-shell{
  background:#f4ead1 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table{
  background:#fffaf0 !important;
  border-color:#7a4b16 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-time,
body.kiosk[data-kiosk-bg="day"] .plan-table th.plan-sticky,
body.kiosk[data-kiosk-bg="day"] .plan-table td.plan-sticky{
  color:#ffffff !important;
  background:#5a3510 !important;
  font-weight:1000 !important;
  text-shadow:0 1px 0 rgba(0,0,0,.55) !important;
  border-right:3px solid #2f1a07 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table thead th{
  color:#ffffff !important;
  background:#6d4316 !important;
  font-weight:1000 !important;
  text-shadow:0 1px 0 rgba(0,0,0,.42) !important;
  border-bottom:3px solid #3b2209 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table td{
  border-bottom:1px solid rgba(75,45,15,.28) !important;
  border-right:1px solid rgba(75,45,15,.20) !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-col,
body.kiosk[data-kiosk-bg="day"] .plan-cell{
  background:#fffaf0 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-table tbody tr:nth-child(even) .plan-col,
body.kiosk[data-kiosk-bg="day"] .plan-table tbody tr:nth-child(even) .plan-cell{
  background:#f0e2bf !important;
}
body.kiosk[data-kiosk-bg="day"] .empty-kiosk-col{
  background:#e8d5a9 !important;
}
body.kiosk[data-kiosk-bg="day"] .plan-item{
  background:#fff2cf !important;
  border-color:rgba(var(--kiosk-accent), .88) !important;
  box-shadow:0 12px 22px rgba(60,34,10,.18), inset 0 0 0 1px rgba(60,34,10,.16) !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-slideshow,
body.kiosk[data-kiosk-bg="day"] .kiosk-slideshow.is-empty{
  background:#fff2cf !important;
  border-color:#7a4b16 !important;
  box-shadow:0 16px 36px rgba(60,34,10,.16) !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-slide-caption{
  color:#1b0f05 !important;
  text-shadow:none !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-slide-img{
  background:#ead7a8 !important;
  border-color:rgba(75,45,15,.28) !important;
}
body.kiosk[data-kiosk-bg="day"] .kiosk-hint{
  color:#3a220b !important;
  font-weight:800;
}


.global-tools-button{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:5000;
  border:1px solid rgba(184,137,47,.35);
  border-radius:999px;
  padding:11px 16px;
  font-weight:950;
  color:#24180d;
  background:linear-gradient(180deg, rgba(255,245,220,.96), rgba(230,198,132,.96));
  box-shadow:0 14px 34px rgba(60,34,10,.18);
  cursor:pointer;
}
.tool-results{ display:flex; flex-direction:column; gap:8px; max-height:52vh; overflow:auto; }
.tool-result-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(184,137,47,.18);
  border-radius:12px;
  background:rgba(255,255,255,.62);
  cursor:pointer;
}
.tool-result-row:hover{ transform:translateY(-1px); box-shadow:0 10px 22px rgba(60,34,10,.10); }
.tool-modal-grid{ display:grid; grid-template-columns:repeat(2, minmax(260px, 1fr)); gap:12px; }
.stats-summary.mini{ grid-template-columns:repeat(4, minmax(120px, 1fr)); }
.archive-filter-panel{ border-color:rgba(78,161,255,.22); }
.stats-auto-summary{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.stats-auto-summary pre{
  margin:6px 0 0;
  white-space:pre-wrap;
  font-family:inherit;
  color:var(--ink);
}
.kiosk-size-toggle{
  display:flex;
  align-items:center;
  gap:4px;
  padding:5px;
  border-radius:999px;
  border:1px solid rgba(var(--kiosk-accent), .28);
  background:rgba(255,255,255,.06);
}
.kiosk-size-btn{
  border:0;
  border-radius:999px;
  padding:7px 10px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  color:rgba(247,241,227,.78);
  background:transparent;
}
.kiosk-size-btn[aria-pressed="true"]{
  color:#12100a;
  background:var(--kiosk-accent-strong);
}
body.kiosk[data-kiosk-size="compact"] .plan-title{ font-size:13px !important; }
body.kiosk[data-kiosk-size="compact"] .plan-item{ padding:8px !important; }
body.kiosk[data-kiosk-size="compact"] .plan-illus{ width:50px; height:50px; min-width:50px; }
body.kiosk[data-kiosk-size="large"] .plan-title{ font-size:clamp(20px, 1.55vw, 28px) !important; }
body.kiosk[data-kiosk-size="large"] .plan-sub{ font-size:15px !important; }
body.kiosk[data-kiosk-size="large"] .plan-item{ padding:16px !important; }
body.kiosk[data-kiosk-size="large"] .plan-illus{ width:86px; height:86px; min-width:86px; }
@media (max-width: 900px){
  .tool-modal-grid,.stats-summary.mini{ grid-template-columns:1fr; }
  .stats-auto-summary{ flex-direction:column; }
}


/* Stats summary polish */
.stats-auto-summary{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:16px;
  align-items:center;
  overflow:hidden;
  border-color:rgba(46,139,87,.26);
  background:
    linear-gradient(135deg, rgba(255,250,235,.96), rgba(232,246,238,.92) 48%, rgba(236,244,255,.90));
}
.stats-auto-summary::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg, #2e8b57, #f2a32f, #3b82f6, #b33a2b);
}
.stats-summary-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.stats-summary-title{
  font-size:22px;
  line-height:1.1;
  font-weight:950;
  color:var(--ink);
  letter-spacing:0;
}
.stats-summary-sub{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.stats-summary-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:2px;
}
.stats-summary-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(184,137,47,.22);
  background:rgba(255,255,255,.70);
  color:var(--ink);
  font-size:12px;
  font-weight:850;
  box-shadow:0 8px 16px rgba(0,0,0,.06);
}
.stats-summary-badge b{
  color:#1f6f47;
  font-size:14px;
}
.stats-summary-meter{
  height:12px;
  border-radius:999px;
  background:rgba(27,20,13,.10);
  border:1px solid rgba(27,20,13,.08);
  overflow:hidden;
  margin-top:4px;
}
.stats-summary-meter span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #2e8b57, #f2a32f, #b33a2b);
  box-shadow:0 6px 16px rgba(46,139,87,.22);
}
.stats-summary-foot{
  font-size:12px;
  color:var(--muted);
  font-weight:850;
}
.stats-copy-btn{
  align-self:start;
  min-width:88px;
}
@media (max-width: 900px){
  .stats-auto-summary{
    grid-template-columns:1fr;
  }
  .stats-copy-btn{
    justify-self:start;
  }
}


/* Event/search/logo polish */
.event-tools-panel{ overflow:hidden; }
.event-tools-row{
  display:grid;
  grid-template-columns:minmax(260px, 1fr) auto;
  gap:14px;
  align-items:start;
}
.event-tools-copy{ min-width:0; }
.event-tools-actions{
  display:flex;
  gap:10px;
  flex-wrap:nowrap;
  overflow-x:auto;
  max-width:100%;
  padding-bottom:4px;
}
.event-tools-actions .btn{
  flex:0 0 auto;
  white-space:nowrap;
}
.default-logo-img{
  object-fit:contain !important;
  padding:14px;
  background:linear-gradient(135deg, rgba(255,244,214,.92), rgba(214,165,69,.32)) !important;
}
.tool-result-row{
  background:rgba(255,250,240,.96) !important;
  color:#1b140d !important;
  border-color:rgba(184,137,47,.42) !important;
}
.tool-result-row b{ color:#1b140d !important; }
.tool-result-row .small{ color:#5f4b36 !important; }
.tool-result-row .pill{
  color:#1b140d !important;
  background:rgba(255,255,255,.72) !important;
}
html[data-app-theme="dark"] .tool-result-row,
html[data-app-theme="projection"] .tool-result-row{
  background:rgba(255,250,240,.92) !important;
  color:#1b140d !important;
}
@media (max-width: 1200px){
  .event-tools-row{ grid-template-columns:1fr; }
}


/* Modal title contrast polish */
.modal-head,
.modal-title{
  color:#1b140d !important;
}
.modal-close,
.modal-head .icon-btn{
  color:#fffaf0 !important;
}


/* Search filters and calendar badges */
.global-filter-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.global-filter-btn{ padding:8px 10px; box-shadow:none; }
.global-filter-btn[aria-pressed="true"]{ background:linear-gradient(180deg, var(--accent1), var(--accent2)); color:#fff; }
.global-search-extra{ margin-top:10px; }
.cal-badges{ display:flex; gap:4px; flex-wrap:wrap; margin-top:auto; }
.cal-status{ min-width:22px; height:22px; display:inline-grid; place-items:center; border-radius:999px; font-size:11px; font-weight:950; color:#fff; border:1px solid rgba(255,255,255,.28); }
.cal-status.active{ background:#2e8b57; }
.cal-status.archive{ background:#8a5a44; }
.cal-status.full{ background:#2b61b3; }
.cal-status.empty{ background:#f2a32f; color:#24180d; }
.cal-status.over{ background:#b33a2b; }


.game-ref-toolbar{
  display:grid;
  grid-template-columns:minmax(220px, 1fr) minmax(260px, 420px);
  align-items:end;
  gap:14px;
}
.game-ref-card{ min-height:230px; }
.game-ref-head{
  display:grid;
  grid-template-columns:96px minmax(0, 1fr);
  gap:12px;
  align-items:center;
}
.game-ref-img{
  width:96px;
  height:96px;
  object-fit:cover;
  border-radius:16px;
  border:1px solid rgba(184,137,47,.2);
  background:rgba(0,0,0,.05);
}
.game-ref-main{ min-width:0; }
.game-ref-desc{
  margin-top:12px;
  min-height:44px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.game-ref-session-row{ align-items:end; }
@media (max-width: 900px){
  .game-ref-toolbar{ grid-template-columns:1fr; }
  .game-ref-head{ grid-template-columns:72px minmax(0, 1fr); }
  .game-ref-img{ width:72px; height:72px; }
  .game-ref-session-row{ align-items:stretch; }
}


/* Games referenced list layout */
.game-ref-grid{
  display:flex !important;
  flex-direction:column;
  gap:10px;
}
.game-ref-card{
  display:grid !important;
  grid-template-columns:minmax(320px, .9fr) minmax(260px, 1fr) auto;
  align-items:center;
  gap:14px;
  min-height:0 !important;
  padding:10px 12px;
  overflow:visible;
}
.game-ref-card .game-ref-head{
  display:grid;
  grid-template-columns:72px minmax(0, 1fr);
  gap:12px;
  align-items:center;
}
.game-ref-card .game-ref-img{
  width:72px;
  height:72px;
  border-radius:12px;
}
.game-ref-card .pills{
  margin-top:7px;
}
.game-ref-card .game-ref-desc{
  margin-top:0;
  min-height:0;
  line-height:1.35;
  -webkit-line-clamp:2;
}
.game-ref-card .card-foot{
  margin-top:0;
  padding:0;
  justify-content:flex-end;
  flex-wrap:nowrap;
}
.game-ref-card .card-foot .btn{
  white-space:nowrap;
}
@media (max-width: 1180px){
  .game-ref-card{
    grid-template-columns:minmax(280px, .9fr) minmax(220px, 1fr);
  }
  .game-ref-card .card-foot{
    grid-column:1 / -1;
    justify-content:flex-start;
  }
}
@media (max-width: 760px){
  .game-ref-card{
    grid-template-columns:1fr;
    align-items:stretch;
  }
  .game-ref-card .game-ref-head{
    grid-template-columns:64px minmax(0, 1fr);
  }
  .game-ref-card .game-ref-img{
    width:64px;
    height:64px;
  }
  .game-ref-card .card-foot{
    flex-wrap:wrap;
  }
}


/* Kiosk night modal contrast */
body.kiosk:not([data-kiosk-bg="day"]) .modal{
  background:linear-gradient(180deg, rgba(255,250,240,.98), rgba(244,232,206,.96)) !important;
  color:#1b140d !important;
  --ink:#1b140d;
  --muted:#5d4933;
  border-color:rgba(var(--kiosk-accent), .48) !important;
  box-shadow:0 24px 70px rgba(0,0,0,.56), 0 0 0 1px rgba(var(--kiosk-accent), .18) !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal-head,
body.kiosk:not([data-kiosk-bg="day"]) .modal-foot{
  background:linear-gradient(180deg, rgba(255,250,240,.98), rgba(238,222,189,.96)) !important;
  color:#1b140d !important;
  border-color:rgba(92,56,18,.22) !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal-title,
body.kiosk:not([data-kiosk-bg="day"]) .modal b,
body.kiosk:not([data-kiosk-bg="day"]) .modal .card-title,
body.kiosk:not([data-kiosk-bg="day"]) .modal .stat-panel-title{
  color:#1b140d !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .small,
body.kiosk:not([data-kiosk-bg="day"]) .modal .label,
body.kiosk:not([data-kiosk-bg="day"]) .modal .card-sub,
body.kiosk:not([data-kiosk-bg="day"]) .modal .table th{
  color:#5d4933 !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .panel,
body.kiosk:not([data-kiosk-bg="day"]) .modal .kpi-card,
body.kiosk:not([data-kiosk-bg="day"]) .modal .card{
  background:rgba(255,250,240,.92) !important;
  color:#1b140d !important;
  border-color:rgba(154,101,31,.35) !important;
  box-shadow:0 12px 28px rgba(60,34,10,.10) !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .table{
  background:rgba(255,250,240,.92) !important;
  color:#1b140d !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .table td{
  color:#1b140d !important;
  border-bottom-color:rgba(92,56,18,.16) !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .input,
body.kiosk:not([data-kiosk-bg="day"]) .modal select,
body.kiosk:not([data-kiosk-bg="day"]) .modal textarea{
  background:#fffaf0 !important;
  color:#1b140d !important;
  border-color:rgba(154,101,31,.48) !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .input::placeholder,
body.kiosk:not([data-kiosk-bg="day"]) .modal textarea::placeholder{
  color:#7a6650 !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal .pill{
  color:#1b140d !important;
  background:rgba(var(--kiosk-accent), .18) !important;
  border-color:rgba(var(--kiosk-accent), .42) !important;
}
body.kiosk:not([data-kiosk-bg="day"]) .modal-close,
body.kiosk:not([data-kiosk-bg="day"]) .modal-head .icon-btn{
  color:#fffaf0 !important;
  background:#3d2a17 !important;
  border-color:rgba(255,250,240,.20) !important;
}


/* Dark theme planning contrast */
html[data-app-theme="dark"] body:not(.kiosk) .plan-wrap{
  border-radius:16px;
  background:#0f0c09 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-table{
  background:#12100d !important;
  border-color:rgba(255,179,71,.42) !important;
  box-shadow:0 18px 40px rgba(0,0,0,.30) !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-table thead th{
  background:#5a3510 !important;
  color:#fff4df !important;
  border-color:rgba(255,226,176,.22) !important;
  font-weight:950 !important;
  text-shadow:0 1px 0 rgba(0,0,0,.45);
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-sticky,
html[data-app-theme="dark"] body:not(.kiosk) .plan-time,
html[data-app-theme="dark"] body:not(.kiosk) .plan-table td.plan-sticky{
  background:#19130d !important;
  color:#fff4df !important;
  border-color:rgba(255,179,71,.26) !important;
  font-weight:950 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-table td{
  background:#23201a !important;
  color:#fff4df !important;
  border-bottom-color:rgba(255,179,71,.20) !important;
  border-right-color:rgba(255,179,71,.16) !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-table tbody tr:nth-child(even) td{
  background:#1b1712 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-cell.empty{
  background:#181512 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-item,
html[data-app-theme="dark"] body:not(.kiosk) .plan-item.theme-fantasy,
html[data-app-theme="dark"] body:not(.kiosk) .plan-item.theme-eldritch,
html[data-app-theme="dark"] body:not(.kiosk) .plan-item.theme-scifi,
html[data-app-theme="dark"] body:not(.kiosk) .plan-item.theme-cyber,
html[data-app-theme="dark"] body:not(.kiosk) .plan-item.theme-modern{
  background:linear-gradient(145deg, rgba(255,250,240,.96), rgba(224,213,194,.92)) !important;
  color:#1b140d !important;
  border-color:rgba(255,179,71,.58) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.28), inset 0 0 0 1px rgba(92,56,18,.08) !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-item:hover{
  border-color:rgba(255,179,71,.86) !important;
  box-shadow:0 16px 34px rgba(0,0,0,.34), 0 0 0 3px rgba(255,179,71,.14) !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-title{
  color:#1b140d !important;
  text-shadow:none !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-sub,
html[data-app-theme="dark"] body:not(.kiosk) .plan-tag{
  color:#5a422c !important;
  opacity:1 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-badge{
  color:#1b140d !important;
  background:rgba(255,179,71,.22) !important;
  border-color:rgba(154,101,31,.45) !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .plan-badge.full{
  color:#8f2219 !important;
  background:rgba(227,75,63,.16) !important;
  border-color:rgba(227,75,63,.45) !important;
}


/* Softer parchment theme */
html[data-app-theme="default"]{
  --parch:#efe2c8;
  --parch2:#e5d2ae;
  --card:#f4e6c9;
  --muted:#66523c;
}
html[data-app-theme="default"] body:not(.kiosk){
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(184,137,47,.10), transparent 50%),
    radial-gradient(900px 700px at 100% 30%, rgba(128,67,40,.10), transparent 55%),
    linear-gradient(135deg, #0f0c08, #1b140d 70%, #130f0b);
}
html[data-app-theme="default"] body:not(.kiosk) .sidebar{
  background:linear-gradient(180deg, rgba(234,219,190,.98), rgba(221,199,160,.96)) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .shell{
  background:linear-gradient(180deg, rgba(238,224,194,.98), rgba(226,205,168,.96)) !important;
  border-color:rgba(137,91,28,.28) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .topbar{
  background:linear-gradient(180deg, rgba(232,215,181,.94), rgba(220,198,158,.84)) !important;
  border-bottom-color:rgba(137,91,28,.20) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .panel,
html[data-app-theme="default"] body:not(.kiosk) .kpi-card,
html[data-app-theme="default"] body:not(.kiosk) .modal{
  background:rgba(239,224,194,.82) !important;
  border-color:rgba(137,91,28,.24) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .card{
  background:linear-gradient(180deg, rgba(244,230,201,.96), rgba(235,216,181,.94)) !important;
  border-color:rgba(137,91,28,.24) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .input,
html[data-app-theme="default"] body:not(.kiosk) select,
html[data-app-theme="default"] body:not(.kiosk) textarea{
  background:rgba(246,235,212,.88) !important;
  border-color:rgba(137,91,28,.28) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .nav-item{
  background:rgba(230,210,172,.72) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .nav-item:hover{
  background:rgba(239,224,194,.88) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .nav-item.active{
  background:linear-gradient(180deg, rgba(214,177,93,.38), rgba(232,211,173,.92)) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .plan-table{
  background:rgba(226,208,171,.70) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .plan-table thead th,
html[data-app-theme="default"] body:not(.kiosk) .plan-sticky{
  background:rgba(225,205,166,.94) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .plan-item,
html[data-app-theme="default"] body:not(.kiosk) .plan-item.theme-fantasy,
html[data-app-theme="default"] body:not(.kiosk) .plan-item.theme-eldritch,
html[data-app-theme="default"] body:not(.kiosk) .plan-item.theme-scifi,
html[data-app-theme="default"] body:not(.kiosk) .plan-item.theme-cyber,
html[data-app-theme="default"] body:not(.kiosk) .plan-item.theme-modern{
  background:linear-gradient(135deg, rgba(235,216,181,.96), rgba(245,233,208,.90)) !important;
}


/* Softer parchment stronger controls */
html[data-app-theme="default"] body:not(.kiosk) .btn,
html[data-app-theme="default"] body:not(.kiosk) .input,
html[data-app-theme="default"] body:not(.kiosk) select,
html[data-app-theme="default"] body:not(.kiosk) textarea,
html[data-app-theme="default"] body:not(.kiosk) .nav-item,
html[data-app-theme="default"] body:not(.kiosk) .pill,
html[data-app-theme="default"] body:not(.kiosk) .badge,
html[data-app-theme="default"] body:not(.kiosk) .kpi-card,
html[data-app-theme="default"] body:not(.kiosk) .panel,
html[data-app-theme="default"] body:not(.kiosk) .card,
html[data-app-theme="default"] body:not(.kiosk) .plan-item,
html[data-app-theme="default"] body:not(.kiosk) .tool-result-row{
  border-color:rgba(105,66,18,.46) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .btn{
  border-width:1.5px !important;
  box-shadow:0 8px 16px rgba(70,42,12,.10), inset 0 0 0 1px rgba(255,250,240,.28) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .btn-ghost{
  background:rgba(239,224,194,.62) !important;
  color:#2a1a09 !important;
}
html[data-app-theme="default"] body:not(.kiosk) .btn:hover,
html[data-app-theme="default"] body:not(.kiosk) .nav-item:hover,
html[data-app-theme="default"] body:not(.kiosk) .input:focus,
html[data-app-theme="default"] body:not(.kiosk) select:focus,
html[data-app-theme="default"] body:not(.kiosk) textarea:focus{
  border-color:rgba(117,72,18,.78) !important;
  box-shadow:0 0 0 3px rgba(184,137,47,.16), 0 10px 18px rgba(70,42,12,.12) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .input,
html[data-app-theme="default"] body:not(.kiosk) select,
html[data-app-theme="default"] body:not(.kiosk) textarea{
  border-width:1.5px !important;
  box-shadow:inset 0 0 0 1px rgba(255,250,240,.24), 0 6px 12px rgba(70,42,12,.06) !important;
}
html[data-app-theme="default"] body:not(.kiosk) input[type="checkbox"],
html[data-app-theme="default"] body:not(.kiosk) input[type="radio"]{
  accent-color:#b8892f;
  outline:2px solid rgba(105,66,18,.52);
  outline-offset:1px;
}
html[data-app-theme="default"] body:not(.kiosk) .nav-item{
  border-width:1.5px !important;
  box-shadow:inset 0 0 0 1px rgba(255,250,240,.18) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .nav-item.active{
  border-color:rgba(105,66,18,.78) !important;
  box-shadow:0 0 0 3px rgba(184,137,47,.18), inset 0 0 0 1px rgba(255,250,240,.30) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .panel,
html[data-app-theme="default"] body:not(.kiosk) .card,
html[data-app-theme="default"] body:not(.kiosk) .modal,
html[data-app-theme="default"] body:not(.kiosk) .plan-table{
  border-width:1.5px !important;
}
html[data-app-theme="default"] body:not(.kiosk) .plan-table th,
html[data-app-theme="default"] body:not(.kiosk) .plan-table td,
html[data-app-theme="default"] body:not(.kiosk) .table th,
html[data-app-theme="default"] body:not(.kiosk) .table td{
  border-color:rgba(105,66,18,.28) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .archive-check,
html[data-app-theme="default"] body:not(.kiosk) .global-filter-btn,
html[data-app-theme="default"] body:not(.kiosk) .kiosk-color-btn,
html[data-app-theme="default"] body:not(.kiosk) .kiosk-bg-btn,
html[data-app-theme="default"] body:not(.kiosk) .kiosk-size-btn{
  border-color:rgba(105,66,18,.58) !important;
}


/* Universal red close buttons */
#modalClose,
.modal-head .icon-btn[title="Fermer"],
.image-lightbox-close{
  background:linear-gradient(180deg, #d44736, #9f2118) !important;
  color:#fffaf0 !important;
  border:1px solid rgba(96,18,12,.82) !important;
  box-shadow:0 10px 22px rgba(120,24,16,.30), inset 0 0 0 1px rgba(255,255,255,.16) !important;
  text-shadow:0 1px 0 rgba(0,0,0,.35) !important;
}
#modalClose:hover,
.modal-head .icon-btn[title="Fermer"]:hover,
.image-lightbox-close:hover{
  background:linear-gradient(180deg, #e65340, #84170f) !important;
  border-color:rgba(80,12,8,.95) !important;
  transform:translateY(-1px);
}
#modalClose:focus-visible,
.modal-head .icon-btn[title="Fermer"]:focus-visible,
.image-lightbox-close:focus-visible{
  outline:3px solid rgba(212,71,54,.32) !important;
  outline-offset:3px !important;
}

/* Player history summary */
.player-history-kpis{
  display:grid;
  grid-template-columns:repeat(4, minmax(120px, 1fr));
  gap:10px;
}
@media (max-width: 900px){
  .player-history-kpis{ grid-template-columns:repeat(2, minmax(120px, 1fr)); }
}

/* Manual archive overdue signal */
.pill.overdue{
  background:rgba(190,38,30,.18) !important;
  border-color:rgba(190,38,30,.55) !important;
  color:#b51f18 !important;
  font-weight:950 !important;
}
.session-game-title{
  font-size:20px !important;
  line-height:1.12;
  font-weight:950 !important;
}
.session-scenario-title{
  font-size:13px !important;
  font-style:italic;
  font-weight:900;
  color:var(--ink) !important;
}
.archive-manual-note{
  border-color:rgba(190,38,30,.22) !important;
}
html[data-app-theme="dark"] .pill.overdue{
  color:#ffb0a8 !important;
  background:rgba(255,80,64,.20) !important;
  border-color:rgba(255,112,96,.55) !important;
}
html[data-app-theme="dark"] .session-scenario-title{ color:#ffe6bf !important; }

/* Settings data path */
.data-path-inline{
  margin-top:6px;
  padding:9px 11px;
  border:1px solid rgba(137,91,28,.34);
  border-radius:8px;
  background:rgba(255,250,240,.62);
  color:var(--ink);
  font-family:Consolas, 'Courier New', monospace;
  font-size:12px;
  font-weight:800;
  overflow-wrap:anywhere;
}
html[data-app-theme="dark"] .data-path-inline{
  background:rgba(0,0,0,.24);
  border-color:rgba(255,179,71,.34);
  color:#ffe6bf;
}

/* Trio improvements: archive view and event checklist */
.overdue-archive-panel{
  border-color:rgba(190,38,30,.28) !important;
  background:linear-gradient(180deg, rgba(255,245,232,.94), rgba(244,224,194,.90));
}
.overdue-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.overdue-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid rgba(190,38,30,.22);
  border-radius:8px;
  background:rgba(255,250,240,.70);
}
.overdue-row b{ color:#b51f18; }
.event-checklist-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(160px, 1fr));
  gap:10px;
  margin-top:10px;
}
.checklist-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:8px;
  border:1px solid rgba(137,91,28,.22);
  background:rgba(255,250,240,.62);
  font-weight:850;
}
.checklist-item b{ font-size:22px; }
.checklist-item.red{ border-color:rgba(190,38,30,.35); }
.checklist-item.red b{ color:#b51f18; }
.checklist-item.green{ border-color:rgba(46,139,87,.30); }
.checklist-item.green b{ color:#2e7d4f; }
.checklist-item.blue{ border-color:rgba(43,97,179,.30); }
.checklist-item.blue b{ color:#2b61b3; }
html[data-app-theme="dark"] .overdue-archive-panel,
html[data-app-theme="dark"] .overdue-row,
html[data-app-theme="dark"] .checklist-item{
  background:rgba(0,0,0,.22);
}
html[data-app-theme="dark"] .overdue-row b,
html[data-app-theme="dark"] .checklist-item.red b{ color:#ffb0a8; }
@media (max-width: 1100px){
  .event-checklist-grid{ grid-template-columns:repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 700px){
  .event-checklist-grid,.overdue-row{ grid-template-columns:1fr; }
}

/* Settings import/export actions */
.settings-actions-wrap,
.settings-action-row{
  flex:1 1 360px;
  min-width:0;
}
.settings-action-row{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
}
.settings-action-row .btn{
  flex:0 1 148px;
  min-width:0;
  max-width:148px;
  padding:8px 10px;
  line-height:1.12;
  white-space:normal;
  text-align:center;
}
.settings-import-actions .btn{
  flex-basis:126px;
  max-width:126px;
}
@media (max-width: 980px){
  .settings-action-row{
    justify-content:flex-start;
  }
  .settings-action-row .btn,
  .settings-import-actions .btn{
    flex:1 1 150px;
    max-width:none;
  }
}


/* V1.5 modern visual refresh */
:root{
  --radius:8px;
  --shadow:0 18px 48px rgba(10, 12, 16, .22);
  --shadow2:0 10px 28px rgba(20, 18, 14, .13);
}
body:not(.kiosk){
  background:
    linear-gradient(135deg, #10151b 0%, #17140f 48%, #222018 100%) !important;
}
body:not(.kiosk) .app{
  gap:10px;
  padding:10px;
}
body:not(.kiosk) .sidebar,
body:not(.kiosk) .shell,
body:not(.kiosk) .panel,
body:not(.kiosk) .card,
body:not(.kiosk) .modal,
body:not(.kiosk) .kpi-card{
  border-radius:8px !important;
}
body:not(.kiosk) .sidebar{
  width:282px;
  flex-basis:282px;
  background:linear-gradient(180deg, rgba(23,27,31,.98), rgba(18,16,13,.98)) !important;
  border:1px solid rgba(221,184,112,.26) !important;
  box-shadow:0 22px 54px rgba(0,0,0,.30) !important;
}
body:not(.kiosk) .brand{
  padding:18px 18px 14px;
  border-bottom:1px solid rgba(221,184,112,.20) !important;
}
body:not(.kiosk) .brand-title{
  color:#fff6e6 !important;
  font-size:17px;
  letter-spacing:0;
}
body:not(.kiosk) .brand-sub,
body:not(.kiosk) .sidebar-footer{
  color:#d4c1a4 !important;
}
body:not(.kiosk) .brand-badge{
  border-radius:8px !important;
  background:linear-gradient(180deg, #fff8e8, #e6c886) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.55) !important;
}
body:not(.kiosk) .nav{
  gap:7px;
  padding:12px;
}
body:not(.kiosk) .nav-item{
  border-radius:8px !important;
  min-height:44px;
  padding:10px 12px;
  color:#f8ecd7 !important;
  background:rgba(255,255,255,.045) !important;
  border:1px solid rgba(221,184,112,.18) !important;
  box-shadow:none !important;
}
body:not(.kiosk) .nav-item:hover{
  color:#fffaf0 !important;
  background:rgba(255,255,255,.09) !important;
  border-color:rgba(221,184,112,.42) !important;
  transform:translateX(2px);
}
body:not(.kiosk) .nav-item.active{
  color:#18130d !important;
  background:linear-gradient(90deg, #f4b441, #ffe3a1) !important;
  border-color:rgba(255,227,161,.80) !important;
  box-shadow:0 12px 30px rgba(244,180,65,.24) !important;
}
body:not(.kiosk) .shell{
  background:linear-gradient(180deg, rgba(242,234,218,.98), rgba(232,219,193,.96)) !important;
  border:1px solid rgba(221,184,112,.28) !important;
  box-shadow:0 22px 54px rgba(0,0,0,.25) !important;
}
body:not(.kiosk) .topbar{
  min-height:70px;
  padding:14px 18px;
  background:rgba(255,250,240,.72) !important;
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(120,82,32,.20) !important;
}
body:not(.kiosk) .crumb{
  font-size:18px;
  letter-spacing:0;
}
body:not(.kiosk) .subcrumb{
  font-size:12px;
  color:#63533d !important;
}
body:not(.kiosk) .view{
  padding:18px;
}
body:not(.kiosk) .panel,
body:not(.kiosk) .card,
body:not(.kiosk) .kpi-card{
  background:linear-gradient(180deg, rgba(255,250,240,.88), rgba(244,232,207,.82)) !important;
  border:1px solid rgba(113,82,35,.25) !important;
  box-shadow:0 10px 26px rgba(48,35,18,.10) !important;
}
body:not(.kiosk) .card{
  min-height:0;
  overflow:hidden;
}
body:not(.kiosk) .card-head{
  padding:14px 14px 10px;
}
body:not(.kiosk) .card-title,
body:not(.kiosk) .session-game-title{
  letter-spacing:0;
  color:#1c1711 !important;
}
body:not(.kiosk) .card-sub{
  color:#5f503d !important;
}
body:not(.kiosk) .card-foot{
  padding:12px 14px;
  background:rgba(255,255,255,.26);
  border-top:1px solid rgba(113,82,35,.14);
  flex-wrap:wrap;
}
body:not(.kiosk) .card:hover,
body:not(.kiosk) .panel:hover{
  border-color:rgba(38,107,153,.42) !important;
  box-shadow:0 16px 34px rgba(31,44,55,.16) !important;
}
body:not(.kiosk) .btn,
body:not(.kiosk) .icon-btn{
  border-radius:8px !important;
  border:1px solid rgba(45,38,28,.18) !important;
  box-shadow:0 8px 18px rgba(34,26,15,.13) !important;
  letter-spacing:0;
}
body:not(.kiosk) .btn{
  padding:9px 13px;
}
body:not(.kiosk) .btn-primary{
  background:linear-gradient(180deg, #f07b24, #c65317) !important;
}
body:not(.kiosk) .btn-success{
  background:linear-gradient(180deg, #20b66a, #117347) !important;
}
body:not(.kiosk) .btn-danger{
  background:linear-gradient(180deg, #df4b42, #98241d) !important;
}
body:not(.kiosk) .btn-ghost,
body:not(.kiosk) .icon-btn{
  background:rgba(255,250,240,.68) !important;
  color:#21180e !important;
  border-color:rgba(88,65,33,.30) !important;
}
body:not(.kiosk) .btn:hover,
body:not(.kiosk) .icon-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(34,26,15,.18) !important;
}
body:not(.kiosk) .input,
body:not(.kiosk) select,
body:not(.kiosk) textarea{
  border-radius:8px !important;
  background:rgba(255,252,245,.88) !important;
  border:1px solid rgba(88,65,33,.34) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 6px 14px rgba(48,35,18,.06) !important;
}
body:not(.kiosk) .input:focus,
body:not(.kiosk) select:focus,
body:not(.kiosk) textarea:focus{
  border-color:#2f78a7 !important;
  box-shadow:0 0 0 3px rgba(47,120,167,.18), 0 8px 18px rgba(48,35,18,.08) !important;
}
body:not(.kiosk) .pill,
body:not(.kiosk) .badge,
body:not(.kiosk) .plan-badge,
body:not(.kiosk) .cal-status{
  border-radius:999px !important;
  border-color:rgba(88,65,33,.26) !important;
}
body:not(.kiosk) .table,
body:not(.kiosk) .plan-table{
  border-radius:8px !important;
  overflow:hidden;
  border:1px solid rgba(88,65,33,.24) !important;
}
body:not(.kiosk) .table th,
body:not(.kiosk) .plan-table thead th{
  background:rgba(33,41,48,.90) !important;
  color:#fff5e5 !important;
  border-color:rgba(255,255,255,.10) !important;
}
body:not(.kiosk) .table td,
body:not(.kiosk) .plan-table td{
  border-color:rgba(88,65,33,.16) !important;
}
body:not(.kiosk) .modal-backdrop{
  background:rgba(8,10,12,.62) !important;
  backdrop-filter:blur(5px);
}
body:not(.kiosk) .modal{
  background:linear-gradient(180deg, rgba(255,250,240,.98), rgba(239,226,199,.98)) !important;
  border:1px solid rgba(221,184,112,.36) !important;
  box-shadow:0 28px 80px rgba(0,0,0,.40) !important;
}
body:not(.kiosk) .modal-head,
body:not(.kiosk) .modal-foot{
  background:rgba(255,250,240,.78) !important;
  backdrop-filter:blur(12px);
}
body:not(.kiosk) ::-webkit-scrollbar{
  width:11px;
  height:11px;
}
body:not(.kiosk) ::-webkit-scrollbar-track{
  background:rgba(55,42,23,.10);
}
body:not(.kiosk) ::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg, rgba(47,120,167,.72), rgba(197,116,32,.72));
  border:3px solid rgba(244,232,207,.95);
  border-radius:999px;
}
html[data-app-theme="dark"] body:not(.kiosk) .sidebar,
html[data-app-theme="antre"] body:not(.kiosk) .sidebar,
html[data-app-theme="projection"] body:not(.kiosk) .sidebar{
  background:linear-gradient(180deg, rgba(20,22,25,.98), rgba(10,9,8,.98)) !important;
}
@media (max-width: 900px){
  body:not(.kiosk) .app{ padding:8px; }
  body:not(.kiosk) .sidebar{ width:auto; flex-basis:auto; }
  body:not(.kiosk) .nav{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); }
  body:not(.kiosk) .nav-item{ min-width:0; }
}


/* V1.5 colorful fun refresh */
:root{
  --fun-orange:#ff7a1a;
  --fun-gold:#ffd166;
  --fun-blue:#3d8bfd;
  --fun-cyan:#22c7d7;
  --fun-green:#20c875;
  --fun-pink:#e85aa7;
  --fun-violet:#8b5cf6;
}
body:not(.kiosk){
  background:
    radial-gradient(900px 560px at 12% 8%, rgba(61,139,253,.22), transparent 58%),
    radial-gradient(740px 520px at 88% 12%, rgba(232,90,167,.18), transparent 56%),
    radial-gradient(820px 580px at 72% 92%, rgba(32,200,117,.16), transparent 58%),
    linear-gradient(135deg, #0e1420 0%, #1c1520 46%, #21170f 100%) !important;
}
body:not(.kiosk) .bg-ornaments{
  opacity:1;
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(255,209,102,.06) 28% 29%, transparent 29% 100%),
    linear-gradient(65deg, transparent 0 62%, rgba(34,199,215,.06) 62% 63%, transparent 63% 100%) !important;
}
body:not(.kiosk) .sidebar{
  background:
    linear-gradient(180deg, rgba(16,22,32,.98), rgba(14,11,18,.98)),
    linear-gradient(135deg, rgba(61,139,253,.20), rgba(232,90,167,.16)) !important;
  border-color:rgba(255,209,102,.34) !important;
}
body:not(.kiosk) .brand{
  background:linear-gradient(135deg, rgba(61,139,253,.12), rgba(255,122,26,.12));
}
body:not(.kiosk) .brand-badge{
  background:linear-gradient(135deg, #fff7df, #ffd166 48%, #ff8f36) !important;
}
body:not(.kiosk) .nav-item{
  position:relative;
  overflow:hidden;
}
body:not(.kiosk) .nav-item::before{
  content:"";
  width:4px;
  position:absolute;
  inset:8px auto 8px 7px;
  border-radius:999px;
  background:linear-gradient(180deg, var(--fun-blue), var(--fun-cyan));
  opacity:.55;
}
body:not(.kiosk) .nav-item:nth-child(2)::before{ background:linear-gradient(180deg, var(--fun-violet), var(--fun-pink)); }
body:not(.kiosk) .nav-item:nth-child(3)::before{ background:linear-gradient(180deg, var(--fun-orange), var(--fun-gold)); }
body:not(.kiosk) .nav-item:nth-child(4)::before{ background:linear-gradient(180deg, var(--fun-cyan), var(--fun-green)); }
body:not(.kiosk) .nav-item:nth-child(5)::before{ background:linear-gradient(180deg, var(--fun-green), var(--fun-gold)); }
body:not(.kiosk) .nav-item:nth-child(6)::before{ background:linear-gradient(180deg, var(--fun-pink), var(--fun-orange)); }
body:not(.kiosk) .nav-item:nth-child(7)::before{ background:linear-gradient(180deg, var(--fun-blue), var(--fun-violet)); }
body:not(.kiosk) .nav-item:nth-child(8)::before{ background:linear-gradient(180deg, var(--fun-gold), var(--fun-orange)); }
body:not(.kiosk) .nav-item.active::before{
  background:#20140a;
  opacity:.75;
}
body:not(.kiosk) .nav-item.active{
  background:linear-gradient(100deg, #ff7a1a, #ffd166 72%, #fff2bd) !important;
}
body:not(.kiosk) .topbar{
  background:
    linear-gradient(90deg, rgba(255,250,240,.86), rgba(255,250,240,.66)),
    linear-gradient(90deg, rgba(61,139,253,.16), rgba(232,90,167,.14), rgba(255,122,26,.16)) !important;
}
body:not(.kiosk) .crumb{
  font-size:19px;
}
body:not(.kiosk) .panel,
body:not(.kiosk) .kpi-card{
  position:relative;
  overflow:hidden;
}
body:not(.kiosk) .panel::before,
body:not(.kiosk) .kpi-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg, var(--fun-blue), var(--fun-cyan), var(--fun-green), var(--fun-gold), var(--fun-orange), var(--fun-pink));
  opacity:.90;
}
body:not(.kiosk) .card{
  position:relative;
  background:
    linear-gradient(180deg, rgba(255,251,241,.94), rgba(244,232,207,.88)) !important;
}
body:not(.kiosk) .card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg, var(--fun-orange), var(--fun-gold));
  opacity:.95;
  z-index:2;
}
body:not(.kiosk) .card:nth-child(5n+1)::before{ background:linear-gradient(90deg, var(--fun-blue), var(--fun-cyan)); }
body:not(.kiosk) .card:nth-child(5n+2)::before{ background:linear-gradient(90deg, var(--fun-violet), var(--fun-pink)); }
body:not(.kiosk) .card:nth-child(5n+3)::before{ background:linear-gradient(90deg, var(--fun-green), var(--fun-cyan)); }
body:not(.kiosk) .card:nth-child(5n+4)::before{ background:linear-gradient(90deg, var(--fun-orange), var(--fun-pink)); }
body:not(.kiosk) .card:hover{
  transform:translateY(-2px);
}
body:not(.kiosk) .card-img{
  background:
    radial-gradient(420px 200px at 10% 0%, rgba(61,139,253,.16), transparent 55%),
    radial-gradient(420px 240px at 90% 100%, rgba(255,122,26,.14), transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.32), rgba(255,209,102,.14)) !important;
}
body:not(.kiosk) .pill,
body:not(.kiosk) .badge,
body:not(.kiosk) .plan-badge{
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,232,178,.72)) !important;
  box-shadow:0 4px 10px rgba(39,29,14,.08);
}
body:not(.kiosk) .pill:nth-child(2n),
body:not(.kiosk) .badge:nth-child(2n){ background:linear-gradient(180deg, rgba(227,243,255,.86), rgba(190,226,255,.70)) !important; }
body:not(.kiosk) .pill:nth-child(3n),
body:not(.kiosk) .badge:nth-child(3n){ background:linear-gradient(180deg, rgba(229,255,240,.86), rgba(188,239,211,.72)) !important; }
body:not(.kiosk) .btn-primary{
  background:linear-gradient(135deg, #ff7a1a, #e85aa7) !important;
  border-color:rgba(255,255,255,.24) !important;
}
body:not(.kiosk) .btn-success{
  background:linear-gradient(135deg, #20c875, #22c7d7) !important;
}
body:not(.kiosk) .btn-danger{
  background:linear-gradient(135deg, #e64a3a, #b51f62) !important;
}
body:not(.kiosk) .btn-ghost{
  background:linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,241,207,.72)) !important;
}
body:not(.kiosk) .btn:hover{
  filter:saturate(1.08);
}
body:not(.kiosk) .input:focus,
body:not(.kiosk) select:focus,
body:not(.kiosk) textarea:focus{
  border-color:var(--fun-blue) !important;
  box-shadow:0 0 0 3px rgba(61,139,253,.18), 0 0 0 6px rgba(232,90,167,.08) !important;
}
body:not(.kiosk) .modal-head{
  border-top:4px solid transparent;
  border-image:linear-gradient(90deg, var(--fun-blue), var(--fun-pink), var(--fun-orange), var(--fun-gold)) 1;
}
body:not(.kiosk) .stats-summary,
body:not(.kiosk) .tool-result-row,
body:not(.kiosk) .overdue-row,
body:not(.kiosk) .checklist-item{
  border-radius:8px !important;
  background:linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,239,204,.54)) !important;
}
body:not(.kiosk) .checklist-item:nth-child(1){ border-color:rgba(61,139,253,.40) !important; }
body:not(.kiosk) .checklist-item:nth-child(2){ border-color:rgba(32,200,117,.40) !important; }
body:not(.kiosk) .checklist-item:nth-child(3){ border-color:rgba(255,122,26,.42) !important; }
body:not(.kiosk) .checklist-item:nth-child(4){ border-color:rgba(232,90,167,.42) !important; }
body:not(.kiosk) .plan-item{
  border-left:5px solid var(--fun-blue) !important;
}
body:not(.kiosk) .plan-item:nth-child(2n){ border-left-color:var(--fun-green) !important; }
body:not(.kiosk) .plan-item:nth-child(3n){ border-left-color:var(--fun-orange) !important; }
body:not(.kiosk) .plan-item:nth-child(4n){ border-left-color:var(--fun-pink) !important; }
body:not(.kiosk) .cal-day::after{
  content:"";
  position:absolute;
  inset:auto 10px 8px 10px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(61,139,253,.55), rgba(32,200,117,.55), rgba(255,122,26,.55));
  opacity:.55;
  pointer-events:none;
}
html[data-app-theme="dark"] body:not(.kiosk) .panel::before,
html[data-app-theme="dark"] body:not(.kiosk) .kpi-card::before,
html[data-app-theme="antre"] body:not(.kiosk) .panel::before,
html[data-app-theme="antre"] body:not(.kiosk) .kpi-card::before{
  opacity:.80;
}
@media (max-width: 900px){
  body:not(.kiosk) .nav-item::before{ inset:9px auto 9px 7px; }
}


/* V1.5 theme-aware correction: keep global theme visible */
html[data-app-theme="default"] body:not(.kiosk){
  background:
    radial-gradient(900px 560px at 12% 8%, rgba(61,139,253,.12), transparent 58%),
    radial-gradient(740px 520px at 88% 12%, rgba(255,122,26,.10), transparent 56%),
    linear-gradient(135deg, #15120d 0%, #21170f 100%) !important;
  color:#21180e !important;
}
html[data-app-theme="default"] body:not(.kiosk) .shell{
  background:linear-gradient(180deg, rgba(238,224,194,.98), rgba(226,205,168,.96)) !important;
  border-color:rgba(112,76,26,.36) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .topbar,
html[data-app-theme="default"] body:not(.kiosk) .modal-head,
html[data-app-theme="default"] body:not(.kiosk) .modal-foot{
  background:linear-gradient(180deg, rgba(232,215,181,.94), rgba(220,198,158,.84)) !important;
}
html[data-app-theme="default"] body:not(.kiosk) .panel,
html[data-app-theme="default"] body:not(.kiosk) .card,
html[data-app-theme="default"] body:not(.kiosk) .kpi-card,
html[data-app-theme="default"] body:not(.kiosk) .modal{
  background:linear-gradient(180deg, rgba(244,230,201,.96), rgba(235,216,181,.94)) !important;
  color:#21180e !important;
}
html[data-app-theme="default"] body:not(.kiosk) .crumb,
html[data-app-theme="default"] body:not(.kiosk) .card-title,
html[data-app-theme="default"] body:not(.kiosk) .session-game-title,
html[data-app-theme="default"] body:not(.kiosk) .label,
html[data-app-theme="default"] body:not(.kiosk) b{
  color:#21180e !important;
}
html[data-app-theme="default"] body:not(.kiosk) .subcrumb,
html[data-app-theme="default"] body:not(.kiosk) .small,
html[data-app-theme="default"] body:not(.kiosk) .card-sub{
  color:#6a563b !important;
}

html[data-app-theme="dark"] body:not(.kiosk){
  background:
    radial-gradient(900px 560px at 15% 8%, rgba(61,139,253,.18), transparent 58%),
    radial-gradient(760px 520px at 92% 14%, rgba(139,92,246,.14), transparent 56%),
    linear-gradient(135deg, #07090d 0%, #12171f 48%, #10100d 100%) !important;
  color:#f8ecd7 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .shell,
html[data-app-theme="dark"] body:not(.kiosk) .topbar,
html[data-app-theme="dark"] body:not(.kiosk) .panel,
html[data-app-theme="dark"] body:not(.kiosk) .card,
html[data-app-theme="dark"] body:not(.kiosk) .modal,
html[data-app-theme="dark"] body:not(.kiosk) .kpi-card{
  background:linear-gradient(180deg, rgba(28,31,36,.98), rgba(16,18,22,.97)) !important;
  border-color:rgba(96,151,213,.32) !important;
  color:#f8ecd7 !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .crumb,
html[data-app-theme="dark"] body:not(.kiosk) .card-title,
html[data-app-theme="dark"] body:not(.kiosk) .session-game-title,
html[data-app-theme="dark"] body:not(.kiosk) .label,
html[data-app-theme="dark"] body:not(.kiosk) b{
  color:#fff4df !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .subcrumb,
html[data-app-theme="dark"] body:not(.kiosk) .small,
html[data-app-theme="dark"] body:not(.kiosk) .card-sub{
  color:#c8d7ea !important;
}
html[data-app-theme="dark"] body:not(.kiosk) .input,
html[data-app-theme="dark"] body:not(.kiosk) select,
html[data-app-theme="dark"] body:not(.kiosk) textarea,
html[data-app-theme="dark"] body:not(.kiosk) .btn-ghost{
  background:rgba(6,9,13,.72) !important;
  color:#fff4df !important;
  border-color:rgba(96,151,213,.38) !important;
}

html[data-app-theme="antre"] body:not(.kiosk){
  background:
    radial-gradient(900px 560px at 15% 8%, rgba(255,122,26,.20), transparent 58%),
    radial-gradient(760px 520px at 92% 14%, rgba(255,209,102,.12), transparent 56%),
    linear-gradient(135deg, #0b0704 0%, #1a0f07 52%, #060403 100%) !important;
  color:#fff1d2 !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .shell,
html[data-app-theme="antre"] body:not(.kiosk) .topbar,
html[data-app-theme="antre"] body:not(.kiosk) .panel,
html[data-app-theme="antre"] body:not(.kiosk) .card,
html[data-app-theme="antre"] body:not(.kiosk) .modal,
html[data-app-theme="antre"] body:not(.kiosk) .kpi-card{
  background:linear-gradient(180deg, rgba(34,22,12,.98), rgba(15,9,5,.97)) !important;
  border-color:rgba(255,153,51,.36) !important;
  color:#fff1d2 !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .crumb,
html[data-app-theme="antre"] body:not(.kiosk) .card-title,
html[data-app-theme="antre"] body:not(.kiosk) .session-game-title,
html[data-app-theme="antre"] body:not(.kiosk) .label,
html[data-app-theme="antre"] body:not(.kiosk) b{
  color:#ffe6ad !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .subcrumb,
html[data-app-theme="antre"] body:not(.kiosk) .small,
html[data-app-theme="antre"] body:not(.kiosk) .card-sub{
  color:#e3bd83 !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .input,
html[data-app-theme="antre"] body:not(.kiosk) select,
html[data-app-theme="antre"] body:not(.kiosk) textarea,
html[data-app-theme="antre"] body:not(.kiosk) .btn-ghost{
  background:rgba(8,5,3,.76) !important;
  color:#fff1d2 !important;
  border-color:rgba(255,153,51,.38) !important;
}

html[data-app-theme="projection"] body:not(.kiosk){
  background:
    radial-gradient(900px 560px at 15% 8%, rgba(34,199,215,.18), transparent 58%),
    radial-gradient(760px 520px at 92% 14%, rgba(232,90,167,.14), transparent 56%),
    linear-gradient(135deg, #05070d 0%, #111827 52%, #080911 100%) !important;
  color:#eef7ff !important;
}
html[data-app-theme="projection"] body:not(.kiosk) .shell,
html[data-app-theme="projection"] body:not(.kiosk) .topbar,
html[data-app-theme="projection"] body:not(.kiosk) .panel,
html[data-app-theme="projection"] body:not(.kiosk) .card,
html[data-app-theme="projection"] body:not(.kiosk) .modal,
html[data-app-theme="projection"] body:not(.kiosk) .kpi-card{
  background:linear-gradient(180deg, rgba(18,24,38,.98), rgba(9,12,22,.97)) !important;
  border-color:rgba(34,199,215,.36) !important;
  color:#eef7ff !important;
}
html[data-app-theme="projection"] body:not(.kiosk) .crumb,
html[data-app-theme="projection"] body:not(.kiosk) .card-title,
html[data-app-theme="projection"] body:not(.kiosk) .session-game-title,
html[data-app-theme="projection"] body:not(.kiosk) .label,
html[data-app-theme="projection"] body:not(.kiosk) b{
  color:#ffffff !important;
}
html[data-app-theme="projection"] body:not(.kiosk) .subcrumb,
html[data-app-theme="projection"] body:not(.kiosk) .small,
html[data-app-theme="projection"] body:not(.kiosk) .card-sub{
  color:#b9e9f1 !important;
}
html[data-app-theme="projection"] body:not(.kiosk) .input,
html[data-app-theme="projection"] body:not(.kiosk) select,
html[data-app-theme="projection"] body:not(.kiosk) textarea,
html[data-app-theme="projection"] body:not(.kiosk) .btn-ghost{
  background:rgba(5,9,17,.76) !important;
  color:#eef7ff !important;
  border-color:rgba(34,199,215,.42) !important;
}


/* V1.5 theme previews and image gallery */
.theme-preview-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(150px, 1fr));
  gap:10px;
  margin-top:10px;
}
.theme-preview-card{
  display:grid;
  grid-template-columns:54px minmax(0, 1fr);
  gap:10px;
  align-items:center;
  text-align:left;
  min-height:78px;
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(88,65,33,.28);
  background:rgba(255,250,240,.58);
  color:var(--ink);
  cursor:pointer;
  box-shadow:0 8px 18px rgba(34,26,15,.08);
}
.theme-preview-card.active{
  border-color:#3d8bfd !important;
  box-shadow:0 0 0 3px rgba(61,139,253,.16), 0 12px 24px rgba(34,26,15,.12);
}
.theme-preview-swatch{
  width:54px;
  height:54px;
  border-radius:8px;
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.32);
}
.theme-preview-swatch i,.theme-preview-swatch b{ position:absolute; display:block; }
.theme-preview-swatch i{ inset:8px 8px auto 8px; height:10px; border-radius:999px; background:rgba(255,255,255,.70); }
.theme-preview-swatch b{ inset:auto 8px 8px 8px; height:24px; border-radius:6px; background:rgba(255,255,255,.28); }
.theme-preview-swatch.theme-default{ background:linear-gradient(135deg,#efe2c8,#ffd166,#ff7a1a); }
.theme-preview-swatch.theme-dark{ background:linear-gradient(135deg,#07090d,#111827,#3d8bfd); }
.theme-preview-swatch.theme-antre{ background:linear-gradient(135deg,#0b0704,#5c2508,#ff7a1a); }
.theme-preview-swatch.theme-projection{ background:linear-gradient(135deg,#05070d,#0f2a3a,#22c7d7); }
.theme-preview-copy strong{ display:block; font-size:13px; color:inherit; }
.theme-preview-copy small{ display:block; margin-top:3px; color:var(--muted); font-weight:700; }
.theme-preview-dots{ grid-column:1 / -1; display:flex; gap:5px; }
.theme-preview-dots i{ width:18px; height:5px; border-radius:999px; }
.image-gallery-summary{
  display:grid;
  grid-template-columns:repeat(3, minmax(110px, 1fr));
  gap:10px;
  margin-bottom:10px;
}
.image-gallery-summary div{
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(88,65,33,.22);
  background:rgba(255,255,255,.42);
}
.image-gallery-summary b{ display:block; font-size:22px; }
.image-gallery-summary span{ color:var(--muted); font-weight:800; font-size:12px; }
.image-gallery-filters{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.image-gallery-filters [aria-pressed="true"]{ border-color:#3d8bfd !important; box-shadow:0 0 0 3px rgba(61,139,253,.14) !important; }
.image-gallery-path{ margin-bottom:10px; overflow-wrap:anywhere; }
.image-gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:10px; }
.image-gallery-card{
  display:grid;
  grid-template-columns:86px minmax(0, 1fr);
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(88,65,33,.22);
  background:rgba(255,250,240,.54);
}
.image-gallery-card.unused{ border-color:rgba(227,75,63,.42); }
.image-gallery-thumb{
  border:0;
  padding:0;
  width:86px;
  height:64px;
  border-radius:8px;
  overflow:hidden;
  background:rgba(0,0,0,.08);
  cursor:pointer;
}
.image-gallery-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.image-gallery-meta{ min-width:0; }
.image-gallery-meta b{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.image-gallery-meta span,.image-gallery-meta small{ display:block; color:var(--muted); font-size:12px; font-weight:800; margin-top:3px; }
.image-gallery-meta small{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:650; }
.image-gallery-actions{ grid-column:1 / -1; display:flex; justify-content:flex-end; }
.image-gallery-actions .btn{ padding:7px 10px; }
@media (max-width: 1000px){ .theme-preview-grid{ grid-template-columns:repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 620px){ .theme-preview-grid,.image-gallery-summary,.image-gallery-grid{ grid-template-columns:1fr; } }

/* Embedded room planner */
#view:has(.table-manager-shell){
  padding:8px;
  overflow:hidden;
}
.table-manager-shell{
  width:100%;
  height:calc(100vh - 116px);
  min-height:520px;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(184,137,47,.22);
  background:#0d1117;
  box-shadow:var(--shadow2);
}
.table-manager-frame{
  display:block;
  width:100%;
  height:100%;
  border:0;
  background:#0d1117;
}
@media (max-width: 900px){
  .table-manager-shell{
    height:calc(100vh - 104px);
    min-height:480px;
  }
}

/* Planning contrast patch: keep hour cells readable in the dark Antre theme. */
html[data-app-theme="antre"] body:not(.kiosk) .plan-table{
  background:#17100a !important;
  border-color:rgba(255,179,71,.42) !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .plan-table td{
  background:#27211a !important;
  color:#fff2d8 !important;
  border-color:rgba(255,179,71,.18) !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .plan-table tbody tr:nth-child(even) td{
  background:#211a14 !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .plan-table td.plan-sticky,
html[data-app-theme="antre"] body:not(.kiosk) .plan-sticky,
html[data-app-theme="antre"] body:not(.kiosk) .plan-time{
  background:#2f2113 !important;
  color:#ffe9bd !important;
  text-shadow:0 1px 0 rgba(0,0,0,.45);
}
html[data-app-theme="antre"] body:not(.kiosk) .plan-cell.empty{
  background:#1c1712 !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .plan-item,
html[data-app-theme="antre"] body:not(.kiosk) .plan-item.theme-fantasy,
html[data-app-theme="antre"] body:not(.kiosk) .plan-item.theme-eldritch,
html[data-app-theme="antre"] body:not(.kiosk) .plan-item.theme-scifi,
html[data-app-theme="antre"] body:not(.kiosk) .plan-item.theme-cyber,
html[data-app-theme="antre"] body:not(.kiosk) .plan-item.theme-modern{
  background:linear-gradient(145deg, #28190e, #160d07) !important;
  color:#fff6e8 !important;
  border-color:rgba(255,179,71,.38) !important;
}
html[data-app-theme="antre"] body:not(.kiosk) .plan-title{ color:#fffaf0 !important; }
html[data-app-theme="antre"] body:not(.kiosk) .plan-sub,
html[data-app-theme="antre"] body:not(.kiosk) .plan-tag{ color:#f1d4b2 !important; opacity:1 !important; }

/* Archive compact list contrast patch */
body:not(.kiosk) .archive-table-wrap{
  border-color:rgba(24,47,76,.58) !important;
  background:#151d27 !important;
}
body:not(.kiosk) .archive-row:not(.archive-row-head){
  background:#222a34 !important;
  color:#f7fbff !important;
}
body:not(.kiosk) .archive-row:nth-child(even):not(.archive-row-head){
  background:#262d35 !important;
}
body:not(.kiosk) .archive-row:hover:not(.archive-row-head){
  background:#304157 !important;
}
body:not(.kiosk) .archive-row.is-selected:not(.archive-row-head){
  background:#1f3d64 !important;
}
html[data-app-theme] body:not(.kiosk) .archive-row .archive-title,
html[data-app-theme] body:not(.kiosk) .archive-row .archive-cell b{
  color:#f8fbff !important;
  text-shadow:0 1px 0 rgba(0,0,0,.36);
}
html[data-app-theme] body:not(.kiosk) .archive-row .archive-sub{
  color:#d7ebff !important;
}
html[data-app-theme] body:not(.kiosk) .archive-row .archive-players b{
  color:#bff7d2 !important;
}
html[data-app-theme] body:not(.kiosk) .archive-row .archive-cell span{
  color:#9ec5ff !important;
}
html[data-app-theme] body:not(.kiosk) .archive-row-head,
html[data-app-theme] body:not(.kiosk) .archive-row-head div{
  color:#fff8e8 !important;
}

/* Default parchment contrast pass: darker surface and readable sidebar brand. */
html[data-app-theme="default"] body:not(.kiosk){
  --parch:#d8bd88;
  --parch2:#c6a66f;
  --card:#d9bd89;
  --ink:#1f160c;
  --muted:#4f3b23;
  background:
    radial-gradient(900px 560px at 12% 8%, rgba(66,122,172,.14), transparent 58%),
    radial-gradient(760px 520px at 90% 12%, rgba(210,117,38,.15), transparent 56%),
    linear-gradient(135deg, #101318 0%, #1c150f 48%, #2a2116 100%) !important;
  color:var(--ink) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .sidebar{
  background:
    linear-gradient(180deg, rgba(43,33,24,.99), rgba(22,17,13,.99)),
    linear-gradient(135deg, rgba(210,146,56,.16), rgba(44,106,148,.10)) !important;
  border-color:rgba(231,183,96,.42) !important;
  box-shadow:0 22px 56px rgba(0,0,0,.42) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .brand{
  background:linear-gradient(135deg, rgba(75,54,31,.98), rgba(38,27,18,.98)) !important;
  border:1px solid rgba(255,220,150,.26) !important;
  border-radius:8px;
  margin:10px;
  padding:16px 14px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12), 0 12px 30px rgba(0,0,0,.28);
}

html[data-app-theme="default"] body:not(.kiosk) .brand-title{
  color:#fff7e4 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.55);
}

html[data-app-theme="default"] body:not(.kiosk) .brand-sub,
html[data-app-theme="default"] body:not(.kiosk) .sidebar-footer{
  color:#e8d0a6 !important;
}

html[data-app-theme="default"] body:not(.kiosk) .brand-badge{
  color:#4b2a08 !important;
  background:linear-gradient(135deg, #fff1c5, #f0b84e 54%, #c96b1d) !important;
  box-shadow:0 12px 26px rgba(0,0,0,.36), inset 0 0 0 1px rgba(255,255,255,.58) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .nav-item{
  color:#f7ead2 !important;
  background:rgba(255,239,204,.075) !important;
  border-color:rgba(231,183,96,.28) !important;
  text-shadow:0 1px 1px rgba(0,0,0,.36);
}

html[data-app-theme="default"] body:not(.kiosk) .nav-item:hover{
  color:#fff8e8 !important;
  background:rgba(255,224,160,.14) !important;
  border-color:rgba(255,210,122,.55) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .nav-item.active{
  color:#201408 !important;
  background:linear-gradient(100deg, #e1882a, #f3bd5e 72%, #ffe0a0) !important;
  border-color:rgba(255,226,162,.88) !important;
  text-shadow:0 1px 0 rgba(255,245,220,.42);
}

html[data-app-theme="default"] body:not(.kiosk) .shell{
  background:linear-gradient(180deg, rgba(206,177,123,.98), rgba(178,142,88,.96)) !important;
  border-color:rgba(83,55,22,.46) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .topbar,
html[data-app-theme="default"] body:not(.kiosk) .modal-head,
html[data-app-theme="default"] body:not(.kiosk) .modal-foot{
  background:linear-gradient(180deg, rgba(218,191,143,.96), rgba(190,154,99,.88)) !important;
  border-color:rgba(78,52,21,.30) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .panel,
html[data-app-theme="default"] body:not(.kiosk) .card,
html[data-app-theme="default"] body:not(.kiosk) .kpi-card,
html[data-app-theme="default"] body:not(.kiosk) .modal{
  background:linear-gradient(180deg, rgba(224,198,151,.96), rgba(202,166,105,.94)) !important;
  border-color:rgba(72,46,17,.36) !important;
  color:var(--ink) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .card-foot{
  background:rgba(91,59,24,.10) !important;
  border-top-color:rgba(72,46,17,.24) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .card-img{
  background:
    radial-gradient(420px 220px at 12% 0%, rgba(48,101,142,.14), transparent 58%),
    radial-gradient(420px 240px at 92% 100%, rgba(183,92,29,.16), transparent 60%),
    linear-gradient(135deg, rgba(226,207,168,.62), rgba(191,151,91,.26)) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .input,
html[data-app-theme="default"] body:not(.kiosk) select,
html[data-app-theme="default"] body:not(.kiosk) textarea{
  background:rgba(232,209,167,.94) !important;
  color:#211407 !important;
  border-color:rgba(67,43,16,.45) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .input::placeholder,
html[data-app-theme="default"] body:not(.kiosk) textarea::placeholder{
  color:#715431 !important;
}

html[data-app-theme="default"] body:not(.kiosk) .btn-ghost,
html[data-app-theme="default"] body:not(.kiosk) .icon-btn{
  background:linear-gradient(180deg, rgba(234,212,172,.92), rgba(202,166,105,.84)) !important;
  color:#201408 !important;
  border-color:rgba(68,44,17,.42) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .pill,
html[data-app-theme="default"] body:not(.kiosk) .badge,
html[data-app-theme="default"] body:not(.kiosk) .plan-badge{
  color:#211407 !important;
  background:linear-gradient(180deg, rgba(239,221,184,.96), rgba(207,174,119,.86)) !important;
  border-color:rgba(65,42,17,.38) !important;
}

html[data-app-theme="default"] body:not(.kiosk) .crumb,
html[data-app-theme="default"] body:not(.kiosk) .card-title,
html[data-app-theme="default"] body:not(.kiosk) .session-game-title,
html[data-app-theme="default"] body:not(.kiosk) .label,
html[data-app-theme="default"] body:not(.kiosk) b{
  color:#1f160c !important;
}

html[data-app-theme="default"] body:not(.kiosk) .subcrumb,
html[data-app-theme="default"] body:not(.kiosk) .small,
html[data-app-theme="default"] body:not(.kiosk) .card-sub{
  color:#4f3b23 !important;
}

/* Local account login/create screen */
body.auth-mode:not(.kiosk) .sidebar{
  display:none !important;
}

body.auth-mode:not(.kiosk) .app{
  padding:0;
}

body.auth-mode:not(.kiosk) .shell{
  border-radius:0 !important;
  min-height:100vh;
  background:
    radial-gradient(780px 460px at 18% 12%, rgba(61,139,253,.16), transparent 58%),
    radial-gradient(720px 500px at 90% 18%, rgba(255,122,26,.17), transparent 58%),
    linear-gradient(135deg, #17120c, #2a2116) !important;
}

body.auth-mode:not(.kiosk) .topbar{
  background:rgba(24,18,12,.78) !important;
  border-bottom-color:rgba(255,221,156,.18) !important;
}

body.auth-mode:not(.kiosk) .crumb{
  color:#fff7e8 !important;
}

body.auth-mode:not(.kiosk) .subcrumb{
  color:#ead2aa !important;
}

body.auth-mode:not(.kiosk) .view{
  display:grid;
  place-items:center;
  padding:28px;
}

.auth-shell{
  width:min(980px, 100%);
}

.auth-card{
  background:linear-gradient(180deg, rgba(226,198,151,.96), rgba(190,149,86,.94));
  border:1px solid rgba(255,226,162,.34);
  border-radius:8px;
  box-shadow:0 26px 72px rgba(0,0,0,.42);
  padding:22px;
}

.auth-brand-row{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:18px;
}

.auth-title{
  font-size:24px;
  font-weight:950;
  color:#1f160c;
}

.auth-sub{
  margin-top:4px;
  color:#4f3b23;
  font-weight:750;
}

.auth-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.auth-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
  background:rgba(255,239,204,.34);
  border:1px solid rgba(70,46,19,.24);
  border-radius:8px;
  padding:16px;
}

.auth-panel .btn{
  margin-top:auto;
}

.auth-note{
  margin-top:14px;
  padding:12px 14px;
  border-radius:8px;
  background:rgba(50,34,16,.14);
  border:1px solid rgba(70,46,19,.22);
  color:#3d2b16;
  font-size:12px;
  font-weight:750;
}

.sidebar-account-card{
  margin:0 12px 12px;
  padding:12px;
  border-radius:8px;
  background:linear-gradient(180deg, rgba(255,239,204,.11), rgba(255,224,160,.07));
  border:1px solid rgba(231,183,96,.30);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 10px 22px rgba(0,0,0,.20);
}

.sidebar-account-label{
  color:#e8d0a6;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}

.sidebar-account-email{
  margin-top:6px;
  color:#fff7e4;
  font-size:12px;
  line-height:1.25;
  font-weight:850;
  word-break:break-word;
}

.sidebar-account-logout{
  width:100%;
  margin-top:10px;
  min-height:34px;
  border-radius:8px;
  border:1px solid rgba(255,210,122,.42);
  background:linear-gradient(180deg, rgba(234,212,172,.95), rgba(202,166,105,.88));
  color:#201408;
  font-weight:850;
  cursor:pointer;
  box-shadow:0 8px 16px rgba(0,0,0,.18);
}

.sidebar-account-logout:hover{
  filter:saturate(1.08);
}

.error-popup{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:4px 0;
}

.error-popup-icon{
  flex:0 0 auto;
  width:42px;
  height:42px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:linear-gradient(180deg, #e65340, #9f2118);
  color:#fffaf0;
  font-size:24px;
  font-weight:950;
  box-shadow:0 12px 26px rgba(120,20,12,.26);
}

.error-popup-text{
  color:var(--ink);
  font-size:15px;
  line-height:1.45;
  font-weight:800;
  word-break:break-word;
}

/* Visual rules: custom universe/table colors and default images */
.visual-rules-panel{
  overflow:visible;
}

.visual-rule-editor{
  display:grid;
  grid-template-columns:minmax(120px, .45fr) minmax(180px, 1fr) 64px minmax(180px, 1fr) auto auto auto;
  gap:10px;
  align-items:end;
  margin-top:12px;
}

.visual-rule-color{
  min-width:58px;
  padding:6px;
  height:42px;
}

.visual-rule-lists{
  display:grid;
  grid-template-columns:repeat(2, minmax(220px, 1fr));
  gap:12px;
  margin-top:14px;
}

.visual-rule-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.visual-rule-row{
  display:grid;
  grid-template-columns:28px minmax(0, 1fr) auto auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border-radius:8px;
  border:1px solid rgba(72,46,17,.22);
  background:rgba(255,250,240,.48);
}

.visual-rule-swatch{
  width:24px;
  height:24px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.20);
  box-shadow:0 6px 12px rgba(0,0,0,.12);
}

.visual-rule-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.visual-rule-copy b,
.visual-rule-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.visual-rule-copy small,
.visual-rule-empty{
  color:var(--muted);
  font-size:12px;
  font-weight:750;
}

.default-universe-img{
  object-fit:contain !important;
  padding:18px;
  background:
    radial-gradient(260px 160px at 72% 32%, var(--accentSoft), transparent 62%),
    linear-gradient(135deg, rgba(255,250,235,.92), rgba(214,177,93,.22)) !important;
}

body:not(.kiosk) .card[style*="--session-rule-color"]{
  border-color:var(--accentBorder) !important;
}

body:not(.kiosk) .card[style*="--session-rule-color"] .card-head{
  background:linear-gradient(90deg, var(--accentSoft), rgba(255,255,255,0)) !important;
}

body:not(.kiosk) .plan-item[style*="--session-rule-color"],
body:not(.kiosk) .plan-item[style*="--session-rule-color"].theme-fantasy,
body:not(.kiosk) .plan-item[style*="--session-rule-color"].theme-eldritch,
body:not(.kiosk) .plan-item[style*="--session-rule-color"].theme-scifi,
body:not(.kiosk) .plan-item[style*="--session-rule-color"].theme-cyber,
body:not(.kiosk) .plan-item[style*="--session-rule-color"].theme-modern{
  background:linear-gradient(135deg, var(--accentSoft), rgba(255,255,255,.78)) !important;
  border-color:var(--accentBorder) !important;
}

body.kiosk .plan-item[style*="--session-rule-color"]{
  border-color:var(--accentBorder) !important;
}

body:not(.kiosk) .archive-row[style*="--session-rule-color"]{
  border-left-color:var(--accent1) !important;
  background:
    linear-gradient(90deg, var(--accentSoft), rgba(255,250,240,.72) 42%, rgba(255,250,240,.88)) !important;
}

/* Stats: give KPI text real breathing room inside the cards */
.stats-summary .kpi-card.stats-fun-card{
  padding:18px 22px 15px 28px;
  min-height:88px;
}

.stats-summary .stats-fun-card > *{
  position:relative;
  z-index:1;
}

.stats-summary .stats-fun-card .kpi-title,
.stats-summary .stats-fun-card .kpi-value,
.stats-summary .stats-fun-card .small{
  margin-left:0;
}

.stats-summary .stats-fun-card .kpi-value{
  margin-top:7px;
}

@media (max-width: 760px){
  .auth-grid{
    grid-template-columns:1fr;
  }
  .visual-rule-editor,
  .visual-rule-lists{
    grid-template-columns:1fr;
  }
  .visual-rule-row{
    grid-template-columns:28px minmax(0, 1fr);
  }
  .visual-rule-row .btn{
    grid-column:2;
  }
  body.auth-mode:not(.kiosk) .view{
    padding:14px;
  }
}

.brand-logo-badge{
  padding:0 !important;
  overflow:hidden;
  background:#ffffff !important;
  color:transparent !important;
}

.brand-logo-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  padding:4px;
  box-sizing:border-box;
  background:#ffffff;
}

body:not(.kiosk) .pill.session-full-pill,
html[data-app-theme="default"] body:not(.kiosk) .pill.session-full-pill,
html[data-app-theme="dark"] body:not(.kiosk) .pill.session-full-pill,
html[data-app-theme="antre"] body:not(.kiosk) .pill.session-full-pill,
html[data-app-theme="projection"] body:not(.kiosk) .pill.session-full-pill{
  color:#ffffff !important;
  background:linear-gradient(180deg, #ef4444, #b91c1c) !important;
  border-color:rgba(127,29,29,.82) !important;
  box-shadow:0 8px 18px rgba(185,28,28,.24), inset 0 1px 0 rgba(255,255,255,.24) !important;
  text-shadow:0 1px 1px rgba(0,0,0,.28);
  font-weight:950;
}

body:not(.kiosk) .pill.session-full-corner{
  letter-spacing:.02em;
  padding:5px 9px;
}
