/* ═══════════════════════════════════════════════════════════════════
   OPAQUE AUTH FORTRESS – Stylesheet
   Military-grade dark theme with professional security aesthetic
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --bg-card: #151d2b;
    --border: #1e2d3d;
    --border-focus: #3b82f6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.2);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.6;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

/* ── Background Grid ───────────────────────────────────────────── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── Container ─────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

.dashboard-container {
    max-width: 700px;
}

/* ── Auth Header ───────────────────────────────────────────────── */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.shield-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.shield-icon.small {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.auth-header h1 {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* ── Security Badge ────────────────────────────────────────────── */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    text-align: center;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ── Tab Navigation ────────────────────────────────────────────── */
.tab-nav {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ── Tab Content ───────────────────────────────────────────────── */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: all var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group input.success {
    border-color: var(--success);
}

/* ── Password Wrapper ──────────────────────────────────────────── */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 3rem;
}

.toggle-pw {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.toggle-pw:hover {
    opacity: 1;
}

/* ── Password Rules ────────────────────────────────────────────── */
.password-rules {
    list-style: none;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.password-rules li {
    padding: 0.15rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.password-rules li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.password-rules li.pass::before {
    content: '●';
    color: var(--success);
}

.password-rules li.pass {
    color: var(--success);
}

/* ── Password Strength Bar ─────────────────────────────────────── */
.password-strength {
    height: 3px;
    border-radius: 3px;
    margin-top: 0.5rem;
    background: var(--border);
    overflow: hidden;
}

.password-strength .strength-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #fff;
    margin-top: 0.5rem;
    padding: 0.9rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ── Button Loader ─────────────────────────────────────────────── */
.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Form Footer ───────────────────────────────────────────────── */
.form-footer {
    text-align: center;
    margin-top: 1.25rem;
}

.link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ── Messages ──────────────────────────────────────────────────── */
.message {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.message.error {
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.message.success {
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.message.warning {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* ── Protocol Info ─────────────────────────────────────────────── */
.protocol-info {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.protocol-info details {
    cursor: pointer;
}

.protocol-info summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    list-style: none;
    padding: 0.5rem;
}

.protocol-info summary::-webkit-details-marker {
    display: none;
}

.protocol-info summary::before {
    content: '▸ ';
}

.protocol-info details[open] summary::before {
    content: '▾ ';
}

.info-content {
    margin-top: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-content ul {
    list-style: none;
    margin-top: 0.5rem;
}

.info-content li {
    padding: 0.2rem 0;
}

/* ── Step Indicator ────────────────────────────────────────────── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    opacity: 0.4;
    transition: opacity var(--transition);
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.8;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.step.active .step-number {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.step.completed .step-number {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.step.active .step-label {
    color: var(--accent);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
    margin-bottom: 1.2rem;
}

/* ── Reset Steps ───────────────────────────────────────────────── */
.reset-step {
    display: none;
}

.reset-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.6;
}

/* ── Success Screen ────────────────────────────────────────────── */
.success-screen {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-screen h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.success-screen p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ── Loading Screen ────────────────────────────────────────────── */
.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 100;
    gap: 1rem;
}

.loading-screen p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Dashboard ─────────────────────────────────────────────────── */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-title h1 {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.welcome-card {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(59, 130, 246, 0.05));
}

.welcome-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── Status Badge ──────────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.online {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* ── Info Grid ─────────────────────────────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* ── Security Checks ───────────────────────────────────────────── */
.security-checks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.check-item:last-child {
    border-bottom: none;
}

.check-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ── Dashboard Footer ──────────────────────────────────────────── */
.dashboard-footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 500px) {
    body {
        padding: 1rem 0.75rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .auth-header h1 {
        font-size: 1.1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .step-label {
        font-size: 0.6rem;
    }

    .step-line {
        width: 24px;
    }
}

/* ── Utility ───────────────────────────────────────────────────── */
[hidden] {
    display: none !important;
}

/* ── Selection ─────────────────────────────────────────────────── */
::selection {
    background: var(--accent);
    color: #fff;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ── Overlay / Modal ───────────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.overlay-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
}

.overlay-header {
    text-align: center;
    margin-bottom: 1rem;
}

.overlay-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.overlay-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* ── 2FA Code Input ────────────────────────────────────────────── */
.code-input {
    text-align: center;
    font-family: var(--font-mono) !important;
    font-size: 1.6rem !important;
    letter-spacing: 0.5em;
    padding: 0.9rem 1rem !important;
}

.twofa-phone {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 1rem;
    padding: 0.4rem;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
}

.twofa-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ── Backup Codes Grid ─────────────────────────────────────────── */
.backup-codes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.backup-code {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    padding: 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--warning);
    letter-spacing: 0.15em;
    user-select: all;
}

/* ── Phone Input Hint ──────────────────────────────────────────── */
.form-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════════ */

.admin-container {
    max-width: 1100px;
}

.dashboard-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── Admin Table ───────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 0.6rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04);
}

.cell-user {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
}

.cell-email {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.cell-center {
    text-align: center;
}

.cell-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.cell-level {
    min-width: 140px;
}

/* ── Level Control ─────────────────────────────────────────────── */
.level-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.level-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    outline: none;
    min-width: 60px;
}

.level-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.level-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.level-display {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    display: inline-block;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 0.72rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-accent:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-accent:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Level Legend ──────────────────────────────────────────────── */
.level-legend {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.level-low {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.level-mid {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.level-high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.level-max {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ── Admin Action Buttons ──────────────────────────────────────── */
.action-buttons {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: var(--radius-sm, 4px);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-action:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cell-actions {
    min-width: 120px;
    white-space: nowrap;
}

.cell-status {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-locked { color: var(--error); }
.status-reset  { color: var(--warning); }
.status-active { color: var(--success); }

.text-muted {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: italic;
}

/* ── Admin Backup Codes Modal ──────────────────────────────────── */
.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.admin-overlay[hidden] {
    display: none;
}

.overlay-card {
    background: var(--bg-card, #1e1e2e);
    border: 1px solid var(--border);
    border-radius: var(--radius, 8px);
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.overlay-card h3 {
    margin-top: 0;
    color: var(--text-primary);
}

.backup-codes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 1rem 0;
}

.backup-code {
    font-family: var(--font-mono);
    background: var(--bg-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm, 4px);
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent);
    border: 1px solid var(--border);
    letter-spacing: 0.05em;
}

/* ── Admin Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
    .admin-table {
        font-size: 0.78rem;
    }
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.4rem;
    }
    .level-control {
        flex-direction: column;
        gap: 0.3rem;
    }
}
