/* Tema: variáveis em static/css/theme.css */

body {
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

.app-dialog-message {
    white-space: pre-line;
}

/* Navbar principal */
.app-navbar {
    background-color: var(--dark-teal) !important;
    background-image: url('/static/fundonavbar.png') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.55rem 0;
}

nav.navbar.app-navbar {
    background-color: var(--dark-teal) !important;
    background-image: url('/static/fundonavbar.png') !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
}

.app-navbar-inner {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr);
    align-items: center;
    gap: 0.75rem;
}

.app-navbar-brand-logo {
    justify-self: start;
    margin-right: 0;
}

.app-navbar-center {
    justify-self: center;
    text-align: center;
    min-width: 0;
}

.app-navbar-center-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    line-height: 1.15;
    padding: 0.15rem 0.5rem;
}

.app-navbar-center-link:hover {
    color: #fff;
    opacity: 0.92;
}

.app-navbar-actions {
    justify-self: end;
    margin-left: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.app-navbar-actions .app-nav-link-login {
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
    color: var(--app-nav-text) !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 0.95rem !important;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-navbar-actions .app-nav-link-login:hover {
    color: #fff !important;
    background: var(--app-nav-surface-hover);
}

.app-navbar-brand,
.app-navbar-brand-static {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.app-navbar-brand:hover {
    color: #fff;
    opacity: 0.95;
}

.app-navbar-logo {
    display: block;
    height: 42px;
    width: auto;
    max-width: min(220px, 42vw);
    object-fit: contain;
    flex-shrink: 0;
}

.app-navbar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
    flex-shrink: 0;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.app-navbar-title {
    font-size: 1.26rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-navbar-subtitle {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--app-nav-text-muted);
    margin-top: 0.15rem;
}

.app-navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.55rem;
}

.app-navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.18);
}

.app-navbar-collapse {
    gap: 0.75rem;
}

.app-navbar-main {
    gap: 0.35rem;
    align-items: center;
}

.app-navbar-user {
    gap: 0.35rem;
    align-items: center;
    margin-left: auto;
}

.app-nav-link {
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
    color: var(--app-nav-text) !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 0.95rem !important;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.app-nav-link i {
    width: 1rem;
    text-align: center;
    opacity: 0.92;
}

.app-nav-link:hover,
.app-nav-link:focus {
    color: #fff !important;
    background: var(--app-nav-surface-hover);
}

.app-nav-link.active,
.app-nav-link.show {
    color: #fff !important;
    background: var(--app-nav-surface-active);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.app-nav-link-login {
    background: rgba(255, 255, 255, 0.1);
}

.app-nav-dropdown {
    min-width: 320px;
    padding: 0.65rem;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    margin-top: 0.65rem !important;
}

.app-nav-dropdown .dropdown-header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6c757d;
    padding: 0.35rem 0.75rem 0.25rem;
}

.app-nav-dropdown .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.75rem;
    border-radius: 12px;
    white-space: normal;
}

.app-nav-dropdown .dropdown-item:hover,
.app-nav-dropdown .dropdown-item:focus {
    background: #f4f7fb;
}

.app-nav-dropdown .dropdown-item.active,
.app-nav-dropdown .dropdown-item:active {
    background: var(--green-ring-soft);
    color: var(--text-dark);
}

.app-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green-dark);
    flex-shrink: 0;
}

.app-dropdown-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.app-dropdown-text strong {
    font-size: 0.92rem;
    line-height: 1.25;
}

.app-dropdown-text small {
    color: #6c757d;
    line-height: 1.35;
}

.app-user-menu {
    display: inline-flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem 0.35rem 0.35rem !important;
    border-radius: 999px;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-user-menu:hover,
.app-user-menu.show {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
}

.app-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82));
    color: var(--green-dark);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.app-user-avatar-lg {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 0.95rem;
}

.app-user-info {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
}

.app-user-name {
    font-size: 0.86rem;
    font-weight: 700;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-role {
    font-size: 0.72rem;
    color: var(--app-nav-text-muted);
}

.app-user-dropdown {
    min-width: 260px;
    padding: 0.65rem;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    margin-top: 0.65rem !important;
}

.app-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 0.75rem;
    white-space: normal;
}

