:root {
    /* Color Palette - Modern Medical / Tech */
    --primary-h: 220;
    --primary-s: 90%;
    --primary-l: 55%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 90%);
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 30%);
    
    --secondary-h: 180;
    --secondary-s: 100%;
    --secondary-l: 40%;
    --secondary: hsl(var(--secondary-h), var(--secondary-s), var(--secondary-l));
    
    --bg-light: hsl(220, 30%, 98%);
    --bg-dark: hsl(220, 30%, 8%);
    --surface-light: hsl(220, 30%, 100%);
    --surface-dark: hsl(220, 20%, 12%);
    
    --text-main: hsl(220, 20%, 20%);
    --text-muted: hsl(220, 10%, 45%);
    --text-on-primary: #ffffff;
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Base Elements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface-dark);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    overflow: hidden; /* Mantém a sidebar fixa, o scroll será no nav-menu */
}

.app-container.collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding: 1.5rem 0.75rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 2rem;
    white-space: nowrap;
}

.app-container.collapsed .sidebar-logo {
    justify-content: center;
    gap: 0;
}

.sidebar-logo img {
    height: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.sidebar-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Outfit';
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
}

.app-container.collapsed .sidebar-logo span {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.nav-menu {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    margin-right: -10px; /* Esconde a scrollbar padrão */
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Scrollbar Customizada para a Sidebar */
.nav-menu::-webkit-scrollbar {
    width: 4px;
}
.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.nav-menu:hover::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-container.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    flex-shrink: 0;
    text-align: center;
}

.app-container.collapsed .nav-item i {
    margin-right: 0;
}

.nav-item span {
    transition: opacity 0.2s ease;
}

.app-container.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.nav-section-label {
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.app-container.collapsed .nav-section-label {
    opacity: 0;
    height: 0;
    margin: 0 !important;
}

/* Profile Card Sidebar */
.sidebar-profile-card {
    transition: all 0.3s ease;
}

.app-container.collapsed .sidebar-profile-card {
    padding: 1rem 0 !important;
    justify-content: center !important;
    background: transparent !important;
}

.app-container.collapsed .sidebar-profile-card div:last-child {
    display: none !important;
}

.app-container.collapsed .sidebar-profile-card div:first-child {
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.app-container.collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 40;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.collapsed .top-header {
    left: var(--sidebar-collapsed-width);
}

.content-area {
    padding: 2rem;
    margin-top: var(--header-height);
    flex: 1;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}

/* Components */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-modern {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-modern:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.3);
}

.btn-modern:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

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

.animate-in {
    /* Removido transform e animation daqui para evitar novo stacking context que bloqueia z-index do modal */
}

/* Dark Mode (Preliminary) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--bg-dark);
        color: white;
    }
    .top-header {
        background: var(--surface-dark);
        border-bottom-color: rgba(255,255,255,0.05);
    }
    .card {
        background: var(--surface-dark);
        border-color: rgba(255,255,255,0.05);
    }
    .sidebar-toggle:hover {
        background: rgba(255,255,255,0.05);
    }
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Valor muito alto para garantir sobreposição */
    animation: fadeInModal 0.3s ease forwards;
}

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

.modal-content {
    background: white;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.3s ease forwards;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
}

/* Pagination & Table Utils */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-page {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-page:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-page.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.table-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.table-action-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}

.table-action-btn.delete:hover {
    color: #ff6b6b;
    background: rgba(255,107,107,0.1);
}

/* Dark Mode Modal */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: var(--surface-dark);
        border: 1px solid rgba(255,255,255,0.05);
    }
    .form-control {
        background: rgba(255,255,255,0.03);
        border-color: rgba(255,255,255,0.1);
        color: white;
    }
    .form-control:focus {
        background: rgba(255,255,255,0.05);
    }
    .btn-page {
        background: var(--surface-dark);
        border-color: rgba(255,255,255,0.1);
        color: white;
    }
}

/* Blazor Error & Reconnect UI - Premium Styling */
#blazor-error-ui {
    display: none !important;
}

.components-reconnect-modal {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
    z-index: 20000 !important;
}

.components-reconnect-modal > div {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    padding: 2rem !important;
    color: var(--text-main) !important;
    font-family: 'Outfit', sans-serif !important;
    text-align: center !important;
}

