/* ============================================
   Kernel Pro — Cancel Account (Dark Theme)
   Matched to dashboard.css design system
   ============================================ */

:root {
    /* Surface */
    --bg-base:      #0c0d12;
    --bg-elevated:  #13141c;
    --bg-card:      #181924;
    --bg-card-hover:#1e2030;
    --bg-input:     #1a1b26;

    /* Text */
    --text-primary:   #e4e6ed;
    --text-secondary: #8b8fa4;
    --text-muted:     #555871;

    /* Border */
    --border:       #222436;
    --border-hover: #2e3148;

    /* Accent */
    --accent:       #4f7cff;
    --accent-dim:   rgba(79,124,255,0.12);
    --accent-hover: #3d6af0;

    /* Semantic */
    --green:  #34d399;
    --green-dim: rgba(52,211,153,0.12);
    --red:    #f87171;
    --red-dim: rgba(248,113,113,0.12);
    --amber:  #fbbf24;
    --amber-dim: rgba(251,191,36,0.12);

    /* Misc */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-pill: 100px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03);
    --shadow-float: 0 8px 32px rgba(0,0,0,0.5);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: .2s var(--ease);
    --transition-smooth: .4s var(--ease);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.011em;
    font-size: 14px;
}

/* ───── Background Decoration ───── */
.bg-decoration {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(79,124,255,0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(52,211,153,0.04) 0%, transparent 55%);
}

/* ───── Main Container ───── */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 460px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 8vh;
    padding-bottom: 6vh;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ───── Page Header ───── */
.page-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    transition: color var(--transition-fast);
    justify-content: center;
    margin-bottom: 8px;
}

.brand-link:hover { color: var(--text-primary); }

.brand-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}

/* ───── Form Card ───── */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all var(--transition-fast);
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    background: var(--bg-elevated);
}

.form-input.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-dim);
}

.form-error {
    font-size: 11px;
    color: var(--red);
    letter-spacing: 0.02em;
    display: none;
}

.form-error.visible { display: block; }

/* ───── Code Row ───── */
.code-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.code-row .form-group { flex: 1; }

.btn-send-code {
    flex-shrink: 0;
    height: 44px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.btn-send-code:hover:not(:disabled) {
    background: rgba(79,124,255,0.2);
    border-color: var(--accent);
}

.btn-send-code:active:not(:disabled) { transform: scale(0.97); }

.btn-send-code:disabled {
    color: var(--text-muted);
    background: var(--bg-input);
    cursor: not-allowed;
}

/* ───── Buttons ───── */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    color: #ffffff;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(79,124,255,0.25);
    font-family: inherit;
}

.btn-submit:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(79,124,255,0.35);
    transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-card);
}

.btn-submit:disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit.danger {
    background: var(--red);
    box-shadow: 0 2px 8px rgba(248,113,113,0.25);
}

.btn-submit.danger:hover:not(:disabled) {
    background: #ef4444;
    box-shadow: 0 4px 16px rgba(248,113,113,0.35);
}

.btn-submit.danger:disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    box-shadow: none;
}

.btn-outline {
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-outline:active { transform: scale(0.97); }

/* ───── Toast ───── */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 2000;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-float);
    transition: transform var(--transition-smooth);
    pointer-events: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.toast.visible { transform: translateX(-50%) translateY(0); }

.toast.success {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(52,211,153,0.2);
}

.toast.error {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(248,113,113,0.2);
}

.toast.info {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(79,124,255,0.2);
}

.toast.warning {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(251,191,36,0.2);
}

/* ───── Spinner ───── */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* ───── Footer Link ───── */
.footer-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.footer-link a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link a:hover { color: var(--text-primary); }

/* ───── Steps ───── */
.step { display: none; }
.step.active { display: block; animation: fadeIn 0.3s var(--ease); }

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

