/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header styles */
.header {
    background: #0b1024;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    /*    padding: 1rem 0;*/
}

    .header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 240px;
    color: #0d9488;
}

.logo span {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.nav {
    display: flex;
    gap: 1.5rem;
}

    .nav a {
        color: #fff;
        text-decoration: none;
        transition: color 0.2s;
    }


/* Main content styles */
.main {
    padding: 1rem 0;
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Auth form styles */
.auth-form {
    background: white;
    padding: 0rem 2rem 0.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.form-header {
    text-align: center;
    /*margin-bottom: 1rem;*/
    /*margin-top: 1rem;*/
}

.form-icon {
    width: 48px;
    height: 48px;
    padding: 0.75rem;
    background: rgba(13, 148, 136, 0.1);
    border-radius: 50%;
    color: #0d9488;
    margin-bottom: 1rem;
}

.form-header h1 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.form-header p {
    color: #4b5563;
}

.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        font-size: 0.875rem;
        font-weight: 500;
        color: #374151;
        margin-bottom: 0.5rem;
    }

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

    .input-wrapper input:focus {
        outline: none;
        //border-color: #0d9488;
        box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    }

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.forgot-link {
    font-size: 0.875rem;
    color: #0a58ca;
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #DA1200 !important;
    color: white;
    border: none;
}

    .btn-primary:hover {
        background: #DA1200 !important;
    }

.btn-secondary {
    /* background: #f3f4f6;*/
    color: #1a1a1a;
    border: 1px solid #c71000;
    background: #e5e7eb;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    text-decoration: none;
}

.btn-outline {
    text-decoration: none;
    color: #0a58d4;
}

    .btn-outline:hover {
        text-decoration: underline;
    }

.btn-icon {
    width: 20px;
    height: 20px;
}

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

    .divider::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        height: 1px;
        background: #e2e8f0;
    }

    .divider span {
        background: white;
        padding: 0 0.75rem;
        color: #6b7280;
        font-size: 0.875rem;
        position: relative;
    }

.signup-prompt {
    text-align: center;
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 1.5rem;
}

    .signup-prompt a {
        color: #0a58d4;
        text-decoration: none;
        font-weight: 500;
    }

        .signup-prompt a:hover {
            text-decoration: underline;
        }

/* Info card styles */
.info-card {
    background: white;
    /*padding: 2rem;*/
    padding-right: 1rem;
    padding-left: 1rem;
    padding-top: 1rem;
    padding-bottom: 0.8rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

    .info-card h2 {
        font-size: 1.25rem;
        color: #1a1a1a;
        margin-bottom: 1.5rem;
    }

.feature-section {
    margin-bottom: 2rem;
}

.feature-header {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feature-icon {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
}

.feature-header h3 {
    font-size: 1rem;
    color: #1a1a1a;
}

.feature-description {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding-left: 1.75rem;
}

    .feature-list li {
        color: #4b5563;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
        position: relative;
    }

        .feature-list li::before {
            content: "";
            position: absolute;
            left: -1rem;
            top: 0.6rem;
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #0d9488;
        }

/* Footer styles */
.footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
    padding: 1rem 0;
    text-align: center;
}

    .footer p {
        color: #4b5563;
        font-size: 0.875rem;
    }

.footer-links {
    margin-top: 0.5rem;
}

    .footer-links a {
        color: #4b5563;
        text-decoration: none;
        font-size: 0.875rem;
        margin: 0 0.75rem;
    }

        .footer-links a:hover {
            color: #1a1a1a;
        }

/* Responsive styles */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .info-card {
        display: none;
    }

    .nav {
        display: none;
    }
}

.input-error {
    border: 1px solid red;
    /*background-color: #ffe6e6;  */
    color: #cc0000;
}

.info-text {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 1rem;
}

.text-danger {
    --bs-text-opacity: 1;
    color: red;
    font-size: 0.85rem;
}


.info-txt-p {
    margin-top: 0;
    margin-bottom: 1rem;
}




.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
    display: flex;
    flex-direction: column;
}

    .alert-danger strong {
        font-size: 16px;
        margin-bottom: 8px;
    }

.validation-summary-errors {
    font-size: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #842029;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 20px;
    }

    .validation-summary-errors li {
        margin-bottom: 5px;
    }






