body {
    background: #f1f1f1;
}

.vertical-align-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    display: table;
}

.vertical-align-middle {
    display: table-cell;
    vertical-align: middle;
}

.auth-box {
    -moz-box-shadow: 1px 2px 10px 0 rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 1px 2px 10px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 1px 2px 10px 0 rgba(0, 0, 0, 0.1);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    width: 480px;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    background-color: #ffffff;
    color: #616161;
}

.auth-box .content {
    display: inline-block;
    vertical-align: middle;
    *vertical-align: auto;
    *zoom: 1;
    *display: inline;
    width: 99%;
    padding: 30px;
    vertical-align: middle;
}

.auth-box .form-auth-small .btn {
    margin-top: 20px;
}

.auth-box .form-auth-small .element-left {
    float: left;
}

.auth-box .form-auth-small .element-right {
    float: right;
}

.auth-box .form-auth-small .bottom {
    margin-top: 20px;
    text-align: center;
}

.auth-box .lead {
    margin: 10px 0;
    font-size: 18px;
    text-align: center;
}

.auth-box .helper-text {
    font-size: 13px;
    color: #EEEEEE;
}

.auth-box .helper-text a {
    color: #B3E5FC;
}

.auth-box .btn-signin-social {
    display: block;
    margin-bottom: 15px;
    padding: 10px 22px;
    width: 100%;
    background-color: #fff;
    border-color: #e4ecf0;
}

.auth-box .btn-signin-social:hover,
.auth-box .btn-signin-social:focus {
    background-color: #fafafa;
}

.auth-box .btn-signin-social i {
    font-size: 16px;
    margin: 5px;
}

.auth-box.lockscreen {
    width: 50%;
    padding: 40px 60px;
}

.auth-box.lockscreen .logo {
    margin-bottom: 30px;
}

.auth-box.lockscreen .user {
    margin-bottom: 30px;
}

.auth-box.lockscreen .user .name {
    font-size: 18px;
    margin-top: 10px;
}

.logo.align-center {
    text-align: center;
}

.color-white {
    color: #616161 !important;
}

.help-block {
    display: block;
    margin: 5px 0;
    color: #fff;
    font-weight: lighter;
    font-size: 12px;
}

.has-error .help-block {
    color: #fff;
}

@media screen and (min-width: 1440px) {
    .auth-box.lockscreen {
        width: 35%;
    }
}

@media screen and (max-width: 1279px) {
    .auth-box {
        width: 90%;
    }
}

@media screen and (max-width: 992px) {
    .auth-box {
        width: 70%;
    }

    .auth-box.lockscreen {
        width: 50%;
        padding: 40px 20px;
    }
}

@media screen and (max-width: 767px) {
    .ui.form .fields {
        margin: 0 -.5em 1em;
    }
}

@media screen and (max-width: 640px) {
    .auth-box {
        width: 90%;
    }

    .auth-box .content {
        width: 95%;
    }

    .auth-box.lockscreen {
        width: 90%;
    }
}

/* =========================================
   PRECISION UI POLISH - LOGIN PAGE
   ========================================= */

/* Layout & Grid */
.login-page.full-height {
    min-height: 100vh;
    height: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.login-page .column {
    padding: 0 !important;
}

/* -----------------------------------------
   A) Left Column: Branding Section
   ----------------------------------------- */
.branding-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    /* Deep Blue Modern Gradient */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff;
    min-height: 100vh;
    padding: 60px !important;
    position: relative;
    overflow: hidden;
}

.branding-content {
    width: 100%;
    max-width: 460px;
    /* Constrained for better readability */
    text-align: center;
    z-index: 2;
    /* Optical centering adjustment: lift content slightly */
    transform: translateY(-20px);
}

