/* ====== GLOBAL ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}

body {
    background: #000;
    color: #fff;
}

/* ====== LOGIN ====== */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, #161616, #000);
}

.login-card {
    width: 360px;
    padding: 40px;
    border-radius: 26px;
    text-align: center;
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.login-logo {
    width: 110px;
    margin-bottom: 18px;
}

.login-subtitle {
    font-size: 12px;
    letter-spacing: .3em;
    margin-bottom: 22px;
    color: #dcdcdc;
}

.login-input {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #2b2b2b;
    background: #0d0d0d;
    color: #fff;
}

.login-btn {
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(145deg, #262626, #131313);
    border: 1px solid #3d3d3d;
    color: #fff;
    cursor: pointer;
    transition: .2s;
}

.login-btn:hover { transform: translateY(-3px); }

/* ====== DASHBOARD ====== */
.dash-container {
    padding: 50px;
    min-height: 100vh;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.dash-logo-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-title {
    font-size: 22px;
}

.dash-subtitle {
    font-size: 11px;
    letter-spacing: .2em;
    color: #aaa;
}

.dash-card {
    flex: 1 1 260px;
    max-width: 340px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(145deg, #151515, #0a0a0a);
    border: 1px solid rgba(255,255,255,.05);
    text-decoration: none;
    color: white;
    transition: .2s;
}

.dash-card:hover {
    transform: translateY(-6px);
}

/* ===== LOGO CHICO EN PAGINAS INTERNAS ===== */
.side-logo {
    position: fixed;
    top: 40%;
    right: 40px;
    width: 120px;
    opacity: 0.18;
    pointer-events: none;
}

.page-container {
    padding: 40px;
}
/* --- LOGO LATERAL PEQUEÑO --- */
.side-logo-container {
    position: absolute;
    top: 40px;
    right: 40px;
    opacity: 0.3;
}

.side-logo {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
    animation: fadeIn 1.2s ease;
}

/* Animación suave estilo Apple */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
/* ————— DESCARGAR ————— */

.download-wrapper {
    width: 100%;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 70px;
}

.download-header {
    text-align: center;
    margin-bottom: 40px;
}

.download-logo {
    width: 90px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.download-title {
    font-size: 14px;
    letter-spacing: 2px;
    color: #cfcfcf;
    font-weight: 300;
}

.download-form {
    width: 100%;
    max-width: 430px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.download-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #2d2d2d;
    background: #0f0f0f;
    color: #fff;
    outline: none;
    font-size: 15px;
    transition: 0.2s;
}

.download-input:focus {
    border-color: #444;
}

.download-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, #1a1a1a, #111);
    color: white;
    font-size: 14px;
    letter-spacing: .5px;
    cursor: pointer;
    transition: .25s ease;
}

.download-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(180deg, #222, #151515);
}
/* LOGIN PERFECTO COMO FOTO 2 */

.login-container {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, #121212, #000);
}

.login-card {
    width: 380px;
    padding: 45px;
    border-radius: 26px;
    background: rgba(20,20,20,0.45);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 40px 100px rgba(0,0,0,0.7);
    text-align: center;
    animation: fadeIn .7s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.login-logo {
    width: 90px;
    margin-bottom: 12px;
}

.login-title {
    color: white;
    font-size: 14px;
    letter-spacing: 0.5em;
    margin-bottom: 25px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-input {
    padding: 14px;
    border-radius: 12px;
    background: #0d0d0d;
    border: 1px solid #2b2b2b;
    color: white;
    font-size: 14px;
}

.login-btn {
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(145deg, #1f1f1f, #0c0c0c);
    border: 1px solid #3d3d3d;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.login-btn:hover {
    transform: translateY(-3px);
}

.login-error {
    color: #ff4444;
    font-size: 14px;
}
/* Animación global */
.fade-in {
    animation: fadeIn 0.7s ease-out forwards;
    opacity: 0;
}
@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.dash-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dash-logo {
    width: 55px;
    opacity: 0.9;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.2));
}

.dash-title {
    font-size: 26px;
    font-weight: 700;
    color: white;
}

.dash-subtitle {
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.7;
}

/* Usuario */
.dash-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
}

.dash-user {
    color: white;
    font-weight: bold;
}

.dash-logout {
    color: #999;
    text-decoration: none;
    transition: 0.2s;
}
.dash-logout:hover {
    color: white;
}

/* GRID */
.dash-grid {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    padding-bottom: 50px;
}

/* Tarjetas estilo Apple */
.dash-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 30px;
    width: 330px;
    border-radius: 25px;
    text-decoration: none;
    color: white;

    box-shadow:
        0 4px 10px rgba(0,0,0,0.3),
        inset 0 0 10px rgba(255,255,255,0.05);
    transition: 0.25s ease;
}

/* Efecto caro premium */
.apple-float {
    transform: translateY(0px);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}
.apple-float:hover {
    transform: translateY(-6px);
    box-shadow:
        0 10px 25px rgba(0,0,0,0.45),
        inset 0 0 15px rgba(255,255,255,0.07);
}

.dash-card h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 600;
}

.dash-card p {
    margin-top: 8px;
    opacity: 0.8;
    font-size: 14px;
}
/* ============================
   MODAL — SUPERPOSICIÓN APPLE
============================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: rgba(20,20,20,0.85);
    padding: 30px;
    width: 430px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);

    transform: scale(0.85);
    transition: 0.25s cubic-bezier(.25,.8,.25,1);
}

.modal-overlay.visible .modal-box {
    transform: scale(1);
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-cancel,
.btn-confirm {
    width: 48%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: #111;
    color: white;
    cursor: pointer;
}

.btn-confirm {
    background: linear-gradient(145deg, #1f1f1f, #0c0c0c);
}

.btn-cancel:hover,
.btn-confirm:hover {
    transform: translateY(-2px);
    transition: 0.2s;
}
/* ————— PROGRESO ————— */

.progress-wrapper {
    margin-top: 20px;
    text-align: center;
    animation: fadeIn .5s ease;
}

.progress-text {
    font-size: 14px;
    color: #ddd;
    margin-bottom: 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background: #4a9eff;
    border-radius: 10px;
    transition: width 0.2s ease;
}

/* oculto */
.hidden {
    display: none;
}
.hidden { display: none; }

/* Botón tarjetas como <button> */
.dash-card-button {
    border: none;
    background: none;
    text-align: left;
}

/* Rol admin */
.dash-role {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    margin-left: 6px;
}

/* VOLVER */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
}
.back-link:hover { color: #fff; }

/* Widgets abajo */
.widgets-row {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.widget-card {
    background: linear-gradient(145deg, #151515, #080808);
    border-radius: 24px;
    padding: 18px 18px 22px;
    border: 1px solid rgba(255,255,255,0.06);
}
.widget-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
}
.widget-card iframe {
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: 14px;
    background: #000;
}
.widget-news a {
    color: #fff;
    text-decoration: none;
}
.widget-news a:hover {
    text-decoration: underline;
}
.widget-note {
    font-size: 12px;
    opacity: .7;
    margin-top: 6px;
}

/* Modal EN DESARROLLO */
.np-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.np-modal-box {
    background: #101010;
    border-radius: 24px;
    padding: 28px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 28px 65px rgba(0,0,0,0.8);
}
.np-modal-box h2 {
    margin-bottom: 10px;
}
.np-small {
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 20px;
}

/* Tarjeta admin */
.admin-card {
    max-width: 480px;
    background: linear-gradient(145deg, #151515, #080808);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 24px 26px 30px;
}
.admin-help {
    font-size: 13px;
    opacity: .8;
    margin-bottom: 18px;
}
.flash-message {
    background: #12301f;
    border: 1px solid #1aff8a;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 14px;
}
.admin-radio-row {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 13px;
    margin: 10px 0 6px;
}
.admin-radio-row label {
    display: flex;
    align-items: center;
    gap: 4px;
}
.hidden { display: none !important; }
.widgets-row {
    margin-top: 80px !important;
    position: relative;
    z-index: 1;
}

.widget-card iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 14px;
    display: block;
    overflow: hidden;
}
/* ===== WIDGETS TV EN VIVO ===== */

.widgets-row {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-bottom: 40px;
    flex-wrap: wrap;
}

.widget-card {
    flex: 1 1 380px;
    max-width: 520px;
    border-radius: 22px;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 18px 45px rgba(0,0,0,0.7);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(135deg, #151515, #0b0b0b);
}

.widget-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #555;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.widget-title {
    margin-left: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: .8;
}

.widget-body iframe {
    width: 100%;
    height: 260px;
    border: none;
}

/* ===== CONFIG SWITCHES ===== */

.config-form {
    max-width: 520px;
}

.config-card {
    padding: 22px 20px;
    border-radius: 20px;
    background: rgba(18,18,18,0.9);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 22px;
}

.config-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.config-help {
    font-size: 13px;
    opacity: .7;
    margin-bottom: 18px;
}

.config-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
}

/* switch estilo iOS */
.config-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #333;
    position: relative;
    transition: .2s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    top: 3px;
    left: 4px;
    transition: .2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.config-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: #1ed760;
}

.config-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.config-save-btn {
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(145deg, #1f1f1f, #0e0e0e);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
}

.config-save-btn:hover {
    transform: translateY(-2px);
}
