/* ============================================
   Design Tokens
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --secondary: #7c3aed;
    --background: #f1f5f9;
    --background-alt: #e8eef6;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --surface-border: rgba(0, 0, 0, 0.08);
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --input-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    /* Stat colors */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --red-50: #fef2f2;
    --red-500: #ef4444;
    --red-600: #dc2626;
}

/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background);
    background-image:
        radial-gradient(at 10% 0%, rgba(37, 99, 235, 0.07) 0px, transparent 50%),
        radial-gradient(at 90% 100%, rgba(124, 58, 237, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    line-height: 1.5;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   Dashboard Body
   ============================================ */
body.dashboard-body,
body.registro-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    background-color: var(--background);
}

/* ============================================
   Top Navigation Bar
   ============================================ */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-50), var(--violet-50));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--surface-border);
}

.brand-icon img {
    width: 22px;
    height: 22px;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.brand-name {
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.brand-divider {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.brand-section {
    color: var(--text-secondary);
    font-weight: 500;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.825rem;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.topbar-btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.topbar-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.topbar-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--surface-border);
}

.topbar-btn-ghost:hover {
    background: var(--red-50);
    color: var(--red-600);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ============================================
   Dashboard Main
   ============================================ */
.dashboard-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
}

/* ============================================
   Welcome Section
   ============================================ */
.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.welcome-text h1 {
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
    margin-bottom: 0.35rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.welcome-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 480px;
    line-height: 1.5;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.date-icon {
    display: flex;
    color: var(--primary);
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card-total::after {
    background: linear-gradient(90deg, var(--blue-500), var(--blue-600));
}

.stat-card-today::after {
    background: linear-gradient(90deg, var(--emerald-500), var(--emerald-600));
}

.stat-card-files::after {
    background: linear-gradient(90deg, var(--violet-500), var(--violet-600));
}

.stat-card-nofile::after {
    background: linear-gradient(90deg, var(--amber-500), var(--amber-600));
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: var(--blue-50);
    color: var(--blue-600);
}

.stat-icon-emerald {
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.stat-icon-violet {
    background: var(--violet-50);
    color: var(--violet-600);
}

.stat-icon-amber {
    background: var(--amber-50);
    color: var(--amber-600);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-title {
    font-size: 0.775rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

/* ============================================
   Table Card
   ============================================ */
.table-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-hover) 100%);
}

.table-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.table-card-title svg {
    color: var(--primary);
}

.table-card-body {
    padding: 0.5rem 1.5rem 1.5rem;
}

/* ============================================
   DataTables Overrides
   ============================================ */
.dataTables_wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    color: var(--text);
}

/* Toolbar layout */
.dt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 0;
}

.dt-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dt-toolbar-right {
    display: flex;
    align-items: center;
}

.dt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 0 0.25rem;
    border-top: 1px solid var(--surface-border);
    margin-top: 0.25rem;
}

.dt-footer-left,
.dt-footer-right {
    display: flex;
    align-items: center;
}

/* Length select */
.dataTables_wrapper .dataTables_length {
    color: var(--text-muted);
    font-size: 0.825rem;
    padding: 0;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--surface-border);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    margin: 0 0.3rem;
    font-size: 0.825rem;
    cursor: pointer;
    width: auto;
}

/* Search input */
.dataTables_wrapper .dataTables_filter {
    padding: 0;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    margin: 0;
    color: var(--text-muted);
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    padding-left: 0.85rem;
    background: var(--background);
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    width: 240px;
    margin-left: 0;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--surface);
}

/* Info text */
.dataTables_wrapper .dataTables_info {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0;
}

/* Table styles */
table.dataTable {
    border-collapse: collapse !important;
    width: 100% !important;
}

table.dataTable thead th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.8rem 1rem;
    border-bottom: 2px solid var(--surface-border) !important;
    background: var(--surface-hover);
    white-space: nowrap;
    position: relative;
}

table.dataTable thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

table.dataTable thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

table.dataTable tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    font-size: 0.875rem;
    vertical-align: middle;
    color: var(--text-secondary);
}

table.dataTable tbody tr {
    transition: background 0.15s ease;
}

table.dataTable tbody tr:hover td {
    background: var(--primary-light) !important;
}

table.dataTable tbody tr:last-child td {
    border-bottom: none !important;
}

