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

/* ============================================
   VARIÁVEIS GLOBAIS — ServMaq Design System
   ============================================ */
:root {
    /* Cores */
    --bg: #e8edf5;
    --bg-soft: #dce4ef;
    --bg-contrast: #cfd9e7;
    --white: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --success-light: #dcfce7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #d97706;
    --warning-light: #fef9c3;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-dark: #d1d5db;

    /* Layout */
    --sidebar-w: 250px;
    --header-h: 60px;

    /* Efeitos */
    --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.10), 0 8px 18px rgba(15, 23, 42, 0.05);
    --radius: 6px;
    --transition: 0.2s ease;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0) 22rem),
        linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 24%, var(--bg-contrast) 100%);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img,
svg {
    max-width: 100%;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center !important;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: -0.02em;
    gap: 10px;
}

.sidebar-logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: 100%;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari e Opera */
}

.sidebar-section {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    padding: 0 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition);
    text-decoration: none;
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-link i,
.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
}

/* --- Main --- */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header --- */
.header {
    height: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    min-width: 0;
}

.header-user-menu {
    position: relative;
}

button.header-user {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.header-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    padding: 0.35rem;
    display: none;
    z-index: 120;
}

.header-user-menu.open .header-user-dropdown {
    display: block;
}

.header-user-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.header-user-dropdown-item:hover {
    background: var(--bg);
    text-decoration: none;
}

.header-user-dropdown-danger {
    color: var(--danger);
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* --- Content Area --- */
.content {
    padding: 1.5rem;
    flex: 1;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 16rem),
        linear-gradient(180deg, rgba(207, 217, 231, 0.22) 0%, rgba(207, 217, 231, 0) 24rem);
}

/* ============================================
   COMPONENTES — Botões
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    opacity: 0.9;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: var(--white);
    border-color: var(--border);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border-dark);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.4rem;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--text);
}

/* ============================================
   COMPONENTES — Card / Container
   ============================================ */
.card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #d6deea;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 0;
}

/* Maintain breathing room when cards are stacked vertically */
.card + .card {
    margin-top: 1rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dde5ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.95) 0%, rgba(240, 245, 251, 0.9) 100%);
    border-radius: 12px 12px 0 0;
}

.card-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #dde5ef;
    background: #f4f7fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   COMPONENTES — Tabelas
   ============================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

thead {
    background: #f8f9fb;
    border-bottom: 1px solid var(--border);
}

