* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
}

@media (max-width: 1024px) {
    body {
        overflow-y: auto;
    }
}

.login-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.login-left-panel {
    width: 50%;
    background: linear-gradient(135deg, #194789 0%, #1e5ba8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.helm-logo-top-left {
    position: absolute;
    top: 30px;
    left: 30px;
    max-width: 100px;
    height: auto;
    filter: brightness(0) invert(1);
    z-index: 2;
}

.logo-header-row-mobile {
    display: none;
}

.helm-logo-mobile {
    display: none;
}

.termi-group-mobile {
    display: none;
}

.login-left-content {
    text-align: center;
    color: white;
    z-index: 1;
    padding: 40px;
}

.logo-container {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.termi-group-desktop {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.termi-logo {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}

.termi-word-logo {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}

.slogan-text {
    font-size: 24px;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 1px;
    margin-top: 40px;
    opacity: 0.95;
}

.slogan-text p {
    margin: 0;
}

.login-right-panel {
    width: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: hidden;
}

@media (max-width: 1024px) {
    .login-right-panel {
        align-items: flex-start;
        padding-top: 30px;
    }
}

.login-form-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.password_forgot {
    padding-top: 0;
}

#ssoForm {
    padding-top: 0;
}

.form-title {
    font-size: 32px;
    font-weight: bold;
    color: #194789;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.login-header-icon {
    font-size: 28px;
    color: #194789;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    z-index: 2;
    opacity: 0.6;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
    z-index: 2;
    transition: color 0.3s ease;
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

.password-toggle:hover {
    color: #194789;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid black;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.password-wrapper .form-control {
    padding-right: 45px;
}

.form-control:focus {
    outline: none;
    border-color: #194789;
    box-shadow: 0 0 0 3px rgba(25, 71, 137, 0.1);
}

.form-control::placeholder {
    color: #999;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #194789;
}

.remember-me span {
    color: #194789;
}

.btn-signin {
    width: 100%;
    padding: 14px;
    background: #194789;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-signin:hover {
    background: #1e5ba8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 71, 137, 0.3);
    text-decoration: none;
}

.btn-signin:active {
    transform: translateY(0);
}


.btn-sso {
    width: 100%;
    padding: 12px;
    background: white;
    color: #333;
    border: 1px solid black;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-sso:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.sso-icon {
    font-size: 20px;
    color: #194789;
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

.continue-with {
    margin: 20px 0;
}

.divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}


.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.forgot-link span {
    color: #194789;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.back-link {
    text-align: left;
    margin-top: 15px;
}

.back-link-text {
    color: #194789;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.back-link-text:hover {
    color: #1e5ba8;
    text-decoration: none;
}

.back-link-text i {
    font-size: 14px;
    text-decoration: none !important;
    display: inline-block;
    flex-shrink: 0;
}

.back-link-text span {
    text-decoration: none;
    display: inline-block;
    border-bottom: none;
    transition: border-bottom 0.3s ease;
}

.back-link-text:hover span {
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.back-link-text:hover i {
    text-decoration: none !important;
    border-bottom: none;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.lock-icon-container {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 10px;
}

.lock-icon {
    font-size: 70px;
    color: #dc3545;
    display: inline-block;
}

.sso-icon-container {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 10px;
}

.sso-form-icon {
    font-size: 70px;
    color: #194789;
    display: inline-block;
}

.checkmark-icon-container {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 10px;
}

.checkmark-icon {
    font-size: 60px;
    color: #ffffff;
    display: inline-block;
    line-height: 1;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #28a745;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #28a745;
}

.success-message {
    text-align: center;
    font-size: 16px;
    color: #194789;
    margin-bottom: 30px;
    padding: 0 20px;
}

.error-message {
    margin-bottom: 15px;
    padding: 10px;
    background: #fee;
    border-left: 3px solid #f00;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.error-message span {
    font-size: 20px !important;
    margin-right: 4px !important;
}

.text-danger {
    color: #d9534f;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.alert-info {
    padding: 15px;
    background: #d9edf7;
    border: 1px solid #bce8f1;
    border-radius: 4px;
    color: #31708f;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .login-left-panel {
        width: 100%;
        height: 35vh;
        min-height: 250px;
    }

    .login-right-panel {
        width: 100%;
        height: 65vh;
        overflow-y: auto;
    }

    /* Hide desktop Termi group and desktop Helm logo */
    .termi-group-desktop {
        display: none;
    }

    .helm-logo-top-left {
        display: none;
    }

    /* Show mobile header row with both Helm and Termi */
    .logo-header-row-mobile {
        position: absolute;
        top: 20px;
        left: 20px;
        right: 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 2;
        width: calc(100% - 40px);
    }

    .helm-logo-mobile {
        display: block;
        max-width: 90px;
        height: auto;
        filter: brightness(0) invert(1);
        flex-shrink: 0;
    }

    .termi-group-mobile {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        flex-shrink: 0;
    }

    .termi-logo {
        max-width: 30px;
    }

    .termi-word-logo {
        max-width: 90px;
    }

    .slogan-text {
        font-size: 25px;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 5px;
    }

    .login-left-content {
        padding: 10px 20px;
        padding-top: 60px;
    }

    .logo-container {
        margin-bottom: 0;
    }

    .password_forgot {
        padding-top: 50px;
    }

    #ssoForm {
        padding-top: 50px;
    }
}

/* Tablet-specific fixes (iPad, Samsung Tab) */
@media (min-width: 769px) and (max-width: 1024px) {
    html, body {
        height: 100%;
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        touch-action: none;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: none;
    }
    
    .login-container {
        height: 100vh;
        height: -webkit-fill-available;
        overflow: hidden !important;
        touch-action: none;
        overscroll-behavior: none;
    }
    
    .login-left-panel {
        overflow: hidden !important;
        touch-action: none;
        overscroll-behavior: none;
    }
    
    .login-right-panel {
        overflow: hidden !important;
        touch-action: pan-y;
        overscroll-behavior: none;
    }
    
    .login-form-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        max-height: 100%;
    }
}

@media (max-width: 768px) {
    html, body {
        height: 100%;
        overflow: hidden;
        position: fixed;
        width: 100%;
        touch-action: none;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: none;
    }
    
    .login-container {
        height: 100vh;
        height: -webkit-fill-available;
        overflow: hidden;
        touch-action: none;
        overscroll-behavior: none;
    }

    .login-left-panel {
        height: 35vh;
        min-height: 300px;
        overflow: hidden;
        touch-action: none;
        overscroll-behavior: none;
    }

    .login-right-panel {
        height: 80vh;
        padding: 20px;
        overflow: hidden;
        touch-action: pan-y;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .login-form-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 100%;
    }

    .form-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .logo-header-row-mobile {
        top: 15px;
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
    }

    .helm-logo-mobile {
        max-width: 80px;
    }

    .termi-group-mobile {
        gap: 6px;
    }

    .termi-logo {
        max-width: 30px;
    }

    .termi-word-logo {
        max-width: 80px;
    }

    .slogan-text {
        font-size: 22px;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 3px;
    }

    .login-left-content {
        padding: 8px 15px;
        padding-top: 50px;
    }

    .password_forgot {
        padding-top: 50px;
    }

    #ssoForm {
        padding-top: 50px;
    }
}

@media (max-width: 480px) {
    .login-left-panel {
        height: 22vh;
        min-height: 200px;
    }

    .login-right-panel {
        height: 82vh;
        padding: 15px;
        overflow-y: auto;
    }

    .login-left-content {
        padding: 5px 10px;
        padding-top: 45px;
    }

    .logo-header-row-mobile {
        top: 10px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
    }

    .helm-logo-mobile {
        max-width: 60px;
    }

    .termi-group-mobile {
        gap: 4px;
    }

    .termi-logo {
        max-width: 30px;
    }

    .termi-word-logo {
        max-width: 60px;
    }

    .slogan-text {
        font-size: 13px;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 2px;
    }

    .login-form-container {
        padding: 0;
    }

    .form-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .password_forgot {
        padding-top: 50px;
    }

    #ssoForm {
        padding-top: 50px;
    }
}

/* iPhone SE and similar small devices (375px width) */
@media (max-width: 375px) {
    .login-left-panel {
        height: 11vh;
        min-height: 90px;
    }

    .login-right-panel {
        height: 84vh;
        padding: 12px;
    }

    .logo-header-row-mobile {
        top: 8px;
        left: 8px;
        right: 8px;
        width: calc(100% - 16px);
    }

    .helm-logo-mobile {
        max-width: 50px;
    }

    .termi-group-mobile {
        gap: 3px;
    }

    .termi-logo {
        max-width: 30px;
    }

    .termi-word-logo {
        max-width: 50px;
    }

    .slogan-text {
        font-size: 11px;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 2px;
    }

    .login-left-content {
        padding: 3px 8px;
        padding-top: 40px;
    }
    .form-title {
        font-size: 18px;
    }
    .password_forgot {
        padding-top: 50px;
    }

    #ssoForm {
        padding-top: 50px;
    }
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#loading img {
    max-width: 80px;
    height: auto;
}
.disable-click {
    pointer-events: none;
    opacity: 0.5; /* optional visual feedback */
    cursor: not-allowed;
}
/* Chrome, Edge, Opera — EXCEPT iOS */
@supports not (-webkit-touch-callout: none) {
    input[type="password"]::-webkit-textfield-decoration-container,
    input[type="password"]::-webkit-clear-button,
    input[type="password"]::-webkit-inner-spin-button,
    input[type="password"]::-webkit-credentials-auto-fill-button,
    input[type="password"]::-webkit-password-toggle {
        display: none;
    }
}
/* Firefox */
input[type="password"]::-moz-password-toggle {
    display: none !important;
}

/* Internet Explorer / old Edge */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}
