/* Sigma Gatekeeper — Auth Modal Overlay */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* ── Overlay ── */
.sgk-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: sgkFadeIn 0.3s ease;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 20px;
}

@keyframes sgkFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal Box ── */
.sgk-modal {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
    overflow: hidden;
    animation: sgkSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes sgkSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Header ── */
.sgk-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 28px 32px 22px;
    text-align: center;
}

.sgk-modal-brand {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.sgk-modal-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 12.5px;
    margin: 6px 0 0;
    font-weight: 400;
}

/* ── Tabs ── */
.sgk-tabs {
    display: flex;
    border-bottom: 1px solid #edf2f7;
    background: #f8fafc;
}

.sgk-tab {
    flex: 1;
    padding: 13px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    font-family: inherit;
}

.sgk-tab:hover {
    color: #475569;
}

.sgk-tab.sgk-tab-active {
    color: #0f172a;
}

.sgk-tab.sgk-tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #2563eb;
    border-radius: 2px 2px 0 0;
}

/* ── Tab Content ── */
.sgk-tab-content {
    display: none;
    padding: 24px 32px 28px;
}

.sgk-tab-content.sgk-tab-active {
    display: block;
    animation: sgkPanelIn 0.25s ease;
}

@keyframes sgkPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Form Fields ── */
.sgk-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sgk-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sgk-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14.5px;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

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

.sgk-field input::placeholder {
    color: #94a3b8;
}

/* ── Buttons ── */
.sgk-btn {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.sgk-btn:hover {
    background: #1e293b;
}

.sgk-btn:active {
    transform: scale(0.985);
}

.sgk-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.sgk-btn-sm {
    width: auto;
    padding: 10px 20px;
    font-size: 13px;
}

/* ── Links ── */
.sgk-text-link {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    padding: 0;
    font-weight: 500;
}

.sgk-text-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.sgk-text-link:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.sgk-form-footer {
    text-align: center;
    margin-top: 2px;
}

/* ── Feedback ── */
.sgk-feedback {
    font-size: 13px;
    min-height: 18px;
    margin: 2px 0;
    border-radius: 6px;
    transition: all 0.2s;
}

.sgk-feedback.success { color: #16a34a; }
.sgk-feedback.error   { color: #dc2626; }
.sgk-feedback.info    { color: #2563eb; }

/* ── Muted text ── */
.sgk-muted {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

/* ── Progress Steps ── */
.sgk-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 24px;
    gap: 0;
}

.sgk-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
}

.sgk-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.sgk-step-text {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    transition: color 0.3s;
}

.sgk-step.active .sgk-step-dot {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}
.sgk-step.active .sgk-step-text { color: #2563eb; }

.sgk-step.done .sgk-step-dot {
    background: #16a34a;
    color: #fff;
}
.sgk-step.done .sgk-step-dot::after {
    content: '✓';
    font-size: 15px;
}
.sgk-step.done .sgk-step-text { color: #16a34a; }

.sgk-step-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    min-width: 30px;
    margin: 0 4px;
    margin-bottom: 18px;
    transition: background 0.3s;
}

/* ── OTP Row ── */
.sgk-otp-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 12px 0 8px;
}

.sgk-otp-row input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 22px;
    letter-spacing: 6px;
    text-align: center;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    width: 150px;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sgk-otp-row input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* ── Verify Panels ── */
.sgk-verify-panel {
    margin-bottom: 8px;
}

.sgk-verify-panel h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

/* ── Success ── */
.sgk-verify-done {
    text-align: center;
    padding: 20px 0;
}

.sgk-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: sgkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sgkPop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

.sgk-verify-done h3 {
    color: #16a34a;
    font-size: 20px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .sgk-modal {
        max-width: 100%;
        border-radius: 12px;
    }

    .sgk-modal-header {
        padding: 22px 20px 18px;
    }

    .sgk-tab-content {
        padding: 20px;
    }

    .sgk-otp-row {
        flex-direction: column;
    }

    .sgk-otp-row input {
        width: 100%;
    }

    .sgk-btn-sm {
        width: 100%;
    }
}

/* ── Hide scrollbar on modal content ── */
.sgk-modal::-webkit-scrollbar {
    width: 4px;
}
.sgk-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
