/* ======== ESTILOS GENERALES ======== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html, body {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #0e9e85, #0b745e);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======== CONTENEDOR PRINCIPAL ======== */

.container {
    width: 950px;
    height: 600px;
    background: #fff;
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    animation: fadeIn .9s ease-out;
}

/* Animación */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======== PANEL IZQUIERDO ======== */

.side-panel {
    width: 50%;
    background-image: url('../img/GifKomplet.gif');
    background-size: cover;
    background-position: center;
    position: relative;
}

.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.0);
}

.side-logo {
    width: 70%;
    position: absolute;
    top: 20%;
    left: 15%;
    filter: brightness(1000%);
}

.side-text {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: #fff;
    font-size: 18px;
    width: 80%;
    line-height: 1.4;
}

/* ======== LOGIN BOX ======== */

.login-box {
    width: 50%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-logo {
    width: 55%;
    margin: 0 auto 40px auto;
    display: block;
}

/* ======== INPUTS ======== */

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: none;
    border-bottom: 2px solid #ccc;
    outline: none;
    transition: 0.3s;
}

.input-group input:focus {
    border-bottom: 2px solid #0e9e85;
}

.input-group label {
    position: absolute;
    top: 14px;
    left: 5px;
    font-size: 16px;
    color: #777;
    transition: 0.3s;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:valid + label {
    font-size: 12px;
    top: -10px;
    color: #0e9e85;
}

/* Feedback visual conservado de la validacion existente (has-error / has-success) */
.input-group.has-error input {
    border-bottom-color: #e74c3c;
}

.input-group.has-error label {
    color: #e74c3c;
}

.input-group.has-success input {
    border-bottom-color: #0e9e85;
}

/* ======== BOTÓN LOGIN ======== */

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #0e9e85, #0b745e);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    opacity: 0.85;
}

/* ======== EXTRAS ======== */

.extras {
    text-align: center;
    margin-top: 25px;
}

.extras a {
    color: #0e9e85;
    text-decoration: none;
}

.extras p {
    color: #777;
    margin-top: 15px;
    font-size: 13px;
}

.btn-sub {
    display: block;
    margin-top: 10px;
    border: 2px solid #0e9e85;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-sub:hover {
    background: #0e9e85;
    color: #fff;
}

/* ======== FOOTER ======== */

.footer {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #555;
}

/* ======== VALIDACION (popover de Bootstrap, sin bootstrap.css) ======== */

.popover {
    max-width: 230px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    font-size: 13px;
    line-height: 1.4;
    color: #c0392b;
    z-index: 1060;
}

.popover .arrow {
    display: none;
}

.popover-content {
    margin: 0;
}

/* ======== LOADER (Integuer) ======== */

#mask {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
}

.integuer-loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #0e9e85;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#loading-text {
    position: fixed;
    top: calc(45% + 80px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #f3f3f3;
    font-size: 20pt;
    font-weight: 900;
    white-space: nowrap;
}

/* ======== RESPONSIVE ======== */

@media (max-width: 900px) {

    .container {
        width: 90%;
        height: auto;
        flex-direction: column;
    }

    .side-panel {
        display: none;
    }

    .login-box {
        width: 100%;
        padding: 40px;
    }

    .main-logo {
        width: 60%;
    }
}
