/* =========================================================
   BESTLAB LOGIN
   ========================================================= */

html,
body {
    min-height: 100%;
}

body.page-boxed.login-page {
    margin: 0;
    min-height: 100vh;
    background: #f3f6f8;
    font-family: "Segoe UI", Arial, sans-serif;
}

body.page-boxed.login-page:before {
    content: "";
    position: fixed;
    inset: 0;
    background: #f3f6f8;
    z-index: 0;
}

/* =========================================================
   HERO
   ========================================================= */

.login-hero {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #8bc4b9 0%, #71b8bf 100%);
}

.login-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.02);
    z-index: 1;
}

.login-hero__particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 14% 20%, rgba(255,255,255,0.75) 0 2px, transparent 3px),
        radial-gradient(circle at 23% 55%, rgba(255,255,255,0.35) 0 1.5px, transparent 3px),
        radial-gradient(circle at 48% 14%, rgba(255,255,255,0.45) 0 1.5px, transparent 3px),
        radial-gradient(circle at 66% 27%, rgba(255,255,255,0.75) 0 2px, transparent 3px),
        radial-gradient(circle at 81% 18%, rgba(255,255,255,0.40) 0 1.5px, transparent 3px),
        radial-gradient(circle at 93% 23%, rgba(255,255,255,0.65) 0 2px, transparent 3px);
    opacity: 0.85;
}

.login-hero__content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding-top: 34px;
}

.login-hero__logo {
    width: 100%;
    max-width: 430px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-hero__curve {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 88px;
    background: #f3f6f8;
    border-top-left-radius: 55% 100%;
    border-top-right-radius: 55% 100%;
    z-index: 2;
}

/* =========================================================
   WRAPPER
   ========================================================= */

#sign-wrapper {
    width: 460px;
    margin: -72px auto 0;
    position: relative;
    z-index: 10;
    padding-top: 0;
    height: auto;
}

body.page-boxed #sign-wrapper {
    background: transparent;
}

body.page-boxed #sign-wrapper form {
    width: 100%;
    margin: 0 auto;
}

#sign-wrapper .brand {
    display: none;
}

/* =========================================================
   CARD
   ========================================================= */

#sign-wrapper form {
    background: #ffffff;
    border: 1px solid #dbe5e9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(23, 56, 67, 0.12);
}

/* =========================================================
   HEADER CARD
   ========================================================= */

.sign-header {
    background: linear-gradient(135deg, #8bc4b9, #8bc4b9);
    padding: 18px 20px;
    margin-bottom: 0;
    border-bottom: none;
}

.sign-text {
    position: relative;
    display: block;
    margin: 0;
    text-align: center;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.sign-text:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255,255,255,0.25);
}

.sign-text span {
    position: relative;
    display: inline-block;
    padding: 0 14px;
    background: linear-gradient(135deg, #8bc4b9, #71b8bf);
    color: #ffffff;
}

/* =========================================================
   BODY / FOOTER
   ========================================================= */

.sign-body {
    background: #f8fbfc;
    padding: 22px 22px 10px;
}

.sign-footer {
    background: #ffffff;
    padding: 16px 22px 22px;
    border-top: 1px solid #edf3f5;
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */

#login-form .form-group {
    margin: 0 0 14px 0;
    padding: 0;
}

#login-form label,
#login-form .control-label {
    display: block;
    margin-bottom: 6px;
    color: #586b73;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

#login-form .form-control,
#login-form input[type="text"],
#login-form input[type="password"],
#login-form input[type="email"] {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 48px;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px !important;
    box-sizing: border-box;
}

#login-form input[type="text"]:focus,
#login-form input[type="password"]:focus,
#login-form input[type="email"]:focus,
#login-form select:focus,
#login-form .form-control:focus {
    border-color: #2d8aa8 !important;
    box-shadow: none !important;
}

#login-form input::placeholder {
    color: #93a5ad;
}

/* errori */
#login-form .help-block,
#login-form .error,
#login-form .invalid-feedback {
    position: static !important;
    display: block;
    margin-top: 5px;
    margin-bottom: 0;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #e45b52 !important;
    font-size: 12px;
    line-height: 1.4;
}