.app-user-dropdown-header strong {
    display: block;
    font-size: 0.92rem;
    word-break: break-word;
}

.app-user-dropdown-header small {
    display: block;
    color: #6c757d;
    margin-top: 0.15rem;
}

.app-user-dropdown .dropdown-item {
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-weight: 600;
}

.app-user-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.app-user-nav-item i {
    width: 1rem;
    text-align: center;
    opacity: 0.85;
    flex-shrink: 0;
}

.app-user-nav-item.active,
.app-user-dropdown .dropdown-item.active {
    background: var(--green-ring-soft);
    color: var(--text-dark);
}

.app-user-logout {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--accent-red) !important;
}

.app-user-logout i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.app-user-admin-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.app-user-admin-toggle .app-user-admin-chevron {
    margin-left: auto;
    font-size: 0.72rem;
    opacity: 0.55;
    transition: transform 0.2s ease;
}

.app-user-admin-toggle:not(.collapsed) .app-user-admin-chevron {
    transform: rotate(180deg);
}

.app-user-admin-panel {
    margin: 0.15rem 0 0.35rem;
    padding: 0.35rem 0.5rem 0.5rem;
    border-radius: 10px;
    background: #f8fafb;
    border: 1px solid #e5e7eb;
}

.app-user-admin-group-label {
    margin: 0.55rem 0.35rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
}

.app-user-admin-group-label:first-child {
    margin-top: 0.15rem;
}

.app-user-admin-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.app-user-admin-link i {
    width: 1rem;
    text-align: center;
    color: var(--green);
    flex-shrink: 0;
}

.app-user-admin-link:hover {
    background: var(--green-ring-soft);
    color: var(--text-dark);
}

.app-user-admin-link.active {
    background: var(--green-ring-soft);
    color: var(--green-dark);
}

.app-user-logout:hover {
    background: rgba(220, 53, 69, 0.08) !important;
}

.app-navbar-share .app-share-expires {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Compatibilidade com navbar legada (não sobrescreve .app-navbar) */
.navbar:not(.app-navbar) {
    background: var(--gradient-header) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

@media (min-width: 992px) {
    .app-navbar-user {
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .app-navbar {
        padding: 0.45rem 0;
    }

    .app-navbar-inner {
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }

    .app-navbar-center-link {
        padding: 0.1rem 0.25rem;
    }

    .app-navbar-title {
        font-size: 1.1rem;
    }

    .app-user-menu {
        width: auto;
        justify-content: flex-start;
        border-radius: 999px;
    }

    .app-user-dropdown {
        width: min(100vw - 2rem, 320px);
        min-width: 0;
    }

    .app-navbar-subtitle {
        display: block;
        font-size: 0.78rem;
    }
}

@media (max-width: 575.98px) {
    .app-navbar-logo {
        height: 34px;
        max-width: min(120px, 36vw);
    }

    .app-navbar-title {
        font-size: 1.02rem;
    }

    .app-navbar-subtitle {
        font-size: 0.74rem;
    }
}

/* Cards */
.card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: var(--gradient-header);
    color: var(--white) !important;
    font-weight: 600;
    border-radius: 8px 8px 0 0 !important;
}

.card-header,
.card-header *,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .mb-0,
.card-header span,
.card-header div,
.card-header p,
.card-header strong,
.card-header b {
    color: var(--white) !important;
}

/* Botões */
.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 158, 82, 0.3);
}

.btn-danger {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: var(--accent-red-dark);
    border-color: var(--accent-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Visualizador DICOM */
#dicomViewer {
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    background-color: #000;
}

#dicomViewer img {
    transition: transform 0.3s ease;
}

/* Controles de vídeo DICOM */
#dicomViewer canvas {
    transition: transform 0.3s ease;
    background: #000;
    max-width: 100%;
    max-height: calc(100% - 80px);
    object-fit: contain;
}

#dicomViewer .video-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

#dicomViewer .video-controls button {
    min-width: 40px;
}

#dicomViewer .video-controls input[type="range"] {
    flex: 1;
    min-width: 200px;
}

#dicomViewer .video-controls span {
    color: #fff;
    font-size: 0.9em;
    min-width: 100px;
    text-align: center;
}