/*  Updated login button group for two rows layout */
.login-btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.login-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

    .login-row.first-row {
        justify-content: space-between;
    }

    .login-row.second-row {
        justify-content: center;
    }

/*  Button container with help icon */
.login-btn-with-help {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/*  Help icon styles - inside button */
.help-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
    margin-left: 0.25rem;
}

    .help-icon:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
        color: #fff;
    }

    .help-icon svg {
        width: 12px;
        height: 12px;
        pointer-events: none;
    }

/*  Popover positioned above help icon */
.popover-card {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 320px;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    font-size: 0.875rem;
    color: #222;
    z-index: 1000;
    font-weight: 400;
    text-align: left;
    border: 1px solid #e2e8f0;
    background: #fff;
    animation: popupFadeIn 0.18s;
    pointer-events: auto;
    white-space: normal;
}

    .popover-card strong {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.9375rem;
    }

    .popover-card ul {
        margin: 0.5rem 0;
        padding-left: 1.25rem;
        list-style: disc;
    }

    .popover-card li {
        margin-bottom: 0.35rem;
        line-height: 1.4;
    }

    /*  Show popover on help icon hover and keep it visible when hovering over popover */
    .help-icon:hover .popover-card,
    .popover-card:hover {
        display: block;
    }

/*  Popover arrow pointing down */
.popover-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    overflow: hidden;
    z-index: 10;
}

    .popover-arrow::after {
        content: "";
        display: block;
        margin: auto;
        width: 12px;
        height: 12px;
        background: #fff;
        border: 1px solid #e2e8f0;
        transform: rotate(45deg) translateY(-6px);
        border-right: none;
        border-top: none;
    }

/* Button styles */
.btn {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: white;
    color: #1a1a1a;
    min-width: 220px;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: relative;
}

    .btn:hover:not([disabled]) {
        border-color: #94a3b8;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
        transform: translateY(-1px);
    }

    /*  Disabled button styles */
    .btn[disabled] {
        opacity: 0.6;
        cursor: not-allowed;
        background: #f9fafb;
        color: #9ca3af;
    }

        .btn[disabled] .help-icon {
            pointer-events: auto;
            cursor: help;
            opacity: 1;
        }

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Azure OIDC button - Blue gradient */
.azure-btn.oidc-btn {
    background: linear-gradient(135deg, #0078d4 0%, #5a9fd4 100%);
    color: white;
    border-color: #0078d4;
    font-weight: 500;
}

    .azure-btn.oidc-btn:hover:not([disabled]) {
        background: linear-gradient(135deg, #006cbd 0%, #4a8fc4 100%);
        border-color: #006cbd;
        box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
    }

/* Azure SAML button - Teal/Cyan gradient */
.azure-btn.saml-btn {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    color: white;
    border-color: #0891b2;
    font-weight: 500;
}

    .azure-btn.saml-btn:hover:not([disabled]) {
        background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
        border-color: #0e7490;
        box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
    }

/* GitHub button */
.github-btn {
    background: #24292e;
    color: white;
    border-color: #24292e;
}

    .github-btn:hover:not([disabled]) {
        background: #1b1f23;
        border-color: #1b1f23;
    }

/* AWS button */
.aws-btn {
    background: linear-gradient(135deg, #ff9900 0%, #ffad33 100%);
    color: white;
    border-color: #ff9900;
}

    .aws-btn:hover:not([disabled]) {
        background: linear-gradient(135deg, #e68a00 0%, #ff9900 100%);
        border-color: #e68a00;
        box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
    }

/*  Specific popover styles for different providers */
.azure-popover {
    border-color: #3b7ddd;
    background: #f1f6fd;
}

.aws-popover {
    border-color: #ff9900;
    background: #fdf6ee;
}

.github-popover {
    border-color: #24292e;
    background: #f6f8fa;
}

.popover-link {
    display: inline-block;
    margin-top: 0.8em;
    color: #0a58d4;
    font-weight: 500;
    text-decoration: none;
}

    .popover-link:hover {
        text-decoration: underline;
    }

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*  Responsive design */
@media (max-width: 768px) {
    .login-row.first-row {
        flex-direction: column;
        align-items: center;
    }

    .popover-card {
        min-width: 90vw;
        right: -50px;
    }
}

.d-show {
    display: block !important;
}