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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
}

.admin-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header con logo centrado */
.header {
    background: #111111;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 28px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.header-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    width: 70px;
    height: 70px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 2px solid #3a3a3a;
    transition: all 0.3s ease;
    overflow: hidden;
}

.logo-circle:hover {
    border-color: #666666;
    transform: scale(1.02);
}

.logo-img {
    width: 50px;
    height: auto;
    object-fit: contain;
}

.header-logo h1 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-logo p {
    color: #888888;
    font-size: 14px;
    letter-spacing: 1px;
}

.header-stats {
    display: flex;
    gap: 20px;
    margin: 32px 0 24px;
}

.stat-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 18px 28px;
    text-align: center;
    flex: 1;
    border: 1px solid #2a2a2a;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
    background: #1e1e1e;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 12px;
    color: #888888;
    margin-top: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-refresh, .btn-export {
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-refresh {
    background: #1a1a1a;
    color: #cccccc;
    border: 1px solid #333333;
}

.btn-refresh:hover {
    background: #222222;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-refresh.paused {
    background: #2a1a1a;
    color: #ff8888;
    border-color: #553333;
}

.btn-export {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #3a3a3a;
}

.btn-export:hover {
    background: #333333;
    transform: translateY(-1px);
}

/* Filtros */
.filters {
    background: #111111;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #2a2a2a;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input, .filter-group select {
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 10px;
    font-size: 13px;
    color: #e5e5e5;
    outline: none;
    transition: all 0.3s ease;
}

.filter-group input:focus, .filter-group select:focus {
    border-color: #666666;
    box-shadow: 0 0 0 2px rgba(100, 100, 100, 0.2);
}

.filter-group input::placeholder {
    color: #666666;
}

/* Resultados info */
.resultados-info {
    margin-bottom: 20px;
    font-size: 13px;
    color: #888888;
    padding: 10px 0;
}

/* Registros container */
.registros-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.loading-spinner {
    text-align: center;
    padding: 60px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid #2a2a2a;
    border-top-color: #888888;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 18px;
}

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

/* ========== REGISTROS NUEVOS - VERDE CORPORATIVO ========== */

.registro-card.nuevo {
    border-left: 4px solid #10b981;
    animation: glowGreen 0.5s ease, fadeInUp 0.3s ease;
    position: relative;
}

.registro-card.nuevo::before {
    content: "✨ NUEVO";
    position: absolute;
    top: -10px;
    left: 20px;
    background: #10b981;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
    animation: pulse-green 1.5s infinite;
}

@keyframes glowGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
        border-left-color: #10b981;
    }
    50% {
        box-shadow: 0 0 12px 3px rgba(16, 185, 129, 0.15);
        border-left-color: #10b981;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        border-left-color: #10b981;
    }
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        transform: scale(1);
    }
}

/* ========== REGISTROS LEÍDOS - GRIS OPACO ========== */

.registro-card.leido {
    border-left: 4px solid #3a3a3a;
    opacity: 0.75;
    filter: grayscale(0.15);
    transition: all 0.3s ease;
}

.registro-card.leido:hover {
    opacity: 0.9;
    filter: grayscale(0.05);
    transform: translateY(-2px);
}

.registro-card.leido .card-header {
    background: #0a0a0a;
    opacity: 0.8;
}

.registro-card.leido .info-value {
    color: #888888;
}

.registro-card.leido .info-value.highlight {
    background: #1a1a1a;
    color: #888888;
}

.registro-card.leido .password-value {
    background: #0d0d0d;
    color: #777777;
    border-left-color: #444444;
}

.registro-card.leido .badge-yes {
    background: #1a2a1a;
    color: #668866;
    opacity: 0.7;
}

.registro-card.leido .badge-no {
    background: #2a1a1a;
    color: #aa6666;
    opacity: 0.7;
}

.registro-card.leido::before {
    display: none;
}

.registro-card.leido {
    box-shadow: none;
}

.registro-card.leido .card-title .leido-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #2a2a2a;
    color: #888888;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 10px;
}

.registro-card.leido .card-title .leido-check::before {
    content: "✓";
    font-weight: bold;
}

.registro-card.leido .card-icon {
    opacity: 0.5;
    filter: grayscale(1);
}

/* ========== NOTIFICACIONES ========== */

.floating-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    z-index: 10000;
    animation: slideInRight 0.4s ease, fadeOut 0.4s ease 4.6s forwards;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    border-left: 4px solid #059669;
    display: flex;
    align-items: center;
    gap: 10px;
}

.floating-notification::before {
    content: "🔔";
    font-size: 16px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Badge de nuevos registros */
.new-count-badge {
    background: #10b981;
    color: #ffffff;
    border-radius: 30px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 10px;
    animation: pulse-green 1s infinite;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.new-count-badge::before {
    content: "🆕";
    font-size: 10px;
}

/* Botón marcar como leídos */
.btn-refresh#marcarLeidosBtn {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
}

.btn-refresh#marcarLeidosBtn:hover {
    background: #059669;
}

/* Indicador de nuevos en botón refresh */
.btn-refresh.has-new {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
    animation: pulse-green 1s infinite;
}

.btn-refresh.has-new:hover {
    background: #059669;
}

/* Registro card base */
.registro-card {
    background: #111111;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease forwards;
    cursor: pointer;
}

.registro-card:hover {
    border-color: #3a3a3a;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.8);
}

.card-header {
    background: #0a0a0a;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-icon {
    font-size: 20px;
    color: #888888;
}

.card-id {
    font-weight: 600;
    color: #cccccc;
    font-size: 14px;
}

.card-date {
    font-size: 12px;
    color: #666666;
    font-family: 'Courier New', monospace;
}

.card-content {
    padding: 24px;
}

.info-row {
    display: flex;
    margin-bottom: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #1a1a1a;
}

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

.info-label {
    width: 260px;
    font-size: 12px;
    font-weight: 500;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    font-family: 'SF Mono', 'Courier New', monospace;
    word-break: break-all;
    color: #e5e5e5;
}

.info-value.highlight {
    background: #1a1a1a;
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
    border-left: 3px solid #888888;
}

.password-value {
    background: #0d0d0d;
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    color: #cccccc;
    border-left: 3px solid #666666;
    font-family: monospace;
}

.badge-yes {
    background: #1a2a1a;
    color: #88cc88;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #2a3a2a;
}

.badge-no {
    background: #2a1a1a;
    color: #cc8888;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #3a2a2a;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px;
    background: #111111;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
    color: #666666;
}

.empty-state p {
    color: #666666;
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    margin-top: 32px;
    color: #555555;
    font-size: 12px;
    border-top: 1px solid #1a1a1a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111111;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

::selection {
    background: #333333;
    color: #ffffff;
}

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

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 12px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .filters {
        flex-direction: column;
        gap: 16px;
    }
    
    .filter-group input, .filter-group select {
        min-width: auto;
    }
    
    .info-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .info-label {
        width: auto;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo-circle {
        width: 55px;
        height: 55px;
    }
    
    .logo-img {
        width: 35px;
    }
    
    .header-logo h1 {
        font-size: 22px;
    }
}