#dicomViewer .video-controls input[type="number"] {
    width: 60px;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.viewer-controls {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

/* Lista de séries */
.series-list .list-group-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.series-list .list-group-item:hover {
    background-color: var(--green-soft);
    border-left-color: var(--primary-green);
    transform: translateX(5px);
}

.series-list .list-group-item.active {
    background: var(--gradient-green-btn);
    color: white;
    border-color: var(--primary-green);
    border-left-color: var(--green-light);
    font-weight: 600;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

.bg-primary {
    background-color: var(--primary-green) !important;
}

.bg-success {
    background-color: var(--primary-green) !important;
}

.bg-danger {
    background-color: var(--accent-red) !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000;
}

/* Formulários */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem var(--green-ring);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
}

/* Tabelas Modernas */
.table {
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: var(--white);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
}

.table thead th {
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 18px 16px;
    border: none;
    white-space: nowrap;
}

.table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.table thead th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.table thead th.sortable.sort-active {
    background-color: rgba(255, 255, 255, 0.18);
}

.table thead th.sortable .sort-icon {
    opacity: 0.45;
    font-size: 0.85em;
}

.table thead th.sortable.sort-active .sort-icon {
    opacity: 1;
}

.table tbody {
    background: var(--white);
}

.table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:last-child {
    border-bottom: none;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, var(--green-soft) 0%, #dff5ea 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px var(--green-ring-soft);
    border-left: 4px solid var(--primary-green);
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border: none;
    color: #333;
    font-size: 0.95em;
}

.table tbody td strong {
    color: #212529;
    font-weight: 600;
}

.table tbody td small {
    color: #6c757d;
    font-size: 0.85em;
}

.table-responsive {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Stripes alternados mais sutis */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #fafafa;
}

.table-striped > tbody > tr:nth-of-type(odd):hover > td {
    background: linear-gradient(90deg, #f0f9f4 0%, #e8f5e9 100%);
}

/* Badges na tabela */
.table .badge {
    font-size: 0.85em;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Informação de equipamento ao lado da modalidade */
.table td small.text-muted {
    font-size: 0.8em;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.table td small.text-muted i {
    font-size: 0.9em;
    opacity: 0.7;
    margin-right: 4px;
}

/* Botões na tabela */
.table .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.table .btn-sm {
    padding: 6px 14px;
    font-size: 0.875em;
}

/* Animações suaves para linhas da tabela */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table tbody tr {
    animation: fadeInRow 0.3s ease-out;
}

/* Melhorias visuais para ícones na tabela */
.table tbody td i {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.table tbody tr:hover td i {
    opacity: 1;
}

/* Espaçamento melhorado para mobile */
@media (max-width: 576px) {
    .table thead th i {
        display: none;
    }
    
    .table tbody td {
        padding: 10px 8px;
    }
    
    .table .btn-sm {
        padding: 5px 10px;
        font-size: 0.75em;
    }
}

/* Links */
a {
    color: var(--primary-green);
    transition: color 0.2s ease;
}

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

/* Lista de estudos */
.list-group-item-action:hover {
    background-color: #e8f5e9;
    border-left: 3px solid var(--primary-green);
}

.list-group-item-action:active {
    background-color: var(--primary-green);
    color: white;
}

/* Slider */
.form-range::-webkit-slider-thumb {
    background-color: var(--primary-green);
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-green);
}

/* Alerts e mensagens */
.alert-success {
    background-color: #d4edda;
    border-color: var(--primary-green);
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: var(--accent-red);
    color: #721c24;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
}

h1, h2 {
    font-weight: 700;
}

/* Melhorias visuais */
.text-primary {
    color: var(--primary-green) !important;
}

.border-primary {
    border-color: var(--primary-green) !important;
}

/* Loading states */
.loading {
    color: var(--primary-green);
}

/* Scrollbar personalizado */
.series-list::-webkit-scrollbar {
    width: 8px;
}

.series-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.series-list::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

.series-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green-dark);
}

/* Responsividade - Tablets */
@media (max-width: 992px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar-brand {
        font-size: 0.9em;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.9em;
    }
}

/* Responsividade - Celulares */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 0.85em;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-nav {
        margin-top: 10px;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 15px;
    }
    
    main.container-fluid {
        padding-left: 10px;
        padding-right: 10px;
        margin-top: 15px !important;
    }
    
    .card-header h3,
    .card-header h5 {
        font-size: 1.1em;
    }
    
    .table {
        font-size: 0.85em;
    }
    
    .table thead th {
        padding: 12px 10px;
        font-size: 0.8em;
    }
    
    .table tbody td {
        padding: 12px 10px;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .form-control,
    .form-select {
        font-size: 0.9em;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 0.8em;
    }
    
    .navbar-brand img {
        height: 28px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table {
        font-size: 0.75em;
    }
    
    .table th,
    .table td {
        padding: 6px 3px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .form-label {
        font-size: 0.85em;
        margin-bottom: 5px;
    }
    
    .form-control,
    .form-select {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .badge {
        font-size: 0.7em;
        padding: 0.3em 0.6em;
    }
}

@media (max-width: 576px) {
    #dicomViewer {
        min-height: 320px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    #dicomViewer {
        min-height: 260px;
    }
}

/* Melhorias de acessibilidade e usabilidade */
@media (hover: hover) {
    .btn:hover {
        transform: translateY(-1px);
    }
    
    .card:hover {
        transform: translateY(-2px);
    }
}

/* Melhorias para touch devices */
@media (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 12px 15px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    input[type="range"] {
        height: 44px;
    }
}

/* Ajustes para orientação landscape em mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .series-list {
        max-height: 200px;
    }
}

/* Animações */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Melhorias de usabilidade em touch */
.btn {
    touch-action: manipulation;
}

/* Melhorias para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== Layout padrão das páginas internas ==================== */

.app-page,
.studies-page {
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.app-page-header,
.studies-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.app-page-intro,
.studies-page-intro {
    flex: 1 1 320px;
}

.app-page-intro h1,
.studies-page-intro h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.app-page-intro p,
.studies-page-intro p {
    color: #6b7280;
    margin: 0;
    font-size: 0.98rem;
}

.app-page-intro .accent-bar,
.studies-page-intro .accent-bar {
    width: 56px;
    height: 4px;
    border-radius: 999px;
    margin-bottom: 0.85rem;
    background: var(--gradient-accent-bar);
}

.app-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    background: var(--white);
}

.app-page .app-card:hover,
.app-page .studies-toolbar-card:hover,
.app-page .studies-table-card:hover {
    transform: none;
}

.app-card-header {
    background: var(--gradient-header);
    padding: 0.9rem 1.25rem;
    border: none;
    color: var(--white) !important;
}

.app-card-header h3,
.app-card-header h5,
.app-card-header .mb-0 {
    color: var(--white) !important;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.app-card-body {
    padding: 1.25rem 1.35rem;
}

.app-card-body-flush {
    padding: 0;
}

.app-card-body-flush .app-table-wrap {
    padding: 0 1rem 1rem;
}

.app-split-row {
    margin-top: 0 !important;
}

.app-toolbar-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.app-toolbar-inline .btn-sm,
.studies-toolbar-actions .btn-sm {
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
}

/* Botões da toolbar no header — mesmo visual dos ícones gama/brilho/contraste do viewer */
.app-card-header .app-toolbar-inline .btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f3f4f6;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.app-card-header .app-toolbar-inline .btn:hover:not(:disabled),
.app-card-header .app-toolbar-inline .btn:focus-visible:not(:disabled) {
    background: var(--green-overlay);
    border-color: var(--green-border);
    color: #fff;
    box-shadow: none;
}

.app-card-header .app-toolbar-inline .btn-danger:hover:not(:disabled),
.app-card-header .app-toolbar-inline .btn-danger:focus-visible:not(:disabled) {
    background: rgba(220, 53, 69, 0.28);
    border-color: rgba(220, 53, 69, 0.65);
    color: #fff;
}

.app-card-header .app-toolbar-inline .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.studies-toolbar-actions .btn-light {
    background: #fff;
    border-color: #dee2e6;
    color: #374151;
}

.studies-toolbar-actions .btn-light:hover {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #212529;
}

.studies-toolbar-actions .btn-danger .badge {
    font-size: 0.72rem;
    font-weight: 700;
}
.app-help-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.app-help-card .card-body {
    padding: 1rem 1.15rem;
}

.app-empty,
.studies-empty {
    padding: 3rem 1.5rem;
    text-align: center;
}

.app-empty-icon,
.studies-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.75rem;
}

.app-loading,
.studies-loading {
    padding: 3rem 1.5rem;
    text-align: center;
}

.app-loading .spinner-border,
.studies-loading .spinner-border {
    color: var(--primary-green);
    width: 2.5rem;
    height: 2.5rem;
}

.app-page .table thead,
.studies-page .table thead {
    background: #f3f4f6;
    color: #374151;
}

.app-page .table thead th,
.studies-page .table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.app-page .table tbody tr:hover,
.studies-page .table tbody tr:hover {
    background: #f0fdf4;
    transform: none;
    box-shadow: none;
    border-left: 3px solid var(--primary-green);
}

.app-page .table tbody td,
.studies-page .table tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

.app-page .table,
.studies-page .table {
    margin-bottom: 0;
    box-shadow: none;
}

.app-shell {
    background:
        repeating-linear-gradient(
            135deg,
            transparent 0,
            transparent 18px,
            rgba(0, 0, 0, 0.012) 18px,
            rgba(0, 0, 0, 0.012) 19px
        ),
        var(--page-bg);
    min-height: calc(100vh - 56px);
}

/* Páginas de autenticação / compartilhamento */
.auth-page {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: var(--white);
}

.auth-card-header {
    padding: 1.75rem 1.5rem 1.25rem;
    text-align: center;
    background: var(--gradient-header);
    color: var(--white);
}

.auth-card-header i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.95;
}

.auth-card-header h4 {
    color: var(--white);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.auth-card-header p {
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    font-size: 0.92rem;
}

.auth-card-body {
    padding: 1.5rem;
}

/* ==================== Lista de Exames ==================== */

.studies-page {
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.studies-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.studies-page-intro {
    flex: 1 1 320px;
}

.studies-page-intro h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.studies-page-intro p {
    color: #6b7280;
    margin: 0;
    font-size: 0.98rem;
}

.studies-page-intro .accent-bar {
    width: 56px;
    height: 4px;
    border-radius: 999px;
    margin-bottom: 0.85rem;
    background: var(--gradient-accent-bar);
}

.studies-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.studies-stat-card {
    min-width: 130px;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.studies-stat-card .stat-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    line-height: 1.1;
}

.studies-stat-card .stat-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-top: 0.25rem;
    font-weight: 600;
}

.studies-stat-card.stat-selected .stat-value {
    color: var(--green-dark);
}

.studies-header-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.studies-header-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.1;
}

.studies-header-stat .stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.studies-header-stat .stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.82);
}

.studies-header-stat-selected {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

.studies-header-stat-selected .stat-value {
    color: #ffe8e8;
}

.studies-toolbar-card,
.studies-table-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.studies-page .studies-toolbar-card:hover,
.studies-page .studies-table-card:hover {
    transform: none;
}

.studies-toolbar-card .card-body {
    padding: 1.25rem 1.35rem;
}

.studies-toolbar-actions {
    justify-content: flex-end;
}

.studies-filters {
    display: grid;
    grid-template-columns: 2fr 1fr minmax(260px, 1.5fr) 1fr;
    gap: 1rem;
    align-items: end;
}

.studies-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.studies-date-range .form-control {
    min-width: 0;
    flex: 1 1 0;
}

.studies-date-range-sep {
    font-size: 0.82rem;
    color: #6b7280;
    white-space: nowrap;
    flex: 0 0 auto;
}

.studies-filter-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

@media (min-width: 769px) {
    .studies-filters #unitFilter {
        font-size: 12px;
    }
}

.studies-filter-group .input-group-text {
    background: #f9fafb;
    border-color: #d1d5db;
    color: var(--primary-green);
}

.studies-table-card .card-header {
    background: var(--gradient-header);
    padding: 0.9rem 1.25rem;
    border: none;
}

.studies-table-card .card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.studies-table-card .card-body {
    padding: 0;
}

.studies-table-wrap {
    padding: 0 1rem 1rem;
}

.studies-page .table {
    margin-bottom: 0;
    box-shadow: none;
    border-radius: 0;
}

.studies-page .table thead {
    background: #f3f4f6;
    color: #374151;
}

.studies-page .table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.studies-page .table thead th.sortable:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.studies-page .table thead th.sortable.sort-active {
    background-color: #dcfce7;
    color: var(--primary-green-dark);
}

.studies-page .table thead th.sortable .sort-icon {
    opacity: 0.35;
    color: inherit;
}

.studies-page .table thead th.sortable.sort-active .sort-icon {
    opacity: 1;
    color: var(--primary-green-dark);
}

.studies-page .table tbody tr {
    animation: none;
    border-bottom: 1px solid #f0f0f0;
}

.studies-page .table tbody tr:hover {
    background: #f0fdf4;
    transform: none;
    box-shadow: none;
    border-left: 3px solid var(--primary-green);
}

.studies-page .table tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

.studies-page .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #fafafa;
}

