:root {
    /* Color Palette */
    --bg-main: #0b0f19;
    --bg-secondary: #111827;
    --panel-bg: rgba(17, 24, 39, 0.75);
    --panel-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #10b981;
    --secondary-hover: #059669;
    --secondary-glow: rgba(16, 185, 129, 0.4);
    --danger: #ef4444;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    /* Rich Background with ambient glowing orbs */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    display: flex;
    flex-direction: column;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* View transition system */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: 100%;
    height: 100vh;
}

.view.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

#login-view {
    justify-content: center;
    align-items: center;
}

#dashboard-view {
    transform: translateY(10px);
}

/* ----------------- LOGIN SCREEN ----------------- */
.login-card {
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    transform: translateY(20px);
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.logo {
    text-align: center;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 12px var(--primary-glow));
    animation: float 3s ease-in-out infinite;
}

.logo h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: white;
}

.highlight {
    color: var(--primary);
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* Forms & Inputs */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s;
}

textarea.input-group i {
    top: 1.5rem;
}

input, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

/* Adjust textarea padding since it might not have an icon */
#record-content {
    padding: 1rem 1.2rem;
    resize: vertical;
    min-height: 120px;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

input:focus + i, input:focus ~ i {
    color: var(--primary);
}

/* Buttons */
button {
    width: 100%;
    padding: 0.9rem;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #fff;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: #fff;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--secondary-glow);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0;
    border: 1px solid transparent;
}

.btn-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

/* ----------------- DASHBOARD SCREEN ----------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1.5rem 2rem;
}

.navbar .logo {
    margin-bottom: 0;
}

.navbar.offline-mode {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(153, 27, 27, 0.25));
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.gamification-stats {
    display: flex;
    gap: 15px;
    margin-right: 5px;
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.1);
    align-items: center;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, var(--primary));
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--primary);
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 2rem 2rem;
    height: calc(100vh - 120px);
}

@media (max-width: 992px) {
    .dashboard-content {
        height: auto;
    }
    
    .view {
        height: auto;
        min-height: 100vh;
    }
}

section {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* REESTRUCTURACION DEL HEADER (Escritorio y Móvil) */
.section-header-redesign {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--panel-border);
}

.header-title-row {
    display: flex;
    align-items: center;
}

.header-search-row {
    width: 100%;
}

.search-box-full {
    position: relative;
    width: 100%;
}

.search-box-full .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box-full input {
    width: 100%;
    padding: 0.9rem 2.8rem 0.9rem 2.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.search-box-full input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.cancel-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 5px;
    cursor: pointer;
    z-index: 10;
}

.header-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: stretch;
}

.mobile-filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.mobile-sort-select {
    flex: 1;
    min-width: 130px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    transition: all 0.2s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="currentColor" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z" fill="%239ca3af"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Diseño responsivo para computadoras */
@media (min-width: 769px) {
    .section-header-redesign {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-title-row {
        flex: 0 0 auto;
    }
    
    .header-search-row {
        flex: 0 0 auto;
        width: 300px;
        margin-left: auto;
        margin-right: 15px;
    }
    
    .header-actions-row {
        flex: 0 0 auto;
        width: auto;
        margin-top: 0;
    }

    .mobile-filters-wrapper {
        display: none !important;
    }
}

section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 600;
}

.add-data-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--panel-border);
}

.badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Table Styles */
.table-container {
    overflow-y: auto;
    flex-grow: 1;
    border-radius: 8px;
    position: relative;
}

