:root {
  --ink: #23251d;
  --muted: #6c6e63;
  --line: #bfc1b7;
  --paper: #eeefe9;
  --panel: #ffffff;
  --green: #2c8c66;
  --green-pale: #d9eddf;
  --red: #cd4239;
  --red-pale: #f7d6d3;
  --yellow: #f7a501;
  --yellow-pressed: #dd9001;
  --soft: #e5e7e0;
  --soft-line: #dcdfd2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "IBM Plex Sans", sans-serif; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.top-nav { align-items: center; background: var(--paper); border-bottom: 1px solid var(--line); color: var(--ink); display: flex; height: 66px; justify-content: space-between; padding: 0 32px; }
.brand, .top-nav nav { align-items: center; display: flex; gap: 18px; }
.brand { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.brand small { background: var(--yellow); color: var(--ink); font: 700 10px/1 "IBM Plex Sans", sans-serif; letter-spacing: .8px; padding: 5px 7px; }
.brand-mark { background: var(--yellow); box-shadow: 7px 0 0 var(--yellow), 14px 0 0 var(--ink); display: inline-block; height: 17px; width: 4px; }
.top-nav nav { color: var(--muted); font-size: 14px; font-weight: 500; }
.top-nav nav a:hover { color: var(--ink); }

main { margin: 0 auto; max-width: 1440px; padding: 48px 32px 80px; }
.dashboard-intro { align-items: end; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding-bottom: 28px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .9px; margin: 0 0 10px; text-transform: uppercase; }
h1, h2 { letter-spacing: -0.6px; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 36px); font-weight: 700; line-height: 1.3; }
h2 { font-size: clamp(21px, 3vw, 24px); font-weight: 800; line-height: 1.33; }
.dashboard-intro p:not(.eyebrow) { color: var(--muted); margin: 10px 0 0; }

.button { align-items: center; background: var(--soft); border: 1px solid var(--soft-line); border-radius: 6px; cursor: pointer; display: inline-flex; font-size: 14px; font-weight: 700; justify-content: center; min-height: 40px; padding: 8px 16px; }
.button:hover { background: #dfe1d9; }
.button.primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.button.primary:hover { background: var(--yellow-pressed); border-color: var(--yellow-pressed); }
.button.secondary { background: var(--soft); }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin: 28px 0 48px; }
.stats article { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; min-height: 104px; padding: 18px; }
.stats span { display: block; font-size: 27px; font-weight: 700; letter-spacing: 0; }
.stats article:last-child span { font: 500 12px/1.3 "DM Mono", monospace; letter-spacing: 0; margin-top: 8px; }
.stats p { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

.settings-section { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 48px; padding: 24px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 18px; }
.schedule-status, .table-note { color: var(--muted); font-size: 12px; margin: 0; }
.settings-card { align-items: end; display: grid; gap: 16px; grid-template-columns: minmax(200px, 1fr) 220px 220px auto; }
.toggle-row, .field { display: block; }
.toggle-row strong, .field span { display: block; font-size: 14px; font-weight: 600; }
.toggle-row small { color: var(--muted); display: block; font-size: 12px; margin-top: 4px; }
.toggle-row input { accent-color: var(--green); float: right; height: 20px; margin: -25px 0 0; width: 20px; }
.field input { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; margin-top: 7px; padding: 9px 10px; width: 100%; }
.schedule-fixed strong { display: block; font-size: 14px; margin-top: 7px; }
.schedule-fixed small { color: var(--muted); display: block; font-size: 12px; margin-top: 4px; }
.settings-actions { display: flex; gap: 8px; }
.form-message { color: var(--muted); font-size: 12px; grid-column: 1 / -1; margin: 0; }
.form-message.error, .error-text { color: var(--red); }

.runs-section { margin-top: 12px; }
.table-shell { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; }
.runs-table { border-collapse: collapse; min-width: 1000px; table-layout: fixed; width: 100%; }
.runs-table th { background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .4px; padding: 13px 14px; text-align: left; text-transform: uppercase; }
.runs-table th:nth-child(1) { width: 110px; }
.runs-table th:nth-child(2) { width: 36%; }
.runs-table th:nth-child(3) { width: 105px; }
.runs-table th:nth-child(4) { width: 80px; }
.runs-table th:nth-child(5), .runs-table th:nth-child(6) { width: 150px; }
.runs-table th:nth-child(7) { width: 105px; }
.runs-table td { border-top: 1px solid var(--soft-line); font-size: 13px; padding: 14px; vertical-align: middle; }
.runs-table tbody tr:hover { background: #fbfcfa; }
.status { align-items: center; display: inline-flex; font: 500 10px/1 "DM Mono", monospace; gap: 6px; letter-spacing: .3px; text-transform: uppercase; }
.status i { background: var(--yellow); border-radius: 99px; height: 7px; width: 7px; }
.status.success { color: var(--green); }.status.success i { background: var(--green); }.status.failed { color: var(--red); }.status.failed i { background: var(--red); }
.video-cell { align-items: center; display: flex; gap: 12px; min-width: 0; }
.thumb { background: #e5ebe6; display: block; flex: 0 0 55px; height: 42px; overflow: hidden; }
.thumb img { height: 100%; object-fit: cover; width: 100%; }
.empty-thumb { align-items: center; color: var(--muted); display: flex; font: 16px/1 "DM Mono", monospace; justify-content: center; }
.video-cell strong { display: block; font-size: 13px; line-height: 1.2; max-width: 370px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-cell small, td small { color: var(--muted); display: block; font-size: 11px; margin-top: 4px; max-width: 350px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-details { color: var(--muted); font-size: 10px; margin-top: 5px; max-width: 350px; }
.file-details summary { cursor: pointer; font: 10px "DM Mono", monospace; }
.file-details ul { background: #f0f3ef; border: 1px solid var(--line); list-style: none; margin: 6px 0 0; max-height: 180px; overflow: auto; padding: 6px 8px; }
.file-details li { display: flex; gap: 12px; justify-content: space-between; line-height: 1.6; }
.file-details li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-details li strong { color: var(--ink); font-weight: 500; white-space: nowrap; }
.mono { font-family: "DM Mono", monospace; font-size: 11px; }
time { color: var(--muted); font: 11px/1.4 "DM Mono", monospace; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-action { background: var(--soft); border: 1px solid var(--soft-line); border-radius: 4px; cursor: pointer; display: inline-block; font-size: 13px; font-weight: 600; padding: 7px 10px; white-space: nowrap; }
.table-action:hover { background: var(--ink); color: white; }
.empty-cell { color: var(--muted); padding: 34px !important; text-align: center; }
.prompt-dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 8px 8px 0 rgba(35, 37, 29, .12); color: var(--ink); max-width: min(780px, calc(100vw - 32px)); padding: 24px; width: 100%; }
.prompt-dialog::backdrop { background: rgba(12, 22, 16, .48); }
.dialog-heading { align-items: start; display: flex; justify-content: space-between; margin-bottom: 18px; }
.dialog-close { background: transparent; border: 0; color: var(--ink); cursor: pointer; font-size: 28px; line-height: .75; padding: 4px; }
.prompt-dialog pre { background: #f0f3ef; border: 1px solid var(--line); font: 12px/1.65 "DM Mono", monospace; margin: 0; max-height: 55vh; overflow: auto; padding: 14px; white-space: pre-wrap; }
footer { color: var(--muted); font: 11px/1 "DM Mono", monospace; padding: 28px; text-align: center; }

@media (max-width: 860px) { .top-nav { padding: 0 18px; }.top-nav nav { display: none; } main { padding: 26px 16px 40px; }.dashboard-intro { align-items: start; flex-direction: column; gap: 20px; }.stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 28px; }.settings-card { grid-template-columns: 1fr 1fr; }.settings-actions { grid-column: 1 / -1; }.runs-table { min-width: 930px; } }
@media (max-width: 540px) { .stats { gap: 8px; }.stats article { min-height: 88px; padding: 14px; }.stats span { font-size: 22px; }.settings-section { margin-left: -16px; margin-right: -16px; padding: 18px 16px; }.settings-card { grid-template-columns: 1fr; }.settings-actions { flex-wrap: wrap; }.section-heading { align-items: start; flex-direction: column; gap: 10px; }.table-shell { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; }.runs-table { min-width: 820px; } }