.studies-page .table-striped > tbody > tr:nth-of-type(odd):hover > td {
    background: #f0fdf4;
}

.studies-patient-cell {
    display: flex;
    align-items: center;
    min-width: 0;
}

/* Legado: oculta iniciais se o navegador ainda tiver HTML em cache */
.studies-patient-avatar {
    display: none !important;
}

.studies-patient-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.35;
}

.studies-patient-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    min-width: 0;
}

.studies-report-pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dc3545;
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.studies-report-pdf-icon:hover {
    color: #b02a37;
}

.studies-report-pdf-modal-body {
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    padding: 0;
}

#studiesReportPdfModal .studies-report-pdf-modal-content:fullscreen,
#studiesReportPdfModal .studies-report-pdf-modal-content:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

#studiesReportPdfModal .studies-report-pdf-modal-content:fullscreen .studies-report-pdf-modal-body,
#studiesReportPdfModal .studies-report-pdf-modal-content:-webkit-full-screen .studies-report-pdf-modal-body {
    flex: 1;
    min-height: 0;
}

#studiesReportPdfModal .studies-report-pdf-modal-content:fullscreen .studies-report-pdf-frame,
#studiesReportPdfModal .studies-report-pdf-modal-content:-webkit-full-screen .studies-report-pdf-frame {
    min-height: 0;
}

