/* POS Cloud Admin — palette Domino + nuance rouge pour distinguer du front caisse */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #ececec;
  background: radial-gradient(ellipse at top, #3a3a3a 0%, #222 60%, #1a1a1a 100%);
  overflow: hidden;
  user-select: none;
}

.splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background: #1a1a1a; color: #888; z-index: 9999;
}
.splash.hidden { opacity: 0; pointer-events: none; transition: opacity 300ms; }
.logo { font-weight: 700; font-size: 32px; letter-spacing: 5px; color: #fff; display: flex; align-items: center; gap: 10px; }
.logo span:first-of-type { color: #c0392b; }
.adminpill {
  background: linear-gradient(#c0392b, #7a1f15);
  font-size: 11px; padding: 3px 8px; border-radius: 3px;
  letter-spacing: 2px; color: #fff !important;
}
.sub { font-size: 11px; text-transform: uppercase; letter-spacing: 3px; color: #c0392b; }
.spin {
  width: 36px; height: 36px; border: 3px solid #333; border-top-color: #c0392b;
  border-radius: 50%; animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.topbar {
  height: 48px; background: linear-gradient(#373737, #2e2e2e);
  border-bottom: 1px solid #111; display: flex; align-items: center;
  padding: 0 16px; gap: 12px; font-size: 13px; z-index: 10; position: relative;
}
.topbar .sub { font-size: 10px; margin-top: 1px; }
.topbar .logo { font-size: 15px; letter-spacing: 2px; }
.spacer { flex: 1; }
.pill {
  background: #1e1e1e; border: 1px solid #444; padding: 5px 10px;
  border-radius: 12px; color: #bbb; font-size: 12px;
}
.pill.active { background: #6a1b15; border-color: #c0392b; color: #fccec9; }

main {
  position: absolute; top: 48px; left: 0; right: 0; bottom: 28px;
  padding: 14px; overflow: auto;
}

.statusbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 28px; background: #151515; border-top: 1px solid #111;
  display: flex; align-items: center; padding: 0 14px; gap: 12px;
  font-size: 11px; color: #888;
}
.statusbar .ok { color: #4caf50; }
.statusbar .warn { color: #f39c12; }
.statusbar .err { color: #e53935; }

.btn {
  background: linear-gradient(#808080, #4e4e4e); color: #fff;
  border: 1px solid #222; border-radius: 4px; padding: 10px 14px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover:not([disabled]) { background: linear-gradient(#8f8f8f, #5a5a5a); }
.btn.primary { background: linear-gradient(#c0392b, #7a1f15); border-color: #4e1008; }
.btn.primary:hover:not([disabled]) { background: linear-gradient(#d24232, #8e241a); }
.btn.danger { background: linear-gradient(#c0392b, #7a1f15); border-color: #4e1008; }
.btn.ghost { background: transparent; border-color: #555; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 11px; color: #888;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 10px;
  background: #1a1a1a; border: 1px solid #333; border-radius: 3px;
  color: #fff; font: inherit; font-size: 13px;
}
.field input:focus { outline: none; border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192,57,43,0.2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card {
  background: linear-gradient(#373737, #2e2e2e);
  border: 1px solid #111; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.card .head {
  padding: 10px 14px; border-bottom: 1px solid #111;
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #f5a9a0;
  background: rgba(0,0,0,0.2);
}
.card .body { padding: 14px; }

/* Login */
.login {
  max-width: 400px; margin: 80px auto 0;
}

/* Tables */
table.data {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
table.data th, table.data td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #222;
}
table.data th {
  background: #1a1a1a; color: #f5a9a0;
  text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px;
}
table.data tr:hover td { background: rgba(192,57,43,0.08); }

.empty-state { color: #666; text-align: center; padding: 40px 20px; }

/* Toast */
.toast {
  position: fixed; bottom: 48px; left: 50%; transform: translateX(-50%);
  background: #c0392b; color: #fff; padding: 10px 18px;
  border-radius: 4px; font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5); z-index: 999;
}
.toast.err { background: #c0392b; }
.toast.ok { background: #2e7d32; }

/* Nav */
.adminnav {
  display: flex; gap: 4px; padding: 10px 0;
  border-bottom: 1px solid #222; margin-bottom: 14px;
}
.adminnav a {
  color: #bbb; text-decoration: none;
  padding: 8px 14px; border-radius: 4px; font-weight: 600; font-size: 13px;
}
.adminnav a.active {
  background: linear-gradient(#c0392b, #7a1f15);
  color: #fff;
}
.adminnav a:hover:not(.active) { background: #2a2a2a; color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 5px; }
