/* ===== PAINEL MODERNO v3.0 - SISTEMA INTRANET ===== */
/* Arquivo CSS moderno para interface atualizada dos módulos */
/* Criado em: Agosto 2025 */
/* Compatível com: Chrome, Firefox, Safari, Edge */

/* ===== VARIÁVEIS CSS ===== */
:root {
    --primary-color-start: #1b45fa;
    --primary-color-end: #8b2eea;
    --gradient-primary: linear-gradient(135deg, var(--primary-color-start) 0%, var(--primary-color-end) 100%);
    --gradient-primary-90deg: linear-gradient(90deg, var(--primary-color-start), var(--primary-color-end));
    --primary-color: #1b45fa;
    --primary-rgba-10: rgba(27, 69, 250, 0.1);
    --primary-rgba-25: rgba(27, 69, 250, 0.25);
    --primary-rgba-30: rgba(27, 69, 250, 0.3);
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    min-height: 100vh;
}
.uppercase {
    text-transform: uppercase;
}

#TB_title {
    background-color: transparent;
}

#TB_window {
    position: fixed;
    background: transparent;
    z-index: 102;
    color: #000000;
    display: none;
    border: none;
    text-align: left;
    top: 50%;
    left: 50%;
}

#TB_window a:visited {
    color: #f7f7f7;
}

#TB_closeAjaxWindow {
    padding: 6px 0px;
    margin-bottom: 1px;
    text-align: right;
    float: right;
    text-transform: uppercase;
}

/* ===== HEADER PRINCIPAL MODERNO ===== */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
    max-height: 90px;
}

.header-container {
    /* max-width: 1400px; */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    min-height: 60px;
    max-height: 90px;
}

.header-logo .logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.header-logo .logo-link:hover {
    transform: scale(1.05);
}

.company-logo {
    height: 40px;
    width: auto;
    filter: none;
    transition: filter 0.2s ease;
}

.header-user-profile {
    display: flex;
    align-items: center;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.user-profile-card:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.user-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.user-avatar-main {
    width: 57px;
    height: 57px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
}

.user-avatar-main:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(27, 69, 250, 0.15);
}

.avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.avatar-status.online {
    background: #10b981;
    border: 2px solid white;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #374151;
}

.user-name-display {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: #374151;
    text-shadow: none;
}

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

.notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.notification-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.notification-btn:hover .notification-icon {
    color: white;
}

.notification-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.user-menu-btn:hover .menu-icon {
    color: white;
}

.menu-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 12px 15px;
        min-height: 60px;
    }
    
    .user-name-display {
        display: none;
    }
    
    .user-profile-card {
        gap: 8px;
        padding: 6px 8px;
    }
    
    .user-avatar-main {
        width: 38px;
        height: 38px;
    }
    
    .company-logo {
        height: 32px;
    }
}

/* ===== RESET ESPECÍFICO PARA PÁGINAS MODERNAS ===== */

/* Identificador de página moderna (oculto) */

.modern-layout {
    display: none !important;
}

/* Força reset total em páginas modernas */
body.modern-page * {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* ===== RESET E BASE ===== */
* {
    box-sizing: border-box;
}
#pagina {
    padding: 20px;
}
#menu {
    height: 38px;
}
#menu {
    background: #e8e8e8;
}
ul#menu1 li, ul#menu1 li.sair {
    background: #e8e8e8;
}
ul#menu1 li a, ul#menu1 li:hover ul li a {
    color: #545454;
    text-shadow: none;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #334155;
    background-color: #f8fafc;
}

/* ===== HEADER E TOOLBAR MODERNOS ===== */
.modulo-header {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.modulo-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: var(--gradient-primary);
    color: white;
    position: relative;
}
.modulo-toolbar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="2"/><circle cx="30" cy="30" r="15" fill="white"/><circle cx="70" cy="70" r="10" fill="white"/></svg>') no-repeat center;
    background-size: cover;
    background-position-y: 44%;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.btn-add:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.records-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.records-count .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ===== SISTEMA DE FILTROS MODERNO ===== */