/* reset eventuali colonne bootstrap di activeform */
#login-form .col-sm-3,
#login-form .col-sm-6,
#login-form .col-sm-9,
#login-form .col-md-3,
#login-form .col-md-6,
#login-form .col-md-9,
#login-form .col-lg-3,
#login-form .col-lg-6,
#login-form .col-lg-9,
#login-form .col-lg-12 {
    width: 100%;
    float: none;
    padding-left: 0;
    padding-right: 0;
}

/* =========================================================
   LINKS / BUTTONS
   ========================================================= */

#sign-wrapper a {
    color: #1f7d99;
    text-decoration: none;
}

#sign-wrapper a:hover {
    color: #155c72;
    text-decoration: underline;
}

#sign-wrapper .btn,
#sign-wrapper .btn-theme,
#sign-wrapper input[type="submit"],
#sign-wrapper button {
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #2396b3, #1f7d99);
    color: #ffffff;
    box-shadow: none;
}

#sign-wrapper .btn:hover,
#sign-wrapper .btn-theme:hover,
#sign-wrapper input[type="submit"]:hover,
#sign-wrapper button:hover {
    background: linear-gradient(135deg, #8bc4b9, #71b8bf);
    color: #ffffff;
}

#login-form .btn-lg,
#login-form .btn-block {
    width: 100%;
    height: 46px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    display: block;
}
/* =========================================================
   REMEMBER / RECOVER
   ========================================================= */

.login-row {
    margin-bottom: 14px;
}

.login-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.login-remember {
    flex: 1 1 auto;
}

.login-recover {
    flex: 0 0 auto;
    padding-top: 6px;
}

.ckbox,
.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ckbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.ckbox label {
    margin: 0;
    font-size: 13px;
    color: #6f8188;
}

#login-form .field-loginform-rememberme {
    margin-bottom: 0;
}

/* =========================================================
   EXTRA FOOTER
   ========================================================= */

.login-extra {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #edf3f5;
}

.login-extra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.login-lang-flags {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-flag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    padding: 1px;
    border: 1px solid #cddbe0;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    opacity: 0.6;
    text-decoration: none !important;
    overflow: hidden;
}

.login-flag-btn:hover {
    opacity: 1;
    border-color: #2396b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(35, 150, 179, 0.25);
}

.login-flag-btn.active {
    opacity: 1;
    border-color: #1f7d99;
    box-shadow: 0 0 0 2px rgba(31, 125, 153, 0.35);
}

.login-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.login-lang {
    flex: 0 0 34%;
}

.login-lang-submit {
    flex: 0 0 44px;
    text-align: center;
}

.login-home {
    flex: 1 1 auto;
    text-align: right;
}

.login-language-select {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #cddbe0;
    border-radius: 6px;
    background: #ffffff;
    color: #42545c;
    font-size: 13px;
}

.login-lang-btn {
    width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0;
    text-align: center;
    border-radius: 6px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 520px) {
    .login-hero {
        height: 220px;
    }

    .login-hero__content {
        padding-top: 28px;
    }

    .login-hero__logo {
        max-width: 300px;
    }

    .login-hero__curve {
        height: 62px;
    }

    #sign-wrapper {
        width: 92%;
        margin-top: -58px;
    }

    .login-row-top,
    .login-extra-row {
        display: block;
    }

    .login-recover,
    .login-home,
    .login-lang,
    .login-lang-submit {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }

    .login-lang-btn {
        width: 100%;
    }
    
}


    .login-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    }

    .login-recover {
        padding-top: 0;
    }
    
    
    
    .login-extra-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-lang {
    flex: 1;
}

.login-language-select {
    height: 38px;
    border-radius: 8px;
}

.login-lang-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 14px;
}

.login-home {
    flex: 1;
    text-align: right;
    font-size: 13px;
}

#sign-wrapper form {
    box-shadow: 0 18px 45px rgba(23, 56, 67, 0.16);
}


/* =========================
   TWEAK FINALI
   ========================= */

/* hero un filo più compatta */
.login-hero {
    height: 230px;
}