.components-reconnect-show, .components-reconnect-failed, .components-reconnect-rejected {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Animação pulsante para Ditado por Voz */
.pulse-voice {
    animation: voicePulse 1.2s infinite alternate ease-in-out;
}

@keyframes voicePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    100% {
        transform: scale(1.06);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* =========================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ========================================================= */

/* Mobile Sidebar Elements */
.sidebar-backdrop {
    display: none;
}

.mobile-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: auto;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.mobile-sidebar-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.header-logo-mobile {
    display: none;
    align-items: center;
    gap: 8px;
}

/* Responsive Filters */
.filter-card {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
}

.filter-client-layout {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-date-group {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.filter-date-group .form-group {
    flex: 1;
    min-width: 140px;
}

.filter-actions-group {
    display: flex;
    gap: 0.5rem;
}

.filter-actions-group .btn-filter {
    background: var(--secondary);
    min-width: 44px;
    height: 42px;
}

.filter-actions-group .btn-clear {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    min-width: 44px;
    height: 42px;
}

.filter-pro-layout {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr auto;
    gap: 1rem;
    align-items: flex-end;
}

/* Status Badges */
.badge-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-status-pill.novo {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.badge-status-pill.baixado {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Dual View: Table on Desktop, Cards on Mobile */
.desktop-table-container {
    display: block;
    overflow-x: auto;
}

.mobile-cards-container {
    display: none;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern th {
    padding: 1rem;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.01);
}

.table-modern td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
}

.table-modern tr:hover td {
    background: rgba(0, 0, 0, 0.015);
}

.table-modern tr.row-baixado {
    background: rgba(0, 0, 0, 0.005);
}

.cell-date {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cell-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.cell-paciente {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.cell-exame {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    word-break: break-word;
}

.cell-medico {
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cell-hospital {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.btn-download-table {
    padding: 8px 14px;
    font-size: 0.85rem;
    gap: 6px;
    border-radius: var(--radius-sm);
}

/* Mobile Laudo Cards */
.laudo-card-mobile {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.laudo-card-mobile:active {
    transform: scale(0.99);
}

.laudo-card-mobile.is-baixado {
    border-left: 4px solid #6c757d;
}

.laudo-card-mobile:not(.is-baixado) {
    border-left: 4px solid var(--primary);
}

.lcm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 0.75rem;
}

.lcm-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lcm-content {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.lcm-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lcm-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.lcm-value {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
}

.lcm-filename {
    font-weight: 600;
    color: var(--text-main);
}

.lcm-meta-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 0, 0, 0.02);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.lcm-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download-mobile {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    gap: 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.25);
}

/* Pagination Wrapper */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0.5rem 0.5rem 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-current {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0 0.5rem;
}

/* Loading & Empty States */
.results-loading, .results-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.results-empty .empty-icon {
    font-size: 3rem;
    opacity: 0.4;
    margin-bottom: 1rem;
    display: block;
}

.results-empty h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

/* Perfil Grid Layout */
.perfil-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 2rem;
    max-width: 1100px;
    align-items: start;
}

/* Media Query: Tablets & Desktops pequenos (<= 992px) */
@media (max-width: 992px) {
    .filter-pro-layout {
        grid-template-columns: 1fr 1fr;
    }
    .filter-field-paciente {
        grid-column: span 2;
    }
    .filter-field-outros {
        grid-column: span 2;
    }
    .filter-field-actions {
        grid-column: span 2;
        display: flex;
        justify-content: flex-end;
    }
    .perfil-grid-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Media Query: Smartphones e telas pequenas (<= 768px) */
@media (max-width: 768px) {
    .header-logo-mobile {
        display: flex;
    }

    /* Sidebar Mobile Drawer */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(2px);
        z-index: 998;
        animation: fadeIn 0.2s ease;
    }

    .mobile-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 999 !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }

    .app-container.mobile-open .sidebar {
        transform: translateX(0) !important;
    }

    /* Overwrite desktop collapsed styles on mobile */
    .app-container.collapsed .sidebar {
        width: 280px !important;
        padding: 1.5rem 1rem !important;
    }

    .app-container.collapsed .sidebar-logo span {
        opacity: 1 !important;
        width: auto !important;
        pointer-events: auto !important;
    }

    .app-container.collapsed .nav-item span {
        opacity: 1 !important;
        width: auto !important;
        pointer-events: auto !important;
    }

    .app-container.collapsed .nav-item {
        justify-content: flex-start !important;
        padding: 12px 14px !important;
    }

    .app-container.collapsed .nav-item i {
        margin-right: 12px !important;
    }

    .app-container.collapsed .nav-section-label {
        opacity: 1 !important;
        height: auto !important;
    }

    /* Main Content Wrapper on Mobile */
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .app-container.collapsed .main-wrapper {
        margin-left: 0 !important;
    }

    /* Top Header on Mobile */
    .top-header {
        left: 0 !important;
        width: 100% !important;
        padding: 0 1rem !important;
    }

    .app-container.collapsed .top-header {
        left: 0 !important;
    }

    /* Content Area on Mobile */
    .content-area {
        padding: 1rem 0.75rem !important;
        width: 100% !important;
        overflow-x: hidden;
    }

    /* General Form Grid on Mobile */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .form-group.full-width {
        grid-column: span 1 !important;
    }

    /* Switch from Table to Cards on Mobile */
    .desktop-table-container {
        display: none !important;
    }

    .mobile-cards-container {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Filter Form on Mobile */
    .filter-client-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-date-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .filter-actions-group {
        width: 100%;
        display: flex;
    }

    .filter-actions-group button {
        flex: 1;
        height: 44px;
    }

    .filter-pro-layout {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .filter-field-paciente {
        grid-column: span 2;
    }

    .filter-field-outros {
        grid-column: span 2;
    }

    .filter-field-actions {
        grid-column: span 2;
        width: 100%;
        display: flex;
    }

    .filter-field-actions button {
        flex: 1;
        height: 44px;
    }

    /* Pagination on Mobile */
    .pagination-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn-page {
        min-width: 44px;
        min-height: 44px;
    }

    /* Modal on Mobile */
    .modal-content {
        max-width: 95vw !important;
        margin: 0.5rem;
        max-height: 95vh !important;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 1rem !important;
    }
}