/**
 * GREENPLAY - GLOBAL STYLES
 * Cores: #7ED957 (Verde Greenplay) + #38B6FF (Azul Greenplay)
 */

:root {
    --primary-color: #7ED957;
    --primary-dark: #6bc048;
    --primary-light: #92e36f;
    --secondary-color: #38B6FF;
    --secondary-dark: #2099e6;
    --secondary-light: #5cc5ff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --background: #f5f5f5;
    --white: #ffffff;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--background);
}

[ng-cloak] {
    display: none !important;
}

/* COMMON STYLES */
.page-container {
    /* background: white; */
    border-radius: 10px;
    padding: 0;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
    margin-bottom: 0;
}

.page-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.page-header h1 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 28px;
}

.page-header p {
    margin: 0;
    color: #7f8c8d;
}

.loading-container,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-container i,
.empty-state i {
    display: block;
    margin-bottom: 15px;
    font-size: 48px;
}

/* BUTTONS */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-success {
    background: #2ecc71;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #27ae60;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-default {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-default:hover:not(:disabled) {
    background: #bdc3c7;
}

.btn-block {
    width: 100%;
    display: block;
}

/* TABLES - ESTILO LEGADO (mantido para compatibilidade) */
.table-container {
    overflow-x: auto;
}

/* Estilo moderno de tabela é aplicado através de .table-modern ou .table-container-card */
/* As tabelas devem usar .table-modern dentro de .table-container-card para o estilo moderno */

.data-table:not(.table-modern) {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table:not(.table-modern) th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: #2c3e50;
}

.data-table:not(.table-modern) td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.data-table:not(.table-modern) tr:hover {
    background: #f8f9fa;
}

.data-table:not(.table-modern) tr:last-child td {
    border-bottom: none;
}

.data-table:not(.table-modern) tr.table-danger {
    background-color: #f8d7da;
}

.data-table:not(.table-modern) tr.table-danger:hover {
    background-color: #f5c6cb;
}

.action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
}

.action-buttons .btn {
    margin: 0;
}

/* FORMS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-control:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge-success {
    background: #2ecc71;
}

.badge-danger {
    background: #e74c3c;
}

.badge-warning {
    background: #f39c12;
}

.badge-info {
    background: #3498db;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-secondary {
    background: #95a5a6;
}

/* URGENCIA BADGES */
.badge-urgencia {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-urgencia.baixa {
    background: #95a5a6;
    color: white;
}

.badge-urgencia.media {
    background: #3498db;
    color: white;
}

.badge-urgencia.alta {
    background: #f39c12;
    color: white;
}

.badge-urgencia.critica {
    background: #e74c3c;
    color: white;
}

/* CARDS */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* TABS */
.tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0px;
}

