/* 
 * RECAP.PRO - Design System Nativo (Windows Style)
 * Estética de software de automação comercial
 */

/* No Electron, o menu é nativo e o menu-bar HTML é oculto */
body.electron-app #html-menu-bar { display: none; }
body:not(.electron-app) #html-menu-bar { display: block; }

:root {
    /* Cores Windows Standard */
    --bg-app: #ffffff;
    --bg-surface: #f3f3f3;
    --bg-toolbar: #f9f9f9;
    --bg-hover: #e5e5e5;
    --bg-active: #d5d5d5;
    
    --border-color: #dddddd;
    --border-light: #eeeeee;
    
    --text-main: #333333;
    --text-muted: #666666;
    --text-white: #ffffff;
    
    --accent-color: #0078d4; /* Windows Blue */
    --accent-hover: #005a9e;
    
    --status-bar-bg: #f3f3f3;
    
    /* Tipografia */
    --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 13px;
    --font-size-menu: 12px;
    --font-size-toolbar: 11px;
    
    /* Dimensões */
    --menu-height: 32px;
    --toolbar-height: 64px;
    --status-bar-height: 24px;
}

/* Reset Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

/* Bloqueia seleção apenas em elementos de UI (para parecer nativo) */
body, .menu-bar, .tool-bar, .app-taskbar, .status-bar, .win-header, .btn {
    -webkit-user-select: none;
    cursor: default;
}

/* Garante que inputs e áreas de conteúdo sempre permitam texto */
input, textarea, .win-body, [contenteditable="true"] {
    -webkit-user-select: text !important;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-main);
    background-color: var(--bg-app);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Nativa */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border: 2px solid #f1f1f1;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 1. Barra de Menus (Classic) */
#html-menu-bar,
.menu-bar {
    height: var(--menu-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    z-index: 10000;
    box-sizing: border-box;
}

body.electron-app #html-menu-bar {
    display: none;
}

.menu-item {
    padding: 0 14px;
    height: 100%;
    display: inline-flex !important;
    align-items: center;
    font-size: 13px;
    cursor: default;
    position: relative;
    float: none;
    flex-shrink: 0;
}

.menu-item:hover {
    background-color: var(--bg-hover);
}

.menu-item.active {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    display: none; /* Escondido por padrão */
    flex-direction: column;
    padding: 2px 0;
    z-index: 10001; /* Superior à barra de menus para evitar sobreposição interna */
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 32px;
    line-height: 1.2;
    color: var(--text-main);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: default;
}

.dropdown-item:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

.dropdown-item i {
    font-size: 14px;
    margin-right: 8px;
    opacity: 0.7;
}

.dropdown-item:hover i {
    opacity: 1;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 4px 0;
}

.shortcut {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 20px;
}

.dropdown-item:hover .shortcut {
    color: rgba(255,255,255,0.8);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu-items {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
}

.dropdown-item.has-submenu {
    display: flex;
    align-items: center;
    cursor: default;
    justify-content: space-between;
}

.dropdown-item.has-submenu:hover {
    background: #f5f5f5;
    color: #333;
}

.dropdown-submenu-items .dropdown-item {
    padding: 10px 15px;
    color: #333;
    font-size: 13px;
}

.dropdown-submenu-items .dropdown-item:hover {
    background: #0066cc;
    color: #fff;
}

.dropdown-submenu-items .dropdown-item i {
    color: #0066cc;
    font-size: 16px;
}

.dropdown-submenu-items .dropdown-item:hover i {
    color: #fff;
}

.dropdown-submenu:hover .dropdown-submenu-items {
    display: block;
}

.dropdown-item.has-submenu {
    display: flex;
    align-items: center;
    cursor: default;
    justify-content: space-between;
}

.dropdown-item.has-submenu:hover {
    background: #f5f5f5;
    color: #333;
}

.dropdown-submenu-items .dropdown-item {
    padding: 8px 15px;
    color: #333;
}

.dropdown-submenu-items .dropdown-item:hover {
    background: #0066cc;
    color: #fff;
}

.dropdown-submenu-items .dropdown-item i {
    color: #333;
}

.dropdown-submenu-items .dropdown-item:hover i {
    color: #fff;
}
}

.dropdown-item.has-submenu {
    cursor: default;
}

.dropdown-item.has-submenu:hover {
    background: var(--bg-dropdown-hover);
}

.dropdown-submenu-items .dropdown-item {
    padding-left: 30px;
}

/* 2. Barra de Ferramentas (Toolbar) */
.tool-bar {
    height: var(--toolbar-height);
    background-color: var(--bg-toolbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
    z-index: 90;
}

.tool-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 54px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.1s;
}

.tool-button:hover {
    background-color: var(--bg-hover);
    border-color: #ccc;
}

.tool-button:active {
    background-color: var(--bg-active);
}