/* Remove DataTables default borders */
table.dataTable.no-footer {
    border-bottom: none !important;
}

table.dataTable thead th,
table.dataTable thead td {
    border-bottom: 2px solid var(--surface-border) !important;
}

/* Sorting icons color */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after {
    opacity: 0.35;
}

table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::after {
    opacity: 0.8;
    color: var(--primary);
}

/* ============================================
   Pagination Buttons
   ============================================ */
.dataTables_wrapper .dataTables_paginate {
    padding: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--surface-border) !important;
    border-radius: 6px !important;
    background: var(--surface) !important;
    color: var(--text-secondary) !important;
    padding: 0.3rem 0.65rem !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
    font-size: 0.825rem !important;
    font-weight: 500 !important;
    min-width: 32px;
    text-align: center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.35 !important;
    cursor: default !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: var(--surface) !important;
    color: var(--text-secondary) !important;
    border-color: var(--surface-border) !important;
    box-shadow: none !important;
}

/* ============================================
   Export Buttons
   ============================================ */
.btn-dt-export {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem !important;
    border: 1px solid var(--surface-border) !important;
    border-radius: 6px !important;
    background: var(--surface) !important;
    color: var(--text-secondary) !important;
    font-size: 0.775rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    white-space: nowrap;
}

.btn-dt-export:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
}

/* ============================================
   Table Cell Badges
   ============================================ */
.num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    background: var(--blue-50);
    color: var(--blue-600);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0 0.5rem;
}

.codigo-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-light), rgba(124, 58, 237, 0.06));
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Courier New', Courier, monospace;
    white-space: nowrap;
    letter-spacing: 0.02em;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.fecha-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.registrador-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--violet-50);
    color: var(--violet-600);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.775rem;
    letter-spacing: 0.02em;
}

.td-detalle {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.825rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: var(--primary-light);
}

.file-link:hover {
    background: var(--primary);
    color: white;
}

.no-file-badge {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Footer
   ============================================ */
.dashboard-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--surface-border);
    background: var(--surface);
}

/* ============================================
   Generic Container (Forms, Login)
   ============================================ */
.container {
    width: 100%;
    max-width: 600px;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   Registro Page Layout
   ============================================ */
.registro-main {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.registro-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.registro-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.registro-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--blue-50);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.registro-card-header h1 {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 0.2rem;
    background: none;
    -webkit-text-fill-color: var(--text);
    color: var(--text);
}

.registro-card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Base h1 (login, etc) */
h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s ease backwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.form-group:nth-child(5) {
    animation-delay: 0.5s;
}

.form-group:nth-child(6) {
    animation-delay: 0.6s;
}

.form-group:nth-child(7) {
    animation-delay: 0.7s;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input,
select,
textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--surface-border);
    color: var(--text);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="file"] {
    padding: 0.6rem;
    background: var(--background);
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: var(--primary);
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    margin-right: 1rem;
    font-weight: 600;
    font-size: 0.825rem;
    transition: background 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-hover);
}

.next-number-badge {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    color: var(--primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.badge-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-code {
    color: var(--primary);
    font-weight: 700;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    color: var(--emerald-600);
}

.alert-error {
    background: var(--red-50);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red-600);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-main {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .topbar-inner {
        padding: 0 1rem;
        height: 56px;
    }

    .brand-section {
        display: none;
    }

    .brand-divider {
        display: none;
    }

    .topbar-btn span {
        display: none;
    }

    .topbar-btn {
        padding: 0.5rem;
        border-radius: 8px;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .dashboard-welcome {
        flex-direction: column;
        margin-bottom: 1.25rem;
    }

    .welcome-text h1 {
        font-size: 1.4rem;
    }

    .welcome-date {
        align-self: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .stat-icon-wrap svg {
        width: 20px;
        height: 20px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-title {
        font-size: 0.7rem;
    }

    .table-card-body {
        padding: 0.5rem 0.75rem 1rem;
    }

    .table-card-header {
        padding: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }

    h1 {
        font-size: 1.5rem;
    }

    .dt-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dt-toolbar-left {
        flex-direction: column;
        align-items: stretch;
    }

    .dt-toolbar-right {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
    }

    .dt-footer {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .td-detalle {
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.85rem;
    }

    .topbar-actions {
        gap: 0.35rem;
    }
}