﻿:root {
    --cg-bg: #050716;
    --cg-panel: rgba(8, 10, 28, 0.88);
    --cg-panel-border: rgba(148, 163, 184, 0.18);
    --cg-text: #f8fafc;
    --cg-muted: #a1a1aa;
    --cg-soft: #64748b;
    --cg-purple: #7c3aed;
    --cg-purple-bright: #a855f7;
    --cg-pink: #db2777;
    --cg-blue: #3b82f6;
    --cg-danger: #f87171;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--cg-bg) !important;
    color: var(--cg-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cg-auth-page {
    min-height: 100svh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    align-items: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 30%, rgba(124, 58, 237, 0.16), transparent 34rem), radial-gradient(circle at 50% 92%, rgba(147, 51, 234, 0.18), transparent 28rem), #050716;
}

.cg-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.5rem;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.cg-orb-logo {
    position: relative;
    width: 2.55rem;
    height: 1.55rem;
}

    .cg-orb-logo span {
        position: absolute;
        top: 0;
        width: 1.55rem;
        height: 1.55rem;
        border-radius: 999px;
        border: 1.5px solid #a855f7;
        box-shadow: 0 0 1rem rgba(168, 85, 247, 0.58);
    }

        .cg-orb-logo span:nth-child(1) {
            left: 0;
            border-color: #db2777;
        }

        .cg-orb-logo span:nth-child(2) {
            left: 0.28rem;
            border-color: #c026d3;
        }

        .cg-orb-logo span:nth-child(3) {
            left: 0.56rem;
            border-color: #9333ea;
        }

        .cg-orb-logo span:nth-child(4) {
            left: 0.84rem;
            border-color: #7c3aed;
        }

        .cg-orb-logo span:nth-child(5) {
            left: 1.12rem;
            border-color: #2563eb;
        }

.cg-auth-card {
    width: min(100%, 28rem);
    position: relative;
    border-radius: 1.35rem;
    border: 1px solid var(--cg-panel-border);
    background: linear-gradient(180deg, rgba(9, 11, 30, 0.94), rgba(7, 8, 24, 0.94));
    overflow: hidden;
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

    .cg-auth-card::before {
        content: "";
        position: absolute;
        left: -20%;
        right: -20%;
        bottom: -35%;
        height: 14rem;
        background: radial-gradient(circle at 50% 35%, rgba(124, 58, 237, 0.8), transparent 11rem), radial-gradient(circle at 72% 45%, rgba(168, 85, 247, 0.5), transparent 10rem);
        filter: blur(0.35rem);
        pointer-events: none;
    }

.cg-card-inner {
    position: relative;
    z-index: 1;
    padding: 1.75rem;
}

    .cg-card-inner h1 {
        margin: 0;
        text-align: center;
        color: #f8fafc;
        font-size: 1.55rem;
        line-height: 1.15;
        font-weight: 500;
        letter-spacing: -0.035em;
    }

.cg-auth-subtitle {
    margin: 0.75rem 0 1.45rem;
    text-align: center;
    color: var(--cg-muted);
    font-size: 0.92rem;
}

.cg-microsoft-button,
.cg-primary-button {
    width: 100%;
    min-height: 3.15rem;
    border-radius: 0.9rem;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.cg-microsoft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 1px solid rgba(236, 72, 153, 0.76);
    background: radial-gradient(circle at 18% 35%, rgba(255, 255, 255, 0.35), transparent 0.2rem), linear-gradient(90deg, #a855f7 0%, #7c3aed 34%, #2e1065 69%, #9d174d 100%);
    box-shadow: inset 0 0 1.5rem rgba(255, 255, 255, 0.15), 0 1rem 2.5rem rgba(124, 58, 237, 0.26);
}

    .cg-microsoft-button:hover,
    .cg-primary-button:hover {
        transform: translateY(-1px);
        filter: brightness(1.08);
    }

.cg-ms-icon {
    display: grid;
    grid-template-columns: repeat(2, 0.43rem);
    grid-template-rows: repeat(2, 0.43rem);
    gap: 0.08rem;
}

    .cg-ms-icon span:nth-child(1) {
        background: #f25022;
    }

    .cg-ms-icon span:nth-child(2) {
        background: #7fba00;
    }

    .cg-ms-icon span:nth-child(3) {
        background: #00a4ef;
    }

    .cg-ms-icon span:nth-child(4) {
        background: #ffb900;
    }

.cg-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0;
    color: #71717a;
    font-size: 0.85rem;
}

    .cg-divider::before,
    .cg-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: rgba(148, 163, 184, 0.16);
    }

.cg-login-error {
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 0.8rem;
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    font-size: 0.9rem;
}

.cg-login-form {
    display: grid;
    gap: 0.85rem;
}

.cg-field {
    display: grid;
    gap: 0.45rem;
}

    .cg-field label {
        color: #cbd5e1;
        font-size: 0.86rem;
        font-weight: 500;
    }

    .cg-field input[type="email"],
    .cg-field input[type="password"] {
        width: 100%;
        height: 3.15rem;
        box-sizing: border-box;
        border-radius: 0.9rem;
        border: 1px solid rgba(148, 163, 184, 0.16);
        background: rgba(5, 7, 22, 0.76);
        color: #f8fafc;
        padding: 0 1rem;
        outline: none;
        font-size: 0.96rem;
    }

    .cg-field input::placeholder {
        color: #64748b;
    }

    .cg-field input:focus {
        border-color: rgba(168, 85, 247, 0.82);
        box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.14);
    }

