/* =====================================================================
   MÓDULO: ASISTENCIA Y RECURSOS HUMANOS (RRHH) - ESTILOS COMPLETOS
======================================================================== */

/* Contenedor general */
.rrhh-app-container {
    padding-bottom: 50px;
}

/* Encabezado del módulo */
.rrhh-header-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 18px !important;
    padding: 20px 24px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .rrhh-header-toolbar {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.rrhh-icon-badge {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    background: rgba(var(--primary-rgb, 242,129,24), 0.12) !important;
    border: 1px solid rgba(var(--primary-rgb, 242,129,24), 0.25) !important;
    color: var(--primary, #f28118) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    flex-shrink: 0 !important;
}

.rrhh-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.live-clock-pill {
    background: rgba(0, 0, 0, 0.25) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Tabs */
.rrhh-tab-content {
    display: none;
    animation: fadeInRRHHTab 0.2s ease;
}

.rrhh-tab-content.active {
    display: block;
}

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

/* KPI Cards */
.rrhh-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 22px !important;
}

.rrhh-kpi-card {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .rrhh-kpi-card {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-kpi-card .rrhh-kpi-label {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.rrhh-kpi-card .rrhh-kpi-value {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--text-main, #0f172a) !important;
    line-height: 1.1 !important;
}

body.dark-mode .rrhh-kpi-card .rrhh-kpi-value {
    color: #f8fafc !important;
}

.rrhh-kpi-card .rrhh-kpi-sub {
    font-size: 12px !important;
    color: var(--text-muted, #64748b) !important;
    margin-top: 6px !important;
}

.rrhh-kpi-card.info .rrhh-kpi-value { color: #2563eb !important; }
.rrhh-kpi-card.success .rrhh-kpi-value { color: #16a34a !important; }
.rrhh-kpi-card.warning .rrhh-kpi-value { color: #d97706 !important; }
.rrhh-kpi-card.danger .rrhh-kpi-value { color: #dc2626 !important; }

body.dark-mode .rrhh-kpi-card.info .rrhh-kpi-value { color: #60a5fa !important; }
body.dark-mode .rrhh-kpi-card.success .rrhh-kpi-value { color: #34d399 !important; }
body.dark-mode .rrhh-kpi-card.warning .rrhh-kpi-value { color: #fbbf24 !important; }
body.dark-mode .rrhh-kpi-card.danger .rrhh-kpi-value { color: #f87171 !important; }

/* Contenedores de Tarjetas y Tablas */
.rrhh-card,
.rrhh-app-container .table-responsive {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 18px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    overflow-x: auto !important;
    margin-bottom: 22px !important;
}

body.dark-mode .rrhh-card,
body.dark-mode .rrhh-app-container .table-responsive {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

body.dark-mode .rrhh-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main, #0f172a) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}

body.dark-mode .rrhh-card-title {
    color: #f8fafc !important;
}

/* =====================================================================
   TABLAS ESTILIZADAS PARA RRHH (LIGHT & DARK MODE)
======================================================================== */
.rrhh-app-container table,
.rrhh-app-container .rrhh-table,
.rrhh-app-container .modern-table,
.rrhh-app-container .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    text-align: left !important;
    margin: 0 !important;
}

.rrhh-app-container table thead,
.rrhh-app-container .rrhh-table thead,
.rrhh-app-container .modern-table thead,
.rrhh-app-container .data-table thead {
    display: table-header-group !important;
    background: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

body.dark-mode .rrhh-app-container table thead,
body.dark-mode .rrhh-app-container .rrhh-table thead,
body.dark-mode .rrhh-app-container .modern-table thead,
body.dark-mode .rrhh-app-container .data-table thead {
    background: #131b2e !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-app-container table th,
.rrhh-app-container .rrhh-table th,
.rrhh-app-container .modern-table th,
.rrhh-app-container .data-table th {
    padding: 14px 18px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    background: inherit !important;
    border: none !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    display: table-cell !important;
}

body.dark-mode .rrhh-app-container table th,
body.dark-mode .rrhh-app-container .rrhh-table th,
body.dark-mode .rrhh-app-container .modern-table th,
body.dark-mode .rrhh-app-container .data-table th {
    color: #94a3b8 !important;
}

.rrhh-app-container table td,
.rrhh-app-container .rrhh-table td,
.rrhh-app-container .modern-table td,
.rrhh-app-container .data-table td {
    padding: 15px 18px !important;
    font-size: 13.5px !important;
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
    background: transparent !important;
    display: table-cell !important;
}

body.dark-mode .rrhh-app-container table td,
body.dark-mode .rrhh-app-container .rrhh-table td,
body.dark-mode .rrhh-app-container .modern-table td,
body.dark-mode .rrhh-app-container .data-table td {
    color: #f1f5f9 !important;
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.rrhh-app-container table tbody tr,
.rrhh-app-container .rrhh-table tbody tr,
.rrhh-app-container .modern-table tbody tr,
.rrhh-app-container .data-table tbody tr {
    display: table-row !important;
    transition: background 0.15s ease !important;
}

.rrhh-app-container table tbody tr::after,
.rrhh-app-container .rrhh-table tbody tr::after,
.rrhh-app-container .modern-table tbody tr::after,
.rrhh-app-container .data-table tbody tr::after {
    display: none !important;
    content: none !important;
}

.rrhh-app-container table tbody tr:hover td,
.rrhh-app-container .rrhh-table tbody tr:hover td,
.rrhh-app-container .modern-table tbody tr:hover td,
.rrhh-app-container .data-table tbody tr:hover td {
    background: rgba(0, 0, 0, 0.02) !important;
}

body.dark-mode .rrhh-app-container table tbody tr:hover td,
body.dark-mode .rrhh-app-container .rrhh-table tbody tr:hover td,
body.dark-mode .rrhh-app-container .modern-table tbody tr:hover td,
body.dark-mode .rrhh-app-container .data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025) !important;
}

/* Avatar circular de usuario */
.rrhh-avatar-circle {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--primary, #f28118) 0%, #ec4899 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Botones de acción en tabla */
.btn-action-round {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    font-size: 13px !important;
}

.btn-action-round:hover {
    background: rgba(var(--primary-rgb, 242,129,24), 0.15) !important;
    color: var(--primary, #f28118) !important;
    border-color: rgba(var(--primary-rgb, 242,129,24), 0.4) !important;
    transform: translateY(-1px) !important;
}

body.dark-mode .btn-action-round {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
}

/* Status Pills */
.rrhh-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
}

.rrhh-status-pill.success {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.rrhh-status-pill.danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.rrhh-status-pill.warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.rrhh-status-pill.secondary {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.rrhh-status-pill.dark {
    background: #e2e8f0 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

body.dark-mode .rrhh-status-pill.success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-mode .rrhh-status-pill.danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-mode .rrhh-status-pill.warning {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-mode .rrhh-status-pill.secondary {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

/* Time Badges */
.rrhh-time-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

body.dark-mode .rrhh-time-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}

/* Miniatura de fotos selfies */
.photo-thumb {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    border: 1.5px solid #cbd5e1 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.photo-thumb:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.dark-mode .photo-thumb {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Ficha de Personal - Banner Superior */
.rrhh-sheet-profile-card {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 18px !important;
    padding: 22px 26px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .rrhh-sheet-profile-card {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Botonera de tipo de marcación en el Widget */
.punch-action-selector-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}

.punch-action-selector-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    color: #64748b !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

body.dark-mode .punch-action-selector-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

.punch-action-selector-btn:hover {
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.dark-mode .punch-action-selector-btn:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.punch-action-selector-btn.active[data-type="entrada"] {
    background: #dcfce7 !important;
    border-color: #16a34a !important;
    color: #15803d !important;
}

.punch-action-selector-btn.active[data-type="inicio_refrigerio"] {
    background: #fef3c7 !important;
    border-color: #d97706 !important;
    color: #b45309 !important;
}

.punch-action-selector-btn.active[data-type="fin_refrigerio"] {
    background: #dbeafe !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
}

.punch-action-selector-btn.active[data-type="salida"] {
    background: #fee2e2 !important;
    border-color: #dc2626 !important;
    color: #b91c1c !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="entrada"] {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="inicio_refrigerio"] {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="fin_refrigerio"] {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="salida"] {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

/* Inputs de configuración y formularios */
#cfgHRDefaultTolerance, #cfgHRRateMinute, #cfgHRAbsenceDay,
#editEmployeeHRForm input, #editEmployeeHRForm select,
#addHRPaymentForm input, #addHRPaymentForm select, #addHRPaymentForm textarea,
#addHRDeductionForm input, #addHRDeductionForm select, #addHRDeductionForm textarea {
    padding: 10px 14px !important;
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13.5px !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

body.dark-mode #cfgHRDefaultTolerance, body.dark-mode #cfgHRRateMinute, body.dark-mode #cfgHRAbsenceDay,
body.dark-mode #editEmployeeHRForm input, body.dark-mode #editEmployeeHRForm select,
body.dark-mode #addHRPaymentForm input, body.dark-mode #addHRPaymentForm select, body.dark-mode #addHRPaymentForm textarea,
body.dark-mode #addHRDeductionForm input, body.dark-mode #addHRDeductionForm select, body.dark-mode #addHRDeductionForm textarea {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
}


/* Filtros y Buscadores de RRHH */
#rrhhWorkersSearchInput, #rrhhWorkersRoleFilter, #rrhhWorkersStatusFilter, #rrhhSheetWorkerSelect, #rrhhSheetMonthSelect {
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    padding: 10px 14px !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
}

body.dark-mode #rrhhWorkersSearchInput, 
body.dark-mode #rrhhWorkersRoleFilter, 
body.dark-mode #rrhhWorkersStatusFilter, 
body.dark-mode #rrhhSheetWorkerSelect, 
body.dark-mode #rrhhSheetMonthSelect {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
}

/* =====================================================================
   POLÍTICAS DE ASISTENCIA (CARDS CON CONTRASTE MODO CLARO / OSCURO)
======================================================================== */
.policy-switch-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.policy-switch-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.policy-switch-card.danger-policy {
    background: #fffafb;
    border-color: #fecaca;
}

.policy-switch-card.danger-policy:hover {
    border-color: #fca5a5;
}

.hr-config-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.hr-config-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.dark-mode .hr-config-input {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

body.dark-mode .hr-config-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

body.dark-mode .policy-switch-card {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode .policy-switch-card.danger-policy {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.25);
}

.policy-switch-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .policy-switch-title {
    color: #f8fafc;
}

.policy-switch-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

body.dark-mode .policy-switch-desc {
    color: #94a3b8;
}

/* =====================================================================
   GOOGLE AUTHENTICATOR ADMIN TOTP CARD (MODO CLARO Y MODO OSCURO)
======================================================================== */
.admin-totp-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

body.dark-mode .admin-totp-card {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.totp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .totp-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.totp-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.totp-shield-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.28);
    flex-shrink: 0;
}

.totp-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.2px;
}

body.dark-mode .totp-card-title {
    color: #f8fafc;
}

.totp-card-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    display: block;
}

body.dark-mode .totp-card-subtitle {
    color: #94a3b8;
}

.btn-totp-regen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-totp-regen:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

body.dark-mode .btn-totp-regen {
    background: #27272a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

body.dark-mode .btn-totp-regen:hover {
    background: #3f3f46;
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.totp-card-content {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.totp-qr-box {
    background: #ffffff;
    padding: 10px;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-mode .totp-qr-box {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.totp-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.totp-instructions-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.totp-steps-text {
    font-size: 12.5px;
    line-height: 1.55;
    color: #334155;
}

body.dark-mode .totp-steps-text {
    color: #cbd5e1;
}

.totp-steps-text strong {
    color: #0f172a;
    font-weight: 700;
}

body.dark-mode .totp-steps-text strong {
    color: #ffffff;
}

.totp-secret-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.totp-secret-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

body.dark-mode .totp-secret-label {
    color: #94a3b8;
}

.totp-secret-code {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    border-radius: 8px;
    user-select: all;
}

body.dark-mode .totp-secret-code {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
}

.btn-totp-copy {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-totp-copy:hover {
    background: #e2e8f0;
    color: #0f172a;
}

body.dark-mode .btn-totp-copy {
    background: #27272a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-mode .btn-totp-copy:hover {
    background: #3f3f46;
    color: #ffffff;
}

.totp-live-test-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.totp-test-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

body.dark-mode .totp-test-label {
    color: #94a3b8;
}

.totp-live-badge {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 17px;
    font-weight: 800;
    color: #059669;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    padding: 3px 12px;
    border-radius: 8px;
    letter-spacing: 3px;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

body.dark-mode .totp-live-badge {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

