/* ------------------------------
   ESTILO GLOBAL – CYBERSECURE UI
---------------------------------*/

:root {
    --bg-dark: #0d0f17;
    --bg-card: rgba(255,255,255,0.06);
    --accent: #4f8cff;
    --accent-glow: #7aa7ff;
    --text-main: #ffffff;
    --text-muted: #c3c8d4;
    --focus-ring: #00eaff;
    --radius: 14px;
    --transition: 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0 16px;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ------------------------------
   HEADER
---------------------------------*/

#mainHeader {
    text-align: center;
    padding-top: 30px;
    margin-bottom: 25px;
    width: 100%;
}

#headerLogo {
    display: block;
    width: min(420px, 100%);
    margin: 0 auto;
    height: auto;
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

/* ------------------------------
   CONTENEDOR
---------------------------------*/
.container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: clamp(22px, 5vw, 40px);
    width: min(420px, 100%);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ------------------------------
   INPUTS
---------------------------------*/

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

input[type="file"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 3px rgba(0,234,255,0.3);
}

/* ------------------------------
   BOTONES (GRIS + GRIS OSCURO)
---------------------------------*/

.buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
}

button.primary {
    background: #6f6f6f;
}

button.primary:hover {
    background: #8a8a8a;
    box-shadow: 0 0 10px #8a8a8a;
}

button.secondary {
    background: #3a3a3a;
}

button.secondary:hover {
    background: #555555;
    box-shadow: 0 0 10px #555555;
}

.dashboard-link {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 24px;
    max-width: 100%;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
}

.dashboard-link:hover {
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
}

.dashboard-link:focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.logout-button {
    width: auto;
    max-width: 100%;
    margin-top: 16px;
    padding: 10px 22px;
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

.logout-button:hover {
    border-color: var(--focus-ring);
    color: var(--text-main);
    box-shadow: 0 0 10px var(--focus-ring);
}

.seo-content {
    width: min(760px, 100%);
    margin-top: 48px;
    padding: 0 8px;
    color: var(--text-muted);
    line-height: 1.7;
}

.seo-content h1,
.seo-content h2,
.seo-content h3 {
    color: var(--text-main);
    line-height: 1.3;
}

.seo-content h2 {
    font-size: clamp(24px, 4vw, 32px);
}

.seo-content h3 {
    margin-top: 28px;
    font-size: clamp(19px, 3vw, 24px);
}

.seo-content li {
    margin-bottom: 8px;
}

/* ------------------------------
   FOOTER AVANZADO
---------------------------------*/

#mainFooter {
    margin-top: 40px;
    padding: 20px 0;
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 0.5px;
    opacity: 0.85;
    overflow-wrap: anywhere;
    animation: footerGlow 3s infinite alternate;
}

#mainFooter p {
    margin: 4px 0;
}

.footer-security {
    margin-top: 12px;
}

.securityLink {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--focus-ring);
    border-radius: 8px;
    color: var(--focus-ring);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.securityLink:hover,
.securityLink:focus {
    background: var(--focus-ring);
    color: var(--bg-dark);
    box-shadow: 0 0 12px var(--focus-ring);
}

.securityLink:focus {
    outline: 3px solid var(--accent-glow);
    outline-offset: 3px;
}

@keyframes footerGlow {
    from { text-shadow: 0 0 4px #4f8cff; }
    to { text-shadow: 0 0 12px #7aa7ff; }
}

/* ------------------------------
   ACCESIBILIDAD
---------------------------------*/

button:focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
 
/* ------------------------------
   DASHBOARD – Lista de archivos
---------------------------------*/

.file-list {
    margin-top: 20px;
    text-align: left;
}

.file-item {
    background: rgba(255,255,255,0.08);
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.file-item:hover {
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 10px #4f8cff;
}

.file-name {
    font-size: 15px;
    color: var(--text-main);
    min-width: 0;
    overflow-wrap: anywhere;
}

.file-actions {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.file-actions button {
    width: auto;
    min-width: 104px;
    margin-left: 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

/* Descargar */
.file-actions .download {
    background: rgba(79, 140, 255, 0.14);
    border-color: var(--accent);
    color: var(--accent-glow);
}

.file-actions .download:hover {
    background: var(--accent);
    color: var(--text-main);
    box-shadow: 0 0 14px var(--accent-glow);
}

/* Eliminar */
.file-actions .delete {
    background: rgba(255, 74, 99, 0.12);
    border-color: #ff4a63;
    color: #ff8b9b;
}

.file-actions .delete:hover {
    background: #c9364d;
    color: var(--text-main);
    box-shadow: 0 0 14px rgba(255, 74, 99, 0.7);
}

.file-actions button:focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .file-item {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .file-actions {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .file-actions button {
        flex: 1;
        min-width: 0;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0 10px;
    }

    #mainHeader {
        padding-top: 18px;
        margin-bottom: 18px;
    }

    .container {
        padding: 20px 16px;
    }

    .buttons {
        flex-direction: column;
    }

    .dashboard-link {
        width: 100%;
    }

    .logout-button {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .container {
        width: min(680px, 100%);
    }
}