.modulo-filters {
    padding: 20px 24px;
}

.filter-group {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 16px;
    align-items: center;
}

.input-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #9ca3af;
    pointer-events: none;
}

.input-container input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.input-container input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-rgba-10);
}

.input-container input::placeholder {
    color: #9ca3af;
}

.select-filter,
.select-status {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
}

.select-filter:focus,
.select-status:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-rgba-10);
}

.btn-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-rgba-30);
}

/* ===== SISTEMA DE ALERTAS MODERNO ===== */
.alert {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    border: 1px solid;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    z-index: 1001;
    position: relative;
    color: inherit;
}

/* ===== LOGIN: ÍCONES DE INPUT ===== */
.input-container {
    position: relative;
}
.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
    z-index: 5;
    pointer-events: none;
    transition: color 0.2s;
}
.form-input:focus ~ .input-icon {
    color: var(--primary-color-start);
}

/* ===== COMPATIBILIDADE COM SISTEMA ANTIGO ===== */
#message-green,
#message-yellow,
#message-red {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
    border: 1px solid;
}

#message-green {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

#message-yellow {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

#message-red {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

/* ===== TABELAS MODERNAS ===== */
.table-container,
.modulo-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

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

.modern-table thead tr {
    background: var(--gradient-primary);
}

.modern-table th {
    padding: 20px 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.modern-table tbody .table-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.modern-table tbody .table-row:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.modern-table tbody .table-row.alternate-row {
    background-color: #fafbfc;
}

.modern-table tbody .table-row.alternate-row:hover {
    background-color: #f1f5f9;
}

.modern-table td {
    padding: 16px;
    vertical-align: middle;
    font-size: 15px;
    border: none;
}

/* ===== COMPATIBILIDADE COM TABELAS ANTIGAS ===== */
.designListagem {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

#listar {
    width: 100%;
    border-collapse: collapse;
}

/* #listar thead tr,
#listar tr:first-child {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-end) 100%);
} */

#listar th {
    padding: 20px 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

#listar th b {
    color: white;
    font-weight: 600;
}

#listar tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

#listar tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#listar tr.alternate-row,
#listar td.alternate-row {
    background-color: #fafbfc;
}

#listar tr.alternate-row:hover {
    background-color: #f1f5f9;
}

#listar td {
    padding: 14px;
    vertical-align: middle;
    font-size: 12px;
    border: none;
    background: inherit;
    text-transform: uppercase;
}

#listar td a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    display: block;
}

#listar td a:hover {
    color: var(--primary-color-end);
    text-decoration: underline;
}
#listar td .icon {
    margin-bottom: -3px;
}
/* ===== BADGES E STATUS ===== */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

