:root {
    --ink: #102a43;
    --ink-soft: #243b53;
    --copper: #c49a4a;
    --parchment: #f7f3ea;
    --line: #e6dfd2;
}

html,
body {
    font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

.font-display {
    font-family: "Fraunces", Georgia, serif;
}

.bg-grid {
    background-color: #f7f3ea;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(16, 42, 67, 0.06) 1px, transparent 0);
    background-size: 22px 22px;
}

.brand-band {
    background:
        linear-gradient(90deg, #8b1e2d 0 28%, #f4efe4 28% 36%, #102a43 36% 100%);
    height: 6px;
}

.input-field,
.select-field,
.textarea-field {
    width: 100%;
    border: 1px solid #d9d0c1;
    background: #fffdf8;
    border-radius: 0.9rem;
    padding: 0.7rem 0.9rem;
    color: #102a43;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: #c49a4a;
    box-shadow: 0 0 0 4px rgba(196, 154, 74, 0.18);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card label {
    display: block;
    cursor: pointer;
    border: 1px solid #d9d0c1;
    background: #fffdf8;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    transition: all 0.2s ease;
}

.choice-card input:checked + label {
    border-color: #102a43;
    background: #102a43;
    color: #fffdf8;
    box-shadow: 0 10px 24px rgba(16, 42, 67, 0.18);
}

.campo-personal {
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.campo-personal.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

#pruebas.highlight {
    border-color: #2f855a;
    box-shadow: 0 0 0 4px rgba(47, 133, 90, 0.18);
}

.admin-shell {
    min-height: 100vh;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.9rem;
    color: #d6e0ea;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-link.active {
    background: #c49a4a;
    color: #102a43;
}

.stat-card {
    background: #fffdf8;
    border: 1px solid #e6dfd2;
    border-radius: 1.25rem;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.04);
}

.table-panel {
    background: #fffdf8;
    border: 1px solid #e6dfd2;
    border-radius: 1.4rem;
    padding: 1rem 1rem 0.5rem;
    overflow: hidden;
}

table.dataTable {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

table.dataTable thead th {
    background: #102a43;
    color: #f7f3ea;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    border: 0 !important;
    padding: 0.85rem 0.75rem !important;
    white-space: nowrap;
}

table.dataTable thead th:first-child {
    border-top-left-radius: 0.8rem;
}

table.dataTable thead th:last-child {
    border-top-right-radius: 0.8rem;
}

table.dataTable tbody td {
    border-bottom: 1px solid #eee6d8 !important;
    padding: 0.8rem 0.75rem !important;
    vertical-align: middle;
    color: #243b53;
    font-size: 0.92rem;
}

table.dataTable tbody tr:hover td {
    background: #faf6ee !important;
}

.datatable-toolbar,
.datatable-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 0.25rem 1rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d9d0c1;
    border-radius: 0.8rem;
    padding: 0.45rem 0.7rem;
    background: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.6rem !important;
    border: 0 !important;
    padding: 0.35rem 0.7rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #102a43 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_info {
    color: #627d95;
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #efe4cc !important;
    color: #102a43 !important;
}

.dataTables_wrapper table.dataTable {
    margin: 0 !important;
}

.badge-anonima {
    background: #102a43;
    color: #f7f3ea;
}

.badge-identificada {
    background: #efe4cc;
    color: #102a43;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-fail {
    background: #fee2e2;
    color: #991b1b;
}

.modal-backdrop-custom {
    background: rgba(12, 26, 39, 0.55);
}

pre.detalles-json {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 0;
}

@media (max-width: 1023px) {
    #sidebar {
        position: fixed;
        z-index: 40;
        transform: translateX(-110%);
    }

    #sidebar.open {
        transform: translateX(0);
    }
}
