:root {
  --bg: #070b16; --bg2: #0d1426; --panel: rgba(20, 30, 54, .68); --line: rgba(130, 170, 255, .18);
  --text: #edf3ff; --muted: #93a3c2; --cyan: #2ee6d6; --blue: #4d8dff; --violet: #9b6bff;
  --high: #2ee6a8; --medium: #ffc857; --low: #ff6b6b; --radius: 16px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--text);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(155, 107, 255, .22), transparent 65%),
    radial-gradient(800px 500px at 0% 10%, rgba(46, 230, 214, .13), transparent 60%),
    linear-gradient(rgba(130, 170, 255, .035) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(130, 170, 255, .035) 1px, transparent 1px) 0 0 / 44px 100%,
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
h1, h2 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: 1.25rem; }
small { color: var(--muted); }
.muted { color: var(--muted); margin: .25rem 0 0; }

.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem clamp(1rem, 4vw, 2.5rem); background: rgba(7, 11, 22, .82);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 300; letter-spacing: .16em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--cyan); font-weight: 800; margin-left: -.55rem; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--cyan), var(--violet)); box-shadow: 0 0 16px rgba(46, 230, 214, .55); }
.nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.3rem); font-size: .92rem; }
.nav a:not(.btn) { color: var(--muted); }
.nav a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav form { margin: 0; }