/* Badges de Margem/Categorias */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success,
.margem-ideal {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning,
.margem-media {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error,
.margem-minima {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* ===== VALORES E NÚMEROS ===== */
.valor-total,
.valor-destacado {
    font-weight: 700;
    color: #059669;
    font-size: 15px;
}

.valor-negativo {
    font-weight: 700;
    color: #dc2626;
    font-size: 15px;
}

.numero-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== BOTÕES DE AÇÃO ===== */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
    text-decoration: none;
}

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

.btn-edit:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.btn-delete {
    color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.btn-view {
    color: #059669;
}

.btn-view:hover {
    background: #059669;
    color: white;
    transform: scale(1.1);
}

.btn-download {
    color: #8b5cf6;
}

.btn-download:hover {
    background: #8b5cf6;
    color: white;
    transform: scale(1.1);
}

/* ===== PAGINAÇÃO MODERNA ===== */
.pagination-container {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.pagination-form {
    width: 100%;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

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

.pagination-info {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Botões de paginação - Links e Buttons */
.pagination-controls a,
.pagination-controls span,
.pagination-controls button,
.pagination-controls input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
button.pgAtiva {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 8px var(--primary-rgba-30);
}

/* Hover states */
.pagination-controls a:hover,
.pagination-controls button:hover,
.pagination-controls input[type="button"]:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px var(--primary-rgba-25);
    transform: translateY(-1px);
}

/* Active/Current page */
.pagination-controls span.current,
.pagination-controls .current {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 8px var(--primary-rgba-30);
}

/* Disabled state */
.pagination-controls .disabled,
.pagination-controls [disabled] {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: not-allowed;
    box-shadow: none;
}

.pagination-controls .disabled:hover,
.pagination-controls [disabled]:hover {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    transform: none;
    box-shadow: none;
}

/* Navigation arrows */
.pagination-controls a[href*="p=1"]:first-child,
.pagination-controls button:first-child {
    border-radius: 8px 4px 4px 8px;
}

.pagination-controls a:last-child,
.pagination-controls button:last-child {
    border-radius: 4px 8px 8px 4px;
}

/* Separators */
.pagination-controls span:not(.current) {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: default;
    box-shadow: none;
}

.pagination-controls span:not(.current):hover {
    background: transparent;
    color: #94a3b8;
    transform: none;
    box-shadow: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .pagination-controls a,
    .pagination-controls span,
    .pagination-controls button,
    .pagination-controls input[type="button"] {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .pagination-info {
        font-size: 13px;
    }
}

/* ===== ESTADO VAZIO ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    stroke: #d1d5db;
}

.empty-state p {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #64748b;
}

.empty-state span {
    font-size: 14px;
    color: #9ca3af;
}

/* ===== ÍCONES SVG ===== */
.icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}

.icon-sm {
    width: 14px;
    height: 14px;
}

.icon-lg {
    width: 20px;
    height: 20px;
}


/* ===== FORMULÁRIOS MODERNOS ===== */
.modern-form {
    margin-top: 25px;  
}

.form-modern {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-rgba-10);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== CARDS E CONTAINERS ===== */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    /* margin-bottom: 20px;  */
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.card-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0 0;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .filter-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modulo-toolbar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .modern-table,
    #listar {
        font-size: 12px;
    }
    
    .modern-table th,
    .modern-table td,
    #listar th,
    #listar td {
        padding: 12px 8px;
    }
    
    .modulo-header,
    .table-container,
    .modulo-table-container,
    .designListagem {
        border-radius: 8px;
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .modulo-filters,
    .modulo-toolbar {
        padding: 16px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .modern-table thead,
    #listar thead {
        display: none;
    }
    
    .modern-table tr,
    #listar tr {
        display: block;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px;
    }
    
    .modern-table td,
    #listar td {
        display: block;
        padding: 8px 0;
        border: none;
        text-align: left !important;
    }
    
    .modern-table td:before,
    #listar td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #64748b;
        font-size: 12px;
        text-transform: uppercase;
    }
}

/* ===== UTILITÁRIOS ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease-out; }
.slide-in { animation: slideIn 0.3s ease-out; }

/* ===== SISTEMA DE LOADING COMPLETO ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
}

.loader-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    animation: pulse-text 2s infinite;
}

.loader-subtext {
    font-size: 14px;
    opacity: 0.8;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: white;
    width: 0%;
    border-radius: 2px;
    animation: loading-progress 2s ease-out forwards;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes loading-progress {
    0% { width: 0%; }
    25% { width: 25%; }
    50% { width: 50%; }
    75% { width: 75%; }
    100% { width: 100%; }
}

/* IMPORTANTE: SVGs ficam totalmente ocultos até o loading acabar */
svg {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.4s ease, visibility 0.4s ease !important;
}

/* Oculta conteúdo principal durante loading */
.modulo-header,
.modulo-table-container,
.pagination-container,
.alert,
.empty-state,
.table-container,
.filter-section,
.alert-container {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.6s ease, visibility 0.6s ease !important;
}

