/* CSO Login page — UI only */

.cso-login-body {
    background: linear-gradient(145deg, #eef1f8 0%, #e4e9f4 45%, #f4f6fa 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.cso-login-body .page-content,
.cso-login-body .content-wrapper {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    background: transparent;
    overflow-x: hidden;
}

.cso-login-body .navbar-dark {
    background: #303F9F;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.cso-login-body .navbar-text {
    font-size: 0.8125rem;
    text-align: center;
    width: 100%;
}

.cso-login-page {
    min-height: calc(100vh - 48px);
    min-height: calc(100dvh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    box-sizing: border-box;
}

.cso-login-page.content {
    width: 100%;
    max-width: 100%;
}

.cso-login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(63, 81, 181, 0.14);
    border: 1px solid rgba(63, 81, 181, 0.1);
    overflow: hidden;
}

.cso-login-brand {
    padding: 2rem 1.75rem 0.5rem;
    text-align: center;
}

.cso-login-brand img {
    max-height: 54px;
    width: auto;
    margin-bottom: 1rem;
}

.cso-login-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #303F9F;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.cso-login-subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.cso-login-tabs {
    display: flex;
    margin: 1.25rem 1.5rem 0;
    padding: 4px;
    background: #f1f3f9;
    border-radius: 10px;
    gap: 4px;
}

.cso-login-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    padding: 0.55rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.cso-login-tab:hover:not(.active) {
    color: #3F51B5;
    background: rgba(63, 81, 181, 0.06);
}

.cso-login-tab.active {
    background: #3F51B5;
    color: #fff;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.35);
}

.cso-login-tab-icon {
    font-size: 0.8rem;
    opacity: 0.9;
}

.cso-login-btn-icon {
    margin-right: 0.35rem;
    font-size: 0.875rem;
    line-height: 1;
}

.cso-login-form-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.cso-login-section {
    display: none;
}

.cso-login-section.active {
    display: block;
}

.cso-login-page .form-group {
    margin-bottom: 1rem;
}

.cso-login-page .form-group-feedback-left .form-control {
    border-radius: 10px;
    border: 1px solid #dde1ea;
    padding-left: 2.75rem;
    height: 44px;
    font-size: 0.9375rem;
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cso-login-page .form-group-feedback-left .form-control:focus {
    border-color: #3F51B5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.12);
}

.cso-login-page .form-control-feedback {
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
}

.cso-login-page .form-control-feedback i {
    color: #94a3b8 !important;
    font-size: 1rem;
}

.cso-login-page .btn-login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 160px;
    max-width: 220px;
    margin: 0 auto;
    padding: 0 2.25rem;
    height: 44px;
    border-radius: 10px;
    background: #3F51B5;
    border: 1px solid #3F51B5;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.cso-login-page .form-group.mb-0 {
    text-align: center;
}

.cso-login-page .btn-login-submit:hover {
    background: #303F9F;
    border-color: #303F9F;
    color: #fff;
    box-shadow: 0 4px 14px rgba(63, 81, 181, 0.35);
    transform: translateY(-1px);
}

.cso-login-page .btn-login-submit:active {
    transform: translateY(1px);
}

.cso-login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eef0f4;
    flex-wrap: wrap;
}

.cso-login-forgot {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cso-login-forgot:hover {
    color: #334155;
    text-decoration: underline;
}

.cso-login-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #198754;
    color: #198754;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.cso-login-register:hover {
    background: #198754;
    border-color: #198754;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(25, 135, 84, 0.3);
    transform: translateY(-1px);
}

.cso-login-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 160px;
    max-width: 220px;
    margin: 0.75rem auto 0;
    padding: 0 2rem;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.cso-login-profile:not(.disabled) {
    border-color: #00897B;
    color: #00897B;
    background: #f0faf8;
    cursor: pointer;
}

.cso-login-profile:not(.disabled):hover {
    background: #00897B;
    border-color: #00897B;
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 137, 123, 0.3);
    transform: translateY(-1px);
}

.cso-login-profile.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tablet */
@media (max-width: 767.98px) {
    .cso-login-page {
        align-items: flex-start;
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .cso-login-card {
        max-width: 100%;
        border-radius: 14px;
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .cso-login-page {
        padding: 0.75rem 0.75rem 1rem;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        align-items: center;
    }

    .cso-login-card {
        border-radius: 12px;
        box-shadow: 0 8px 28px rgba(63, 81, 181, 0.12);
        max-width: 360px;
    }

    .cso-login-brand {
        padding: 1.25rem 1rem 0.35rem;
    }

    .cso-login-brand img {
        max-height: 46px;
        margin-bottom: 0.75rem;
    }

    .cso-login-title {
        font-size: 0.95rem;
        line-height: 1.3;
        padding: 0 0.25rem;
    }

    .cso-login-subtitle {
        font-size: 0.75rem;
    }

    /* Tabs — side by side, compact pill style */
    .cso-login-tabs {
        margin: 0.85rem 1rem 0;
        flex-direction: row;
        gap: 0.35rem;
        padding: 3px;
    }

    .cso-login-tab {
        flex: 1;
        flex-direction: column;
        gap: 0.2rem;
        min-height: auto;
        padding: 0.5rem 0.25rem;
        font-size: 0.6875rem;
        line-height: 1.2;
    }

    .cso-login-tab-icon {
        font-size: 1rem;
        margin: 0;
        opacity: 1;
    }

    .cso-login-tab .cso-login-btn-icon {
        margin-right: 0;
    }

    .cso-login-form-body {
        padding: 1rem 1rem 1.15rem;
    }

    .cso-login-page .form-group-feedback-left .form-control {
        height: 44px;
        font-size: 16px;
        padding-left: 2.65rem;
    }

    /* Primary buttons — centered, not full width */
    .cso-login-page .btn-login-submit {
        width: auto;
        min-width: 150px;
        max-width: 200px;
        min-height: 42px;
        height: 42px;
        padding: 0 1.5rem;
        font-size: 0.875rem;
    }

    .cso-login-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.35rem;
        padding-top: 0.85rem;
    }

    .cso-login-forgot {
        justify-content: flex-start;
        min-height: auto;
        padding: 0.25rem 0;
        font-size: 0.8125rem;
        flex: 1 1 auto;
    }

    .cso-login-register {
        justify-content: center;
        width: auto;
        flex: 0 0 auto;
        min-height: 36px;
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .cso-login-profile {
        width: auto;
        min-width: 150px;
        max-width: 200px;
        min-height: 38px;
        height: 38px;
        padding: 0 1.25rem;
        margin-top: 0.65rem;
        font-size: 0.8125rem;
    }
}

/* Very small phones */
@media (max-width: 359.98px) {
    .cso-login-tab {
        font-size: 0.625rem;
        padding: 0.45rem 0.15rem;
    }

    .cso-login-tab-icon {
        font-size: 0.9rem;
    }

    .cso-login-title {
        font-size: 0.875rem;
    }

    .cso-login-register {
        font-size: 0.6875rem;
        padding: 0.35rem 0.55rem;
    }

    .cso-login-forgot {
        font-size: 0.75rem;
    }
}

/* Short landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
    .cso-login-page {
        align-items: flex-start;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .cso-login-brand {
        padding-top: 0.75rem;
    }

    .cso-login-brand img {
        max-height: 36px;
        margin-bottom: 0.5rem;
    }

    .cso-login-tabs {
        flex-direction: row;
        margin-top: 0.65rem;
    }

    .cso-login-form-body {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}
