#cs-navigation,
#addContactModal,
.skip {
    display: none !important;
}

html:has(.cs-auth),
body:has(.cs-auth) {
    height: 100%;
    overflow: hidden;
}

.cs-auth-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 40;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cs-auth-progress.is-active,
.cs-auth-progress.is-booting {
    opacity: 1;
}

.cs-auth-progress > i {
    display: block;
    height: 100%;
    width: 38%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #2563eb, #22d3ee);
    transform: translateX(-120%);
}

.cs-auth-progress.is-active > i,
.cs-auth-progress.is-booting > i {
    animation: cs-auth-progress-slide 1.05s ease-in-out infinite;
}

@keyframes cs-auth-progress-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(360%); }
}

.cs-auth-spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: conic-gradient(from 120deg, #7c3aed, #2563eb, #22d3ee, #7c3aed);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
    animation: cs-auth-spin 0.65s linear infinite;
}

.cs-login-submit:has(.cs-auth-spinner) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@keyframes cs-auth-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .cs-auth-progress > i,
    .cs-auth-spinner {
        animation: none;
    }
}

#main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    background: #0b1220 !important;
}

.cs-auth {
    position: relative;
    isolation: isolate;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(1.5rem, 1fr) minmax(22rem, 26rem) minmax(28rem, 34rem) minmax(1.5rem, 1fr);
    grid-template-rows: minmax(1.5rem, 1fr) auto minmax(1.5rem, 1fr);
    column-gap: clamp(6.5rem, 14vw, 12rem);
    background: #0b1220;
}

.cs-auth::before,
.cs-auth::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.cs-auth::before {
    background:
        radial-gradient(ellipse 70% 55% at 88% 12%, rgba(124, 58, 237, 0.55), transparent 58%),
        radial-gradient(ellipse 60% 50% at 8% 88%, rgba(34, 211, 238, 0.28), transparent 52%),
        radial-gradient(ellipse 50% 45% at 60% 60%, rgba(37, 99, 235, 0.35), transparent 55%);
}

.cs-auth::after {
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at 70% 40%, #000 35%, transparent 78%);
}

.cs-auth-form,
.cs-auth-visual {
    position: relative;
    z-index: 1;
}

.cs-auth-form {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    min-height: 0;
    height: auto;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.cs-auth-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 22.5rem;
    padding: 1.85rem 1.7rem 1.5rem;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.cs-auth-title,
.cs-login-title {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    text-align: left;
}

.cs-auth-subtitle,
.cs-login-subtitle {
    margin: 0 0 0.95rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #64748b;
    text-align: left;
}

.cs-login-subtitle.is-error,
.cs-auth-subtitle.is-error { color: #b91c1c; }
.cs-login-subtitle.is-success,
.cs-auth-subtitle.is-success { color: #15803d; }

.cs-login-hint {
    margin: -0.65rem 0 1.35rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #64748b;
}

.cs-auth-card > .cs-login-hint {
    margin: 0;
}

.cs-login-field .cs-login-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.cs-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    text-align: left;
    margin-bottom: 0.85rem;
}

.cs-login-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cs-login-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}

.cs-login-field input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    font: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    background: #fff;
}

.cs-login-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.cs-login-forgot {
    text-align: right;
    margin: -0.25rem 0 0;
    font-size: 0.85rem;
}

.cs-login-forgot a,
.cs-login-footer a {
    color: #2563eb;
    text-decoration: none;
}

.cs-login-forgot a:hover,
.cs-login-footer a:hover {
    text-decoration: underline;
}

.cs-login-submit {
    width: 100%;
    display: inline-block;
    box-sizing: border-box;
    padding: 12px 20px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.cs-login-submit:hover { background: #1e293b; }
.cs-login-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.cs-login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.85rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cs-login-divider::before,
.cs-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.cs-login-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 11px 18px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.cs-login-google:hover {
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.cs-login-google svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.cs-login-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    color: #64748b;
    font-size: 0.875rem;
    text-align: left;
}

.cs-login-footer p + p {
    margin-top: 0.55rem;
    font-size: 0.75rem;
    line-height: 1.5;
}

.cs-login-feedback {
    min-height: 0;
    margin: 0;
    font-size: 0.85rem;
    color: #b91c1c;
    text-align: left;
}

.cs-login-feedback:empty {
    display: none;
}

.cs-login-feedback.is-success { color: #15803d; }

.cs-auth-visual {
    grid-column: 3;
    grid-row: 2;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    height: auto;
    overflow: hidden;
    color: #fff;
    background: transparent;
}

.cs-auth-aurora {
    display: none;
}

.cs-auth-visual-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 32rem;
    text-align: center;
}

.cs-auth-visual-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 1.15rem;
}

.cs-auth-visual-logo {
    display: block;
    width: min(5.75rem, 32%);
    height: auto;
    margin: 0 0 0.4rem;
}

.cs-auth-visual-wordmark {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #f8fafc;
}

#main .cs-auth-visual,
#main .cs-auth-visual-title,
#main .cs-auth-visual-wordmark,
#main .cs-auth-preview-row,
#main .cs-auth-preview-row strong {
    color: #f8fafc;
}

.cs-auth-visual-title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.7rem, 2.6vw, 2.25rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-align: center;
}

#main .cs-auth-visual-lede {
    margin: 0 auto 1.45rem;
    max-width: 26rem;
    text-align: center;
    color: rgba(248, 250, 252, 0.82);
    font-size: 1rem;
    line-height: 1.55;
}

.cs-auth-preview {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.7rem;
    min-height: 0;
    padding: 0.7rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.cs-auth-preview-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    flex: 1;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    background: rgba(11, 18, 32, 0.35);
}

.cs-auth-preview-row strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cs-auth-preview-row em {
    display: block;
    margin-top: 0.15rem;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.78rem;
    font-style: normal;
}

.cs-auth-preview-row b {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cs-auth-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.cs-auth-dot-violet { background: #7c3aed; }
.cs-auth-dot-blue { background: #2563eb; }
.cs-auth-dot-cyan { background: #22d3ee; }

@media (max-width: 1100px) {
    .cs-auth {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        column-gap: 0;
        height: auto;
        overflow: visible;
    }

    html:has(.cs-auth),
    body:has(.cs-auth) {
        height: auto;
        overflow: auto;
    }

    #main {
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    .cs-auth-form,
    .cs-auth-visual {
        grid-column: auto;
        grid-row: auto;
        height: auto;
        align-items: center;
    }

    .cs-auth-form {
        min-height: 100vh;
        justify-content: center;
        padding: 1.5rem 1.15rem 2rem;
        overflow: visible;
        background: transparent;
    }

    .cs-auth-card,
    .cs-auth-visual-inner {
        height: auto;
    }

    .cs-auth-visual {
        display: none;
    }
}
