/* 2FA TOTP tool — Trust & Authority palette (ui-ux-pro-max) */
.totp-page {
    --totp-primary: #0f766e;
    --totp-primary-hover: #0d9488;
    --totp-secondary: #14b8a6;
    --totp-cta: #0369a1;
    --totp-cta-hover: #0284c7;
    --totp-bg: #f0fdfa;
    --totp-text: #134e4a;
    --totp-muted: #475569;
    --totp-border: rgba(15, 118, 110, 0.18);
    --totp-card-shadow: 0 20px 60px rgba(15, 118, 110, 0.14);

    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: transparent;
    position: relative;
}

.totp-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1050px;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border-radius: 24px;
    box-shadow: var(--totp-card-shadow), 0 0 0 1px var(--totp-border) inset;
    overflow: hidden;
    border: 1px solid var(--totp-border);
    position: relative;
    z-index: 1;
}

.totp-tool {
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.totp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--totp-primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.totp-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.totp-tool h1 {
    font-size: 2rem;
    line-height: 1.2;
    color: var(--totp-text);
    margin: 0;
}

.totp-subtitle {
    color: var(--totp-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

.totp-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--totp-text);
    margin-bottom: 0.5rem;
}

.totp-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(15, 118, 110, 0.22);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.04em;
    color: var(--totp-text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.totp-field input:focus {
    outline: none;
    border-color: var(--totp-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.totp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.totp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: var(--totp-cta);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(3, 105, 161, 0.25);
}

.totp-btn:hover {
    background: var(--totp-cta-hover);
    transform: translateY(-1px);
}

.totp-btn:focus-visible {
    outline: 3px solid rgba(3, 105, 161, 0.35);
    outline-offset: 2px;
}

.totp-btn svg {
    width: 18px;
    height: 18px;
}

.totp-status {
    font-size: 0.875rem;
    font-weight: 600;
    min-height: 1.25rem;
}

.totp-status--neutral {
    color: transparent;
}

.totp-status--success {
    color: #059669;
}

.totp-status--warning {
    color: #d97706;
}

.totp-status--error {
    color: #dc2626;
}

.totp-result {
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.06) 0%, rgba(20, 184, 166, 0.08) 100%);
    border: 1px solid var(--totp-border);
}

.totp-result-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.totp-result-row:last-child {
    margin-bottom: 0;
}

.totp-result-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--totp-text);
}

.totp-code {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--totp-cta);
    transition: color 0.2s ease;
}

.totp-code--empty {
    color: #94a3b8;
    letter-spacing: 0.12em;
}

.totp-time {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--totp-primary);
    font-variant-numeric: tabular-nums;
}

.totp-progress-wrap {
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    overflow: hidden;
    margin-top: 0.75rem;
}

.totp-progress {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--totp-primary), var(--totp-secondary));
    transition: width 1s linear;
}

.totp-hint {
    font-size: 0.8125rem;
    color: var(--totp-muted);
    line-height: 1.5;
    margin: 0;
}

.totp-info {
    padding: 2.5rem 3rem;
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.95) 0%, rgba(236, 254, 255, 0.85) 100%);
    border-left: 1px solid var(--totp-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

.totp-info-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 118, 110, 0.1);
    color: var(--totp-primary);
}

.totp-info-icon svg {
    width: 28px;
    height: 28px;
}

.totp-info h2 {
    font-size: 1.5rem;
    color: var(--totp-text);
    margin: 0;
}

.totp-info p {
    color: var(--totp-muted);
    font-size: 0.9375rem;
    line-height: 1.75;
    margin: 0;
}

.totp-info-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--totp-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

.totp-info-list li + li {
    margin-top: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
    .totp-btn,
    .totp-field input,
    .totp-progress {
        transition: none;
    }
}

@media (max-width: 768px) {
    .totp-container {
        grid-template-columns: 1fr;
    }

    .totp-info {
        border-left: none;
        border-top: 1px solid var(--totp-border);
        padding: 2rem;
    }

    .totp-tool {
        padding: 2rem;
    }

    .totp-tool h1 {
        font-size: 1.625rem;
    }

    .totp-code {
        font-size: 1.875rem;
    }
}
