﻿:root {
    /* Paleta de Cores - Manguezal (Modernizada SaaS) */
    --primary-color: #059669; /* Emerald 600 - Verde mais vibrante e moderno */
    --secondary-color: #2563eb; /* Blue 600 - Azul Royal moderno */
    --accent-color: #10b981; /* Emerald 500 - Detalhes vivos */
    --bg-color: #f3f4f6; /* Gray 100 - Fundo muito suave */
    --text-color: #1f2937; /* Gray 800 - Texto com contraste suave */
    --card-bg: #ffffff;
    
    /* Espaçamento e Bordas */
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: fit-content; /* Garante que o body expanda com o conteúdo */
}

/* Header Styles - Refatorado para alinhamento e proporção */
header {
    background-color: var(--primary-color);
    color: white;
    /* padding removido para evitar duplo espaçamento - controlado pelo container */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); /* Sombra mais difusa */
    height: 90px; /* Levemente maior para respiro */
    display: flex; /* Permite alinhamento interno direto, se necessário */
    align-items: center;
    justify-content: center;
    z-index: 100;
    position: relative;
    width: 100%;
    min-width: 100%; /* Garante que o fundo cubra a viewport e scroll horizontal */
    box-sizing: border-box;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centralização vertical forçada */
    width: 100%;
    max-width: none; /* Remove limite */
    margin: 0; /* Sem centralização com largura fixa */
    height: 100%;
    gap: 40px; /* Garante espaçamento mínimo entre título e menu */
    padding: 0 4rem; /* Padding mantido no container interno */
}

.brand-wrapper {
    display: flex;
    align-items: center; /* Centralização vertical forçada */
    gap: 20px; /* Ajustado para melhor proporção */
}

.header-logo {
    height: 55px; /* Ajuste sutil para harmonia */
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    line-height: 1; /* Line-height neutro para evitar deslocamento */
    white-space: nowrap;
    letter-spacing: -0.01em;
    margin: 0; /* Removido margin-top para alinhamento perfeito */
}

.main-nav {
    display: flex;
    align-items: center; /* Centralização vertical forçada */
    gap: 32px;
    margin: 0;
    padding: 0;
    margin-top: 5px; /* Ajuste fino para alinhar baseline do menu com o título */
}

.mobile-nav-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

/* Upload Minimalista */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f0fdf4;
}
.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.upload-icon {
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
.upload-text {
    color: #64748b;
    font-weight: 500;
}
.upload-subtext {
    color: #94a3b8;
    font-size: 0.85rem;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent; /* Garante mesma altura do botão logout */
    white-space: nowrap;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-link.logout {
    color: #fed7d7; /* Vermelho claro suave */
    margin-left: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.nav-link.logout:hover {
    background-color: #c53030;
    border-color: #c53030;
    color: white;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

main {
    flex: 1;
    padding: 0; /* Remove padding padrão do main, controlado pelo container interno */
    width: 100%;
}

/* Footer */
footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0;
    color: #64748b;
    background: transparent;
}
footer p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.dashboard-container {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 2rem) 2.5rem;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.admin-page-shell,
.container.fade-in,
.main-content {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 2rem) 2.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-title,
.header-flex h1,
.header-flex h2,
.page-header h1,
.page-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    color: #1f2937;
}

.page-subtitle,
.page-header .subtitle,
.header-flex .subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    gap: 12px; /* Espaçamento ajustado para 12px */
    align-items: center;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem; /* Mais padding interno */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05); /* Sombra mais suave e difusa */
    margin-bottom: 0; /* Controlado pelo Grid */
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Botões Estilizados */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem; /* Padding horizontal ajustado */
    font-size: 0.9rem;
    font-weight: 600; /* Mais peso */
    text-decoration: none;
    border-radius: 8px; /* Combinar com inputs */
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    height: 42px; /* Altura padronizada com filtros */
    box-sizing: border-box;
    letter-spacing: 0.025em;
}

/* Utilitários de Alinhamento e Cores de Botão (Mantendo compatibilidade) */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
    background-color: #047857; /* Emerald 700 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-color);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: none;
}
.btn-outline-primary:hover {
    background-color: #ecfdf5; /* Verde muito claro */
    color: #047857;
    border-color: #047857;
}

