/* Console d'administration */
body.admin { overflow: auto; height: auto; min-height: 100%; }
#adbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: calc(8px + var(--sat)) 16px 8px; background: var(--bg); border-bottom: 1px solid #ffffff14; }
#adbar h1 { margin: 0; font-size: 18px; }
#tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
#tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; color: var(--mute); }
#tabs button:hover { background: #ffffff10; color: var(--ink); }
#tabs button.on { background: var(--acc); color: #fff; }
#admain { padding: 20px clamp(12px, 3vw, 32px) 60px; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.adcard { background: var(--bg2); border: 1px solid #ffffff14; border-radius: 16px; padding: 18px; min-width: 0; }
.adcard h2 { margin: 0 0 12px; font-size: 16px; }
.adcard.narrow { max-width: 760px; }
.adgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.kpis4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--bg2); border: 1px solid #ffffff14; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { color: var(--mute); font-size: 13px; } .kpi small { color: var(--acc); font-size: 12px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; }
.bars > div { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bars i { display: block; width: 100%; min-height: 2px; background: var(--acc); border-radius: 3px 3px 0 0; }
.barlbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--mute); margin-top: 6px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
.hbar > div { height: 10px; background: #ffffff10; border-radius: 99px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--acc); }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.adt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adt th { text-align: left; color: var(--mute); font-weight: 600; font-size: 12px; padding: 8px; border-bottom: 1px solid #ffffff22; white-space: nowrap; }
.adt td { padding: 9px 8px; border-bottom: 1px solid #ffffff0d; vertical-align: top; }
.adt td small { display: block; color: var(--mute); font-size: 12px; }
.adt tbody tr[data-u] { cursor: pointer; } .adt tbody tr[data-u]:hover { background: #ffffff08; }
.adt tr.off td { opacity: .5; }
.adt .nowrap { white-space: nowrap; }
.st { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: #ffffff14; white-space: nowrap; }
.st-active { background: #16a34a33; color: #86efac; } .st-trialing { background: #f9731633; color: #fdba74; } .st-past_due { background: #dc262633; color: #fca5a5; }
.st-comp { background: #6366f133; color: #c7d2fe; } .st-canceled { background: #52525b55; }
.badge { font-size: 10.5px; background: var(--acc); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: middle; font-weight: 600; }
.badge.red { background: var(--danger); }
.tools { margin-bottom: 12px; } .tools select { min-height: 40px; border-radius: 9px; background: var(--bg); border: 1px solid #ffffff22; padding: 0 8px; }
.tools input { min-height: 40px; border-radius: 9px; background: var(--bg); border: 1px solid #ffffff22; padding: 0 10px; }
.plangrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.planf { display: flex; flex-direction: column; gap: 10px; }
.planf h2 { margin: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; font-size: 13px; }
.feats .chk { min-height: 30px; }
details summary { cursor: pointer; color: var(--acc); padding: 6px 0; }
code { background: #ffffff14; padding: 1px 5px; border-radius: 5px; font-size: .92em; overflow-wrap: anywhere; }
pre { background: #020617; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; overflow-x: auto; }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.warn { color: #fdba74; }
.adcard .fld input, .adcard .fld select, .adcard .fld textarea { background: var(--bg); }
@media (max-width: 700px) { #tabs button span:last-child { display: none; } .grid3 { grid-template-columns: 1fr 1fr; } .plangrid { grid-template-columns: 1fr; } .hbar { grid-template-columns: 90px 1fr 32px; } }
.tools > select, .tools > button { width: auto !important; flex: none; }
#adbar a.tb { text-decoration: none; color: var(--ink); }
