* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #1d232a; background: #f5f5f0; }
header { background: #232f3e; color: #fff; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
header .brand { font-weight: 800; font-size: 16px; } header .brand span { color: #ff9900; }
header nav { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 13px; }
header a { color: #ffb84d; text-decoration: none; } header .who { color: #c9d1d9; }
main { max-width: 960px; margin: 0 auto; padding: 24px; }
main.narrow { max-width: 420px; }
.card { background: #fff; border: 1px solid #e3e3dc; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 8px; font-size: 16px; }
.hint { color: #57606a; font-size: 12.5px; }
label { display: block; font-size: 13px; margin: 10px 0 4px; font-weight: 600; }
input[type=email], input[type=password], input[type=text], input[type=number] { width: 100%; padding: 9px 10px; border: 1px solid #c8ccd0; border-radius: 7px; font: inherit; }
button { font: inherit; border: 1px solid #c8ccd0; background: #fff; border-radius: 7px; padding: 7px 14px; cursor: pointer; }
button.primary { background: #ff9900; border-color: #e88a00; font-weight: 700; color: #111; }
button.danger { background: #b42318; border-color: #b42318; color: #fff; }
button.small { padding: 3px 9px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 120px; }
.msg { margin-top: 10px; font-size: 13px; min-height: 18px; } .msg.err { color: #b42318; } .msg.ok { color: #1a7f37; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button.on { background: #232f3e; color: #fff; border-color: #232f3e; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #f7f7f2; border-radius: 8px; padding: 10px 12px; }
.stat .l { font-size: 11px; text-transform: uppercase; color: #666; letter-spacing: .03em; } .stat .v { font-size: 22px; font-weight: 800; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
th { font-size: 11.5px; color: #555; text-transform: uppercase; letter-spacing: .03em; }
code, .code { font-family: ui-monospace, Consolas, monospace; background: #f0f0ea; border-radius: 5px; padding: 1px 6px; }
.pill { display: inline-block; font-size: 11px; border-radius: 10px; padding: 0 8px; background: #eee; }
.pill.ok { background: #dcfce7; color: #14532d; } .pill.off { background: #fee2e2; color: #991b1b; } .pill.admin { background: #fff3d6; color: #8a5a00; }
.codes { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.hidden { display: none !important; }
ol.steps { padding-left: 20px; margin: 6px 0 0; } ol.steps li { margin: 4px 0; }

header nav a.on { color: #fff; font-weight: 700; }
.muted { color: #8b949e; }
.tr { font-weight: 700; white-space: nowrap; } .tr.up { color: #1a7f37; } .tr.down { color: #b42318; } .tr.flat { color: #b45309; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=text] { flex: 1; min-width: 200px; width: auto; }
select { font: inherit; padding: 8px 8px; border: 1px solid #c8ccd0; border-radius: 7px; background: #fff; }
td a { color: #0f5c99; text-decoration: none; } td a:hover { text-decoration: underline; }
td.num, th.num { text-align: right; }
td.title { max-width: 380px; }
textarea.note { width: 100%; min-width: 180px; min-height: 34px; font: inherit; font-size: 12.5px; border: 1px solid #e3e3dc; border-radius: 6px; padding: 4px 6px; resize: vertical; }
.star { background: none; border: 0; font-size: 18px; cursor: pointer; color: #b45309; padding: 0 4px; }
.empty { padding: 18px; text-align: center; color: #57606a; }
.bookhead { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.bookhead h1 { margin: 0 0 4px; font-size: 20px; }
.chartbox { position: relative; width: 100%; }
.chartbox svg { display: block; width: 100%; }
.tip { position: absolute; pointer-events: none; background: #232f3e; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -120%); }
.range button.on { background: #232f3e; color: #fff; border-color: #232f3e; }
.explain { font-size: 12.5px; color: #57606a; margin-top: 8px; }
.tablewrap { overflow-x: auto; }
.w220 { max-width: 220px; }
.grow { flex: 1; }

.scanlist td { vertical-align: middle; }
.status { display: inline-block; font-size: 11.5px; border-radius: 10px; padding: 1px 9px; background: #eee; font-weight: 600; }
.status.running { background: #dbeafe; color: #1e40af; } .status.done { background: #dcfce7; color: #14532d; } .status.paused { background: #fff3d6; color: #8a5a00; }
.status.failed, .status.cancelled { background: #fee2e2; color: #991b1b; } .status.queued { background: #f3f4f6; color: #374151; }
.bar { height: 6px; background: #eee; border-radius: 4px; overflow: hidden; min-width: 90px; } .bar > i { display: block; height: 100%; background: #ff9900; }
.topbooks a { display: block; font-size: 12px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.filters label { margin: 0 0 3px; font-size: 12px; } .filters input, .filters select { width: 100%; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.badge { display: inline-block; font-size: 10.5px; border-radius: 8px; padding: 0 6px; background: #eef2ff; color: #3730a3; margin-left: 4px; }
.warnbox { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #7c2d12; margin-bottom: 10px; }
main.wide { max-width: 1320px; }
.saved { color: #1a7f37; font-weight: 700; white-space: nowrap; font-size: 12.5px; }
.topbooks a { max-width: 220px; }
th { white-space: nowrap; }