th {
    padding: 0.7rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
    text-align: left;
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:hover td {
    background: #fafbfd;
}

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

/* ============================================
   COMPONENTES — Formulários
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ============================================
   COMPONENTES — Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.badge-accent {
    background: #faf5ff;
    color: #9333ea;
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
}

/* ============================================
   COMPONENTES — Filtros
   ============================================ */
.filters {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.filters .form-group {
    margin-bottom: 0;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.text-sm { font-size: 0.8rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ============================================
   ESTADO VAZIO
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    text-align: center;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.empty-state p {
    font-size: 0.85rem;
    max-width: 360px;
}

.sidebar-backdrop,
.mobile-menu-btn {
    display: none;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.app-install-strip {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    box-shadow: var(--shadow-sm);
}

.app-install-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.app-install-copy strong {
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.app-install-copy span {
    font-size: 0.82rem;
    color: var(--text-light);
}

.app-install-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 960px) {
    .sidebar {
        width: min(86vw, 290px);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
    }

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

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        border: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 95;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu-btn {
        display: inline-flex;
        flex-shrink: 0;
    }

    .header {
        height: var(--header-h);
        padding: 0 1rem;
        gap: 0.5rem;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .header-main {
        flex: 1;
        min-width: 0;
        gap: 0.5rem;
    }

    .header-title {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        width: auto;
        gap: 0.5rem;
        margin-left: auto;
        flex-shrink: 0;
    }

    .header-user span {
        display: none; /* Esconde o nome do usuário no mobile */
    }

    .header-user {
        border-left: 0;
        padding-left: 0;
    }

    .header-divider,
    .header-subtitle {
        display: none;
    }

    .content {
        padding: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .app-install-strip {
        top: 0.5rem;
        flex-direction: column;
        align-items: stretch;
    }

    .app-install-actions {
        justify-content: stretch;
    }

    .card-header,
    .card-footer {
        gap: 0.75rem;
        align-items: flex-start;
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 13px;
    }

    .btn {
        width: auto;
        max-width: 100%;
    }

    .table-responsive {
        overflow-x: auto;
    }

    th,
    td {
        padding: 0.7rem 0.75rem;
    }

    .dashboard-install-top,
    .dashboard-install-grid {
        display: flex !important;
        flex-direction: column;
    }

    .dashboard-install-art {
        order: -1;
    }

    .dashboard-install-banner .card-body {
        padding: 1rem !important;
    }

    .dashboard-kpis .card-body h3 {
        font-size: 1.3rem !important;
    }

    .app-install-actions .btn {
        width: 100%;
    }

    .filters .btn,
    .card-footer .btn {
        width: 100%;
    }

    /* Ajustes Modais mobile */
    .modal-content {
        width: 95% !important;
        margin: 10px auto !important;
        padding: 0 !important;
    }
    
    .modal-body {
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Grid do Formulário de OS */
    .os-kpis {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Sidebar Mobile - Garante que ocupe a altura toda e tenha scroll */
    .sidebar {
        height: 100vh;
        overflow-y: auto;
    }

    /* Ajuste de Tabelas Mobile */
    .table-responsive {
        border: 0;
        margin-bottom: 1rem;
    }
    
    /* Utility for cards in rows */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .content {
        padding: 0.65rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .sidebar-brand {
        padding-inline: 0.9rem;
    }
}

@media (max-width: 480px) {
    .os-kpis {
        grid-template-columns: 1fr !important;
    }
    
    .header-actions {
        display: none; /* Esconde ações secundárias se estiver muito apertado */
    }
    
    .header-user-menu {
        display: block !important; /* Sempre mantém o menu do usuário */
    }
}

/* ──────────────────────────────────────────────────
   HACK: Suporte para menus que dão scroll horizontal 
   ────────────────────────────────────────────────── */
.cfg-nav, .os-tabs, .ag-toolbar {
    -webkit-overflow-scrolling: touch;
}
.cfg-nav::-webkit-scrollbar, .os-tabs::-webkit-scrollbar {
    display: none;
}

@media (max-width: 480px) {
    .header {
        padding-inline: 0.75rem;
    }

    .header-main {
        gap: 0.4rem;
    }

    .header-title {
        font-size: 0.9rem;
    }

    .header-actions {
        display: flex;
        gap: 0.35rem;
    }

    .notif-wrapper {
        display: none;
    }

    .header-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.68rem;
    }

    .header-user-dropdown {
        min-width: min(240px, calc(100vw - 24px));
        right: 0;
    }
}

/* PWA Install Banner */
.pwa-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 2px solid var(--primary);
    padding: 1rem 1.2rem;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}

.pwa-banner-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pwa-banner-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.pwa-banner-info {
    flex: 1;
    min-width: 200px;
}

.pwa-banner-info strong {
    display: block;
    color: #f8fafc;
    font-size: 0.95rem;
}

.pwa-banner-info p {
    color: #94a3b8;
    font-size: 0.82rem;
    margin: 0.15rem 0 0;
}

.pwa-install-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.pwa-dismiss-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.dashboard-shell {
    display: grid;
    gap: 0.9rem;
}

.dashboard-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-kpi-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid #dbe3ee;
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    min-width: 0;
}

.dashboard-kpi-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-kpi-card__top svg {
    width: 17px;
    height: 17px;
    color: #64748b;
    flex-shrink: 0;
}

.dashboard-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.65rem;
    line-height: 1.05;
}

.dashboard-kpi-card p {
    color: #64748b;
    margin: 0;
    font-size: 0.84rem;
}

.dashboard-kpi-card--finance {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.95));
}

.dashboard-kpi-card--finance .dashboard-kpi-card__top svg {
    color: #2563eb;
}

.dashboard-kpi-card--success {
    background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
}

.dashboard-kpi-card--success .dashboard-kpi-card__top svg {
    color: #16a34a;
}

.dashboard-kpi-card--warning {
    background: linear-gradient(180deg, #fff7ed, #fffbeb);
    border-color: #fed7aa;
}

.dashboard-kpi-card--warning .dashboard-kpi-card__top svg {
    color: #f59e0b;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f7fafe);
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.dashboard-hero__headline {
    max-width: 760px;
}

.dashboard-eyebrow,
.dashboard-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-eyebrow {
    color: #2563eb;
    margin-bottom: 0.4rem;
}

.dashboard-hero__headline h1 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.15;
}

.dashboard-hero__headline p {
    margin: 0.35rem 0 0;
    max-width: 560px;
    color: #64748b;
}

.dashboard-hero__meta {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
    max-width: 360px;
}

.dashboard-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.8rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #dbeafe;
}

.dashboard-meta-chip svg {
    width: 15px;
    height: 15px;
}

.dashboard-snapshot {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1rem;
    align-items: start;
}

.dashboard-snapshot--stacked {
    grid-template-columns: 1fr;
}

.dashboard-snapshot__main,
.dashboard-snapshot__finance {
    border: 1px solid #d7dfeb;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    align-self: start;
}

.dashboard-snapshot__main {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: fit-content;
}

.dashboard-snapshot__block {
    padding: 1.1rem 1.2rem;
    min-width: 0;
}

.dashboard-snapshot__block + .dashboard-snapshot__block {
    border-left: 1px solid #e2e8f0;
}

.dashboard-snapshot__block strong,
.dashboard-periods strong,
.dashboard-finance-grid strong,
.dashboard-finance-value strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.55rem;
    line-height: 1.1;
    color: #0f172a;
}

.dashboard-snapshot__block p,
.dashboard-finance-value span,
.dashboard-finance-grid span,
.dashboard-upcoming__content span,
.dashboard-upcoming__owner small,
.dashboard-timeline__content span,
.dashboard-timeline__content small,
.dashboard-owners__item small,
.dashboard-finance-list__item small {
    color: #64748b;
}

.dashboard-snapshot__finance {
    padding: 1.2rem;
    display: grid;
    gap: 1rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0) 13rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 253, 0.95));
}

