/* ==========================================================
   HOSTINGROUP MAIL - LOGIN FINAL
   ========================================================== */

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 100% !important;
}

body.task-login {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f4f9fd !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Oculta elementos originales de Roundcube */
body.task-login h1.voice,
body.task-login #layout-sidebar,
body.task-login #layout-menu,
body.task-login #taskmenu,
body.task-login #topnav,
body.task-login #login-footer,
body.task-login .watermark {
    display: none !important;
}

body.task-login #layout,
body.task-login #layout-content,
body.task-login #layout-content > .frame-content {
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Contenedor principal */
#hg-login-page {
    width: 100%;
    height: 100vh;
    min-height: 720px;
    display: grid;
    grid-template-columns: minmax(620px, 58%) minmax(460px, 42%);
    background:
        radial-gradient(circle at 8% 10%, rgba(0, 174, 239, 0.22), transparent 26%),
        radial-gradient(circle at 92% 88%, rgba(0, 119, 200, 0.15), transparent 30%),
        linear-gradient(135deg, #f7fbff 0%, #edf7fc 50%, #ffffff 100%);
    color: #172331;
}

/* LADO IZQUIERDO */
.hg-left {
    position: relative;
    overflow: hidden;
}

.hg-left-content {
    position: relative;
    height: 100%;
    padding: 48px 58px;
    box-sizing: border-box;
}

.hg-top-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 5;
}

.hg-top-brand img {
    width: 245px;
    height: auto;
    display: block;
}

.hg-domain-badge {
    color: #0077c8;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 119, 200, 0.12);
    box-shadow: 0 12px 28px rgba(15, 41, 64, 0.08);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.hg-copy {
    position: relative;
    z-index: 5;
    max-width: 640px;
    margin-top: 76px;
}

.hg-badge {
    display: inline-flex;
    color: #0077c8;
    background: rgba(0, 174, 239, 0.10);
    border: 1px solid rgba(0, 174, 239, 0.24);
    border-radius: 999px;
    padding: 10px 17px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 24px;
}

.hg-copy h1 {
    margin: 0;
    color: #172331;
    font-size: clamp(46px, 5vw, 72px);
    line-height: 1.02;
    letter-spacing: -2px;
    font-weight: 900;
}

.hg-copy h1 span {
    color: #00a6e8;
}

.hg-copy p {
    max-width: 570px;
    margin: 26px 0 0;
    color: #5d7488;
    font-size: 18px;
    line-height: 1.65;
}

.hg-features {
    position: relative;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hg-features div {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.88);
    color: #26394a;
    border: 1px solid rgba(0, 119, 200, 0.10);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: 0 14px 34px rgba(15, 41, 64, 0.08);
}

.hg-features span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #00aeef;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
}

/* Ilustración */
.hg-visual {
    position: absolute;
    left: 56%;
    bottom: 58px;
    width: 460px;
    height: 255px;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.92;
}

.hg-visual::before {
    content: "";
    position: absolute;
    inset: 20px 0 0;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.18), transparent 68%);
    filter: blur(8px);
}

.hg-laptop {
    position: absolute;
    left: 24px;
    bottom: 22px;
    width: 280px;
    height: 170px;
    border-radius: 20px 20px 12px 12px;
    background: #d6e3ec;
    box-shadow: 0 30px 58px rgba(15, 41, 64, 0.22);
}

.hg-screen {
    position: absolute;
    left: 18px;
    top: 16px;
    width: 244px;
    height: 126px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0077c8 0%, #00aeef 100%);
    overflow: hidden;
}

.hg-screen::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -80px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.hg-envelope {
    position: absolute;
    width: 82px;
    height: 54px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(15, 41, 64, 0.16);
    z-index: 2;
}

.hg-envelope::before,
.hg-envelope::after {
    content: "";
    position: absolute;
    top: 17px;
    width: 44px;
    height: 3px;
    background: #00aeef;
}

.hg-envelope::before {
    left: 7px;
    transform: rotate(28deg);
}

.hg-envelope::after {
    right: 7px;
    transform: rotate(-28deg);
}

.hg-base {
    position: absolute;
    left: -24px;
    bottom: -24px;
    width: 328px;
    height: 38px;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(180deg, #c8d6e0, #aebfcc);
}

.hg-server {
    position: absolute;
    right: 38px;
    bottom: 34px;
    width: 90px;
    height: 146px;
    border-radius: 18px;
    background: linear-gradient(180deg, #1d3448, #102337);
    box-shadow: 0 28px 50px rgba(15, 41, 64, 0.25);
}

.hg-server i {
    display: block;
    height: 12px;
    margin: 21px 16px;
    border-radius: 999px;
    background: rgba(0, 174, 239, 0.78);
    box-shadow: 0 0 14px rgba(0, 174, 239, 0.55);
}

.hg-float {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: #fff;
    color: #0077c8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(15, 41, 64, 0.15);
    border: 1px solid rgba(0, 119, 200, 0.08);
}

.hg-float-1 {
    left: 12px;
    top: 12px;
}

.hg-float-2 {
    left: 238px;
    top: 22px;
}

.hg-float-3 {
    left: 320px;
    top: 90px;
    background: #00aeef;
    color: #fff;
}

/* LADO DERECHO */
.hg-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 58px 42px 18px;
    box-sizing: border-box;
}

.hg-card {
    width: 100%;
    max-width: 470px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 119, 200, 0.10);
    border-radius: 30px;
    padding: 42px 44px 34px;
    box-sizing: border-box;
    box-shadow: 0 34px 90px rgba(15, 41, 64, 0.18);
}