.btn-icon-outline {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    width: 36px; /* Botões de tabela menores */
    height: 36px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-outline:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Filtros */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* Aumentado gap */
    background-color: #f9fafb; /* Cinza bem claro e moderno */
    padding: 1.5rem 2rem;
    border-radius: 12px; /* Rounded-lg */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Sombra sutil */
    margin-bottom: 40px; /* Aumentado margin bottom */
    align-items: flex-end;
    border: 1px solid #edf2f7;
}

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

.filter-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #718096; /* Cinza médio moderno */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

/* Selects Customizados */
.filter-input, .form-control {
    appearance: none; /* Remove estilo padrão */
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px; /* Cantos arredondados */
    padding: 0.6rem 1rem; /* Padding base */
    font-size: 0.95rem;
    color: #4a5568;
    height: 42px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
    box-sizing: border-box; /* Garante tamanho correto */
}

/* Estilos específicos para Selects (Seta e Padding) */
select.filter-input, select.form-control {
    padding-right: 2.5rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0aec0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

input.filter-input, input.form-control {
    cursor: text;
}

.filter-input:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.filter-btn {
    height: 42px;
    padding: 0 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(46, 139, 87, 0.2);
    letter-spacing: 0.025em;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(46, 139, 87, 0.25);
}

/* Cards de Impacto Redesenhados */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 4rem; /* Mais respiro abaixo dos cards */
}

/* Tablet e Desktop: Forçar 3 colunas */
@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem; /* Padding padrão */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #edf2f7;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Removido layout fixo para permitir uso genérico */
}

.card-kpi {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centraliza verticalmente se sobrar espaço */
    height: auto; /* Altura adaptável ao conteúdo */
    min-height: 9.5rem; /* Garante consistência visual entre abas (Moeda vs Plante) */
    padding: 1rem 1rem 2.25rem 1rem; /* Padding inferior aumentado para acomodar referência absoluta */
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.kpi-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.25rem 0; /* Margem reduzida drasticamente */
    text-align: center;
    height: auto; /* Remove altura fixa */
    min-height: 0;
    display: block; /* Remove flex desnecessário */
    line-height: 1.2;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-bottom: 0; /* Margem removida, controlado pelo gap/padding do pai se necessário */
    gap: 0.5rem; /* Respiro aumentado entre valor e unidade */
}

.kpi-value {
    font-size: 2.75rem; /* Mantém fonte grande legível */
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0; /* Remove margem inferior extra */
    color: var(--primary-color);
    line-height: 1; /* Altura de linha ajustada para evitar cortes */
}

.kpi-unit {
    font-size: 0.85rem; /* Tamanho equilibrado */
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0;
}