.dashboard-snapshot--stacked .dashboard-snapshot__finance {
    grid-template-columns: minmax(240px, 1.05fr) minmax(220px, 0.95fr);
    align-items: start;
}

.dashboard-snapshot--stacked .dashboard-finance-grid {
    height: 100%;
}

.dashboard-finance-value span {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-finance-value {
    display: grid;
    gap: 0.35rem;
}

.dashboard-finance-value__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-finance-value__icon {
    width: 18px;
    height: 18px;
    color: #2563eb;
}

.dashboard-finance-value strong {
    font-size: clamp(2rem, 2.8vw, 2.5rem);
    letter-spacing: 0;
}

.dashboard-finance-value small {
    color: #64748b;
    font-size: 0.8rem;
}

.dashboard-finance-meter {
    display: grid;
    gap: 0.45rem;
}

.dashboard-finance-meter__track {
    display: flex;
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #dbe7f5;
}

.dashboard-finance-meter__fill {
    height: 100%;
}

.dashboard-finance-meter__fill--success {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.dashboard-finance-meter__fill--warning {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.dashboard-finance-meter__legend {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-finance-meter__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-finance-meter__legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.dashboard-finance-meter__legend span:first-child i {
    background: #16a34a;
}

.dashboard-finance-meter__legend span:last-child i {
    background: #f59e0b;
}

.dashboard-finance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-finance-stat {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dashboard-finance-stat strong {
    font-size: 1.15rem;
}

.dashboard-finance-stat small {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.76rem;
}

.dashboard-finance-stat--success {
    background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
}

.dashboard-finance-stat--warning {
    background: linear-gradient(180deg, #fff7ed, #fffbeb);
    border-color: #fed7aa;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
    gap: 0.9rem;
}

.dashboard-column {
    display: grid;
    gap: 1rem;
}

.dashboard-panel .card-body {
    display: grid;
    gap: 0.85rem;
}

.dashboard-periods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-periods > div,
.dashboard-validation > div {
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.dashboard-timeline,
.dashboard-upcoming,
.dashboard-owners,
.dashboard-finance-list {
    display: grid;
    gap: 0.7rem;
}

.dashboard-timeline__item,
.dashboard-upcoming__item,
.dashboard-owners__item,
.dashboard-finance-list__item {
    display: grid;
    align-items: center;
    gap: 0.7rem;
    padding: 0.78rem 0.85rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
}

.dashboard-timeline__item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.dashboard-timeline__time {
    min-width: 58px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-timeline__content,
.dashboard-upcoming__content {
    min-width: 0;
}

.dashboard-timeline__content strong,
.dashboard-upcoming__content strong,
.dashboard-owners__item strong,
.dashboard-finance-list__item strong {
    display: block;
    color: #0f172a;
}

.dashboard-upcoming__item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.dashboard-upcoming__date {
    min-width: 64px;
}

.dashboard-upcoming__date strong,
.dashboard-upcoming__owner span,
.dashboard-finance-list__headline strong,
.dashboard-owners__item > span,
.dashboard-finance-list__item > span {
    color: #0f172a;
    font-weight: 700;
}

.dashboard-upcoming__date span,
.dashboard-finance-list__headline span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
}

.dashboard-owners__item,
.dashboard-finance-list__item {
    grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-owners__item > span {
    font-size: 1.1rem;
}

.dashboard-finance-list {
    padding: 0.85rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.dashboard-finance-list--alert {
    background: #fffaf3;
    border-color: #fed7aa;
}

.dashboard-finance-list__headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-validation {
    display: grid;
    gap: 0.75rem;
}

.dashboard-finance-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-finance-summary__item {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.dashboard-finance-summary__item span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-finance-summary__item strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.dashboard-finance-summary__item small {
    color: #64748b;
    font-size: 0.78rem;
}

.dashboard-finance-summary__item--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dashboard-finance-summary__item--warning {
    background: #fff7ed;
    border-color: #fed7aa;
}

.dashboard-validation .is-ok {
    background: linear-gradient(180deg, #ecfdf5, #dcfce7);
    border-color: #86efac;
}

.dashboard-validation .is-warn {
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
    border-color: #fdba74;
}

.dashboard-validation span {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-validation strong {
    display: block;
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 1rem;
}

.relatorios-shell {
    display: grid;
    gap: 1rem;
}

.relatorios-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 18px;
    border: 1px solid rgba(14, 116, 144, 0.18);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0) 18rem),
        linear-gradient(135deg, rgba(11, 47, 74, 0.98), rgba(8, 145, 178, 0.92));
    color: #f8fafc;
    box-shadow: 0 24px 54px rgba(8, 47, 73, 0.2);
}

.relatorios-hero__headline {
    max-width: 760px;
}

.relatorios-eyebrow,
.relatorios-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.relatorios-eyebrow {
    margin-bottom: 0.55rem;
    color: rgba(165, 243, 252, 0.92);
}

.relatorios-hero__headline h1 {
    margin: 0;
    font-size: 1.95rem;
    line-height: 1.12;
}

.relatorios-hero__headline p {
    margin: 0.7rem 0 0;
    max-width: 660px;
    color: rgba(226, 232, 240, 0.92);
}

.relatorios-hero__actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
    max-width: 350px;
}

.relatorios-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.82rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}

.relatorios-hero__chip svg {
    width: 15px;
    height: 15px;
}

.relatorios-kpi-grid,
.relatorios-summary-grid,
.relatorios-grid {
    display: grid;
    gap: 1rem;
}

.relatorios-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.relatorios-kpi {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    padding: 1.1rem 1.15rem;
    border-radius: 14px;
    border: 1px solid #d8e2ed;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.96));
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.relatorios-kpi__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.relatorios-kpi__icon svg {
    width: 20px;
    height: 20px;
}

.relatorios-kpi span,
.relatorios-insight span,
.relatorios-export-card span,
.relatorios-brand__headline span,
.relatorios-ranking__content span,
.relatorios-ranking__value small,
.relatorios-footnote {
    color: #64748b;
}

.relatorios-kpi span,
.relatorios-insight span,
.relatorios-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.relatorios-kpi strong,
.relatorios-insight strong,
.relatorios-ranking__value strong,
.relatorios-brand__headline b {
    display: block;
    color: #0f172a;
}

.relatorios-kpi strong {
    margin-top: 0.2rem;
    font-size: 1.45rem;
    line-height: 1.1;
}

.relatorios-kpi small,
.relatorios-insight small {
    display: block;
    margin-top: 0.18rem;
}

.relatorios-kpi .badge {
    grid-column: 1 / -1;
    justify-self: flex-start;
}

.relatorios-kpi--primary .relatorios-kpi__icon {
    background: #dbeafe;
    color: #2563eb;
}

.relatorios-kpi--danger .relatorios-kpi__icon {
    background: #fee2e2;
    color: #dc2626;
}

.relatorios-kpi--info .relatorios-kpi__icon {
    background: #e0f2fe;
    color: #0284c7;
}

.relatorios-kpi--accent .relatorios-kpi__icon {
    background: #f1f5f9;
    color: #475569;
}

.relatorios-summary-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
}

.relatorios-panel {
    overflow: hidden;
}

.relatorios-panel--dark {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), rgba(34, 211, 238, 0) 14rem),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.relatorios-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.relatorios-panel__header h2 {
    margin: 0.2rem 0 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.relatorios-panel__header svg {
    width: 20px;
    height: 20px;
    color: #0f766e;
}

.relatorios-panel__header--soft svg {
    color: #2563eb;
}

.relatorios-insights,
.relatorios-export-list,
.relatorios-brand-list,
.relatorios-ranking {
    display: grid;
    gap: 0.8rem;
}

.relatorios-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.relatorios-insight,
.relatorios-export-card,
.relatorios-brand,
.relatorios-ranking__item {
    border-radius: 14px;
    border: 1px solid #dbe4ef;
    background: #f8fafc;
}

.relatorios-insight {
    padding: 1rem;
}

.relatorios-insight strong {
    margin-top: 0.18rem;
    font-size: 1.15rem;
}

.relatorios-export-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.95rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.relatorios-export-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: #bfdbfe;
}

.relatorios-export-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.relatorios-export-card__icon svg {
    width: 18px;
    height: 18px;
}

.relatorios-export-card__icon--finance {
    background: #dcfce7;
    color: #15803d;
}

.relatorios-export-card__icon--os {
    background: #dbeafe;
    color: #1d4ed8;
}

.relatorios-export-card__icon--clients {
    background: #ede9fe;
    color: #6d28d9;
}

.relatorios-export-card__icon--stock {
    background: #fef3c7;
    color: #b45309;
}

.relatorios-export-card strong,
.relatorios-brand__headline strong,
.relatorios-ranking__content strong {
    display: block;
    color: #0f172a;
}

.relatorios-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.relatorios-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.relatorios-ranking__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.9rem 1rem;
}

.relatorios-ranking__position {
    min-width: 44px;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    text-align: center;
}

.relatorios-brand {
    padding: 0.95rem 1rem;
}

.relatorios-brand__headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.relatorios-brand__bar {
    margin-top: 0.75rem;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.relatorios-brand__bar > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0891b2, #2563eb);
}

.relatorios-footnote {
    font-size: 0.8rem;
    text-align: center;
    padding-bottom: 0.15rem;
}

@media (max-width: 1100px) {
    .dashboard-strip,
    .dashboard-snapshot,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-finance-summary {
        grid-template-columns: 1fr;
    }

    .relatorios-kpi-grid,
    .relatorios-summary-grid,
    .relatorios-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .dashboard-hero,
    .dashboard-snapshot__main,
    .dashboard-snapshot--stacked .dashboard-snapshot__finance,
    .dashboard-periods,
    .dashboard-finance-grid,
    .dashboard-upcoming__item,
    .dashboard-timeline__item {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: 1.2rem;
    }

    .dashboard-hero__headline h1 {
        font-size: 1.45rem;
    }

    .dashboard-snapshot__block + .dashboard-snapshot__block {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .relatorios-hero,
    .relatorios-insights,
    .relatorios-ranking__item {
        grid-template-columns: 1fr;
    }

    .relatorios-hero {
        padding: 1.2rem;
    }

    .relatorios-hero__headline h1 {
        font-size: 1.45rem;
    }

    .relatorios-hero__actions {
        justify-content: flex-start;
        max-width: none;
    }
}

.fin-erp {
    display: grid;
    gap: 1rem;
}

.fin-erp__strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.fin-kpi {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d9e3ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.fin-kpi span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.fin-kpi strong {
    font-size: 1.15rem;
    color: #0f172a;
}

.fin-kpi--danger strong { color: #dc2626; }
.fin-kpi--primary strong { color: #2563eb; }

.fin-toolbar-card .card-body,
.fin-summary-card .card-body {
    padding: 0.95rem 1rem;
}

.fin-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(120px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.fin-toolbar__search {
    min-width: 0;
}

.fin-toolbar__actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding-top: 0.15rem;
}

.fin-export-group {
    display: inline-flex;
    gap: 0.45rem;
}

.fin-summary-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1rem;
}

.fin-conference {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.fin-conference__item {
    padding: 0.75rem 0.85rem;
    border: 1px solid #dde5ef;
    border-radius: 10px;
    background: #f8fafc;
}

.fin-conference__item span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
}

.fin-conference__item strong {
    display: block;
    margin-top: 0.2rem;
    color: #0f172a;
}

.fin-conference__item--total {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.fin-bulk {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.fin-bulk .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.fin-table-card {
    overflow: hidden;
}

.fin-table {
    min-width: 1320px;
}

.fin-table th,
.fin-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.79rem;
}

.fin-table thead th {
    background: #f8fafc;
    color: #64748b;
}

.fin-table__check {
    width: 36px;
}

.fin-link-strong {
    font-weight: 700;
    text-decoration: none;
}

.fin-table__client strong,
.fin-table__money strong {
    display: block;
    color: #0f172a;
}

.fin-table__client small,
.fin-table__money small {
    color: #64748b;
    font-size: 0.71rem;
}

.fin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.fin-status--success {
    background: #dcfce7;
    color: #15803d;
}

.fin-status--warning {
    background: #fef3c7;
    color: #b45309;
}

.fin-status--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.fin-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.fin-delete-form {
    display: inline-flex;
    margin: 0;
}

.fin-modal[hidden] {
    display: none;
}

.fin-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fin-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
}

.fin-modal__dialog {
    position: relative;
    width: min(100%, 520px);
    border-radius: 14px;
    background: #fff;
    border: 1px solid #d8e1ec;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.fin-modal__header,
.fin-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.fin-modal__header {
    border-bottom: 1px solid #e2e8f0;
}

.fin-modal__header h3 {
    margin: 0;
    font-size: 1rem;
}

.fin-modal__body {
    padding: 1rem;
}

.fin-modal__footer {
    justify-content: flex-end;
    padding: 0;
    margin-top: 1rem;
}

.cred-history-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 0 0 1.5rem;
}

.cred-history-card {
    display: grid;
    gap: 0.45rem;
    min-height: 108px;
    padding: 1rem 1.1rem;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.cred-history-card span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cred-history-card strong {
    display: block;
    margin: 0;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.15;
}

.cred-history-card:nth-child(2) strong {
    color: #16a34a;
}

.cred-history-card:nth-child(3) strong {
    color: #dc2626;
}

.cred-payment-history {
    margin-top: 1.25rem;
    border-top: 1px solid #d8e1ec;
    padding-top: 1rem;
}

.cred-payment-history h4 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    color: #0f172a;
    font-size: 1rem;
}

.cred-payment-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    overflow: hidden;
}

.cred-payment-table th,
.cred-payment-table td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

.cred-payment-table th {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    background: #f8fafc;
}

.cred-payment-table tr:last-child td {
    border-bottom: 0;
}

.cred-payment-value {
    color: #16a34a;
    font-weight: 900;
    white-space: nowrap;
}

.cred-payment-empty {
    padding: 0.9rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
}

@media (max-width: 1280px) {
    .dashboard-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fin-erp__strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fin-toolbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .dashboard-strip,
    .fin-summary-grid,
    .fin-conference,
    .fin-erp__strip,
    .fin-toolbar {
        grid-template-columns: 1fr;
    }

    .fin-toolbar__actions,
    .fin-bulk {
        flex-direction: column;
        align-items: stretch;
    }

    .fin-export-group {
        display: flex;
    }

    .fin-export-group .btn,
    .fin-toolbar__actions .btn,
    .fin-bulk .btn {
        width: 100%;
    }

    .relatorios-export-actions {
        flex-direction: column;
    }

    .relatorios-export-actions .btn {
        width: 100%;
    }

    .cred-history-summary {
        grid-template-columns: 1fr;
    }

    .cred-payment-table,
    .cred-payment-table tbody,
    .cred-payment-table tr,
    .cred-payment-table td {
        display: block;
        width: 100%;
    }

    .cred-payment-table thead {
        display: none;
    }

    .cred-payment-table tr {
        border-bottom: 1px solid #e2e8f0;
    }

    .cred-payment-table tr:last-child {
        border-bottom: 0;
    }

    .cred-payment-table td {
        border-bottom: 0;
        padding: 0.55rem 0.75rem;
    }

    .cred-payment-table td::before {
        content: attr(data-label);
        display: block;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 800;
        text-transform: uppercase;
        margin-bottom: 0.2rem;
    }
}
