/* =========================================================================
   Nexus Voice Vault — Auth & Admin Modal Styles
   Strict adherence to Official Theme Palette (Montserrat & JetBrains Mono)
   ========================================================================= */

/* Modals General */
.auth-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

body.theme-dark .auth-modal-backdrop {
    background: rgba(0, 0, 0, 0.75);
}

.auth-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal-box,
.clean-auth-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    width: 92%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    padding: 34px 28px 28px;
    position: relative;
    overflow: hidden;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.clean-auth-modal-box .btn-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.clean-auth-modal-box .btn-modal-close:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

@keyframes modalPopIn {
    0% { transform: scale(0.96) translateY(8px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-modal-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.auth-modal-body {
    padding: 24px;
}

/* 6-Digit OTP Box Grid */
.otp-inputs-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.otp-digit-input {
    width: 100%;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-input);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.otp-digit-input:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.otp-resend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
}

.btn-resend-link {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-resend-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: none;
}

/* Admin Dashboard Modal */
.admin-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    width: 95%;
    max-width: 980px;
    height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-header-row {
    padding: 16px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    flex: 1;
    overflow: hidden;
}

.admin-sidebar-nav {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-light);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-tab-btn.active {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
}

.admin-main-viewport {
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-card);
}

.admin-tab-pane {
    display: none;
}

.admin-tab-pane.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

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

/* Stats Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
}

.admin-stat-number {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-primary);
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.badge-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
}

.badge-pill.status-verified {
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}

.badge-pill.status-pending {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.badge-pill.role-admin {
    background: var(--accent-primary);
    color: var(--accent-primary-text);
}

.badge-pill.role-user {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.btn-action-sm {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

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

.admin-log-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.log-indicator {
    font-size: 14px;
}

.log-indicator.success { color: #059669; }
.log-indicator.warn { color: #d97706; }
