:root{
  --bg1:#071026;
  --bg2:#0b1633;
  --card: rgba(18,22,34,.72);
  --stroke: rgba(255,255,255,.10);
  --muted: rgba(255,255,255,.62);
}

*{ box-sizing:border-box; }
body.page{
  margin:0;
  min-height:100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:#fff;
  background: radial-gradient(1200px 700px at 50% 35%, #0c1a3f 0%, var(--bg1) 35%, #050a18 100%);
}

.topbar{
  display:flex;
  justify-content:flex-end;
  padding:18px 26px;
  gap:12px;
}
.topbar a{
  color: rgba(200,220,255,.55);
  text-decoration:none;
}
.topbar a:hover{
  color:#fff;
  text-decoration:underline;
}

.shell{
  width: 95%;
  max-width: 1400px;
  margin: 28px auto;
  position: relative;
  z-index: 2;
}

h1{
  margin: 6px 0 18px;
  font-family: Georgia, serif;
  font-size: 54px;
  letter-spacing:.3px;
  color:#fff;
}

.card{
  width: 520px;
  max-width: calc(100vw - 40px);
  margin: 120px auto;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
}

.muted{ color: var(--muted); }

label{
  display:block;
  margin-top:14px;
  margin-bottom:6px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

input, button{
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color:#fff;
  outline:none;
}
input::placeholder{ color: rgba(255,255,255,.35); }

button{
  margin-top: 14px;
  background: rgba(120,160,255,.22);
  cursor:pointer;
  font-weight:700;
}
button:hover{ background: rgba(120,160,255,.30); }

.msg{ margin-top: 10px; min-height: 18px; font-size: 13px; opacity:.95; }

.mini{
  margin-top: 14px;
  font-size: 12px;
  opacity:.75;
}
.mini a{ color: #a7b0d6; }

/* --- Big panel pages --- */
.panel{
  background: rgba(255,255,255,.08);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
}

.row{
  display:flex;
  gap:12px;
  align-items:center;
}

.col{ flex:1; }
.col-2{ flex:2; }

.btn{
  width:auto;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(120,160,255,.22);
  color:#fff;
  cursor:pointer;
  font-weight:700;
}
.btn.gray{ background: rgba(255,255,255,.10); }
.btn:hover{ background: rgba(120,160,255,.30); }
.btn.gray:hover{ background: rgba(255,255,255,.14); }

table{
  width:100%;
  border-collapse: collapse;
  margin-top: 14px;
  overflow:hidden;
  border-radius: 14px;
}
th, td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
  color: rgba(255,255,255,.86);
}
th{
  font-weight: 800;
  color: rgba(255,255,255,.92);
}

.badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 12px;
  color: rgba(255,255,255,.85);
}

.smallbox{
  min-height: 56px;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.75);
  font-size: 13px;
}
.btn.small{
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
}

.btn.danger{
  background: rgba(255, 90, 90, .22);
}
.btn.danger:hover{
  background: rgba(255, 90, 90, .30);
}
/* --- Modal --- */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  padding: 18px;
  z-index: 50;
}
.modal.open{ display:flex; }

.modalCard{
  width: 980px;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 40px);
  overflow:auto;
  background: rgba(18,22,34,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
}

/* Fix: options de <select> lisibles (Windows/Chrome affiche souvent fond blanc) */
select { color: #fff; }
select option { color: #111; background: #fff; }
/* =========================
   Fix lisibilité + UI commandes
   ========================= */

/* Assure la bonne base sur toutes les pages marquées .page */
body.page{
  margin:0;
  min-height:100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:#fff;
  background: radial-gradient(1200px 700px at 50% 35%, #0c1a3f 0%, var(--bg1) 35%, #050a18 100%);
}

/* Carte "commande" (préparateur) : ne plus utiliser .card (login) */
.orderCard{
  width: 100%;
  margin: 12px 0;
  padding: 16px;
  background: rgba(18,22,34,.72);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(0,0,0,.30);
  backdrop-filter: blur(12px);
}

.orderCard:hover{
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 20px 60px rgba(0,0,0,.38);
}

/* Titres/texte à l’intérieur des orderCard (si jamais le navigateur force un style) */
.orderCard *{
  color: inherit;
}

/* Ajuste un peu le bouton dans les cards (sans casser .btn global) */
.orderCard .btn{
  white-space: nowrap;
}
/* ===== Page préparateur : plein écran + lisible ===== */

.ordersPanel{
  width: 100%;
}

/* Liste des commandes : spacing propre */
.ordersList{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Carte commande : version lisible + full width */
.orderCard{
  width: 100%;
  margin: 0;
  padding: 16px 18px;
  background: rgba(18,22,34,.72);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(0,0,0,.30);
  backdrop-filter: blur(12px);
}

.orderCard:hover{
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 20px 60px rgba(0,0,0,.38);
}

/* Lisibilité interne */
.orderCard h3,
.orderCard p,
.orderCard span,
.orderCard div{
  color: rgba(255,255,255,.90);
}

.orderCard p{
  margin: 4px 0 0 0;
  color: rgba(255,255,255,.68);
}
/* Container générique (page Préparation utilise class="container") */
.container{
  width: 95%;
  max-width: 1400px;
  margin: 28px auto;
  padding: 0 16px;
}
.sectionTitle{
  margin: 10px 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: rgba(255,255,255,.92);
}


/* =========================
   Admin — Comptes
   ========================= */
.admin-page .panel{
  padding: 22px;
}
.adminHeader{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom: 14px;
}
.adminHeader .subtitle{
  color: rgba(255,255,255,.65);
  margin:0;
  font-size: 13px;
}

.subpanel{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 16px;
}

.formGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.formGrid .full{ grid-column: 1 / -1; }

@media (max-width: 860px){
  .formGrid{ grid-template-columns: 1fr; }
}

.adminActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.adminMsg{
  margin-top: 10px;
  min-height: 18px;
  font-size: 13px;
  opacity:.95;
}

table.adminTable td:last-child{
  white-space: nowrap;
}