.tool-button i {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--text-main);
}

.tool-button span {
    font-size: var(--font-size-toolbar);
    font-weight: 500;
}

.tool-separator {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
    margin: 0 5px;
}

/* 3. Área de Trabalho (Workspace) */
.main-workspace {
    flex: 1;
    position: relative;
    background-color: var(--bg-app);
    overflow: auto;
}

.logo-corner {
    position: absolute;
    bottom: 30px;
    right: 30px;
    opacity: 0.15;
    pointer-events: none;
    max-width: 250px;
    transition: opacity 0.3s;
}

.main-workspace:hover .logo-corner {
    opacity: 0.25;
}

/* 4. Barra de Status */
.status-bar {
    height: var(--status-bar-height);
    background-color: var(--status-bar-bg);
    color: var(--text-main);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 11px;
    z-index: 110;
}

.status-left, .status-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 5. Janelas Virtuais (MDI) */
.win-window {
    position: absolute;
    min-width: 400px;
    min-height: 300px;
    background: #fff;
    border: 1px solid #999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.win-window.active {
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px rgba(0,120,212,0.3);
    z-index: 20;
}

.win-header {
    height: 32px;
    background: #f3f3f3;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    cursor: default;
}

.win-window.active .win-header {
    background: #e5f1fb;
}

