@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #181512;
    --bg-overlay: rgba(19, 16, 14, 0.58);
    --card: rgba(39, 31, 26, 0.92);
    --card-border: rgba(214, 197, 179, 0.14);

    --text-main: #f3ece4;
    --text-soft: #d4c6b8;
    --text-muted: #a99887;

    --accent: #8a745f;
    --accent-hover: #745f4c;

    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body#pagina-login {
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    padding-top: 65px;
    background:
        linear-gradient(var(--bg-overlay), var(--bg-overlay)),
        url('../assets/PavosTruchasRia.jpeg') center center / cover no-repeat fixed;
}

.login-container {
    min-height: calc(100vh - 65px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px 72px;
}

.login-card {
    width: 100%;
    max-width: 560px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 42px 36px 34px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.4rem, 4vw, 3.35rem);
    line-height: 0.95;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.login-header h2 i {
    font-style: italic;
    color: #f0e3d5;
}

.login-header p {
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.7;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-soft);
}

.input-group input {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    padding: 0 16px;
    outline: none;
    transition: 0.25s ease;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    border-color: rgba(212, 198, 184, 0.34);
    box-shadow: 0 0 0 3px rgba(138, 116, 95, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.password-container {
    position: relative;
}

.password-container input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--text-main);
}

.login-options {
    display: flex;
    justify-content: flex-start;
    margin-top: -2px;
}

.login-options a,
.login-footer-text a {
    color: var(--text-soft);
    text-decoration: none;
    border-bottom: 1px solid rgba(243, 236, 228, 0.28);
    font-size: 0.86rem;
    transition: 0.2s ease;
}

.login-options a:hover,
.login-footer-text a:hover {
    color: var(--text-main);
    border-color: rgba(243, 236, 228, 0.6);
}

.btn-main,
.btn-google {
    width: 100%;
    min-height: 54px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    transition: 0.25s ease;
}

.btn-main {
    border: none;
    background: var(--accent);
    color: #fff;
}

.btn-main:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-google {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.btn-google img {
    width: 18px;
    height: 18px;
}

.separator {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 2px 0;
}

.separator::before,
.separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-message,
.auth-error-box {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.88rem;
}

.auth-message {
    background: rgba(116, 95, 76, 0.18);
    border: 1px solid rgba(212, 198, 184, 0.18);
    color: var(--text-soft);
}

.auth-error-box {
    background: rgba(140, 40, 40, 0.18);
    border: 1px solid rgba(255, 180, 180, 0.22);
    color: #ffd6d6;
}

.auth-error-box ul {
    padding-left: 18px;
}

.login-footer-text {
    text-align: center;
    margin-top: 24px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* MODAL REAL */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(9, 8, 7, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 5000;
}

.modal.activo {
    display: flex;
}

.modal-contenido {
    width: 100%;
    max-width: 480px;
    background: rgba(37, 30, 25, 0.98);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 28px 24px 24px;
    position: relative;
    box-shadow: var(--shadow);
}

.modal-contenido h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    margin-bottom: 8px;
}

.modal-contenido p {
    color: var(--text-soft);
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-contenido form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-contenido input {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    padding: 0 14px;
}

.cerrar-modal {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.6rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .login-card {
        max-width: 100%;
        padding: 32px 22px 26px;
    }

    .login-header h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body#pagina-login {
        background:
            linear-gradient(rgba(12, 10, 9, 0.76), rgba(12, 10, 9, 0.76)),
            url('/assets/PavosTruchasRia.jpeg') center center / cover no-repeat;
        background-attachment: scroll;
    }

    .login-container {
        padding: 24px 14px 42px;
    }

    .login-card {
        border-radius: 20px;
        padding: 26px 18px 22px;
    }

    .login-header h2 {
        font-size: 2.1rem;
    }

    .input-group input,
    .btn-main,
    .btn-google {
        min-height: 48px;
    }
}