.login-hero__content {
    padding-top: 26px;
}

.login-hero__logo {
    max-width: 360px;
}

.login-hero__curve {
    height: 74px;
}

/* card un po' più presente */
#sign-wrapper {
    width: 480px;
    margin: -58px auto 0;
}

#sign-wrapper form {
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(23, 56, 67, 0.14);
}

/* header card più elegante */
.sign-header {
    padding: 16px 22px;
    background: linear-gradient(135deg, #8bc4b9, #71b8bf);
}

.sign-text {
    font-size: 12px;
    letter-spacing: 0.12em;
}

/* body/footer un po' più ariosi */
.sign-body {
    padding: 24px 20px 10px;
}

.sign-footer {
    padding: 14px 20px 20px;
}

/* label più leggibili */
#login-form label,
#login-form .control-label {
    font-size: 14px;
    font-weight: 600;
    color: #556871;
}

/* input migliori */
#login-form .form-control,
#login-form input[type="text"],
#login-form input[type="password"],
#login-form input[type="email"] {
    height: 48px;
    border-radius: 8px !important;
    padding: 10px 14px;
    font-size: 14px;
}

/* errore un po' meno aggressivo */
#login-form .help-block,
#login-form .error,
#login-form .invalid-feedback {
    font-size: 12px;
    margin-top: 6px;
    color: #ef6a5b !important;
    font-style: italic;
}

/* riga remember / recover meglio allineata */
.login-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.login-remember {
    display: flex;
    align-items: center;
}

/* checkbox rifatta meglio */
#login-form .field-loginform-rememberme {
    margin-bottom: 0;
}

#login-form .checkbox,
#login-form .ckbox {
    margin: 0;
}

#login-form .checkbox label,
#login-form .ckbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    color: #667981;
    font-weight: 400;
    cursor: pointer;
}

#login-form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #258aa4;
}

/* link */
#sign-wrapper a {
    font-size: 14px;
}

/* bottone login più premium */
#login-form .btn-lg,
#login-form .btn-block,
#sign-wrapper .btn-theme {
    width: 100%;
    height: 46px;
    line-height: 46px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #8bc4b9, #71b8bf);
}

#login-form .btn-lg:hover,
#login-form .btn-block:hover,
#sign-wrapper .btn-theme:hover {
    background: linear-gradient(135deg, #248aa4, #1b6f88);
}

/* separazione footer lingua */
.login-extra {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e8eef1;
}

/* riga lingua */
.login-extra-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-lang {
    flex: 0 0 42%;
}

.login-lang-submit {
    flex: 0 0 40px;
}

.login-home {
    flex: 1 1 auto;
    text-align: right;
}

/* select lingua */
.login-language-select {
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    padding: 8px 12px;
}

/* bottone lingua con icona centrata */
.login-lang-btn {
    width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

/* se usi font-awesome sul bottone lingua */
.login-lang-btn:before {
    line-height: 40px;
}

/* mobile */
@media (max-width: 520px) {
    .login-hero {
        height: 200px;
    }

    .login-hero__logo {
        max-width: 260px;
    }

    .login-hero__curve {
        height: 56px;
    }

    #sign-wrapper {
        width: 92%;
        margin-top: -44px;
    }

    .login-row-top,
    .login-extra-row {
        display: block;
    }

    .login-recover,
    .login-home,
    .login-lang,
    .login-lang-submit {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }

    .login-lang-btn {
        width: 100%;
    }
}


.login-extra-row-single {
    justify-content: center;
}

.login-extra-row-single .login-home {
    width: 100%;
    text-align: center;
}

#reset-password-form .form-group {
    width: 100%;
    margin: 0 0 14px 0;
}

#reset-password-form .reset-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #556871;
}

#reset-password-form .reset-input,
#reset-password-form input[type="email"] {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 48px;
    padding: 10px 14px;
    border: 1px solid #cddbe0 !important;
    border-radius: 8px !important;
    box-sizing: border-box;
    background: #fff !important;
}

#reset-password-form .help-block {
    margin-top: 6px;
    font-size: 12px;
    color: #ef6a5b !important;
}