/* =====================================================
   Sistema Tahara ERP - Estilos Principais
   ===================================================== */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px; /* Reduz o zoom do sistema (padrão: 16px) */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* ==================== HEADER ==================== */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.header h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    transition: width 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header img {
    max-width: 100%;
    height: auto;
}

.sidebar-header .logo-img {
    max-width: 150px;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo-img {
    opacity: 0;
    width: 0;
}

.sidebar-user {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user .greeting {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.sidebar.collapsed .sidebar-user {
    display: none;
}

.sidebar-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin: 0.5rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu a i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .sidebar-menu a span {
    display: none;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.15);
    border-left: 3px solid var(--secondary-color);
}

/* Submenu */
.menu-item-has-children {
    position: relative;
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.menu-item-has-children.active > .submenu {
    max-height: 500px;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding-left: 3rem;
    font-size: 0.9rem;
}

.submenu-toggle {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.menu-item-has-children.active .submenu-toggle {
    transform: rotate(180deg);
}

.sidebar.collapsed .menu-item-has-children .submenu,
.sidebar.collapsed .menu-item-has-children .submenu-toggle {
    display: none !important;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ==================== CARDS ==================== */
.card {
    background: rgb(255, 255, 255);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.card-header h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.card-body {
    padding: 1.0rem;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

select.form-control {
    cursor: pointer;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

.btn-success:hover {
    background: #219a52;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-warning:hover {
    background: #e67e22;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==================== TABLES ==================== */
.table-responsive {
    overflow-x: auto;
}

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

.table .contact-info {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.table thead {
    background: #f8f9fa;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

.table th.sortable {
    cursor: pointer;
    user-select: none;
}

.table th.sortable:hover {
    background: rgba(0, 0, 0, 0.04);
}

.table th.sortable .sort-indicator {
    margin-left: 0.35rem;
    font-size: 0.75em;
    color: #6b7280;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table.table-centered th,
.table.table-centered td {
    text-align: center;
    vertical-align: middle;
}

.table .contact-info {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.finance-summary {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    background: rgba(66, 66, 66, 0.82);
    color: #fff;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 1.1rem 1.35rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    min-width: 760px;
    max-width: 920px;
    backdrop-filter: blur(6px);
    cursor: grab;
}

.finance-summary-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.finance-summary-header .finance-summary-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.finance-summary-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.finance-summary-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.finance-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
}

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

.finance-summary .summary-column {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.finance-summary .summary-column .summary-item {
    margin-bottom: 0.5rem;
}

.finance-summary .summary-item.summary-item-meter {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.quality-meter-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0.95rem;
}

.summary-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
    margin: 0.25rem 0 0.5rem;
    border-radius: 999px;
}

.quality-meter-bar {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.25rem;
    width: 100%;
    padding: 0.35rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.quality-segment {
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.quality-title {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.quality-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: currentColor;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    text-shadow: none;
}

.quality-arrow {
    position: relative;
    width: 18px;
    height: 18px;
    display: inline-block;
}

.quality-arrow::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    width: 4px;
    height: 10px;
    background: #ffffff;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

.quality-arrow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #ffffff;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.2));
}

.quality-arrow-up {
    transform: rotate(0deg);
}

.quality-arrow-diag-up {
    transform: rotate(45deg);
}

.quality-arrow-diag-down {
    transform: rotate(135deg);
}

.quality-arrow-right {
    transform: rotate(90deg);
}

.quality-arrow-down {
    transform: rotate(180deg);
}

.quality-indicator-empty {
    color: rgba(0, 0, 0, 0.35);
    font-weight: 500;
}

.finance-summary .summary-item:last-child {
    margin-bottom: 0;
}

.finance-summary .summary-value {
    font-weight: 600;
}

.finance-summary .summary-value.summary-orange {
    color: #ffc26a;
}

.finance-summary .summary-value.summary-red {
    color: #ff8585;
}

.finance-summary .summary-value.summary-blue {
    color: #84c9ff;
}

.finance-summary .summary-value.summary-green {
    color: #8fee9e;
}

.finance-summary.collapsed {
    padding: 0.5rem 0.75rem;
    min-width: 380px;
    max-width: 460px;
}

.finance-summary.collapsed .finance-summary-header {
    margin-bottom: 0;
}

.finance-summary.collapsed .finance-summary-title {
    display: none;
}

.finance-summary.collapsed .summary-columns,
.finance-summary.collapsed .summary-divider {
    display: none;
}

.finance-summary.collapsed .finance-summary-toggle i {
    transform: rotate(180deg);
}

.finance-summary.dragging {
    opacity: 0.95;
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
    user-select: none;
    cursor: grabbing;
}

.finance-summary * {
    cursor: inherit;
}

/* Seção de Detalhamento do Lucro Líquido */
.lucro-liquido-section {
    transition: all 0.3s ease;
}

.lucro-liquido-header {
    position: relative;
}

.lucro-liquido-toggle {
    transition: background 0.2s ease, transform 0.2s ease;
}

.lucro-liquido-toggle:hover {
    background: rgba(0, 0, 0, 0.15) !important;
}

.lucro-liquido-toggle i {
    transition: transform 0.3s ease;
}

.lucro-liquido-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.lucro-liquido-section.collapsed .lucro-liquido-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.lucro-liquido-section.collapsed .lucro-liquido-toggle i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .finance-summary {
        position: static;
        margin-bottom: 1rem;
        width: 100%;
        right: auto;
        top: auto;
        min-width: 0;
    }
    .finance-summary .summary-columns {
        grid-template-columns: 1fr;
    }
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

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

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

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

.badge-info {
    background: var(--secondary-color);
    color: white;
}

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

/* ==================== ALERTS ==================== */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

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

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

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

/* ==================== LOGIN PAGE ==================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-box .logo img {
    max-width: 200px;
}

.login-box h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.login-box .form-link {
    text-align: center;
    margin-top: 1rem;
}

.login-box .form-link a {
    color: var(--secondary-color);
    text-decoration: none;
}

.login-box .form-link a:hover {
    text-decoration: underline;
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 1rem;
}

/* ==================== MOBILE MENU TOGGLE ==================== */
.mobile-menu-toggle {
    display: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        transition: all 0.3s ease;
        font-size: 1.2rem;
    }
    
    .mobile-menu-toggle:active {
        background: var(--secondary-color);
        transform: scale(0.95);
    }
    
    .sidebar {
        width: var(--sidebar-width) !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease !important;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        z-index: 1000 !important;
    }
    
    .sidebar.show {
        transform: translateX(0) !important;
        z-index: 1002 !important;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%) !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding-top: 4rem;
    }
    
    .sidebar-toggle {
        display: none !important;
    }
    
    /* Overlay ao abrir menu mobile */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
        pointer-events: none;
    }
    
    body.menu-open::before {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }
}

/* Grid System para formulários */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.row > [class*="col-"] {
    padding: 0 0.5rem;
    flex: 1;
}

.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%; }

@media (max-width: 768px) {
    .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

/* Seções do formulário */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-section h3 i {
    margin-right: 0.5rem;
}

.section-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.frete-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 1rem;
    background: #f9f9f9;
    margin-bottom: 1rem;
    height: 100%;
}

.frete-card .form-group:last-child {
    margin-bottom: 0;
}

.produto-divider {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border: 0;
    border-top: 1px solid #dee2e6;
}

.produto-cards-row {
    margin-top: 0.1rem;
    margin-bottom: 1rem;
}

.produto-info-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    background-color: #f8f9fa;
    text-align: center;
}

.produto-info-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.produto-info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

/* ==================== DASHBOARD FECHAMENTO ==================== */
.dashboard-section {
    margin-bottom: 2rem;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-cards-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card-large {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 3px solid transparent;
    text-align: center;
}

.stat-card-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.stat-card-large.stat-card-primary {
    border-top-color: #3498db;
}

.stat-card-large.stat-card-success {
    border-top-color: #27ae60;
}

.stat-card-large.stat-card-info {
    border-top-color: #17a2b8;
}

.stat-card-large.stat-card-warning {
    border-top-color: #f39c12;
}

.stat-card-large.stat-card-danger {
    border-top-color: #e74c3c;
}

.stat-card-large-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card-large-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.stat-card-large.stat-card-primary .stat-card-large-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.stat-card-large.stat-card-success .stat-card-large-icon {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

.stat-card-large.stat-card-info .stat-card-large-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stat-card-large.stat-card-warning .stat-card-large-icon {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.stat-card-large.stat-card-danger .stat-card-large-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.stat-card-large-header h4 {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-large-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-card-large-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.dashboard-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.stat-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.stat-card-primary .stat-card-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.stat-card-success .stat-card-icon {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
}

.stat-card-info .stat-card-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.stat-card-warning .stat-card-icon {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.stat-card-danger .stat-card-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.stat-card-content {
    flex: 1;
    width: 100%;
    text-align: center;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-card-content h3 {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-content .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.2rem 0;
    line-height: 1.2;
}

.stat-card-content .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.dashboard-cards-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card-small {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.stat-card-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.stat-card-small-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.stat-card-small-content h4 {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.stat-card-small-content p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

@media (max-width: 768px) {
    .dashboard-fechamento {
        padding: 1rem;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards-main {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards-secondary {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card-large {
        padding: 1rem;
    }
    
    .stat-card-large-value {
        font-size: 1.2rem;
    }
    
    .stat-card-content .stat-value {
        font-size: 1.1rem;
    }
}