.hg-card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.hg-card-logo img {
    width: 215px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Si tu logo es blanco, este fondo azul evita que desaparezca */
.hg-card-logo {
    background: linear-gradient(135deg, #0077c8, #00aeef);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 16px 36px rgba(0, 119, 200, 0.18);
}

.hg-card-title {
    text-align: center;
    margin-bottom: 28px;
}

.hg-card-title h2 {
    margin: 0;
    color: #172331;
    font-size: 27px;
    line-height: 1.22;
    letter-spacing: -0.6px;
    font-weight: 900;
}

.hg-card-title p {
    margin: 11px auto 0;
    max-width: 360px;
    color: #647b8e;
    font-size: 15px;
    line-height: 1.55;
}

/* FORMULARIO REAL DE ROUNDCUBE */
body.task-login form#login-form,
body.task-login form.hg-form {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.task-login form#login-form table,
body.task-login form.hg-form table {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse !important;
}

body.task-login form#login-form tbody,
body.task-login form#login-form tr,
body.task-login form#login-form td,
body.task-login form.hg-form tbody,
body.task-login form.hg-form tr,
body.task-login form.hg-form td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

body.task-login form#login-form td.title,
body.task-login form.hg-form td.title {
    color: #26394a !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0 0 8px !important;
    text-align: left !important;
}

body.task-login form#login-form td.input,
body.task-login form.hg-form td.input {
    margin: 0 0 17px !important;
}

body.task-login form#login-form input[type="text"],
body.task-login form#login-form input[type="password"],
body.task-login form#login-form input[type="email"],
body.task-login form.hg-form input[type="text"],
body.task-login form.hg-form input[type="password"],
body.task-login form.hg-form input[type="email"] {
    display: block !important;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    border-radius: 15px !important;
    border: 1px solid #d7e6ef !important;
    background: #f8fbfd !important;
    color: #172331 !important;
    font-size: 15px !important;
    padding: 0 15px !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
}

body.task-login form#login-form input[type="text"]:focus,
body.task-login form#login-form input[type="password"]:focus,
body.task-login form#login-form input[type="email"]:focus,
body.task-login form.hg-form input[type="text"]:focus,
body.task-login form.hg-form input[type="password"]:focus,
body.task-login form.hg-form input[type="email"]:focus {
    border-color: #00aeef !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.14) !important;
}

body.task-login form#login-form .formbuttons,
body.task-login form#login-form p.formbuttons,
body.task-login form.hg-form .formbuttons,
body.task-login form.hg-form p.formbuttons {
    display: block !important;
    width: 100% !important;
    margin: 22px 0 0 !important;
    padding: 0 !important;
    text-align: initial !important;
}

body.task-login form#login-form button,
body.task-login form#login-form input[type="submit"],
body.task-login form#login-form input.button,
body.task-login form#login-form .button,
body.task-login form#login-form .mainaction,
body.task-login form.hg-form button,
body.task-login form.hg-form input[type="submit"],
body.task-login form.hg-form input.button,
body.task-login form.hg-form .button,
body.task-login form.hg-form .mainaction {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #00aeef 0%, #0077c8 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    text-align: center !important;
    box-shadow: 0 16px 34px rgba(0, 119, 200, 0.30) !important;
    cursor: pointer !important;
    text-shadow: none !important;
}

body.task-login form#login-form button:hover,
body.task-login form#login-form input[type="submit"]:hover,
body.task-login form.hg-form button:hover,
body.task-login form.hg-form input[type="submit"]:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.hg-support {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5eff6;
    text-align: center;
    color: #647b8e;
    font-size: 14px;
}

.hg-support a {
    color: #0077c8;
    font-weight: 800;
    text-decoration: none;
}

.hg-bottom {
    margin: 24px auto 0;
    text-align: center;
    color: #768b9b;
    font-size: 13px;
}

/* Mensajes de error */
body.task-login #message,
body.task-login .message,
body.task-login .error,
body.task-login .warning {
    border-radius: 14px !important;
    margin: 0 0 18px !important;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    body.task-login {
        overflow: auto !important;
    }

    #hg-login-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        height: auto;
        padding: 28px 16px;
        box-sizing: border-box;
    }

    .hg-left {
        display: none;
    }

    .hg-right {
        width: 100%;
        max-width: 480px;
        padding: 0;
    }

    .hg-card {
        max-width: 100%;
        padding: 34px 26px 28px;
        border-radius: 24px;
    }

    .hg-card-title h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .hg-card {
        padding: 30px 20px 26px;
    }

    .hg-card-logo img {
        width: 195px;
    }

    .hg-card-title h2 {
        font-size: 22px;
    }

    .hg-card-title p {
        font-size: 14px;
    }
}