.win-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.win-controls {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.win-btn:hover { background: #e5e5e5; }
.win-btn-close:hover { background: #e81123 !important; color: #fff !important; }

.win-body {
    flex: 1;
    overflow: auto;
    position: relative;
    padding: 0;
}

/* 6. Taskbar Interna */
.app-taskbar {
    height: 36px;
    background: #f3f3f3;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 5px;
    z-index: 105;
}

.task-item {
    height: 30px;
    min-width: 120px;
    max-width: 200px;
    background: #fff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 2px;
    gap: 8px;
    transition: all 0.1s;
}

.task-item:hover { background: #f0f7ff; border-color: var(--accent-color); }
.task-item.active { background: #e5f1fb; border-color: var(--accent-color); font-weight: 600; border-bottom: 3px solid var(--accent-color); }

.task-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.task-close:hover { color: #e81123; }

/* Ajustes no MenuBar para Hover */
.menu-item span { pointer-events: none; } /* Facilita o hover no item pai */

/* 7. Utilitários e Botões Genéricos */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-family);
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}

.btn:hover {
    background: #f8f8f8;
    border-color: #bbb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn:active {
    background: #eee;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: #004578;
    color: #fff;
}

.btn-success { background: #28a745; border-color: #28a745; color: #fff; }
.btn-success:hover { background: #218838; border-color: #1e7e34; color: #fff; }

.btn-warning { background: #ffc107; border-color: #ffc107; color: #000; }
.btn-warning:hover { background: #e0a800; border-color: #d39e00; color: #000; }

.btn-danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; border-color: #bd2130; color: #fff; }

.btn-sm { padding: 3px 8px; font-size: 12px; }
.btn-sm i { font-size: 14px; }

.btn i {
    font-size: 16px;
}

/* Tipografia e Tabelas de Software */
h1, h2, h3, h4 { font-weight: 600; color: #111; margin-bottom: 10px; }
table { border-collapse: collapse; width: 100%; }
th { background: #f8f8f8; text-align: left; border: 1px solid #ddd; padding: 6px 10px !important; font-weight: 600; font-size: 11px; }
td { border: 1px solid #ddd; padding: 5px 10px !important; font-size: 13px; }
tr:hover { background-color: #f6faff; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
}
.modal-header {
    background: #f3f3f3;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-body {
    padding: 15px;
}
.modal-footer {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Combo Select */
.combo-select { position: relative; display: block; }
.combo-input { width: 100%; box-sizing: border-box; }
.combo-dropdown { display: none; position: absolute; background: white; border: 1px solid #ccc; border-top: none; max-height: 150px; overflow-y: auto; width: 100%; z-index: 10000; top: 100%; }
.combo-option { padding: 5px 8px; cursor: pointer; border-bottom: 1px solid #eee; }
.combo-option:hover { background: #e5f5ff; }

.datalist-dropdown { position: absolute; background: white; border: 1px solid #ccc; max-height: 200px; overflow-y: auto; width: 100%; z-index: 999999; top: 100%; box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.datalist-option { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #eee; font-size: 13px; }
.datalist-option:hover { background: #e5f5ff; }
.datalist-input { width: 100%; position: relative; z-index: 2; }
.config-form-group { position: relative; z-index: 2; }
.modal-body { position: relative; z-index: 1; }

.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.status-badge.active { background: #e8f5e9; color: #388e3c; }
.status-badge.inactive { background: #ffebee; color: #c62828; }
.status-aberta { background: #e3f2fd; color: #1976d2; }
.status-producao, .status-em-producao, .status-em-producao { background: #fff3e0; color: #f57c00; }
.status-banda { background: #fce4ec; color: #c2185b; }
.status-coleta { background: #f3e5f5; color: #7b1fa2; }
.status-finalizada { background: #e8f5e9; color: #388e3c; }
.status-cancelada { background: #ffebee; color: #c62828; }

.inactive-row { opacity: 0.6; }

.btn-warning { background: #ff9800; color: #fff; border: none; }

/* 8. Estilo de Listagem em Cards - Premium */
.module-header-modern {
    padding: 20px 25px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-header-modern h1 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

.modern-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}

.card-color-strip {
    height: 6px;
    width: 100%;
}

.card-main {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #555;
    border: 1px solid #eee;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.card-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-actions {
    margin-top: auto;
    padding: 12px 20px;
    background: #fcfcfc;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-card-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.btn-card-action:hover {
    background: #f0f7ff;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-card-action.danger:hover {
    background: #fff5f5;
    color: #e74c3c;
    border-color: #e74c3c;
}

/* 9. Módulo Financeiro */
.fin-wrapper {
    padding: 20px;
    background: #fcfcfc;
    min-height: 100%;
}

.fin-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.fin-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.fin-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.fin-card.positive .fin-card-icon { background: #e8f5e9; color: #2ecc71; }
.fin-card.negative .fin-card-icon { background: #ffebee; color: #e74c3c; }
.fin-card.balance .fin-card-icon { background: #e3f2fd; color: #0078d4; }

.fin-card-info span {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

.fin-card-info b {
    font-size: 18px;
    color: #333;
}

.fin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: #fff;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.fin-view-selector {
    display: flex;
    gap: 5px;
}

.fin-tab {
    padding: 6px 15px;
    border: 1px solid transparent;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
}

.fin-tab:hover { background: #f5f5f5; }
.fin-tab.active { background: #e5f1fb; color: var(--accent-color); border-color: #cde4f7; }

.status-paid { background: #e8f5e9; color: #2ecc71; }
.status-open { background: #fff3e0; color: #f39c12; }
.status-overdue { background: #ffebee; color: #e74c3c; }

/* Status badges para vendas e comissões */
.status-orcamento { background: #e3f2fd; color: #1976d2; }
.status-pedido { background: #fff3e0; color: #f57c00; }
.status-aprovado { background: #e8f5e9; color: #388e3c; }
.status-cancelado { background: #ffebee; color: #c62828; }
.status-finalizada { background: #e8f5e9; color: #388e3c; }
.status-pendente { background: #fff3e0; color: #f57c00; }
.status-pago { background: #e8f5e9; color: #2ecc71; }

/* 10. Paginação */
.pagination-container {
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-info {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: #f5f5f5;
    border-color: #ccc;
}

.pagination-btn.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 0 4px;
    color: #999;
    font-size: 13px;
}

/* Item de busca de clientes e produtos (reutilizado de pdv.css) */
.pdv-cliente-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.pdv-cliente-item:hover {
    background: #e3f2fd;
    border-color: #90caf9;
}
.pdv-produto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.pdv-produto-item:hover {
    background: #e3f2fd;
    border-color: #90caf9;
}
.pdv-produto-item.selected {
    background: #e3f2fd;
    border-color: #1565c0;
    border-width: 2px;
}

.relat-header {
    margin-bottom: 20px;
}

.relat-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.relat-header-row h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    flex-shrink: 0;
}

.relat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.relat-period {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.relat-period input[type="date"] {
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    color: var(--text-main);
    outline: none;
}

.relat-period input[type="date"]:focus {
    border-color: var(--accent-color);
}

.relat-btn {
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-toolbar);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.relat-btn:hover {
    background: var(--bg-hover);
    border-color: #bbb;
}

.relat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.relat-btn-pdf {
    background: #fff3e0;
    border-color: #ffcc02;
    color: #e65100;
}

.relat-btn-pdf:hover {
    background: #ffe0b2;
}

.relat-btn-xlsx {
    background: #e8f5e9;
    border-color: #66bb6a;
    color: #2e7d32;
}

.relat-btn-xlsx:hover {
    background: #c8e6c9;
}

.relat-tipo-filter {
    font-size: 13px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    user-select: none;
}

.relat-tipo-filter input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.relat-section {
    margin-bottom: 28px;
}

.relat-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.relat-count {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    background: var(--bg-surface);
    padding: 2px 10px;
    border-radius: 10px;
}

.relat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.relat-table th {
    background: var(--bg-toolbar);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.relat-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
}

.relat-table tbody tr:hover {
    background: var(--bg-hover);
}

.relat-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 16px 0 24px 0;
}

.relat-total {
    background: var(--bg-toolbar);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

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