/* 1. Logo */
.branding-logo {
    max-width: 90px;
    /* Reduced visual dominance */
    margin-bottom: 24px;
    /* Strict rhythm */
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* 2. Title */
.branding-title {
    font-size: 2.5rem;
    /* Large but not overwhelming */
    font-weight: 800;
    margin-bottom: 12px;
    /* Strict rhythm */
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.15;
    /* Tightened line height */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 3. Subtitle */
.branding-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    /* Softened opacity */
    font-weight: 400;
    margin-bottom: 40px;
    /* Larger gap before features */
    line-height: 1.5;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* 4. Feature Box (Glassmorphism) */
.branding-features {
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 32px;
    /* Consistent padding */
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    display: inline-block;
    width: 100%;
    max-width: 420px;
    /* Align visually under subtitle */
}

.feature-item {
    font-size: 1.05rem;
    margin-bottom: 16px;
    /* consistent spacing */
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.95);
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item i {
    margin-right: 16px;
    color: #64b5f6;
    font-size: 1.25em;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* -----------------------------------------
   B) Right Column: Login Section
   ----------------------------------------- */
.login-section {
    background-color: #f4f6f9;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh;
    padding: 40px !important;
}

.login-container {
    width: 100%;
    max-width: 400px;
    /* Strict max width */
}

/* Login Card */
.login-card.ui.card {
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    /* Softer, refined shadow */
    border: none;
    border-radius: 16px;
    padding: 40px;
    /* Generous internal padding */
    background: #ffffff;
    margin-bottom: 24px;
}

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

.login-title {
    font-size: 1.6rem;
    /* Clear hierarchy < branding title */
    color: #1a202c;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    color: #718096;
    font-size: 0.95rem;
}

/* Form Elements */
.ui.form .field {
    margin-bottom: 20px;
}

.ui.form .field>label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ui.input input {
    border-radius: 8px !important;
    /* Match button radius */
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    border: 1px solid #e2e8f0;
    background: #fcfcfc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ui.input input:focus {
    border-color: #3182ce;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
}

.ui.input>.icon {
    opacity: 0.4;
}

/* Button */
.ui.primary.button {
    background: #2b6cb0;
    background: linear-gradient(to right, #2c5282, #2b6cb0);
    border-radius: 8px;
    /* Consistent with inputs */
    padding: 14px 0;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(44, 82, 130, 0.15);
    margin-top: 8px;
}

.ui.primary.button:hover {
    background: linear-gradient(to right, #2a4365, #2c5282);
    transform: translateY(-1px);
    /* Subtle lift */
    box-shadow: 0 6px 12px rgba(44, 82, 130, 0.25);
}

.ui.checkbox label {
    color: #718096;
    font-size: 0.9rem;
    padding-left: 24px;
}

/* Footer */
.login-footer {
    text-align: center;
    color: #a0aec0;
    font-size: 0.85rem;
    font-weight: 500;
    padding-top: 8px;
    /* Closer to card */
}

/* -----------------------------------------
   D) Mobile & Tablet Responsiveness
   ----------------------------------------- */

@media only screen and (max-width: 991px) {
    .branding-section {
        padding: 40px !important;
    }

    .branding-title {
        font-size: 2rem;
    }
}

@media only screen and (max-width: 767px) {
    .login-page.full-height {
        flex-direction: column !important;
        /* Ensure vertical stack */
    }

    .branding-section {
        min-height: auto;
        width: 100% !important;
        padding: 60px 24px 80px 24px !important;
        /* Extra bottom padding for overlap */
        border-bottom-right-radius: 32px;
        border-bottom-left-radius: 32px;
        flex: none !important;
        /* Don't grow */
    }

    .branding-content {
        transform: none;
        /* remove optical shift */
        padding-bottom: 20px;
    }

    .branding-logo {
        max-width: 70px;
    }

    .branding-title {
        font-size: 1.75rem;
    }

    .branding-subtitle {
        margin-bottom: 0;
    }

    .branding-features {
        display: none;
        /* Hide on mobile for cleanliness */
    }

    .login-section {
        width: 100% !important;
        min-height: auto;
        padding: 0 20px 40px 20px !important;
        background: transparent;
        margin-top: -50px;
        /* Refined overlap */
        flex: 1 !important;
        justify-content: flex-start !important;
        /* Start from top */
        z-index: 10;
    }

    .login-container {
        max-width: 100%;
    }

    .login-card.ui.card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        /* Lighter shadow for mobile */
        border-radius: 20px;
        padding: 30px 24px;
    }
}