/* ShipX shared shell — client / driver / dashboard */
:root {
  color-scheme: dark;
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --ok: #4ade80;
  --err: #f87171;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, #0b1220 0%, var(--bg) 40%, #020617 100%);
  color: var(--text);
  line-height: 1.5;
}
.sx-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}
.sx-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.sx-top h1 {
  margin: 0;
  font-size: 1.2rem;
  flex: 1 1 auto;
}
.sx-top a {
  color: #93c5fd;
  font-size: 0.9rem;
}
.sx-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.sx-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}
.sx-muted {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
}
label {
  display: block;
  margin: 0.4rem 0 0.15rem;
  font-size: 0.8rem;
  color: var(--muted);
}
input,
select,
textarea,
button {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  padding: 0.45rem 0.55rem;
  max-width: 100%;
}
input,
select,
textarea {
  width: 100%;
  max-width: 420px;
}
button {
  cursor: pointer;
  background: var(--accent);
  border-color: #1d4ed8;
  color: #fff;
  padding: 0.5rem 1rem;
  margin: 0.35rem 0.35rem 0 0;
}
button.secondary {
  background: var(--border);
  border-color: #475569;
  color: var(--text);
}
button.danger {
  background: #b91c1c;
  border-color: #991b1b;
}
.sx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.sx-pre {
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.78rem;
  overflow: auto;
  max-height: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}
.sx-pre.ok {
  border-color: #166534;
}
.sx-pre.err {
  border-color: #991b1b;
}
table.sx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
table.sx-table th,
table.sx-table td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.sx-table th {
  color: var(--muted);
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-pending {
  background: #422006;
  color: #fdba74;
}
.badge-approved {
  background: #14532d;
  color: #86efac;
}
.badge-rejected {
  background: #450a0a;
  color: #fca5a5;
}