/* ───── Agreement Box ───── */
.agreement-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    max-height: 220px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.agreement-box h4 {
    color: var(--amber);
    font-size: 14px;
    margin-bottom: 8px;
}

.agreement-box ul {
    padding-left: 18px;
    margin: 6px 0;
}

.agreement-box li { margin-bottom: 4px; }

.agreement-box strong { color: var(--text-primary); }

.agreement-timer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.agreement-timer span {
    color: var(--amber);
    font-weight: 700;
    font-size: 14px;
}

/* ───── Confirm Card ───── */
.confirm-card {
    background: var(--red-dim);
    border: 1px solid rgba(248,113,113,0.15);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
}

.confirm-card .icon { font-size: 40px; margin-bottom: 8px; }

.confirm-card .title {
    font-size: 18px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 6px;
}

.confirm-card .desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ───── Result Card ───── */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
}

.result-card .icon { font-size: 48px; margin-bottom: 12px; }

.result-card .title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.result-card .desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ───── Progress Bar ───── */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all var(--transition-fast);
}

.progress-dot.active {
    background: var(--accent);
    transform: scale(1.2);
    box-shadow: 0 0 8px var(--accent-dim);
}

.progress-dot.done {
    background: var(--green);
}

/* ───── Button Group ───── */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ───── Warning Text ───── */
.warn-text {
    font-size: 12px;
    color: var(--red);
    background: var(--red-dim);
    border: 1px solid rgba(248,113,113,0.15);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    line-height: 1.7;
}

/* ───── Info Row ───── */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.info-row:last-child { border-bottom: none; }

.info-row .label { color: var(--text-muted); }

.info-row .val {
    font-weight: 600;
    color: var(--text-primary);
}

/* ───── Anti-Fraud Banner ───── */
.fraud-banner {
    display: none;
    background: var(--amber-dim);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--amber);
    line-height: 1.6;
    gap: 10px;
    align-items: flex-start;
}

.fraud-banner.visible { display: flex; }

.fraud-banner .fraud-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.fraud-banner .fraud-text { flex: 1; }

.fraud-banner .fraud-text strong { color: var(--text-primary); }

/* ───── Security Badge ───── */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--green-dim);
    border: 1px solid rgba(52,211,153,0.15);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    margin-top: 4px;
}

/* ───── Responsive ───── */
@media (min-width: 481px) {
    .main-container {
        padding: 0 32px;
        padding-top: 10vh;
        padding-bottom: 8vh;
    }
    .form-card { padding: 28px 24px; }
    .page-title { font-size: 28px; }
}

@media (min-width: 768px) {
    .main-container { max-width: 480px; padding-top: 12vh; }
}

@media (min-width: 1024px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 40px;
    }

    .main-container {
        max-width: 480px;
        width: 100%;
        min-height: auto;
        padding: 0;
        margin: 0;
    }

    .form-card {
        padding: 36px 32px;
        border-radius: 20px;
        box-shadow: var(--shadow-float);
        border: 1px solid var(--border-hover);
        gap: 22px;
    }

    .form-label { font-size: 13px; }

    .form-input {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: var(--radius-md);
    }

    .form-input:hover {
        border-color: var(--border-hover);
        background: var(--bg-card-hover);
    }

    .btn-submit {
        padding: 16px 24px;
        font-size: 15px;
    }

    .btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
    }

    .btn-submit:active:not(:disabled) {
        transform: translateY(0) scale(0.98);
    }

    .btn-outline {
        padding: 16px 24px;
        font-size: 15px;
    }

    .btn-outline:hover {
        background: var(--bg-card-hover);
    }

    .btn-send-code {
        border-radius: var(--radius-md);
        height: 48px;
    }

    .toast {
        top: 32px;
        padding: 14px 28px;
        font-size: 14px;
    }

    .btn-group {
        flex-direction: row;
    }

    .btn-group .btn-submit,
    .btn-group .btn-outline {
        flex: 1;
    }
}