/* Custom Scrollbar for container */
.table-container::-webkit-scrollbar {
    width: 6px;
}
.table-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.table-container::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    text-align: left;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--panel-border);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}
th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--panel-border);
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
th.sortable:hover {
    color: var(--primary);
}
.sort-icon {
    font-size: 0.8rem;
    margin-left: 5px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
th.sortable.active {
    color: var(--primary);
}
th.sortable.active .sort-icon {
    opacity: 1;
}

/* Desktop Filter Dropdowns */
.desktop-filter-select {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 15px;
    /* Custom simple arrow for select */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%239ca3af" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right center;
    transition: color 0.2s;
}

.desktop-filter-select:hover,
.desktop-filter-select:focus {
    color: var(--primary);
}

.desktop-filter-select option {
    background: var(--bg-secondary);
    color: var(--text-main);
    text-transform: none;
}

.desktop-filter-select.active-filter {
    color: var(--primary);
    font-weight: bold;
}

.mobile-filters-container {
    display: flex;
}

/* Mobile Sort Specific */
.mobile-sort-select {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="currentColor" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z" fill="%239ca3af"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.mobile-sort-select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.mobile-sort-select option {
    background: var(--bg-secondary);
    color: var(--text-main);
}

td {
    color: #fff;
    vertical-align: top;
    line-height: 1.5;
}

tr {
    transition: background-color 0.2s;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.record-title {
    font-weight: 600;
    color: #fff;
}

.record-content {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 400px;
    word-break: break-word;
}

.author-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.date-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Empty State */
.empty-state {
    display: none; /* Toggled via JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-muted);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.empty-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--panel-border);
    font-size: 2.5rem;
}

.empty-state h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.toast {
    background: var(--panel-bg);
    backdrop-filter: blur(8px);
    border-left: 4px solid var(--secondary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateX(120%);
}

.toast.hiding {
    animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animations */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

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

@keyframes slideInRight {
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    to { transform: translateX(120%); opacity: 0; }
}

.row-enter {
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(15px);
}

/* Status Selector */
.status-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.status-option {
    flex: 1;
    cursor: pointer;
}

.status-option input {
    display: none;
}

.status-option .status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-option input:checked + .status-btn.normal {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
}

.status-option input:checked + .status-btn.medium {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #f59e0b;
}

.status-option input:checked + .status-btn.difficult {
    background: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
    color: #f97316;
}

.status-option input:checked + .status-btn.hostile {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: var(--danger);
}

/* Status Badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge.normal {
    background: rgba(16, 185, 129, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.difficult {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.status-badge.hostile {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Duplicate Record Highlighting */
tr.repeated-record td {
    background-color: rgba(139, 92, 246, 0.12) !important;
}

tr.repeated-record td:first-child {
    border-left: 4px solid #8b5cf6;
}

tr.repeated-record:hover td {
    background-color: rgba(139, 92, 246, 0.2) !important;
}

@media screen and (max-width: 768px) {
    table tr.repeated-record {
        border-color: #8b5cf6;
        box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
    }
}

.duplicate-badge {
    background: #8b5cf6;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
    animation: pulse 2s infinite;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--panel-border);
}

.modal-header h3 {
    margin: 0;
    padding: 0;
    border: none;
    color: #fff;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.close-modal-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* File Input Specific */
.file-input-group input[type="file"] {
    padding: 0.8rem 1.2rem 0.8rem 3rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.file-input-group input[type="file"]::file-selector-button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    margin-right: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.file-input-group input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
}

/* Specific Thumbnail logic if needed in table */
.record-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 5px;
    border: 1px solid var(--panel-border);
}

/* ----------------- RESPONSIVE / MOBILE SCREENS ----------------- */
@media screen and (max-width: 768px) {
    .dashboard-content {
        padding: 0 1rem 1rem;
        gap: 1.5rem;
    }
    
    .navbar {
        padding: 1rem;
        margin: 0.5rem 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .user-profile {
        justify-content: center;
        gap: 1rem;
    }

    .gamification-stats {
        border-right: none;
        padding-right: 0;
        margin-right: 0;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
        background: rgba(0,0,0,0.2);
        padding: 0.8rem;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.05);
    }
    
    .stat-box {
        align-items: center;
        flex: 1;
    }
    
    section {
        padding: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-filters-container {
        display: flex !important;
        width: 100%;
        margin-top: 10px;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .status-selector {
        flex-direction: column;
        gap: 5px;
    }
    
    .table-container {
        /* Remove inner scrollbar space if any on mobile */
        border: none;
        overflow-x: hidden;
    }

    /* Convert Table to Cards */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    table thead {
        /* Hide visually but keep for screen readers */
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        border: 0;
    }

    table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--panel-border);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        padding: 0.5rem;
    }

    table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.8rem 0.5rem;
    }

    table td:last-child {
        border-bottom: 0;
        justify-content: flex-end;
    }

    table td::before {
        /* The data-label attribute generates the header on the left side */
        content: attr(data-label);
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-right: 1.5rem;
        text-align: left;
    }

    /* Fix image overlap in card view */
    .record-content {
        text-align: right;
        word-break: break-word;
        max-width: 60%;
    }
    
    /* Make actions fit nicely in the flex row */
    td[data-label="Acciones"] > div {
        justify-content: flex-end;
        width: 100%;
    }
}
