/* cdsfy: brand tokens */
:root {
    --da-brand: #0a7594;
    --da-brand-dark: #075b74;
    --da-brand-accent: #0c8aaf;
    --da-cta: #fb641b;
    --da-cta-hover: #e85a18;
    --da-text: #212121;
    --da-text-light: #878787;
    --da-border: #e0e0e0;
    --da-bg: #fff;
    --da-overlay: rgba(0,0,0,0.6);
    --da-error: #ff5252;
    --da-radius: 4px;
}

.dopeauth-modal {
    position: fixed; inset: 0; z-index: 999999;
    display: none; align-items: center; justify-content: center;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.dopeauth-modal,
.dopeauth-modal * {
    box-sizing: border-box;
}
.dopeauth-modal h2,
.dopeauth-modal h3,
.dopeauth-modal h4,
.dopeauth-modal p,
.dopeauth-modal label,
.dopeauth-modal input,
.dopeauth-modal button,
.dopeauth-modal a {
    font-family: inherit;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    margin: 0;
}
.dopeauth-modal[aria-hidden="false"] { display: flex; }

.dopeauth-backdrop {
    position: absolute; inset: 0;
    background: var(--da-overlay);
}

.dopeauth-dialog {
    position: relative;
    display: flex;
    width: 750px; max-width: 95vw;
    min-height: 520px; max-height: 90vh;
    background: var(--da-bg);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: da-pop .18s ease-out;
}
@keyframes da-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.dopeauth-close {
    position: absolute; top: 12px; right: 16px;
    background: transparent; border: 0;
    color: var(--da-text-light); font-size: 28px; line-height: 1;
    cursor: pointer; z-index: 2;
    transition: color 0.15s;
}
.dopeauth-close:hover { color: var(--da-text); }

.dopeauth-left {
    width: 44%;
    background: #000;
    position: relative;
    padding: 0;
    overflow: hidden;
}
.dopeauth-left__art { 
    position: absolute; inset: 0; 
    width: 100%; height: 100%; 
}
.dopeauth-left__art svg,
.dopeauth-left__art img {
    width: 100%; height: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
}

.dopeauth-right {
    flex: 1;
    position: relative;
    padding: 40px 36px 32px;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.dopeauth-right__header { margin-bottom: 24px; }
.dopeauth-right__title { margin: 0 0 8px !important; font-size: 28px !important; font-weight: 600 !important; line-height: 1.2 !important; color: var(--da-text) !important; }
.dopeauth-right__sub { margin: 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--da-text-light) !important; }
.dopeauth-dialog.is-otp .dopeauth-right__header { display: none; }

.dopeauth-pane { display: flex; flex-direction: column; flex: 1; }
.dopeauth-pane[hidden] { display: none; }
.dopeauth-loader[hidden] { display: none !important; }
[hidden] { display: none !important; }

.dopeauth-field-label {
    display: block;
    margin: 0 0 6px;
    font-size: 11px; font-weight: 400;
    color: var(--da-text-light);
    text-transform: none;
    letter-spacing: 0;
}
.dopeauth-field-label + .dopeauth-field-label { margin-top: 14px; }

.dopeauth-input {
    width: 100%;
    padding: 8px 0;
    font-size: 14px;
    background: transparent;
    border: 0; border-bottom: 1px solid var(--da-border);
    outline: none;
    color: var(--da-text);
    transition: border-color .15s;
}
.dopeauth-input:focus { border-bottom-color: var(--da-brand); }
.dopeauth-input.is-error { border-bottom-color: var(--da-error); }

.dopeauth-error {
    min-height: 18px;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--da-error);
}

.dopeauth-terms {
    margin: 16px 0 20px;
    font-size: 12px; line-height: 1.5;
    color: var(--da-text-light);
}
.dopeauth-terms a { color: var(--da-brand); text-decoration: none; }

.dopeauth-btn {
    display: block; width: 100%;
    padding: 11px 16px;
    border: 0; border-radius: var(--da-radius);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background .15s, opacity .15s, transform .05s;
}
.dopeauth-btn:active { transform: scale(.99); }
.dopeauth-btn[disabled] { opacity: .55; cursor: progress; }
.dopeauth-btn--primary {
    background: var(--da-cta); color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.dopeauth-btn--primary:hover { background: var(--da-cta-hover); }

.dopeauth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0;
    color: var(--da-text-light); font-size: 12px;
}
.dopeauth-divider::before,
.dopeauth-divider::after {
    content: ""; flex: 1; height: 1px; background: var(--da-border);
}

.dopeauth-google { min-height: 44px; display: flex; justify-content: center; }

.dopeauth-link {
    color: var(--da-brand);
    font-size: 14px; font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.dopeauth-link:hover { text-decoration: underline; }

.dopeauth-link--bottom {
    margin-top: auto;
    padding-top: 20px;
    text-align: center;
}

/* cdsfy: otp screen */
.dopeauth-back {
    position: absolute; top: 16px; left: 16px;
    background: transparent; border: 0; padding: 4px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--da-text-light);
    transition: color 0.15s;
}
.dopeauth-back:hover { color: var(--da-text); }
.dopeauth-otp-title { margin: 0 0 8px !important; font-size: 24px !important; font-weight: 600 !important; line-height: 1.2 !important; color: var(--da-text) !important; }
.dopeauth-otp-sub { margin: 0 0 24px !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--da-text-light) !important; }
.dopeauth-otp-sub strong { color: var(--da-text); }

.dopeauth-otp-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}
.dopeauth-otp-single {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    font-size: 16px;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    border: 0;
    outline: none;
    padding: 0;
    z-index: 2;
    -webkit-text-fill-color: transparent;
    letter-spacing: calc(100% / 6);
}
.dopeauth-otp-single::selection { background: transparent; }
.dopeauth-otp-overlay {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    pointer-events: none;
}
.dopeauth-otp-overlay span {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1.1;
    border: 1px solid var(--da-border);
    border-radius: var(--da-radius);
    font-size: 18px;
    font-weight: 500;
    color: var(--da-text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.dopeauth-otp-single:focus ~ .dopeauth-otp-overlay span.is-next {
    border-color: var(--da-brand);
    box-shadow: 0 0 0 3px rgba(10,117,148,0.15);
}
.dopeauth-otp-overlay span.is-filled {
    border-color: var(--da-brand);
}
.dopeauth-otp-overlay span.is-error {
    border-color: var(--da-error);
}

.dopeauth-resend {
    display: flex; justify-content: space-between; align-items: center;
    margin: 12px 0 20px;
    font-size: 13px; color: var(--da-text-light);
}

.dopeauth-loader {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.85);
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
    pointer-events: all;
}
.dopeauth-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--da-border);
    border-top-color: var(--da-brand);
    border-radius: 50%;
    animation: da-spin .7s linear infinite;
}
@keyframes da-spin { to { transform: rotate(360deg); } }

/* cdsfy: mobile */
@media (max-width: 640px) {
    .dopeauth-dialog {
        width: 100%; max-width: 100%;
        height: 100vh; max-height: 100vh;
        border-radius: 0;
        flex-direction: column;
    }
    .dopeauth-left {
        display: none;
    }
    .dopeauth-right { padding: 32px 24px; }
    .dopeauth-close { color: var(--da-text-light); }
}
