:root { --gap: 12px; }
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background:#0b0f14; color:#e6edf3; }
header { display:flex; align-items:center; justify-content:space-between; padding:16px 24px; border-bottom:1px solid #1f2937; }
header h1 { margin:0; font-size:18px; }
nav a { color:#9fd3ff; margin-left:12px; text-decoration:none; }
main { max-width: 1000px; margin: 24px auto; padding: 0 16px; }
.card { background:#111827; border:1px solid #1f2937; border-radius:12px; padding:16px; margin-bottom:16px; }
.row { display:flex; gap:var(--gap); align-items:center; }
.table { width:100%; border-collapse:collapse; margin-top:12px; }
.table th, .table td { border-bottom:1px solid #1f2937; padding:8px; text-align:left; }
input[type=file], input, button { padding:8px; border-radius:8px; border:1px solid #374151; background:#0b1220; color:#e6edf3; }
button { cursor:pointer; background:#1d4ed8; border-color:#1d4ed8; }
button:disabled { cursor:not-allowed; opacity:.65; }
button.danger { background:#b91c1c; border-color:#7f1d1d; }
.btn { display:inline-block; padding:8px 10px; background:#1f6feb; color:#fff; border-radius:8px; text-decoration:none; }
.error { margin-top:12px; padding:8px; background:#7f1d1d; border:1px solid #ef4444; border-radius:8px; }
.success { margin:12px 0; padding:8px; background:#14532d; border:1px solid #22c55e; border-radius:8px; }
.muted { color:#9ca3af; }
.tag { background:#334155; padding:2px 6px; border-radius:6px; }
.secondary { background:#273449; border-color:#475569; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.page-heading h2, .page-heading h3, .container-title h3 { margin:0; }
.page-heading p { margin:4px 0 0; }
.docker-page { min-width:0; }
.docker-summary { margin-bottom:12px; color:#cbd5e1; }
.container-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(420px, 1fr)); gap:12px; }
.container-card { background:#111827; border:1px solid #263244; border-radius:8px; padding:16px; min-width:0; }
.container-title { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.container-title code { display:block; margin-top:5px; color:#94a3b8; word-break:break-all; }
.status { padding:4px 8px; border-radius:999px; background:#334155; font-size:12px; text-transform:uppercase; }
.status-running { color:#86efac; background:#14532d; }
.status-exited, .status-dead { color:#fca5a5; background:#7f1d1d; }
.metric-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; margin:16px 0; }
.metric-grid div { background:#0b1220; border:1px solid #263244; border-radius:6px; padding:10px; min-width:0; }
.metric-grid span, .metric-grid strong { display:block; }
.metric-grid span { color:#94a3b8; font-size:12px; margin-bottom:4px; }
.metric-grid strong { font-size:14px; overflow-wrap:anywhere; }
.mount-list { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.mount-list code { padding:4px 6px; background:#0b1220; border-radius:4px; }
.container-actions { margin-top:16px; flex-wrap:wrap; }
.file-dialog { width:min(860px, calc(100vw - 32px)); max-height:85vh; padding:18px; color:#e6edf3; background:#111827; border:1px solid #374151; border-radius:8px; }
.file-dialog::backdrop { background:rgba(0,0,0,.72); }
.file-toolbar { margin:12px 0; }
.file-listing { display:flex; flex-direction:column; max-height:60vh; overflow:auto; border-top:1px solid #263244; }
.file-entry { display:flex; justify-content:space-between; width:100%; border:0; border-bottom:1px solid #263244; border-radius:0; background:transparent; text-align:left; }
.file-entry:disabled { cursor:default; opacity:1; }
.file-entry small { color:#94a3b8; }
pre { white-space: pre-wrap; word-break: break-word; background:#0b1220; padding:12px; border-radius:8px; border:1px solid #1f2937; }
.settings-form { margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid #1f2937; }
.file-list-controls { display:flex; gap:var(--gap); align-items:center; margin:12px 0; }
.file-list-search { min-width:240px; }
.file-list { max-height:360px; overflow:auto; margin:0; padding:8px 8px 8px 28px; background:#0b1220; border:1px solid #1f2937; border-radius:8px; }
.file-list li { padding:3px 0; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:13px; word-break:break-all; }
.batch-results { margin-top:16px; }
.batch-results h3 { margin:0 0 8px; font-size:16px; }
.batch-failures { margin:8px 0 0; padding-left:22px; }
.batch-failures li { margin:6px 0; word-break:break-word; }
.upload-progress { width:100%; min-width:220px; margin-top:12px; }
.row .upload-progress { flex:1 1 260px; margin-top:0; }
.upload-progress__meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; color:#cbd5e1; font-size:14px; }
.upload-progress__percent { font-variant-numeric:tabular-nums; color:#9fd3ff; }
.upload-progress__track { height:10px; overflow:hidden; border-radius:999px; background:#0b1220; border:1px solid #374151; }
.upload-progress__bar { width:0; height:100%; background:#22c55e; transition:width .2s ease; }
.upload-progress.is-processing .upload-progress__bar { background:#38bdf8; }
.upload-progress.is-error .upload-progress__bar { background:#ef4444; }
@media (max-width: 720px) {
  .upload-form.row { align-items:stretch; flex-direction:column; }
  .upload-form.row .upload-progress { flex:auto; margin-top:4px; }
  .container-grid { grid-template-columns:minmax(0, 1fr); }
  .page-heading { align-items:flex-start; flex-direction:column; }
  .metric-grid { grid-template-columns:minmax(0, 1fr); }
}