.studies-report-pdf-frame {
    width: 100%;
    flex: 1;
    min-height: 400px;
    height: 100%;
    border: none;
    background: #fff;
}

.studies-report-pdf-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-style: italic;
}

.studies-exam-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.35;
}

.studies-exam-meta {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.studies-modality-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: var(--green-soft);
    color: var(--primary-green-dark);
    border: 1px solid var(--green-ring-soft);
}

.studies-modality-badge.modality-us { background: #e0f2fe; color: #0369a1; border-color: rgba(3, 105, 161, 0.2); }
.studies-modality-badge.modality-ct { background: #fef3c7; color: #b45309; border-color: rgba(180, 83, 9, 0.2); }
.studies-modality-badge.modality-mr { background: #ede9fe; color: #6d28d9; border-color: rgba(109, 40, 217, 0.2); }
.studies-modality-badge.modality-cr,
.studies-modality-badge.modality-dx { background: #fce7f3; color: #be185d; border-color: rgba(190, 24, 93, 0.2); }
.studies-modality-badge.modality-xa { background: #fee2e2; color: #b91c1c; border-color: rgba(185, 28, 28, 0.2); }

.studies-equipment-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.studies-dsa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(185, 28, 28, 0.12);
    color: #991b1b;
    border: 1px solid rgba(185, 28, 28, 0.25);
}

/* Coluna Modalidade oculta na UI (dados permanecem no DOM/código) */
.studies-page th[data-sort="modality"] {
    display: none !important;
}

.studies-page .studies-col-modality .studies-modality-badge,
.studies-page .studies-col-modality .studies-equipment-tag,
.studies-page .studies-col-modality .studies-dsa-badge {
    display: none !important;
}

@media (min-width: 992px) {
    .studies-page .studies-col-modality {
        display: none !important;
    }
}

.studies-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.studies-datetime .date-line {
    font-weight: 400;
}

.studies-datetime .time-line {
    color: #6b7280;
    font-size: inherit;
}

.studies-view-btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    white-space: nowrap;
}

.studies-loading {
    padding: 3rem 1.5rem;
    text-align: center;
}

.studies-loading .spinner-border {
    color: var(--primary-green);
    width: 2.5rem;
    height: 2.5rem;
}

.studies-empty {
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.studies-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.75rem;
}

.studies-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.studies-pagination-bar .page-link {
    color: var(--primary-green-dark);
    border-color: #dee2e6;
}

.studies-pagination-bar .page-item.active .page-link {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

@media (max-width: 992px) {
    .studies-filters {
        grid-template-columns: 1fr 1fr;
    }

    .studies-filters .studies-filter-clear {
        grid-column: 1 / -1;
    }
}

@media (max-width: 576px) {
    .studies-filters {
        grid-template-columns: 1fr;
    }

    .studies-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .studies-toolbar-actions .btn {
        flex: 1;
    }

    .studies-page-header {
        margin-bottom: 1rem;
    }
}

/* Lista de exames — layout em cards no mobile/tablet */
@media (max-width: 991.98px) {
    .studies-page {
        overflow-x: clip;
    }

    .studies-page .app-card-header {
        padding: 0.85rem 1rem;
    }

    .studies-page .app-card-header > .d-flex.align-items-center {
        width: 100%;
    }

    .studies-page .app-toolbar-inline {
        width: 100%;
    }

    .studies-page .app-toolbar-inline .btn-sm {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
    }

    .studies-page .card-body.border-bottom {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .studies-page .studies-table-wrap,
    .studies-page .app-card-body-flush .app-table-wrap {
        padding: 0 0.65rem 0.75rem;
    }

    .studies-page .table-responsive {
        overflow: visible;
    }

    .studies-page .table {
        border-spacing: 0;
    }

    .studies-page .table thead {
        display: none;
    }

    .studies-page .table tbody {
        display: block;
    }

    .studies-page .table tbody tr.studies-row {
        display: grid;
        grid-template-columns: 2.25rem minmax(0, 1fr) auto;
        grid-template-areas:
            "check exam action"
            "meta meta meta";
        gap: 0.55rem 0.65rem;
        padding: 0.85rem;
        margin-bottom: 0.65rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    }

    .studies-page .table tbody tr.studies-row:hover {
        transform: none;
        border-left: 1px solid var(--primary-green);
        box-shadow: 0 2px 10px var(--green-ring-soft);
    }

    .studies-page .table-striped > tbody > tr.studies-row:nth-of-type(odd) > td,
    .studies-page .table-striped > tbody > tr.studies-row:nth-of-type(even) > td {
        background: transparent;
    }

    .studies-page .table tbody tr.studies-row > td {
        display: block;
        width: auto;
        padding: 0;
        border: none;
    }

    .studies-page .studies-col-check {
        grid-area: check;
        align-self: start;
        padding-top: 0.2rem;
    }

    .studies-page .studies-col-exam {
        grid-area: exam;
        min-width: 0;
    }

    .studies-page .studies-col-actions {
        grid-area: action;
        align-self: start;
    }

    .studies-page .studies-col-modality {
        grid-area: meta;
        padding-top: 0.55rem;
        border-top: 1px solid #f3f4f6;
    }

    .studies-page .studies-patient-name,
    .studies-page .studies-exam-title {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .studies-page .studies-patient-cell {
        align-items: flex-start;
    }

    .studies-page .studies-col-modality > div {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.65rem;
    }

    .studies-page .studies-equipment-tag,
    .studies-page .studies-dsa-badge {
        margin-top: 0;
    }

    .studies-page .studies-col-modality .d-lg-none.mt-2 {
        margin-top: 0 !important;
        width: 100%;
    }

    .studies-page .studies-col-modality .studies-datetime {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.75rem;
    }

    .studies-page .studies-view-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.45rem 0.65rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .studies-page .studies-view-btn-label {
        display: none;
    }

    .studies-pagination-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding: 0.75rem 0.85rem;
        text-align: center;
    }

    .studies-pagination-bar nav {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .studies-pagination-bar .pagination {
        justify-content: center;
        flex-wrap: nowrap;
        min-width: min-content;
    }

    #studiesPageInfo {
        font-size: 0.82rem;
        line-height: 1.35;
    }
}

/* Editor de Laudo no modal */
#reportEditorModal .modal-body {
    overflow: hidden;
}

#reportEditorModal .note-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#reportEditorModal .note-editable {
    flex: 1;
    overflow-y: auto;
}
