/* Original Diyar DVR graphite/cyan palette. */
:root { color-scheme: dark; font-family: Roboto,"Segoe UI",Arial,sans-serif; font-synthesis: none; color: #f4f7ff; background: #080f14; --panel: #161e25; --line: #303d47; --muted: #a0afbd; --cyan: #35c4ef; }
* { box-sizing: border-box; }
body { margin: 0; }
h1, p { margin: 0; }
button, input { font: inherit; border: 1px solid var(--line); border-radius: 6px; color: #f4f7ff; }
button { padding: 11px 18px; background: var(--panel); cursor: pointer; font-size: 13px; font-weight: 600; }
button:hover { background: #1d2a34; border-color: #587180; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, input:focus-visible, .table-wrap:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.primary { background: linear-gradient(180deg,#1b4257,#153443); border-color: #00b4ff; }
.primary:hover { background: #1f4b60; border-color: #00e2ff; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 750; white-space: nowrap; }
.brand-logo { object-fit: contain; flex: 0 0 auto; }
.login-screen { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 24px; }
.login-card { width: min(100%,360px); padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.login-card .brand { justify-content: center; margin-bottom: 30px; }
#login label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
#password { width: 100%; min-width: 0; padding: 13px; background: #101920; }
#login-submit { width: 100%; margin-top: 18px; }
.dashboard { max-width: 1800px; padding: 24px 32px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 28px; margin-bottom: 24px; }
.total { color: var(--muted); font-size: 15px; white-space: nowrap; }
.total strong { color: var(--cyan); font-size: 24px; font-variant-numeric: tabular-nums; margin-left: 6px; }
.actions { display: flex; gap: 10px; margin-left: auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.table-wrap { overflow: auto; scrollbar-color: #445c6d #101920; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { padding: 17px 20px; background: #101920; border-bottom: 1px solid var(--line); color: #bdcbd6; font-size: 11px; text-transform: uppercase; letter-spacing: .2px; white-space: nowrap; }
td { padding: 18px 20px; border-bottom: 1px solid #2b3741; vertical-align: middle; line-height: 1.6; max-width: 340px; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #182c38; }
td:first-child { min-width: 206px; }
.cell-main { display: block; font-weight: 600; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.mono { font-family: "Cascadia Code",Consolas,monospace; }
.warning { color: #ffd18a; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border: 1px solid #3a4b58; border-radius: 4px; background: #1d2b35; color: #b7c5d0; white-space: nowrap; }
.badge.good { color: #8ee2be; background: #16352c; border-color: #315a4b; }
.badge.warn { color: #ffd18a; background: #382d1d; border-color: #695234; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.error { margin: 16px 0; padding: 12px 14px; border: 1px solid #71424d; border-radius: 6px; background: #331d26; color: #ffafb6; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.version-panel { padding: 20px; margin-bottom: 20px; }
.version-heading { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.version-heading h2 { font-size: 17px; margin: 0; }
.version-target { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.version-target label { color: var(--muted); font-size: 13px; }
.version-target select { font: inherit; color: #f4f7ff; background: #101920; border: 1px solid var(--line); border-radius: 6px; padding: 10px; min-height: 44px; max-width: 100%; }
.version-target select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.version-counts { display: flex; flex-wrap: wrap; gap: 20px 32px; margin: 20px 0; }
.version-counts div { flex: 1 1 210px; }
.version-counts dt { color: var(--muted); font-size: 13px; line-height: 1.6; }
.version-counts dd { color: var(--cyan); margin: 4px 0 0; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.version-distribution { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 16px 0; margin: 0; border-top: 1px solid var(--line); }
.version-distribution li { display: flex; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font-size: 13px; overflow-wrap: anywhere; }
.version-distribution strong { color: var(--cyan); font-variant-numeric: tabular-nums; }
#version-note { line-height: 1.6; }
@media(max-width:480px) { .version-panel { padding: 16px 14px; } .version-target, .version-target select { width: 100%; } .version-counts { gap: 16px; } }
.login-card .error { margin-bottom: 0; }
details { min-width: 240px; max-width: 380px; }
summary { cursor: pointer; color: var(--cyan); padding: 8px 0; }
summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.install { padding: 12px 0; border-top: 1px solid var(--line); }
.install-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.install-actions button, .log-download { min-height: 44px; }
.danger { border-color: #a25763; color: #ffafb6; }
.log-download { display: block; margin-top: 8px; text-align: left; width: 100%; }
[hidden] { display: none !important; }
.release-panel { min-width: 0; max-width: none; margin-bottom: 20px; }
.release-panel > summary { padding: 16px 20px; font-weight: 600; }
.release-content { padding: 0 20px 20px; }
.release-heading, .release-draft { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.release-heading h2 { font-size: 17px; margin: 0; }
.release-current { margin: 16px 0 8px; color: var(--cyan); overflow-wrap: anywhere; }
.release-help { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 850px; }
.release-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.release-upload label { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.release-upload input { padding: 8px; min-width: 0; max-width: 100%; background: #101920; }
.release-message { padding: 12px; margin: 12px 0; border-left: 2px solid var(--cyan); background: #101920; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.release-draft { padding: 16px 0; border-top: 1px solid var(--line); }
.release-draft h3 { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.release-draft .install-actions { margin-top: 0; }
.activation-panel { min-width: 0; max-width: none; margin-bottom: 20px; }
.activation-panel > summary { padding: 16px 20px; font-weight: 600; }
.activation-panel > summary .badge { margin-left: 8px; }
.activation-content { padding: 0 20px 20px; }
.activation-heading, .activation-request { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.activation-heading { align-items: center; }
.activation-heading h2, .activation-dialog h2 { font-size: 17px; margin: 0; }
.activation-help { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0; }
.activation-request { border-top: 1px solid var(--line); padding: 16px 0; }
.activation-identity { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.activation-identity h3 { font-size: 14px; margin: 0 0 8px; }
.activation-state { flex: 0 1 360px; min-width: 0; overflow-wrap: anywhere; }
.activation-dialog { width: min(560px,calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 24px; border: 1px solid var(--cyan); border-radius: 7px; color: #f4f7ff; background: var(--panel); }
.activation-dialog::backdrop { background: #080f14cc; }
#activation-dialog-identity { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; margin-top: 16px; }
.activation-dialog label { display: block; font-size: 13px; margin-bottom: 8px; }
.activation-dialog textarea { width: 100%; font: inherit; padding: 12px; color: #f4f7ff; background: #101920; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.activation-dialog textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.activation-dialog button, .activation-heading button { min-height: 44px; }
@media(max-width:480px) { .activation-content { padding: 0 14px 16px; } .activation-state { flex-basis: 100%; } .activation-state button { flex: 1; } .activation-dialog { padding: 16px; } .activation-dialog .install-actions button { width: 100%; } }
@media(max-width:480px) { .release-content { padding: 0 14px 16px; } .release-upload input, .release-upload button { width: 100%; } .release-draft .install-actions { width: 100%; } .release-draft button { flex: 1; } }
@media(max-width:700px) {
  .dashboard { padding: 18px 14px; }
  .topbar { flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
  .topbar .brand { font-size: 19px; gap: 9px; }
  .topbar .brand-logo { width: 38px; height: 38px; }
  .total { margin-left: auto; font-size: 13px; }
  .total strong { font-size: 21px; }
  .actions { width: 100%; margin: 0; }
  .actions button { flex: 1; }
  th, td { padding: 14px; }
}
@media(max-width:360px) {
  .login-screen { padding: 16px; } .login-card { padding: 24px; }
  .topbar .brand { font-size: 17px; } .total strong { margin-left: 3px; }
}