/* Mostra conteúdo após loading com animação */
body.page-loaded .modulo-header,
body.page-loaded .modulo-table-container,
body.page-loaded .pagination-container,
body.page-loaded .alert,
body.page-loaded .empty-state,
body.page-loaded .table-container,
body.page-loaded .filter-section,
body.page-loaded .alert-container,
.page-loaded .modulo-header,
.page-loaded .modulo-table-container,
.page-loaded .pagination-container,
.page-loaded .alert,
.page-loaded .empty-state,
.page-loaded .table-container,
.page-loaded .filter-section,
.page-loaded .alert-container {
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeInUp 0.6s ease-out forwards !important;
}

body.page-loaded .modulo-header,
.page-loaded .modulo-header { animation-delay: 0.1s !important; }
body.page-loaded .filter-section,
.page-loaded .filter-section { animation-delay: 0.15s !important; }
body.page-loaded .alert-container,
.page-loaded .alert-container { animation-delay: 0.2s !important; }
body.page-loaded .modulo-table-container,
body.page-loaded .table-container,
.page-loaded .modulo-table-container,
.page-loaded .table-container { animation-delay: 0.25s !important; }
body.page-loaded .pagination-container,
.page-loaded .pagination-container { animation-delay: 0.3s !important; }
body.page-loaded .empty-state,
.page-loaded .empty-state { animation-delay: 0.25s !important; }

