:root {
    --bg: #f8fbfd;
    --surface: #ffffff;
    --primary: #0096ff;
    --primary-dark: #00337a;
    --primary-hover: #005fc4;
    --primary-soft: #e8f5ff;
    --text: #2c3e50;
    --muted: #6e8190;
    --border: #dfeaf1;
    --danger: #b94a55;
    --success: #317a59;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(0, 150, 255, .28); outline-offset: 2px; }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 64px; }
.container.narrow { width: min(720px, calc(100% - 32px)); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 max(24px, calc((100% - 1180px) / 2)); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: auto; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: #385674; text-decoration: none; font-size: .94rem; }
.nav-links a:hover { color: var(--primary-dark); }
.logout-form { display: inline-flex; }
.logout-form button { padding: 0; border: 0; background: none; color: #385674; font-size: .94rem; cursor: pointer; }
.logout-form button:hover { color: var(--primary-dark); }
.user-chip { padding: 7px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .84rem; }
.nav-toggle { display: none; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 12px; color: var(--text); }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; }
.muted { color: var(--muted); }
.eyebrow { display: block; margin-bottom: 10px; color: var(--primary-dark); font-size: .76rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.hero, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.hero { min-height: 180px; }
.hero p { max-width: 650px; font-size: 1.08rem; }
.page-heading h1 { font-size: clamp(1.9rem, 3vw, 2.65rem); }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; color: var(--primary-dark); font-size: .88rem; font-weight: 720; text-decoration: none; }
.back-link span { font-size: 1.15rem; line-height: 1; transition: transform .2s ease; }
.back-link:hover { color: var(--primary-hover); }
.back-link:hover span { transform: translateX(-3px); }

.panel, .category-card, .stats article, .video-card { background: var(--surface); border: 1px solid rgba(223, 234, 241, .9); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: clamp(20px, 4vw, 32px); }
.auth-container { padding-top: 16px; padding-bottom: 16px; }
.auth-shell { min-height: calc(100vh - 32px); display: grid; place-items: center; }
.auth-card { width: min(470px, 100%); padding: 42px 46px 44px; }
.auth-brand { display: flex; justify-content: center; padding-bottom: 30px; border-bottom: 1px solid #e6eef4; }
.auth-logo { display: block; width: min(255px, 76%); height: auto; }
.auth-intro { padding: 28px 0 24px; }
.auth-intro .eyebrow { margin-bottom: 12px; }
.auth-card h1 { margin-bottom: 10px; font-size: 2.2rem; }
.auth-intro p { max-width: 320px; margin-bottom: 0; line-height: 1.5; }
.auth-form { gap: 20px; }
.auth-form label { gap: 8px; }
.auth-form input { min-height: 46px; }
.auth-form .button { min-height: 46px; margin-top: 2px; }
.installer-container { padding-top: 10px; padding-bottom: 8px; }
.installer { margin: 0; padding: 22px 28px; }
.installer h1 { margin-bottom: 4px; font-size: clamp(1.8rem, 3.5vw, 2.3rem); }
.installer > .muted { margin-bottom: 12px; font-size: .92rem; }
.installer-logo { display: block; width: min(190px, 54%); height: auto; margin-bottom: 12px; }
fieldset { margin: 28px 0; padding: 22px; border: 1px solid var(--border); border-radius: 12px; }
legend { padding: 0 8px; font-weight: 720; }
.installer-wizard { margin-top: 16px; }
.installer-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px; background: #edf4f8; border-radius: 12px; }
.installer-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.installer-tabs button span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #dcecf8; color: #416681; font-size: .76rem; }
.installer-tabs button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.installer-tabs button.active span { background: var(--primary); color: var(--primary-dark); }
.installer-tabs button.complete span { background: #d7eee2; color: var(--success); }
.installer-step { margin: 10px 0 0; min-height: 310px; padding: 15px 18px; }
.installer-wizard.is-enhanced .installer-step { display: none; }
.installer-wizard.is-enhanced .installer-step.active { display: grid; gap: 10px; align-content: start; }
.installer-step input, .installer-step select { padding-top: 9px; padding-bottom: 9px; }
.step-description { margin: -6px 0 0; color: var(--muted); font-size: .86rem; }
.installer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.install-summary { display: grid; gap: 5px; margin-top: 12px; padding: 16px; border-radius: 10px; background: #f1f8fb; color: #466779; }
.install-summary span { font-size: .87rem; }

form { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #405767; font-size: .9rem; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #cfdde6; border-radius: 9px; background: #fff; padding: 11px 12px; color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: #a9c5d7; }
textarea { resize: vertical; }
small { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.button { display: inline-flex; justify-content: center; align-items: center; width: fit-content; min-height: 42px; padding: 10px 17px; border: 1px solid var(--primary-dark); border-radius: 9px; background: var(--primary-dark); color: #fff; font-weight: 720; text-decoration: none; box-shadow: 0 4px 12px rgba(0, 51, 122, .14); cursor: pointer; }
.button:hover { border-color: var(--primary-hover); background: var(--primary-hover); color: #fff; box-shadow: 0 7px 18px rgba(0, 95, 196, .22); transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.full { width: 100%; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: .82rem; }
.button.secondary { background: #fff; border-color: #b9d8ee; color: var(--primary-dark); box-shadow: none; }
.button.secondary:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.button.danger-bg { background: #fff; border-color: #e8c5c9; color: var(--danger); }
/* display:inline-flex gana sobre el display:none que el navegador da a [hidden]:
   sin esta regla, un botón con el atributo hidden se sigue viendo. */
.button[hidden] { display: none; }
.button-row, .actions { display: flex; align-items: center; gap: 12px; }
.actions form, .button-row form { display: inline-flex; }
.text-link { padding: 0; border: 0; background: none; color: var(--primary-dark); font-weight: 700; text-decoration: none; cursor: pointer; }
.text-link.danger, .danger { color: var(--danger); }
.text-link:disabled { color: #9baab4; cursor: not-allowed; }

.alert { margin: 16px 0; padding: 13px 15px; border-radius: 9px; font-size: .92rem; }
.alert-error { background: #fff1f2; border: 1px solid #f1d0d4; color: #8d3540; }
.alert-success { background: #edf8f2; border: 1px solid #cde8d9; color: var(--success); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.stats article { padding: 20px; }
.stats strong, .stats span { display: block; }
.stats strong { margin-bottom: 6px; font-size: 1.45rem; }
.stats span { color: var(--muted); font-size: .84rem; }

.search-section { margin: 24px 0 42px; }
.search-label { margin-bottom: 8px; }
.search-input { min-height: 54px; padding-left: 18px; border-radius: 12px; font-size: 1rem; box-shadow: var(--shadow); }
.search-results { display: grid; gap: 1px; margin-top: 8px; overflow: hidden; border-radius: 10px; box-shadow: var(--shadow); }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--border); text-decoration: none; }
.search-result:hover { background: #f5fafd; }
.search-result strong, .search-result small { display: block; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { margin: 0; }
.section-heading span { color: var(--muted); font-size: .88rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.category-card { min-height: 210px; padding: 24px; text-decoration: none; }
.category-card:hover { border-color: #bcd5e5; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(49, 89, 117, .08); }
.category-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 28px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
.category-card p { min-height: 40px; color: var(--muted); font-size: .9rem; }
.count { color: var(--primary-dark); font-size: .82rem; font-weight: 700; }

.dashboard-page { margin-top: -12px; }
.dashboard-page .stats { gap: 12px; margin-bottom: 20px; }
.dashboard-page .stats article { padding: 14px 18px; }
.dashboard-page .stats strong { margin-bottom: 2px; font-size: 1.25rem; }
.download-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); align-items: center; gap: 36px; margin-bottom: 18px; padding: 24px 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.download-header h1 { margin-bottom: 6px; font-size: clamp(1.9rem, 3vw, 2.5rem); }
.download-header p { margin-bottom: 0; }
.download-search { position: relative; }
.download-search .search-input { min-height: 50px; padding-left: 18px; background: #f8fbfe; box-shadow: none; }
.download-search .search-results { position: absolute; top: calc(100% + 7px); right: 0; left: 0; z-index: 10; margin: 0; box-shadow: none; }
.filter-status { display: block; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--muted); font-size: .8rem; }
.dashboard-message { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; font-size: .9rem; font-weight: 650; }
.dashboard-message[hidden] { display: none; }
.dashboard-message.success { border: 1px solid #cde8d9; background: #edf8f2; color: var(--success); }
.dashboard-message.error { border: 1px solid #f1d0d4; background: #fff1f2; color: #8d3540; }
.dashboard-message.info { border: 1px solid var(--border); background: #fff; color: var(--muted); }
.download-categories { display: grid; gap: 12px; }
.download-category { border-bottom: 1px solid var(--border); }
.download-category[hidden] { display: none; }
.download-category summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 20px; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 10px; background: #f0f5fa; color: var(--text); cursor: pointer; list-style: none; }
.download-category summary::-webkit-details-marker { display: none; }
.download-category[open] summary { background: #eaf4fd; }
.download-category.drop-target summary { outline: 2px solid rgba(0, 150, 255, .35); background: #e1f1ff; }
.download-category.drop-target .download-category-body { border-radius: 0 0 12px 12px; background: rgba(232, 245, 255, .55); }
.download-category-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #fff; color: var(--primary-dark); font-weight: 800; box-shadow: 0 1px 3px rgba(0, 51, 122, .08); }
.download-category-title { min-width: 0; }
.download-category-title strong, .download-category-title small { display: block; }
.download-category-title strong { font-size: 1.05rem; }
.download-category-title small { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 400; }
.download-count { min-width: 30px; padding: 4px 8px; border-radius: 999px; background: #dce7f2; color: var(--primary-dark); font-size: .75rem; font-weight: 750; text-align: center; }
.download-chevron { width: 9px; height: 9px; border-right: 2px solid #6e87a0; border-bottom: 2px solid #6e87a0; transform: rotate(45deg); transition: transform .2s ease; }
.download-category[open] .download-chevron { transform: rotate(225deg); }
.download-category-body { padding: 12px 10px 18px; }
.category-toolbar { display: flex; justify-content: flex-end; gap: 18px; margin-bottom: 10px; font-size: .8rem; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.download-card { position: relative; display: flex; flex-direction: column; min-height: 162px; padding: 15px 16px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.dashboard-page[data-file-move-url] .download-card { cursor: grab; }
.download-card:hover { border-color: #9bcff2; box-shadow: 0 8px 22px rgba(0, 51, 122, .08); transform: translateY(-2px); }
.download-card[hidden] { display: none; }
.download-card.is-dragging { opacity: .55; cursor: grabbing; transform: scale(.98); }
.download-card.is-moving { pointer-events: none; opacity: .72; }
.download-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.download-file-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-size: 1rem; font-weight: 800; }
.download-extension { flex: 0 0 auto; padding: 4px 7px; border-radius: 6px; background: #f0f4f8; color: #71869a; font-size: .66rem; font-weight: 800; letter-spacing: .04em; }
/* El nombre es lo unico que distingue una version de otra, asi que ocupa el
   ancho completo de la tarjeta y dispone de dos lineas antes de recortarse.
   La extension ya la anuncia la etiqueta, por eso no se repite en el nombre. */
.download-card strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; margin-top: 12px; overflow: hidden; font-size: .92rem; line-height: 1.32; overflow-wrap: anywhere; }
.download-card small { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.download-action { margin-top: auto; padding-top: 12px; color: var(--primary-dark); font-size: .78rem; font-weight: 750; }
/* Si aun con dos lineas el nombre no cabe, al pasar el cursor se muestra
   completo y con extension: es lo unico que distingue dos versiones del mismo
   ejecutable. */
.download-card[data-file-title]::after {
    content: attr(data-file-title);
    position: absolute;
    right: 8px; bottom: calc(100% - 4px); left: 8px;
    z-index: 6;
    padding: 8px 10px;
    border-radius: 8px;
    background: #10293f;
    box-shadow: 0 6px 18px rgba(0, 32, 64, .22);
    color: #fff;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .13s ease .3s, visibility 0s linear .43s;
}
.download-card[data-file-title]:hover::after,
.download-card[data-file-title]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transition: opacity .13s ease .3s, visibility 0s;
}
.download-card.is-dragging::after, .download-card.is-moving::after { content: none; }
.category-empty { margin: 8px 4px 4px; color: var(--muted); font-size: .88rem; text-align: center; }
/* Archivo cuyo registro existe pero el fichero ya no está en el disco: la
   tarjeta es un <span>, no un enlace, y debe verse claramente inerte. */
.download-card.is-unavailable { border-color: #efd7da; background: #fffafa; cursor: default; }
.download-card.is-unavailable:hover { border-color: #efd7da; box-shadow: var(--shadow); transform: none; }
.download-card.is-unavailable .download-file-icon { background: #f6e7e9; color: var(--danger); }
.download-card.is-unavailable strong, .download-card.is-unavailable small { color: #9a8085; }
.download-card.is-unavailable .download-action { color: var(--danger); }

.split-layout { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.5fr); align-items: start; gap: 20px; }
.list { display: grid; gap: 1px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item strong, .list-item small { display: block; }
.user-item { align-items: flex-start; }
.user-item details { width: min(270px, 50%); }
.user-item summary { color: var(--primary-dark); font-weight: 700; cursor: pointer; text-align: right; }
.user-item details form { margin-top: 14px; }
.user-item .button-row { margin-top: 12px; justify-content: flex-end; }
.upload-panel { max-width: 720px; }
.restore-target { padding: 16px 18px; border: 1px solid #d8e7f3; border-radius: 11px; background: var(--primary-soft); }
.restore-target strong { display: block; margin: 2px 0 8px; font-size: 1.02rem; overflow-wrap: anywhere; }
.restore-target p { margin: 0 0 6px; font-size: .85rem; }
.restore-target p:last-child { margin-bottom: 0; }
.file-drop { padding: 24px; border: 1px dashed #a9c5d7; border-radius: 12px; background: #f9fcfe; }
.file-drop span { color: var(--muted); font-weight: 400; }
.upload-progress { display: grid; gap: 9px; }
.upload-bar { overflow: hidden; height: 12px; border-radius: 999px; background: #e6eef5; }
.upload-bar-fill { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--primary-dark); transition: width .4s ease; }
/* Mientras la carga avanza, el relleno se mueve siempre, aunque el porcentaje
   todavía no cambie: el usuario nunca ve la barra congelada. */
.upload-progress.is-active .upload-bar-fill {
    background-image: linear-gradient(100deg, var(--primary-dark) 0%, var(--primary) 42%, #8ccdf7 50%, var(--primary) 58%, var(--primary-dark) 100%);
    background-size: 220% 100%;
    animation: upload-sheen 1.4s linear infinite;
}
.upload-progress.is-done .upload-bar-fill { background: var(--success); background-image: none; animation: none; }
.upload-progress.is-error .upload-bar-fill { background: var(--danger); background-image: none; animation: none; }
.upload-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .82rem; }
.upload-progress-meta strong { color: var(--primary-dark); font-size: .95rem; }
@keyframes upload-sheen { from { background-position: 220% 0; } to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) {
    .upload-progress.is-active .upload-bar-fill { animation: none; }
}

.table-panel { padding: 0; overflow: hidden; }
.file-table { overflow-x: auto; }
.file-row { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(120px, 1fr) 100px 110px minmax(180px, auto); align-items: center; gap: 16px; min-width: 870px; padding: 17px 22px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.file-row:last-child { border-bottom: 0; }
.file-head { background: #f3f8fb; color: var(--muted); font-size: .75rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.file-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-type { flex: none; min-width: 42px; padding: 5px 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-dark); font-size: .68rem; font-weight: 800; text-align: center; }
.file-row.is-missing { background: #fffafa; }
.file-row.is-missing .file-type { background: #f6e7e9; color: var(--danger); }
.missing-badge { flex: none; padding: 3px 7px; border-radius: 5px; background: #f6e7e9; color: var(--danger); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.public-badge { flex: none; padding: 3px 7px; border-radius: 5px; background: #e6f4ec; color: var(--success); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.public-badge[hidden], .text-link[hidden] { display: none; }
.share-url { display: block; width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.orphan-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.orphan-notice p { margin: 5px 0 0; font-size: .86rem; }
.orphan-notice form { flex: none; }
.empty-state { padding: 62px 24px; color: var(--muted); text-align: center; }
.empty-state .button { margin-top: 12px; }

.video-card { padding: 18px; }
.video-player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 10px; background: #071017; color: #fff; }
.video-player video { width: 100%; height: 100%; object-fit: contain; }
.video-center-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 70px; height: 70px; padding-left: 6px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(10,24,33,.72); color: #fff; font-size: 1.7rem; cursor: pointer; backdrop-filter: blur(8px); }
.video-player.is-playing .video-center-play { opacity: 0; pointer-events: none; }
.video-controls { position: absolute; right: 0; bottom: 0; left: 0; padding: 28px 16px 12px; background: linear-gradient(transparent, rgba(3,10,15,.88)); }
.video-timeline { position: relative; height: 16px; }
.video-timeline::before, .video-buffer, .video-progress { position: absolute; top: 7px; left: 0; height: 3px; border-radius: 4px; content: ""; }
.video-timeline::before { width: 100%; background: rgba(255,255,255,.25); }
.video-buffer { width: 0; background: rgba(255,255,255,.45); }
.video-progress { width: 0; background: var(--primary); }
.video-timeline input { position: absolute; inset: 0; z-index: 2; height: 16px; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.video-control-row { display: flex; align-items: center; gap: 10px; }
.video-control-row button, .video-control-row select { width: auto; min-width: 36px; padding: 5px 7px; border: 0; border-radius: 5px; background: transparent; color: #fff; cursor: pointer; }
.video-control-row select { background: #172731; }
.video-control-row button:hover { background: rgba(255,255,255,.14); }
.volume { width: 90px; padding: 0; accent-color: var(--primary); }
.video-time { font-size: .78rem; font-variant-numeric: tabular-nums; }
.control-spacer { flex: 1; }
.player-help { margin: 13px 4px 0; color: var(--muted); font-size: .82rem; }

@media (max-width: 850px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .split-layout { grid-template-columns: 1fr; }
    .nav-toggle { display: block; }
    .nav-links { position: absolute; top: 66px; right: 16px; display: none; width: min(280px, calc(100% - 32px)); padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 35px rgba(44,62,80,.12); }
    .nav-links.open { display: grid; }
    .download-header { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 580px) {
    .container { width: min(100% - 22px, 1180px); padding-top: 24px; }
    .hero, .page-heading { align-items: flex-start; flex-direction: column; }
    .hero { min-height: auto; margin: 28px 0; }
    .stats, .card-grid, .form-grid { grid-template-columns: 1fr; }
    .auth-card, .panel { padding: 22px; }
    .auth-card { padding: 30px 26px 32px; }
    .auth-brand { padding-bottom: 22px; }
    .auth-intro { padding: 22px 0 20px; }
    .auth-card h1 { font-size: 1.9rem; }
    .brand img { height: 25px; }
    .installer { padding: 20px 18px; }
    .installer h1 { font-size: 1.85rem; }
    .installer-logo { width: min(210px, 70%); }
    .installer-tabs button { gap: 0; font-size: 0; }
    .installer-tabs button span { font-size: .76rem; }
    .installer-step { min-height: 390px; padding: 16px; }
    .category-card { min-height: 185px; }
    .dashboard-page { margin-top: 0; }
    .dashboard-page .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .dashboard-page .stats article { padding: 12px 14px; }
    .download-header { padding: 20px; }
    .download-category summary { grid-template-columns: 34px minmax(0, 1fr) auto 16px; padding: 10px; }
    .download-category-title small { display: none; }
    .category-toolbar { justify-content: flex-start; flex-wrap: wrap; }
    .download-grid { grid-template-columns: 1fr; }
    .user-item { display: grid; }
    .user-item details { width: 100%; }
    .user-item summary { text-align: left; }
    .video-card { padding: 6px; }
    .volume, .video-time, [data-action="pip"] { display: none; }
    .video-controls { padding-right: 8px; padding-left: 8px; }
}