.page { width: min(1120px, 100%); margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem); flex: 1; }
.page > section { margin-top: 2rem; }
.footer { padding: 1.25rem; text-align: center; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); }
.panel { padding: clamp(1.25rem, 3vw, 2rem); }
.panel > h2 { margin-bottom: .5rem; }
.panel > p:not(.kicker) { color: var(--muted); }
.kicker { display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; color: var(--cyan); font: 600 .74rem var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 230, 214, .6); } 100% { box-shadow: 0 0 0 10px rgba(46, 230, 214, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } * { transition: none !important; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .5rem 1.1rem;
  border: 0; border-radius: 11px; color: #04131a; font-family: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  background: linear-gradient(100deg, var(--cyan), #58b7ff); box-shadow: 0 4px 20px rgba(46, 230, 214, .22);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 26px rgba(46, 230, 214, .38); }
.btn-small { min-height: 34px; padding: .25rem .8rem; font-size: .84rem; }
.btn-large { min-height: 50px; padding: .6rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-ghost { color: var(--text); background: rgba(130, 170, 255, .1); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: rgba(130, 170, 255, .18); box-shadow: none; }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--text); }
.link-btn.danger { color: var(--low); font-size: .84rem; }

.hero { padding: clamp(1.5rem, 6vw, 4rem) 0 .5rem; }
.hero h1 { font-size: clamp(2.2rem, 6.5vw, 4.2rem); font-weight: 800; }
.hero em { font-style: normal; background: linear-gradient(90deg, var(--cyan), var(--blue) 55%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 580px; margin: 1rem 0 1.75rem; color: var(--muted); font-size: 1.08rem; }
.page-head { margin-bottom: 1.5rem; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.label { margin-bottom: .65rem; color: var(--muted); font: 600 .76rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.search { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .75rem; align-items: end; padding: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label, legend { color: var(--muted); font-size: .82rem; font-weight: 600; }
input, select {
  width: 100%; min-height: 46px; padding: .55rem .8rem; color: var(--text); font: inherit; font-size: 16px;
  background: rgba(7, 11, 22, .72); border: 1px solid var(--line); border-radius: 10px;
}
input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46, 230, 214, .16); }
input:disabled { opacity: .6; }
.has-error input { border-color: var(--low); }
.error-text { color: var(--low); }
.form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; }
.form-grid .btn, .form-grid .message { grid-column: 1 / -1; }
.narrow { width: min(560px, 100%); margin: 0 auto; }
.alt { margin: 1rem 0 0; text-align: center; font-size: .92rem; }

.chips { display: flex; gap: .55rem; overflow-x: auto; padding-bottom: .3rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; flex: none; padding: .35rem .85rem .35rem .4rem; color: var(--text); font-size: .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.chip:hover { text-decoration: none; border-color: var(--cyan); }
.chip.active { border-color: var(--cyan); background: rgba(46, 230, 214, .14); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 700 .68rem var(--mono); background: linear-gradient(135deg, var(--blue), var(--violet)); }

.days { display: grid; grid-template-columns: repeat(7, minmax(86px, 1fr)); gap: .5rem; overflow-x: auto; padding-bottom: .3rem; }
.day { display: flex; flex-direction: column; align-items: center; padding: .55rem .25rem; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.day:hover { text-decoration: none; border-color: var(--cyan); }
.day span { color: var(--muted); font-size: .76rem; text-transform: capitalize; }
.day b { font-size: 1.3rem; line-height: 1.25; }
.day small { font-size: .68rem; white-space: nowrap; }
.day.active { border-color: var(--cyan); background: rgba(46, 230, 214, .14); box-shadow: inset 0 0 18px rgba(46, 230, 214, .12); }

.slots-panel { padding: 1.25rem; }
.legend { display: flex; gap: .85rem; color: var(--muted); font-size: .76rem; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .3rem; border-radius: 2px; background: var(--c); }
.legend .high, [data-level="high"] { --c: var(--high); }
.legend .medium, [data-level="medium"] { --c: var(--medium); }
.legend .low, [data-level="low"] { --c: var(--low); }
[data-level="full"] { --c: #56627b; }
.slots { display: flex; gap: .3rem; overflow-x: auto; padding: .25rem .1rem .4rem; }
.slot { display: flex; flex: 1 0 38px; flex-direction: column; align-items: center; gap: .25rem; padding: .3rem .1rem; color: var(--text); border: 1px solid transparent; border-radius: 9px; }
a.slot:hover { text-decoration: none; background: rgba(130, 170, 255, .1); }
.slot.active { border-color: var(--cyan); background: rgba(46, 230, 214, .1); }
.slot b { font: 700 .76rem var(--mono); }
.slot small { font: .68rem var(--mono); }
.bar { display: flex; align-items: flex-end; width: 16px; height: 84px; overflow: hidden; border-radius: 5px; background: rgba(130, 170, 255, .09); }
.bar i { display: block; width: 100%; min-height: 2px; border-radius: 5px; background: var(--c); box-shadow: 0 0 10px var(--c); transition: height .4s; }
.empty-slot { opacity: .42; }

.departures, .list { display: flex; flex-direction: column; gap: .7rem; }
.departure { display: grid; grid-template-columns: 86px minmax(0, 1fr) 170px 150px; gap: 1rem; align-items: center; padding: 1rem 1.15rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.departure:hover { border-color: rgba(46, 230, 214, .5); }
.departure[data-level="full"] { opacity: .62; }
.departure[data-level="full"] [data-book] { pointer-events: none; color: var(--muted); background: rgba(130, 170, 255, .1); box-shadow: none; }
.dep-time strong { display: block; font: 700 1.45rem var(--mono); }
.dep-time span { color: var(--muted); font-size: .76rem; }
.dep-agency { display: flex; align-items: center; gap: .45rem; font-weight: 700; }
.dep-route { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; color: var(--text); font-size: .94rem; }
.dep-route i { flex: 0 1 44px; height: 1px; background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.dep-plate { margin-top: .1rem; color: var(--muted); font: .78rem var(--mono); }
.seat-count { color: var(--muted); font-size: .82rem; }
.seat-count b { color: var(--c); font-size: 1.15rem; }
.meter { height: 6px; margin-top: .3rem; overflow: hidden; border-radius: 6px; background: rgba(130, 170, 255, .12); }
.meter span { display: block; height: 100%; border-radius: 6px; background: var(--c); transition: width .4s; }
.dep-buy { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.price { font-weight: 800; }
.empty { padding: 1.5rem; color: var(--muted); text-align: center; }

.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; align-items: start; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin: 1rem 0; }
dt { color: var(--muted); font-size: .88rem; }
dd { margin: 0; font-weight: 600; text-align: right; }
.total { display: flex; align-items: baseline; justify-content: flex-end; gap: .4rem; color: var(--muted); }
.total b { color: var(--cyan); font-size: 1.6rem; }
.notice { margin: 1rem 0; padding: .7rem .9rem; color: #ffe2a3; font-size: .9rem; background: rgba(255, 200, 87, .1); border: 1px solid rgba(255, 200, 87, .35); border-radius: 10px; }
.hold { color: var(--muted); }
.hold b { color: var(--medium); font-family: var(--mono); }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0; padding: 0; border: 0; }
.pay-methods legend { margin-bottom: .4rem; }
.pay-option { display: flex; align-items: center; gap: .55rem; padding: .75rem; background: rgba(7, 11, 22, .6); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--cyan); background: rgba(46, 230, 214, .1); }
.pay-option input { width: 18px; min-height: 18px; accent-color: var(--cyan); }

.ticket { max-width: 720px; margin: 0 auto; overflow: hidden; background: linear-gradient(150deg, rgba(36, 52, 92, .85), rgba(20, 27, 52, .9)); border: 1px solid rgba(46, 230, 214, .4); border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35), 0 0 34px rgba(46, 230, 214, .1); }
.ticket > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.5rem; }
.ticket > .message { margin: 0 1.5rem 1rem; }
.arrow { color: var(--cyan); font-style: normal; }
.ticket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0 1.5rem 1.5rem; }
.ticket-grid span, .ticket footer span { display: block; color: var(--muted); font-size: .76rem; }
.ticket footer { padding: 1.1rem 1.5rem; text-align: center; border-top: 2px dashed rgba(130, 170, 255, .32); }
.ticket footer strong { display: block; color: var(--cyan); font: 700 1.5rem var(--mono); letter-spacing: .1em; }
.actions { display: flex; justify-content: center; gap: .6rem; margin-top: 1.25rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .18rem .6rem; font-size: .74rem; font-weight: 700; white-space: nowrap; border-radius: 999px; color: var(--muted); background: rgba(130, 170, 255, .12); }
.badge.paid { color: var(--high); background: rgba(46, 230, 168, .13); }
.badge.hold { color: var(--medium); background: rgba(255, 200, 87, .13); }
.badge.cancelled, .badge.expired, .badge.released { color: var(--low); background: rgba(255, 107, 107, .13); }

.tickets-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; margin: 0 0 1rem !important; }
.mini-ticket { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .85rem 1rem; color: var(--text); }
.mini-ticket:hover { border-color: var(--cyan); }
.mini-ticket.todo { border-color: rgba(255, 196, 92, .55); box-shadow: 0 0 0 1px rgba(255, 196, 92, .18) inset; }
.mini-link { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; color: var(--text); }
.mini-link:hover { text-decoration: none; }
.trip-note { flex: 1; margin: .35rem 0 .2rem; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.mini-ticket.todo .trip-note { color: #ffd58a; }
.mini-ticket .btn { margin-top: .3rem; }
.trips .section-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.todo-count { padding: .15rem .6rem; color: #1a1205; font-size: .76rem; font-weight: 700; background: #ffc45c; border-radius: 999px; }
.trips .empty { margin: 0 0 1rem; padding: 1rem; }
.recent-routes { margin-top: 1rem; }
.route-chip { padding-left: .85rem; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.swap-btn { padding: 0 .2rem; color: var(--cyan); font-family: inherit; font-size: .78rem; font-weight: 600; line-height: 1.6; background: none; border: 0; cursor: pointer; }
.swap-btn:hover { text-decoration: underline; }
.empty p { margin: .7rem 0 0; }
.profile-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.profile-head h1 { margin: .1rem 0 0; }
.profile-avatar { display: grid; flex: none; place-items: center; width: 64px; height: 64px; color: #06121a; font: 700 1.35rem var(--mono); background: linear-gradient(135deg, var(--cyan), var(--violet)); border-radius: 20px; box-shadow: 0 0 22px rgba(46, 230, 214, .35); }
.stat-link { color: var(--text); }
.stat-link:hover { text-decoration: none; border-color: var(--cyan); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.profile-grid h2 { margin: 0; font-size: 1.15rem; }
.profile-side { display: grid; gap: 1rem; }
.profile-side .btn { margin-top: .9rem; }
.profile-list { display: grid; gap: .5rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.profile-list li { display: flex; flex-direction: column; padding: .55rem .75rem; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; }
.profile-list li.muted { display: block; border-style: dashed; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.1rem; color: var(--text); }
a.row:hover { text-decoration: none; border-color: var(--cyan); }
.row strong, .row small { display: block; }
.row-end { text-align: right; }
.row-time { flex: 0 0 74px; }
.row-time b { display: block; font: 700 1.15rem var(--mono); }
.row-main { flex: 1; min-width: 0; }
.row-seats { flex: 0 0 140px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex: 0 0 auto; }
.row-actions form { margin: 0; }
.is-cancelled { opacity: .55; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 2rem; }
.stat { padding: 1rem 1.15rem; }
.stat span { display: block; color: var(--muted); font-size: .82rem; }
.stat b { font: 700 1.5rem var(--mono); }

.messages { width: min(1120px, 100%); margin: 1rem auto 0; padding: 0 clamp(1rem, 4vw, 2rem); }
.message { padding: .7rem .95rem; margin-bottom: .5rem; font-size: .92rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(77, 141, 255, .13); }
.message.success { border-color: rgba(46, 230, 168, .4); background: rgba(46, 230, 168, .11); }
.message.error { border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .11); }

.badge.confirmed { color: #04131a; background: var(--cyan); }
.report-cell b { color: var(--cyan); font-family: var(--mono); font-size: 1.15rem; }
.report-box { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: .8rem 1rem; color: var(--muted); background: rgba(46, 230, 214, .1); border: 1px solid rgba(46, 230, 214, .4); border-radius: 10px; }
.report-box b { color: var(--cyan); font: 700 1.5rem var(--mono); }
.confirm-panel { max-width: 720px; margin: 1rem auto 0; padding: 1.25rem 1.5rem; }
.confirm-panel .btn-large { margin-top: .75rem; }
.rule-note { margin: .85rem 0 0; color: var(--muted); font-size: .86rem; }
.btn:disabled { color: var(--muted); background: rgba(130, 170, 255, .1); border: 1px solid var(--line); box-shadow: none; cursor: not-allowed; transform: none; }
.choice-list, .field:has(input[type="radio"]) > div { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.field:has(input[type="radio"]) > div > div > label { display: flex; align-items: center; gap: .55rem; height: 100%; padding: .75rem; color: var(--text); background: rgba(7, 11, 22, .6); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.field:has(input[type="radio"]) > div > div > label:has(input:checked) { border-color: var(--cyan); background: rgba(46, 230, 214, .1); }
.field input[type="radio"], .check input { flex: none; width: 18px; min-height: 18px; accent-color: var(--cyan); }
.lang-switch { display: inline-flex; flex: none; margin: 0 auto 0 .4rem; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.lang-switch button { min-width: 32px; min-height: 26px; padding: 0 .35rem; color: var(--muted); font: 700 .72rem var(--mono); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { color: #04131a; background: var(--cyan); }
.password-field { position: relative; display: block; width: 100%; }
.password-field input { padding-right: 3rem; }
.password-toggle { position: absolute; top: 50%; right: 4px; display: grid; place-items: center; width: 40px; height: 38px; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { color: var(--cyan); background: rgba(46, 230, 214, .1); }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stats-three { grid-template-columns: repeat(3, 1fr); }
.date-filter { display: flex; align-items: center; gap: .5rem; margin: 0; }
.date-filter label { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.date-filter input { width: 165px; min-height: 38px; padding: .3rem .6rem; }
.agency-days { grid-template-columns: repeat(8, minmax(86px, 1fr)); margin-bottom: 1rem; }
.badge.boarded { color: #fff; background: var(--violet); }
.badge.boarding { color: var(--violet); background: rgba(155, 107, 255, .16); }
.vip { display: inline-block; padding: .02rem .4rem; color: #231700; font: 800 .68rem var(--mono); letter-spacing: .06em; vertical-align: middle; background: linear-gradient(100deg, #ffd978, #ffb84d); border-radius: 5px; }
.seat-board { margin: 0 0 1rem; }
.seat-board h2 { margin-bottom: .6rem; font-size: 1.05rem; }
.seat-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .45rem .8rem; margin-bottom: .4rem; background: rgba(7, 11, 22, .6); border: 1px solid var(--line); border-radius: 10px; }
.seat-row form { margin: 0; }
.seat-row.done { border-color: rgba(155, 107, 255, .55); background: rgba(155, 107, 255, .1); }
.seat-row.done span { color: var(--muted); font-size: .86rem; }
.field:has(> input[type="checkbox"]) { grid-column: 1 / -1; flex-flow: row wrap; align-items: center; gap: .6rem; }
.field > input[type="checkbox"] { order: -1; flex: none; width: 18px; min-height: 18px; accent-color: var(--cyan); }
.field:has(> input[type="checkbox"]) small { flex-basis: 100%; }
.board-form { margin: 0 0 .6rem; }
.badge.refunded { color: var(--blue); background: rgba(77, 141, 255, .15); }
.choice-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.choice-actions form { margin: 0; }
.choice-actions .btn-large { margin-top: 0; }
.manage-panel { margin-bottom: 1.5rem; border-color: rgba(255, 200, 87, .45); }
.list-head { margin-top: 1.5rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; cursor: pointer; }

.receipt { display: grid; grid-template-columns: 190px 1fr; gap: 1.25rem; align-items: center; padding: 1.25rem 1.5rem; border-top: 1px solid var(--line); }
.receipt-qr { width: 190px; padding: 4px; background: #fff; border-radius: 12px; }
.receipt-qr svg { display: block; width: 100%; height: auto; }
.receipt-info dl { margin: .6rem 0; }
.verdict { display: flex; flex-direction: column; gap: .15rem; margin: .5rem 0 1rem; padding: 1rem 1.1rem; border: 1px solid; border-radius: 12px; }
.verdict b { font-size: 1.5rem; line-height: 1.2; }
.verdict.valid { color: var(--high); background: rgba(46, 230, 168, .12); }
.verdict.warning { color: var(--medium); background: rgba(255, 200, 87, .12); }
.verdict.invalid { color: var(--low); background: rgba(255, 107, 107, .12); }
.verdict span { color: var(--text); }

@media print {
  body { background: #fff !important; color: #000; }
  .topbar, .footer, .messages, .actions, .confirm-panel { display: none !important; }
  .page { padding: 0; }
  .ticket { max-width: none; background: #fff !important; border: 1px solid #000; box-shadow: none; break-inside: avoid; }
  .ticket *, .ticket small, .ticket dt, .ticket-grid span, .ticket footer span { color: #000 !important; }
  .ticket .badge { background: none; border: 1px solid #000; }
  .receipt, .ticket footer { border-color: #000; }
}

@media (max-width: 860px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search .btn { grid-column: 1 / -1; }
  .departure { grid-template-columns: 72px minmax(0, 1fr); gap: .75rem; }
  .dep-seats { grid-column: 1 / -1; }
  .dep-buy { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .two-col, .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .list .row:has(.row-actions) { flex-wrap: wrap; }
  .row-seats { flex: 1 1 100%; order: 3; }
  .row-actions { flex: 1 1 100%; order: 4; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; row-gap: .45rem; padding-top: .55rem; padding-bottom: .45rem; }
  .lang-switch { margin-left: auto; margin-right: 0; }
  .nav { order: 3; width: 100%; gap: .85rem; justify-content: space-between; overflow-x: auto; font-size: .8rem; white-space: nowrap; }
  .nav-agency { display: none; }
  .nav > * { flex: none; }
  .stats-three { grid-template-columns: 1fr 1fr; }
  .brand { font-size: .88rem; }
  .search, .form-grid, .choice-list, .field:has(input[type="radio"]) > div { grid-template-columns: 1fr; }
  .receipt { grid-template-columns: 1fr; justify-items: center; }
  .receipt-info { width: 100%; }
  .ticket-grid { grid-template-columns: 1fr 1fr; }
  .legend { display: none; }
  .days { grid-template-columns: repeat(7, 86px); }
  .agency-days { grid-template-columns: repeat(8, 86px); }
  .date-filter { width: 100%; flex-wrap: wrap; }
  .date-filter label { flex-basis: 100%; }
  .date-filter input { flex: 1; width: auto; min-width: 0; }
}

/* Pièce d'identité, logos et compagnons */
.id-reminder { display: flex; flex-direction: column; gap: .1rem; margin: 1rem 0; padding: .7rem .9rem; font-size: .88rem; color: var(--text); background: rgba(77, 141, 255, .12); border: 1px solid rgba(77, 141, 255, .42); border-left-width: 4px; border-radius: 10px; }
.id-reminder b { color: #9cc1ff; }
.ticket-reminder { padding: 0 1.5rem; }
.ticket-reminder .id-reminder { margin-top: 0; }
.avatar-logo { padding: 2px; object-fit: contain; background: #fff; }
.kicker .avatar { letter-spacing: 0; }
.agency-title { display: flex; align-items: center; gap: .6rem; }
.agency-title .avatar { width: 44px; height: 44px; font-size: .9rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.logo-preview { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: 1.25rem; }
.logo-preview img, .logo-preview span { display: grid; place-items: center; width: 140px; height: 140px; padding: 8px; object-fit: contain; color: #fff; font: 700 2rem var(--mono); background: #fff; border-radius: 18px; }
.logo-preview span { background: linear-gradient(135deg, var(--blue), var(--violet)); }
input[type="file"] { padding: .6rem; }
.form-extra { margin-top: .8rem; }
.companion-list { display: flex; flex-direction: column; gap: .45rem; margin-top: 1.25rem; }
.companion-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: .25rem .8rem; background: rgba(7, 11, 22, .6); border: 1px solid var(--line); border-radius: 10px; }
.companion-row strong { min-width: 0; overflow-wrap: anywhere; }
.companion-row form { flex: none; margin: 0; }
.companions { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; border: 0; }
.companions legend { margin-bottom: .2rem; color: var(--muted); font-size: .82rem; font-weight: 600; }
.companions .pay-option input { flex: none; }
.companion-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
.companion-add input, .companion-add .btn { grid-column: 1 / -1; min-width: 0; }
.companion-add select { min-width: 0; }
.companion-who { display: flex; flex-direction: column; min-width: 0; }
.companion-actions { display: flex; flex: none; align-items: center; gap: .3rem; }
.companion-actions form { margin: 0; }
.field:has(input[type="radio"]) > div:not(.password-field) { min-width: 0; }
.seat-who { display: flex; flex-direction: column; min-width: 0; }
.seat-who small { overflow-wrap: anywhere; }

/* Comptes de versement */
.field[hidden] { display: none; }
.payout-title { margin-top: 1.5rem; }
.payout-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.payout-row { padding-top: .55rem; padding-bottom: .55rem; }
.payout-delete { display: inline-flex; align-items: center; font-size: .84rem; }
@media (max-width: 560px) {
  .payout-row { flex-wrap: wrap; }
  .payout-row .companion-actions { width: 100%; justify-content: flex-end; }
}

/* Points d'embarquement */
textarea { width: 100%; min-height: 104px; padding: .6rem .8rem; color: var(--text); font: inherit; font-size: 16px; resize: vertical; background: rgba(7, 11, 22, .72); border: 1px solid var(--line); border-radius: 10px; }
textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46, 230, 214, .16); }
.has-error textarea { border-color: var(--low); }
select { appearance: auto; }
.dep-point { margin-top: .1rem; color: var(--cyan); font-size: .8rem; }
.point-place { display: block; }

/* Fiche de départ imprimable */
.row-actions { flex-wrap: wrap; }
.manifest-actions { margin: 0 0 1rem; }
.manifest { padding: clamp(1rem, 3vw, 1.75rem); color: #111827; background: #fff; border-radius: 12px; }
.manifest small { color: #4b5563; }
.manifest-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .8rem; border-bottom: 2px solid #111827; }
.manifest-brand { display: flex; align-items: center; gap: .6rem; }
.manifest-brand .avatar { width: 48px; height: 48px; font-size: .9rem; }
.manifest-brand strong, .manifest-brand small, .manifest-title small { display: block; }
.manifest-title { text-align: right; }
.manifest-title h1 { font-size: 1.45rem; }
.manifest-cancelled { margin: .8rem 0 0; padding: .5rem .7rem; color: #991b1b; font-weight: 700; border: 2px solid #991b1b; }
.manifest-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem 1rem; margin: 1rem 0 .7rem; }
.manifest-info dt { color: #4b5563; font-size: .74rem; }
.manifest-info dd { font-size: .92rem; text-align: left; }
.manifest-note { margin: 0 0 .7rem; font-size: .84rem; font-weight: 600; }
.manifest-scroll { overflow-x: auto; }
.manifest table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: .82rem; }
.manifest th, .manifest td { padding: .35rem .45rem; text-align: left; vertical-align: top; border: 1px solid #9ca3af; }
.manifest th { font-size: .72rem; background: #e5e7eb; }
.manifest tr { break-inside: avoid; }
.manifest .mono { font-family: var(--mono); font-size: .74rem; white-space: nowrap; }
.free-label { color: #6b7280; }
.manifest .tick { text-align: center; }
.manifest .box { display: inline-grid; place-items: center; width: 18px; height: 18px; font-weight: 800; border: 1.5px solid #111827; }
.manifest-released { margin-top: 1rem; font-size: .84rem; }
.manifest-released h2 { font-size: .95rem; }
.manifest-released ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.manifest-sign { display: flex; align-items: flex-end; gap: .7rem; margin-top: 1.5rem; font-size: .84rem; }
.manifest-sign i { flex: 0 1 260px; height: 32px; border-bottom: 1px solid #111827; }
@page { size: A4; margin: 11mm; }
@media print {
  body { padding-bottom: 0 !important; }
  .manifest { padding: 0; border-radius: 0; }
  .manifest-scroll { overflow: visible; }
  .manifest table { min-width: 0; font-size: 9.5pt; }
  .manifest thead { display: table-header-group; }
  .manifest th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 560px) {
  .manifest-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Listes raccourcies sur mobile et tablette */
[data-paged] > [hidden] { display: none !important; }
.show-more { margin-top: .7rem; }

/* Zones tactiles d'au moins 44 px */
@media (max-width: 1024px) {
  .brand, .btn { min-height: 44px; }
  .tickets-strip, .days, .slots, .chips { scrollbar-width: thin; }
  .nav a:not(.btn), .nav .link-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 .45rem; }
  .btn-small { min-height: 44px; }
  .lang-switch button { min-width: 44px; min-height: 44px; font-size: .78rem; }
  .link-btn { min-height: 44px; padding: 0 .5rem; }
  .chip { min-height: 44px; }
  .swap-btn { min-height: 32px; }
  .section-head > a, .alt a, .notice a, .summary > a { display: inline-flex; align-items: center; min-height: 44px; }
  .date-filter input { min-height: 44px; }
  .password-toggle { right: 1px; width: 44px; height: 44px; }
  .check, .field:has(> input[type="checkbox"]) { min-height: 44px; align-items: center; }
}

/* Tablette */
@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
  .nav a.nav-agency { display: none; }
  .tickets-strip { display: flex; overflow-x: auto; padding-bottom: .3rem; }
  .mini-ticket { flex: 0 0 min(78%, 300px); }
}
@media (min-width: 561px) and (max-width: 1024px) {
  .days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
  .agency-days { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .35rem; }
  .slots { gap: 2px; }
  .slot { flex: 1 1 0; min-width: 30px; }
  .bar { width: 14px; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .search { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 680px) and (max-width: 860px) {
  .departure { grid-template-columns: 76px minmax(0, 1fr) 130px 118px; gap: .7rem; }
  .dep-seats, .dep-buy { grid-column: auto; }
  .dep-buy { flex-direction: column; align-items: flex-end; justify-content: center; }
  .row-seats { flex: 0 0 150px; order: 0; }
  .row-actions { justify-content: flex-end; }
}

/* Téléphone : menu en bas de l'écran, à portée de pouce */
@media (max-width: 560px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .topbar { flex-wrap: nowrap; padding-top: .25rem; padding-bottom: .25rem; background: #080d1a; backdrop-filter: none; }
  .nav {
    position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; width: auto;
    height: calc(60px + env(safe-area-inset-bottom)); padding: .25rem .35rem calc(.25rem + env(safe-area-inset-bottom));
    gap: .2rem; justify-content: space-around; overflow: visible; font-size: .76rem;
    background: #080d1a; border-top: 1px solid var(--line);
  }
  .nav > * { flex: 1 1 0; min-width: 0; }
  .nav form { display: flex; }
  .nav form .link-btn { width: 100%; }
  .nav a:not(.btn), .nav .link-btn { padding: 0 .1rem; font-size: .76rem; white-space: nowrap; }
  .nav .btn-small { padding: 0 .25rem; font-size: .76rem; }
  .search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search input { padding-right: .35rem; padding-left: .6rem; }
  .search .btn { grid-column: auto; min-height: 46px; padding-right: .5rem; padding-left: .5rem; }
  .agency-days .day:last-child { order: -1; }
}
@media (max-width: 359px) {
  .search { grid-template-columns: 1fr; }
  .search .btn { grid-column: 1 / -1; }
}

/* Profil voyageur : trois compteurs toujours sur une ligne */
.stats.profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; }
@media (max-width: 560px) {
  .profile-stats .stat { padding: .75rem; }
  .profile-stats .stat b { font-size: 1.25rem; }
  .profile-head { align-items: flex-start; }
  .profile-avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 1.1rem; }
}

.info-list { display: grid; gap: .5rem; margin: 1rem 0 0; }
.info-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 12px; }
.info-list dt { color: var(--muted); font-size: .88rem; }
.info-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 420px) { .info-list > div { flex-direction: column; gap: .1rem; } .info-list dd { text-align: left; } }

.pre-line { white-space: pre-line; }
.locked-note { margin: 1rem 0; }
.ticket-changes { margin-bottom: 1rem; }
.ticket-changes h2 { margin: 0; font-size: 1.1rem; }
.support-search { grid-template-columns: 1fr auto; margin-bottom: 1.5rem; }
.row-end .btn { margin-top: .35rem; }
@media (max-width: 560px) { .support-search { grid-template-columns: 1fr; } }

.deadline-note { margin: .6rem 0 0; color: #ffd58a; font-size: .92rem; }
.staff-cancel { margin-bottom: 1rem; border-color: rgba(255, 107, 107, .45); }
.staff-cancel h2 { margin: 0; font-size: 1.15rem; }
.refund-form { margin-top: .8rem; }

/* Scanner de billets */
.scan-departure { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; padding: 1rem; margin-bottom: 1rem; }
.scan-count { text-align: right; }
.scan-count span { display: block; color: var(--muted); font-size: .82rem; }
.scan-count b { font: 700 1.6rem var(--mono); }
.scan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.scan-camera { padding: 1rem; }
.scan-video-wrap { position: relative; display: none; overflow: hidden; aspect-ratio: 4 / 3; background: #000; border-radius: 14px; }
.camera-on .scan-video-wrap { display: block; }
.scan-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(46, 230, 214, .85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); }
.scan-camera [data-scan-status] { margin: .7rem 0; }
.scan-camera-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.scan-camera-actions [data-scan-start] { flex: 1 1 14rem; }
.scan-camera-actions [hidden] { display: none; }
.scan-secure-link { display: block; margin-top: .6rem; text-align: center; white-space: normal; }
.scan-manual label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .85rem; }
.scan-manual-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.scan-manual input { font-family: var(--mono); text-transform: uppercase; }
.scan-result { min-height: 260px; padding: 1.25rem; border-width: 2px; transition: border-color .2s, background .2s; }
.scan-result[data-level="valid"] { border-color: #34d399; background: rgba(52, 211, 153, .12); }
.scan-result[data-level="warning"] { border-color: #ffc45c; background: rgba(255, 196, 92, .12); }
.scan-result[data-level="invalid"] { border-color: #ff6b6b; background: rgba(255, 107, 107, .12); }
.scan-verdict { margin: 0; font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
.scan-result[data-level="valid"] .scan-verdict { color: #34d399; }
.scan-result[data-level="warning"] .scan-verdict { color: #ffc45c; }
.scan-result[data-level="invalid"] .scan-verdict { color: #ff6b6b; }
.scan-detail { margin: .35rem 0 1rem; color: var(--text); }
.scan-info { display: flex; flex-direction: column; gap: .2rem; margin-bottom: 1rem; }
.scan-info strong { font-size: 1.15rem; }
.scan-actions { display: grid; gap: .5rem; }
.scan-actions .seat-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.scan-message { margin: .8rem 0 0; font-weight: 600; }
.scan-help { margin-top: 1rem; font-size: .85rem; }
@media (max-width: 860px) { .scan-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .scan-departure { grid-template-columns: 1fr; } .scan-count { text-align: left; } }
.scan-info[hidden], .scan-message[hidden] { display: none; }

/* Noms manquants sur un billet */
.names-note { display: grid; gap: .25rem; margin: .6rem 0; }
.names-note[hidden] { display: none; }
.names-note small { color: var(--muted); }
.names-warning { display: grid; gap: .35rem; margin: 1rem 0 0; }
.names-warning a { color: inherit; font-weight: 600; }
.names-contacts { line-height: 1.6; }
.mini-ticket .trip-warning { color: #ffb86b; font-weight: 600; }
.seat-names { display: grid; gap: .6rem; margin: 1rem 0; padding: 0; border: 0; }
.seat-names legend { margin-bottom: .4rem; font-weight: 600; }
.seat-name-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 8rem 9.5rem; gap: .5rem; align-items: center; }
.seat-name-row .seat-num { color: var(--muted); font-size: .86rem; }
.seat-name-row .error-text { grid-column: 2 / -1; }
@media (max-width: 640px) {
  .seat-name-row { grid-template-columns: 1fr 1fr; }
  .seat-name-row .seat-num, .seat-name-row input { grid-column: 1 / -1; }
}

/* Scanner : confirmation au contrôle */
.scan-confirm { display: grid; gap: .6rem; width: 100%; }
.scan-traveler { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .45rem; align-items: center; padding: .5rem .6rem; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; }
.scan-traveler.missing { grid-template-columns: 1fr 1fr; border-color: rgba(255, 184, 107, .55); background: rgba(255, 184, 107, .07); }
.scan-traveler.missing .seat-num, .scan-traveler.missing input { grid-column: 1 / -1; }
.scan-traveler select, .scan-traveler input { min-width: 0; width: 100%; }
.scan-traveler .seat-num { color: var(--muted); font-size: .85rem; }
.scan-baggage { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; border: 0; }
.scan-baggage legend { margin-bottom: .3rem; font-size: .85rem; color: var(--muted); }
.scan-final { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.scan-final .btn { flex: 1 1 10rem; }

/* Espace NEXBUS : agences partenaires */
.badge.agency-approved { color: var(--high); background: rgba(46, 230, 168, .13); }
.badge.agency-pending { color: var(--medium); background: rgba(255, 200, 87, .13); }
.badge.agency-suspended, .badge.agency-refused { color: var(--low); background: rgba(255, 107, 107, .13); }
.agency-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.chip-plain { padding: .35rem .85rem; }
.chip-plain b { margin-left: .3rem; color: var(--muted); }
.agency-search { display: flex; gap: .5rem; flex: 1 1 260px; max-width: 420px; }
.agency-search input { flex: 1; min-width: 0; }
.agency-row:hover { text-decoration: none; border-color: var(--cyan); }
.agency-figures { display: flex; gap: 1.2rem; flex: none; }
.agency-figures span { text-align: right; }
.agency-figures b { display: block; font: 700 1.05rem var(--mono); }
.agency-figures small { color: var(--muted); font-size: .75rem; }
.agency-figures .warn b, .agency-figures .warn small { color: var(--medium); }
.profile-main { display: grid; gap: 1rem; }
.agency-decision .decision-form { margin-top: .8rem; }
.btn-danger { color: var(--low); border-color: rgba(255, 107, 107, .45); }
.payout-check { flex-direction: row !important; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.payout-check .payout-badges { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.payout-check form { margin: 0; }
@media (max-width: 760px) {
  .agency-row { flex-wrap: wrap; }
  .agency-figures { order: 3; width: 100%; justify-content: flex-start; }
  .agency-figures span { text-align: left; }
}

/* Espace NEXBUS : navigation, filtres, pages */
.nexbus-nav { margin: -.4rem 0 1.2rem; }
.nexbus-stats { grid-template-columns: repeat(4, 1fr); }
a.stat { color: var(--text); }
a.stat:hover { text-decoration: none; border-color: var(--cyan); }
.stat.stat-alert b { color: var(--medium); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1rem; padding: .75rem; }
.filter-bar input:not([type="checkbox"]), .filter-bar select { flex: 1 1 170px; min-width: 0; }
.filter-bar input[name="q"] { flex: 2 1 240px; }
.filter-bar .check { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .88rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.2rem 0; flex-wrap: wrap; }
.row-time small { color: var(--muted); font-size: .75rem; }
.sms-row .row-main small { white-space: normal; }
@media (max-width: 760px) {
  .nexbus-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Versements aux agences */
.money-scroll { overflow-x: auto; }
.profile-main, .profile-side { min-width: 0; }
.money-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: .86rem; }
.money-table th, .money-table td { padding: .45rem .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.money-table th { color: var(--muted); font-size: .76rem; font-weight: 600; }
.money-table tfoot th { color: var(--text); font-size: .86rem; border-bottom: 0; border-top: 1px solid var(--cyan); }
.money-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.money-table .mono { font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.payout-steps { margin: 0 0 .8rem; padding-left: 1.1rem; font-size: .88rem; }
.payout-steps b { color: var(--text); }
.payout-history { margin-top: 1rem; }
.row.refund-new { border-color: rgba(255, 200, 87, .55); opacity: 1; }

/* Paiement Mobile Money : attente de validation */
.error-notice { color: #ffc9c9; background: rgba(255, 107, 107, .1); border-color: rgba(255, 107, 107, .4); }
.payment-wait { text-align: center; }
.payment-wait .btn { margin-top: .5rem; }
.payment-wait .small { margin-top: 1.2rem; font-size: .8rem; }
.pay-spinner { width: 54px; height: 54px; margin: 1.2rem auto; border-radius: 50%; border: 4px solid rgba(46, 230, 214, .2); border-top-color: rgb(46, 230, 214); animation: pay-spin 1s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spinner { animation-duration: 3s; } }

/* Remboursement : autre numéro MTN, remboursement fait à la main */
.refund-choice .field { margin-bottom: .6rem; text-align: left; }
.manual-refund { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line, rgba(255,255,255,.12)); }
.manual-refund summary { cursor: pointer; font-weight: 600; }

/* Pied de page */
.footer { display: grid; gap: .6rem; justify-items: center; text-align: center; }
.footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.1rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--text); text-decoration: underline; }

/* Pages légales, FAQ, aide */
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; max-width: 1060px; margin: 0 auto; }
.legal-nav { position: sticky; top: 1rem; display: grid; gap: .15rem; padding: .6rem; border-radius: 14px; }
.legal-nav a { padding: .55rem .7rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .92rem; }
.legal-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.legal-nav a.active { color: var(--text); background: rgba(46, 230, 214, .12); font-weight: 600; }
.legal { min-width: 0; line-height: 1.65; }
.legal h2 { margin: 1.8rem 0 .6rem; font-size: 1.15rem; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .3rem 0; }
.legal a { color: rgb(46, 230, 214); }
.legal-lead { font-size: 1.05rem; }
.legal-updated { margin-top: -.4rem; font-size: .85rem; }
.legal-table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; font-size: .92rem; }
.legal-table th, .legal-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--line, rgba(255,255,255,.12)); text-align: left; vertical-align: top; }
.legal-table th { color: var(--muted); font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line, rgba(255,255,255,.12)); }
.faq summary { cursor: pointer; padding: .8rem .2rem; font-weight: 600; list-style-position: inside; }
.faq details p { margin: 0 .2rem 1rem; color: var(--muted); }
.faq details[open] summary { color: rgb(46, 230, 214); }
.help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: .6rem 0; }
.help-card { display: grid; gap: .25rem; padding: 1rem; border-radius: 14px; color: var(--text); text-decoration: none; }
.help-card span { color: var(--muted); }
a.help-card:hover { border-color: rgba(46, 230, 214, .5); }
.error-page { text-align: center; }
.error-page .choice-actions { justify-content: center; }

/* Case d'acceptation des conditions */
.consent-label { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; line-height: 1.45; cursor: pointer; }
.consent-label input { width: auto; margin-top: .2rem; flex: none; }
.consent-label a { color: rgb(46, 230, 214); }

@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: .3rem; }
  .legal-nav a { padding: .4rem .6rem; font-size: .85rem; }
  .legal-table { display: block; overflow-x: auto; }
}

/* Suppression du compte */
.danger-zone summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.danger-zone details[open] summary { color: #ff8f8f; margin-bottom: .6rem; }
.danger-btn { color: #ff8f8f; border-color: rgba(255, 107, 107, .45); }