.kpi-reference {
    position: absolute;
    bottom: 0.75rem;
    left: 0;
    width: 100%;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Ajustes de Opacidade para Filtro */
.dimmed {
    opacity: 0.4;
    filter: grayscale(100%);
}

/* Tabelas Modernas (Clean UI) */
.table-clean, table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    color: #64748b; /* Slate 500 */
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

td {
    padding: 1.25rem 1.5rem; /* Mais respiro */
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155; /* Slate 700 */
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

/* Zebra Striping */
tbody tr:nth-child(even) td {
    background-color: #fafafa; /* Cinza muito sutil */
}

/* Hover Effect */
tbody tr:hover td {
    background-color: #f0fdf4 !important; /* Verde muito claro ao passar o mouse */
    color: var(--primary-color);
}

tr:last-child td {
    border-bottom: none;
}

/* Botões de Ação na Tabela */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin: 0 4px;
    cursor: pointer;
}

.btn-edit {
    color: #0ea5e9; /* Sky 500 */
    background-color: #f0f9ff; /* Sky 50 */
    border-color: #e0f2fe;
}
.btn-edit:hover {
    background-color: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}

.btn-delete {
    color: #ef4444; /* Red 500 */
    background-color: #fef2f2; /* Red 50 */
    border-color: #fee2e2;
}
.btn-delete:hover {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Tooltip simples para evidências */
.tooltip-container {
    display: inline-flex;
    position: relative;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.alert-success { background-color: #d4edda; color: #155724; }
.alert-danger { background-color: #f8d7da; color: #721c24; }
.alert-warning { background-color: #fff3cd; color: #856404; }

@media (max-width: 768px) {
    .dashboard-container,
    .admin-page-shell,
    .container.fade-in,
    .main-content {
        padding: 1.5rem 1rem 2rem;
    }

    .header-flex,
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 991.98px) {
    header {
        height: auto;
        min-width: 0;
    }

    .header-container {
        padding: 1rem 1.25rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .brand-wrapper {
        width: 100%;
        min-width: 0;
    }

    .header-title {
        white-space: normal;
        line-height: 1.2;
    }

    .main-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    html,
    body {
        overflow-x: hidden;
    }

    body {
        min-width: 0;
        width: 100%;
    }

    header {
        height: auto;
        min-width: 0;
        overflow: visible;
    }

    .header-container {
        position: relative;
        padding: 0.625rem 0.875rem;
        align-items: center;
        gap: 0.625rem;
        flex-wrap: nowrap;
        min-width: 0;
    }

    .brand-wrapper {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        gap: 0.625rem;
        overflow: hidden;
        max-width: calc(100% - 50px);
    }

    .brand-wrapper > a {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        min-width: 0;
        width: 100%;
        overflow: hidden;
    }

    .header-brand-link {
        min-width: 0;
        max-width: 100%;
    }

    .header-logo {
        height: 32px;
        flex: 0 0 auto;
    }

    .header-title {
        font-size: 0.78rem;
        font-weight: 600;
        max-width: 100%;
        white-space: normal;
        line-height: 1.1;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-width: 0;
    }

    .header-title-full {
        display: none;
    }

    .header-title-short {
        display: inline !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        width: 38px;
        height: 38px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 1rem;
        right: 1rem;
        width: auto;
        margin-top: 0;
        padding: 0.5rem;
        border-radius: 14px;
        background: #047857;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 200;
        max-height: calc(100vh - 78px);
        overflow-y: auto;
    }

    .main-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.75rem 0.875rem;
    }

    .main-nav .nav-link.logout {
        margin-left: 0;
    }

    main {
        padding-top: 0.25rem;
    }

    .dashboard-container,
    .admin-page-shell,
    .container.fade-in,
    .main-content {
        padding: 1rem 0.75rem 1.75rem;
        min-width: 0;
    }

    .header-flex,
    .page-header {
        gap: 0.875rem;
        min-width: 0;
        margin-bottom: 1rem;
    }

    .header-flex > div,
    .page-header > div {
        min-width: 0;
        width: 100%;
    }

    .page-title,
    .header-flex h1,
    .header-flex h2,
    .page-header h1,
    .page-header h2 {
        max-width: 100%;
        font-size: 1.42rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .header-flex > .btn,
    .page-header > .btn,
    .header-actions,
    .page-header .header-actions {
        width: 100%;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .header-actions > .btn,
    .header-actions > a,
    .page-header .header-actions > .btn,
    .page-header .header-actions > a {
        width: 100%;
    }

    .filters-bar {
        padding: 0.875rem;
        gap: 0.875rem;
    }

    .filters-bar .filter-group {
        width: 100%;
    }

    .filters-bar .filter-group > div {
        width: 100%;
        flex-wrap: wrap;
    }

    .filters-bar .filter-input,
    .filters-bar .form-control,
    .filters-bar .btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .filters-bar .btn {
        justify-content: center;
    }

    .dashboard-page {
        overflow-x: hidden;
        min-width: 0;
    }

    .dashboard-page-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        align-items: stretch;
    }

    .dashboard-page-header > div:first-child {
        min-width: 0;
    }

    .dashboard-greeting {
        font-size: 0.95rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    #dashboard-title {
        font-size: 1.28rem !important;
        line-height: 1.15;
        margin: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .dashboard-header-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        width: 100%;
    }

    .dashboard-header-actions .btn,
    .dashboard-header-actions > a {
        height: 38px;
        min-width: 0;
        width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.85rem;
        justify-content: center;
    }

    .dashboard-header-actions > a:last-child {
        grid-column: 1 / -1;
    }

    .dashboard-filters {
        padding: 0.875rem;
        gap: 0.875rem;
        margin-bottom: 1.25rem;
        align-items: stretch;
    }

    .dashboard-filters .filter-group {
        gap: 0.35rem;
        min-width: 0;
    }

    .dashboard-filters .filter-group label {
        margin-bottom: 0;
    }

    .dashboard-filters .dashboard-filter-pair {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 84px;
        width: 100%;
    }

    .dashboard-filters .filter-group > div[style*="display: flex"] {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 84px;
        gap: 0.5rem !important;
        width: 100%;
    }

    .dashboard-filters #multiselect-trigger,
    .dashboard-filters #multiselect-options,
    .dashboard-filters [style*="height: 38px"],
    .dashboard-filters [style*="min-width: 220px"] {
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-filters .filter-input,
    .dashboard-filters .form-control {
        height: 40px;
        font-size: 0.92rem;
    }

    .dashboard-filters [style*="min-width: 110px"],
    .dashboard-filters [style*="min-width: 90px"],
    .dashboard-filters [style*="min-width: 220px"] {
        min-width: 0 !important;
        width: 100% !important;
    }

    .dashboard-filters .filter-group[style*="margin-left: auto"] {
        margin-left: 0 !important;
    }

    .dashboard-filters .filter-group:last-child {
        width: 100%;
    }

    .dashboard-tabs {
        gap: 0.35rem !important;
        margin-bottom: 1.25rem !important;
        padding-bottom: 0.15rem;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-width: 0;
    }

    .dashboard-tabs::-webkit-scrollbar {
        display: none;
    }

    .dashboard-tabs .tab-btn {
        flex: 0 0 auto;
        padding: 0.65rem 0.85rem !important;
        font-size: 0.92rem !important;
        white-space: nowrap;
    }

    .cards-grid {
        gap: 0.9rem;
        margin-bottom: 1.5rem;
        grid-template-columns: 1fr !important;
    }

    .cards-grid > * {
        min-width: 0;
    }

    .card.card-kpi,
    .card-kpi {
        min-height: 0 !important;
        height: auto !important;
        padding: 0.625rem 0.7rem 0.75rem;
        border-radius: 10px;
    }

    .kpi-title {
        font-size: 0.68rem;
        margin-bottom: 0.15rem;
        line-height: 1.25;
    }

    .kpi-content {
        gap: 0.25rem;
    }

    .kpi-value {
        font-size: 1.55rem;
        line-height: 1;
    }

    .kpi-unit {
        font-size: 0.7rem;
    }

    .kpi-reference {
        position: static;
        width: auto;
        margin-top: 0.25rem;
        font-size: 0.64rem;
    }

    .reports-page .reports-filters-row {
        flex-wrap: wrap !important;
    }

    .reports-page .reports-filters-row > .filter-group {
        flex: 1 1 100% !important;
    }

    .reports-page .reports-actions-cell {
        min-width: 180px;
    }

    .users-page .users-form-grid {
        grid-template-columns: 1fr !important;
    }

    .users-page .users-submit-btn {
        width: 100%;
    }

    .users-page #sponsor_access_hint {
        position: static !important;
        width: auto !important;
        margin-top: 0.5rem;
    }

    .table-responsive,
    .notas-page .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > table,
    .notas-page .data-table {
        min-width: 640px;
    }

    .notas-page .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .notas-page .filter-row > .filter-group,
    .notas-page .filter-row > button {
        width: 100%;
    }

    .notas-page .filter-row > button {
        margin-left: 0 !important;
    }

    .notas-page .form-row-top {
        grid-template-columns: 1fr !important;
    }

    .notas-page .form-row-top .field {
        min-width: 0;
    }

    .notas-page .field.action {
        grid-column: auto !important;
        justify-self: stretch !important;
    }

    .notas-page .field.action .btn {
        width: 100%;
    }
}
