:root { color-scheme: light; --line: #d9d9d9; --text: #303030; --muted: #616161; --accent: #303030; }
* { box-sizing: border-box; }
body { margin: 0; padding: 1rem; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text); background: #f1f1f1; }
main { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
section { background: #fff; border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
h1 { font-size: 20px; margin: .25rem 0 0; }
h2 { font-size: 15px; margin: 0 0 .25rem; }
p.hint { color: var(--muted); margin: 0 0 .75rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .5rem .25rem; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
input, select { font: inherit; padding: .45rem .55rem; border: 1px solid #8a8a8a; border-radius: 8px; background: #fff; min-width: 0; }
td input { width: 6rem; }
label { display: grid; gap: .25rem; margin-bottom: .75rem; }
label.inline { display: flex; align-items: center; gap: .5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 .75rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
button { font: inherit; font-weight: 600; padding: .5rem 1rem; border-radius: 8px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.status { margin-left: .75rem; color: var(--muted); }
.status.error { color: #b42318; }
.status.ok { color: #067647; }
.notice { background: #fff4e5; border-radius: 12px; padding: 1rem 1.25rem; }

.tabs { display: flex; gap: .5rem; }
.tab { background: #e3e3e3; color: var(--text); }
.tab.active { background: var(--accent); color: #fff; }
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; }
.tile-value { font-size: 20px; font-weight: 650; }
.tile-label { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table-wrap th, .table-wrap td { white-space: nowrap; }
.badge { padding: .1rem .5rem; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e3e3e3; }
.badge-active { background: #cdfee1; color: #014b40; }
.badge-paused { background: #ffd6a4; color: #5e4200; }
.badge-cancelled { background: #fed3d1; color: #8e1f0b; }

h3 { font-size: 14px; margin: 1.5rem 0 .5rem; }
.help { color: var(--muted); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 .75rem; }
.grid2 label { margin-bottom: .75rem; }
.notice-ok, .notice-off { margin: .5rem 0 0; padding: .5rem .75rem; border-radius: 8px; font-weight: 600; }
.notice-ok { background: #cdfee1; color: #014b40; }
.notice-off { background: #f3f3f3; color: var(--muted); }

/* label { display: grid } would otherwise beat the browser's [hidden] rule and keep dependent fields on screen. */
[hidden] { display: none !important; }