/* SVGs aparecem junto com o conteúdo */
body.page-loaded svg,
.page-loaded svg {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== FORMULÁRIOS MODERNOS (ACTIONS) ===== */

/* Cabeçalho da Ação */
.action-header {
    display: flex;
    position: sticky;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-primary);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    /* margin-bottom: 25px; */
    box-shadow: 0 4px 15px var(--primary-rgba-30);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Estados do Sticky Header */
.action-header.sticky {
    position: sticky;
    left: 0;
    right: 0;
    margin-inline: -20px;
    margin-bottom: 0;
    border-radius: 0;
    padding: 20px 25px;
    background: var(--gradient-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px var(--primary-rgba-30);
    transform: translateY(0%);
    z-index: 1001;
    animation: slideDownToBottom 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Animação de descida elegante */
@keyframes slideDownToBottom {
    0% {
        top: 136px;
        transform: translateY(0);
        border-radius: 8;
        box-shadow: 0 4px 25px var(--primary-rgba-30);
    }
    50% {
        transform: scale(0.98);
        border-radius: 8px;
        box-shadow: 0 8px 30px var(--primary-rgba-30);
    }
    100% {
        top: 0;
        transform: scale(1);
        border-radius: 0;
        box-shadow: 0 -4px 25px var(--primary-rgba-30);
    }
}

/* Animação de saída (subida) */
.action-header.sticky.leaving {
    animation: slideUpFromBottom 0.6s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

@keyframes slideUpFromBottom {
    0% {
        transform: scale(1);
        border-radius: 0;
        box-shadow: 0 -4px 25px var(--primary-rgba-30);
    }
    50% {
        transform: translateY(0%) scale(0.98);
        border-radius: 8px;
        box-shadow: 0 8px 30px var(--primary-rgba-30);
    }
    100% {
        top: 136px; 
        transform: translateY(0%) scale(1);
        border-radius: 0;
        box-shadow: 0 4px 25px var(--primary-rgba-30);
        /* opacity: 0; */
    }
}

/* Animação de entrada (não mais usada, mas mantida para compatibilidade) */
.action-header.sticky.entering {
    transform: translateY(0%);
    opacity: 0;
}

/* Espaçador para compensar o header fixo */
.sticky-spacer {
    height: 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-spacer.active {
    height: 68px; /* Altura do header compactado */
}

/* Ajustes no header sticky */
.action-header.sticky .action-title h1 {
    font-size: 20px;
}

.action-header.sticky .title-icon {
    width: 24px;
    height: 24px;
}

.action-header.sticky .action-toolbar button {
    padding: 8px 16px;
}

.action-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-icon {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.action-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.action-toolbar {
    display: flex;
    gap: 12px;
    z-index: 1;
}

.action-toolbar button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* ===== PAINEL 3 - SISTEMA DE CARDS COM COLAPSO ===== */
/* Componentes reutilizáveis para todas as actions dos módulos */

/* Cards do Formulário com Sistema de Colapso */
.form-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid #d6dfeb;
    transition: all 0.3s ease;
}

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

/* Card Header com Sistema de Colapso */
.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.card-header:hover {
    background: linear-gradient(135deg, #f1f3f4 0%, #e0e3e7 100%);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    width: 20px;
    height: 20px;
    stroke: #495057;
    stroke-width: 2;
}

.card-header h2 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

.card-toggle {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
    stroke: #6c757d;
    stroke-width: 2;
}

.card-header:hover .card-toggle {
    opacity: 1;
}

/* Sistema de Colapso */
.collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.form-card.active .collapse-content {
    max-height: 2000px; /* Valor alto para permitir expansão */
}

.form-card.active .card-toggle {
    transform: rotate(180deg);
}

/* Destaque para card ativo */
.form-card.active {
    border: 1px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.15);
}

.card-content {
    padding: 25px;
}

/* ===== ACTION HEADER MODERNO ===== */
/* Header padrão para todas as actions dos módulos */

.action-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="2"/><circle cx="30" cy="30" r="15" fill="white"/><circle cx="70" cy="70" r="10" fill="white"/></svg>') no-repeat center;
    background-position-y: 44%;
    background-size: cover;
}

.action-title {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-title svg,
.title-icon {
    width: 28px;
    height: 28px;
    opacity: 0.9;
}

.action-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.action-toolbar .btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    text-decoration: none;
}

.action-toolbar .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ===== LAYOUT DO FORMULÁRIO ===== */
/* Sistema de grid responsivo para todas as actions */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.label-icon {
    width: 16px;
    height: 16px;
    stroke: #6c757d;
    stroke-width: 2;
}

/* ===== CAMPOS DO FORMULÁRIO ===== */
/* Estilos padrão para todos os inputs e selects */


.form-control:hover {
    border-color: #d0d7de;
}

.select-modern {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    cursor: pointer;
}

.textarea-modern {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* ===== TABELAS DE DADOS ===== */
/* Componente de tabela reutilizável para exibir dados relacionados */
.data-table-container {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e3e6f0;
    background: white;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e3e6f0;
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    font-size: 14px;
    color: #6c757d;
}

.data-table tr:last-child th,
.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8f9fa;
}

/* ===== BADGES E ALERTAS ===== */
/* Sistema de badges para status e alertas informativos */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

/* ===== CAMPOS CONDICIONAIS ===== */
/* Sistema para mostrar/ocultar campos baseado em condições */
.conditional-field {
    display: none;
    transition: all 0.3s ease;
}

.conditional-field.show {
    display: grid;
}

/* ===== RESPONSIVIDADE PADRÃO ===== */
/* Breakpoints padrão para todas as actions dos módulos */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-header {
        padding: 24px 20px;
        text-align: center;
    }
    
    .action-title {
        font-size: 24px;
    }
    
    .action-toolbar {
        flex-direction: column;
        margin-top: 20px;
    }
    
    .card-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .action-header {
        padding: 20px 16px;
    }
    
    .card-content {
        padding: 16px;
    }
    
    .form-row {
        gap: 12px;
    }
}

/* Layout do Formulário */
.form-row-col4-col1-col1 {
    grid-template-columns: 4fr 1fr 1fr;
}
.form-row-col4-col2 {
    grid-template-columns: 4fr 2fr;
}

.form-row-col1-col1 {
    grid-template-columns: 1fr 1fr;
}
.form-row {
    grid-template-columns: 1fr 1fr;
}
.form-row-col4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.form-row-col3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.form-row-modal {
    grid-template-columns: 3fr 1fr;
}

.form-row,
.form-row-col3,
.form-row-col4,
.form-row-col1-col1,
.form-row-col4-col2,
.form-row-col4-col1-col1,
.form-row-modal { 
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}
.form-row:last-child {
    margin-bottom: 0;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.label-icon {
    width: 16px;
    height: 16px;
    stroke: #6c757d;
    stroke-width: 2;
}

/* Campos do Formulário */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #eff2f5;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-rgba-10);
}

.select-modern {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.textarea-modern {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Seções de Produtos */
.product-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.product-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.product-number {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

/* Responsividade */
@media (max-width: 768px) {
        .action-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .action-header-dashboard {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .action-toolbar {
        width: 100%;
        justify-content: center;
    }
    
    .card-content {
        padding: 20px 15px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0 !important;
        transform: translateY(30px);
    }
    to {
        opacity: 1 !important;
        transform: translateY(0);
    }
}

/* ===== MÓDULO DE INÍCIO - DASHBOARD ===== */

/* Grid de Módulos */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.module-card {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: var(--primary-color);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary-90deg);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.module-card:hover .module-icon {
    transform: scale(1.1) rotate(5deg);
}

.module-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    stroke-width: 2;
}

.module-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.module-card:hover .module-title {
    color: var(--primary-color);
}

/* Botão Cartão Ponto Moderno */
.time-clock-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.time-clock-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa085 100%) !important;
    transform: translateY(-2px);
}

/* Tabelas Modernas para Dashboard */

.action-header-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-primary);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px var(--primary-rgba-30);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
    font-size: 14px;
}

.user-stats {
    font-size: 13px;
    color: #6c757d;
}

.support-item {
    max-width: 400px;
}

.support-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.support-description {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.time-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.time-badge.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Movimentações Financeiras */
.financial-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.financial-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.financial-icon.income {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.financial-icon.expense {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.financial-icon svg {
    width: 16px;
    height: 16px;
}

.financial-details {
    flex: 1;
}

.financial-description {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 2px;
    font-size: 14px;
}

.financial-category {
    font-size: 13px;
    color: #6c757d;
}

.financial-amount {
    font-weight: 600;
    font-size: 16px;
}

.financial-amount.positive {
    color: #28a745;
}

.financial-amount.negative {
    color: #dc3545;
}

.financial-time {
    font-size: 13px;
    color: #6c757d;
    text-align: right;
}
/* Estilos para seção de clientes */
.client-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-icon {
    width: 20px;
    height: 20px;
    stroke: #6c757d;
    stroke-width: 2;
    flex-shrink: 0;
}

.client-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.invoice-count {
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

.amount-overdue {
    font-weight: 600;
    color: #dc3545;
    font-size: 14px;
}

.due-date {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.total-summary {
    text-align: right;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #2c3e50;
    font-size: 16px;
}

/* ===== ESTILOS ESPECÍFICOS PARA MÓDULOS ===== */

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.status-inactive {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.2);
}

/* Links de ID */
.id-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.id-link:hover {
    background: var(--primary-rgba-10);
    transform: translateY(-1px);
}

/* Informações do cliente na tabela */
.client-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-name {
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.client-name:hover {
    color: var(--primary-color);
}

/* Links de contato */
.email-link, .phone-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.email-link:hover, .phone-link:hover {
    color: var(--primary-color);
}

.email-link .icon, .phone-link .icon {
    width: 14px;
    height: 14px;
}

/* Texto muted */
.text-muted {
    color: #9ca3af;
    font-style: italic;
}

/* Ações da tabela */
.table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.action-btn .icon {
    width: 16px;
    height: 16px;
}

.edit-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.edit-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.25);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.delete-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.25);
}

/* Alertas modernos */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid;
    animation: slideInDown 0.4s ease-out;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.alert-message {
    font-size: 13px;
    opacity: 0.9;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive para Módulo de Início */
@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .module-card {
        padding: 20px 15px;
    }
    
    .module-icon {
        width: 40px;
        height: 40px;
    }
    
    .module-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .module-title {
        font-size: 14px;
    }
}

/* ===== DARK MODE (PREPARAÇÃO FUTURA) ===== */
@media (prefers-color-scheme: dark) {
    /* Implementação futura do modo escuro */
}

/* ===== FIM DO ARQUIVO ===== */