.cg-password-field {
    position: relative;
}

    .cg-password-field input {
        padding-right: 3rem !important;
    }

.cg-eye-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: #d4d4d8;
    opacity: 0.8;
    font-size: 1.2rem;
}

.cg-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: -0.15rem;
}

.cg-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #a1a1aa;
    font-size: 0.88rem;
}

    .cg-remember input {
        accent-color: var(--cg-purple);
    }

.cg-login-options a,
.cg-auth-footer-text a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 400;
}

    .cg-login-options a:hover,
    .cg-auth-footer-text a:hover {
        text-decoration: underline;
    }

.cg-primary-button {
    margin-top: 0.25rem;
    border: 1px solid rgba(168, 85, 247, 0.92);
    background: radial-gradient(circle at 50% 105%, rgba(255, 255, 255, 0.26), transparent 4.3rem), linear-gradient(90deg, #4c1d95 0%, #7c3aed 48%, #4c1d95 100%);
    box-shadow: inset 0 0 1.5rem rgba(255, 255, 255, 0.13), 0 1rem 2.4rem rgba(124, 58, 237, 0.25);
}

.cg-auth-footer-text {
    margin: 1.2rem 0 0;
    text-align: center;
    color: #a1a1aa;
    font-size: 0.9rem;
}

.cg-page-footer {
    padding-bottom: 1rem;
    color: #71717a;
    font-size: 0.86rem;
    font-weight: 400;
}

@media (max-width: 560px) {
    .cg-auth-page {
        padding: 1rem 0.85rem;
    }

    .cg-auth-card {
        border-radius: 1.1rem;
    }

    .cg-card-inner {
        padding: 1.25rem;
    }

    .cg-login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

    .cg-card-inner h1 {
        font-size: 1.5rem;
    }
          
}

.cg-ms-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 8, 22, 0.72);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.cg-ms-popup {
    position: relative;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    padding: 30px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.cg-ms-popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cg-ms-popup-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

    .cg-ms-popup-icon span {
        display: block;
        border-radius: 3px;
    }

        .cg-ms-popup-icon span:nth-child(1) {
            background: #f25022;
        }

        .cg-ms-popup-icon span:nth-child(2) {
            background: #7fba00;
        }

        .cg-ms-popup-icon span:nth-child(3) {
            background: #00a4ef;
        }

        .cg-ms-popup-icon span:nth-child(4) {
            background: #ffb900;
        }

.cg-ms-popup-title {
    font-size: 24px;
    font-weight: 650;
    margin-bottom: 10px;
}

.cg-ms-popup-text {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 22px;
}

.cg-ms-popup-primary {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.cg-ms-popup-secondary {
    width: 100%;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