.tab {
    display: inline-block;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
    font-weight: 500;
    color: #7f8c8d;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    padding: 20px 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

[class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

.col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* Utility Classes */
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.text-center { text-align: center !important; }
.form-inline { display: flex; align-items: center; flex-wrap: wrap; }
.form-inline > * { margin-right: 10px; margin-bottom: 5px; }

/* Bloqueio global de scroll quando modal aberto */
body.modal-open-lock {
    overflow: hidden !important;
}

body.modal-open-lock .main-content,
body.modal-open-lock .main-content > div[ui-view] {
    overflow: hidden !important;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

.modal-overlay-confirm {
    z-index: 12000 !important;
}

md-dialog-container,
.md-dialog-container,
.md-dialog-backdrop {
    z-index: 12000 !important;
}

.modal {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Modais de criação (Novo Projeto, Novo Cliente, Novo Fornecedor) - estilo simplificado */
.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-dialog .modal-header {
    flex-shrink: 0;
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-bottom: none;
}

.modal-dialog .modal-header h3 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.modal-dialog .modal-header .btn-close {
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-dialog .modal-header .btn-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-dialog .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-dialog .modal-footer {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-dialog .form-group {
    margin-bottom: 15px;
}

.modal-dialog .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.modal-dialog .form-group label i {
    color: var(--primary-color);
    margin-right: 5px;
}

.modal-dialog .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.modal-dialog .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(126, 217, 87, 0.1);
}

.modal-dialog .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-dialog .btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.modal-dialog .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-dialog .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-dialog .btn-secondary:hover {
    background: #5a6268;
}

.modal-dialog .disabled-field {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modais de criação (Novo Projeto, Novo Cliente, Novo Fornecedor) - quase o dobro de largura - DEPRECADO */
.modal.modal-wide {
    max-width: 1100px;
    width: 95%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.modal.modal-wide .modal-body {
    padding: 25px 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal.modal-wide .modal-header {
    flex-shrink: 0;
}

.modal.modal-wide .modal-footer {
    flex-shrink: 0;
}

.modal.modal-wide .form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal.modal-wide .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.modal.modal-wide .form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal.modal-wide .form-section-title i {
    color: var(--primary-color);
    font-size: 16px;
}

.modal.modal-wide .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal.modal-wide .form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.modal.modal-wide .form-group-full {
    grid-column: 1 / -1;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.modal-footer .btn {
    margin-left: 10px;
}

/* ALERTS */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d5f4e6;
    border-color: #27ae60;
    color: #1e8449;
}

.alert-danger {
    background: #fadbd8;
    border-color: #e74c3c;
    color: #c0392b;
}

.alert-warning {
    background: #fef5e7;
    border-color: #f39c12;
    color: #e67e22;
}

.alert-info {
    background: #d6eaf8;
    border-color: #3498db;
    color: #2874a6;
}

/* FILTERS BAR */
.filters-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filters-bar .form-control {
    max-width: 200px;
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 13px;
}

/* MOBILE MENU BUTTON */
.mobile-menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.mobile-menu-btn:hover {
    background: var(--primary-dark);
}

/* MOBILE OVERLAY */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .page-container {
        padding: 15px;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-bar .form-control {
        max-width: 100%;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* ============================================
   BANNER DE FILTRO DO DASHBOARD
   ============================================ */
.filtro-dashboard-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    color: white;
}

.filtro-dashboard-banner .filtro-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtro-dashboard-banner .filtro-info i {
    font-size: 16px;
}

.filtro-dashboard-banner .filtro-count {
    opacity: 0.8;
    font-size: 13px;
}

.filtro-dashboard-banner .btn-outline-light {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.filtro-dashboard-banner .btn-outline-light:hover {
    background: rgba(255,255,255,0.3);
}

/* ============================================
   TABELA MODERNA COM FILTROS INTEGRADOS
   ============================================ */

/* TABELA COM HEADER INTEGRADO */
.table-container-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

/* ESTILO GLOBAL PARA TABELAS MODERNAS - APLICA AUTOMATICAMENTE */
.table-modern,
table.table-modern,
.data-table.table-modern {
    width: 100%;
    border-collapse: collapse;
}

/* Se a tabela estiver dentro de table-container-card, aplicar estilo moderno */
.table-container-card table,
.content-card table.table-modern {
    width: 100%;
    border-collapse: collapse;
}

/* LINHA DE FILTROS NO HEADER */
.table-modern thead tr.filter-header-row {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2099e6 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-modern thead tr.filter-header-row td {
    padding: 20px;
    padding-bottom: 18px;
}

.filter-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.filter-header-left {
    display: flex;
    gap: 15px;
    flex: 1;
    align-items: flex-end;
}

.filter-header-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.filter-header-item label {
    color: white;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-header-item label i {
    font-size: 12px;
}

.filter-header-input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    transition: all 0.2s;
}

.filter-header-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.filter-header-input::placeholder {
    color: #999;
    font-size: 12px;
}

.filter-header-input select,
.filter-header-input[type="select"] {
    cursor: pointer;
}

.filter-header-item select.filter-header-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

.filter-header-right {
    display: flex;
    gap: 10px;
}

.btn-filter {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-clear {
    background: white;
    color: var(--text-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

/* HEADERS DAS COLUNAS */
.table-modern thead tr.table-header-row {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2099e6 100%);
    border-bottom: 2px solid rgba(0,0,0,.12);
}

.table-modern thead tr.table-header-row th {
    padding: 14px 12px;
    padding-top: 12px;
    font-weight: 600;
    font-size: 11px;
    color: white;
    text-align: left;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.table-modern thead tr.table-header-row th.sortable {
    cursor: pointer;
    transition: background 0.2s;
}

.table-modern thead tr.table-header-row th.sortable:hover {
    background: rgba(255,255,255,0.1);
}

.table-modern thead tr.table-header-row th.sortable span {
    margin-right: 8px;
}

.table-modern thead tr.table-header-row th i {
    font-size: 11px;
    opacity: 0.7;
}

/* TBODY */
.table-modern tbody tr {
    border-bottom: 1px solid #ddd;
    transition: background 0.2s;
}

.table-modern tbody tr:nth-child(odd) {
    background-color: rgb(250, 250, 250);
}

.table-modern tbody tr:nth-child(even) {
    background-color: white;
}

.table-modern tbody tr:hover {
    background-color: rgb(245, 248, 250) !important;
}

.table-modern tbody td {
    padding: 12px;
    font-size: 13px;
    vertical-align: middle;
}

.table-modern tbody tr.row-highlight {
    background-color: #e8f5e9 !important;
}

.table-modern tbody td.text-center {
    text-align: center;
}

.table-modern select.select-estado-projeto {
    border-radius: 6px;
    max-width: 100%;
    min-width: 0;
    cursor: pointer;
    font-size: 11.5px;
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 1.25;
}

/* KPIs */
.kpis-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.kpi-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-left: 4px solid;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.kpi-card.kpi-active {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transform: scale(1.02);
}

.kpi-total { border-left-color: #6c757d; }
.kpi-pendente { border-left-color: #ffc107; }
.kpi-ativos { border-left-color: var(--success); }
.kpi-concluidos { border-left-color: #007bff; }
.kpi-cliente { border-left-color: var(--primary-color); }
.kpi-fornecedor { border-left-color: var(--secondary-color); }

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.kpi-total .kpi-icon { background: #f8f9fa; color: #6c757d; }
.kpi-pendente .kpi-icon { background: #fff3cd; color: #856404; }
.kpi-ativos .kpi-icon { background: #d4edda; color: #155724; }
.kpi-concluidos .kpi-icon { background: #cce5ff; color: #004085; }
.kpi-cliente .kpi-icon { background: #d4edda; color: var(--primary-color); }
.kpi-fornecedor .kpi-icon { background: #e7f5ff; color: var(--secondary-color); }

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

/* PAGINAÇÃO */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-numbers {
    display: flex;
    gap: 3px;
}

.btn-pagination {
    min-width: 36px;
    height: 36px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-pagination:hover:not(:disabled):not(.active) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-pagination.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

/* BOTÕES DE AÇÃO */
.btn-icon {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 2px;
    color: white;
    font-size: 13px;
}

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-icon.btn-info {
    background: var(--info);
}

.btn-icon.btn-primary {
    background: var(--primary-color);
}

.btn-icon.btn-success {
    background: var(--success);
}

.btn-icon.btn-danger {
    background: var(--danger);
}

.btn-icon.btn-warning {
    background: var(--warning);
}

/* ============================================
   DIALOG "NOVIDADES" PREMIUM
============================================ */
.gp-whatsnew-dialog {
    max-width: 760px;
    width: calc(100vw - 40px);
    border-radius: 18px;
    overflow: hidden;
    max-height: calc(100vh - 48px);
}

.gp-whatsnew-dialog md-dialog-content {
    padding: 0;
    max-height: calc(100vh - 170px);
    overflow: hidden;
}

.gp-whatsnew-header {
    padding: 26px 28px 20px;
    background: linear-gradient(135deg, #7ED957 0%, #38B6FF 100%);
    color: #fff;
}

.gp-whatsnew-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.gp-whatsnew-header h2 {
    margin: 0 0 8px 0;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
}

.gp-whatsnew-header p {
    margin: 0;
    opacity: 0.95;
}

.gp-whatsnew-list {
    padding: 16px 24px 10px;
    max-height: 340px;
    overflow-y: auto;
}

.gp-whatsnew-list::-webkit-scrollbar {
    width: 8px;
}

.gp-whatsnew-list::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 999px;
}

.gp-whatsnew-list::-webkit-scrollbar-thumb {
    background: #b7c6d8;
    border-radius: 999px;
}

.gp-whatsnew-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 24px 0;
}

.gp-whatsnew-tab-btn {
    border: 1px solid #dbe4ef;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gp-whatsnew-tab-btn:hover {
    border-color: #38B6FF;
    color: #0f172a;
}

.gp-whatsnew-tab-btn.active {
    background: linear-gradient(135deg, #38B6FF 0%, #7ED957 100%);
    color: #fff;
    border-color: transparent;
}

.gp-whatsnew-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #f9fbff;
    border: 1px solid #edf2f7;
}

.gp-whatsnew-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #38B6FF 0%, #7ED957 100%);
    flex-shrink: 0;
}

.gp-whatsnew-content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.gp-whatsnew-content p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

.gp-whatsnew-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 24px 12px;
    color: #6b7280;
    font-size: 13px;
}

.gp-whatsnew-dialog md-dialog-actions {
    padding: 14px 22px 18px;
    border-top: 1px solid #eef2f7;
}

