/* ============================================
   ESTILOS DOS MÓDULOS
   ============================================ */

/* BANNER DO MÓDULO */
.module-banner {
    margin-top: 60px;
    padding: 80px 0;
    color: white;
    text-align: center;
}

.module-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.banner-content i {
    font-size: 4rem;
}

.banner-content h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-content p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    max-width: 600px;
}

/* CONTEÚDO DO MÓDULO */
.module-content {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: calc(100vh - 300px);
}

.module-content section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dark-color);
}

.link-view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link-view-all:hover {
    color: var(--secondary-color);
}

/* ============================================
   RESUMO CARDS
   ============================================ */
.financial-summary,
.logistics-summary,
.sales-summary,
.services-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    gap: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.summary-card .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.summary-card .icon.receita {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.summary-card .icon.despesa {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.summary-card .icon.lucro {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.summary-card .info {
    flex: 1;
}

.summary-card .label {
    font-size: 0.9rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.summary-card .value {
    font-size: 1.8rem;
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.summary-card .subtext,
.summary-card .percentage {
    font-size: 0.9rem;
    color: #666;
}

.summary-card .percentage {
    margin-top: 5px;
}

.percentage.positive {
    color: var(--success-color);
}

.percentage.negative {
    color: var(--error-color);
}

/* ============================================
   GRÁFICOS
   ============================================ */
.graphs-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.graph-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.graph-container h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.chart-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--border-radius);
    padding: 80px;
    text-align: center;
    color: #666;
}

/* ============================================
   TABELAS
   ============================================ */
.transactions-table,
.orders-table,
.suppliers-table,
.clients-table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border-collapse: collapse;
}

.transactions-table thead,
.orders-table thead,
.suppliers-table thead,
.clients-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.transactions-table th,
.orders-table th,
.suppliers-table th,
.clients-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.transactions-table tbody tr,
.orders-table tbody tr,
.suppliers-table tbody tr,
.clients-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: var(--transition);
}

.transactions-table tbody tr:hover,
.orders-table tbody tr:hover,
.suppliers-table tbody tr:hover,
.clients-table tbody tr:hover {
    background: #f8f9fa;
}

.transactions-table tbody td,
.orders-table tbody td,
.suppliers-table tbody td,
.clients-table tbody td {
    padding: 15px;
    color: #555;
}

/* Badges de Status */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.confirmed {
    background: #d4edda;
    color: #155724;
}

.badge.shipped {
    background: #cce5ff;
    color: #004085;
}

.badge.entregue {
    background: #d4edda;
    color: #155724;
}

.badge.transito {
    background: #fff3cd;
    color: #856404;
}

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

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

.badge-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--error-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e0e0e0;
    color: #333;
}

.badge-available {
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.badge-busy {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.badge-operational {
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.badge-maintenance {
    background: #fff3cd;
    color: #856404;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.badge-popular {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   PRODUTOS
   ============================================ */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.product-info .category {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.product-info .description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating span {
    color: #999;
}

.price-section {
    margin-bottom: 10px;
}

.price {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 700;
}

.old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.stock {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

/* ============================================
   RASTREAMENTO
   ============================================ */
.tracking-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
}

.tracking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tracking-item {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    background: #f8f9fa;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.tracking-id {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.tracking-body {
    margin-bottom: 20px;
}

.tracking-body p {
    margin-bottom: 8px;
    color: #555;
}

.tracking-timeline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.timeline-item {
    flex: 1;
    position: relative;
    padding-left: 30px;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ddd;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #ddd;
}

.timeline-item.active .timeline-marker {
    background: var(--primary-color);
    box-shadow: 0 0 0 2px white;
}

.timeline-item.completed .timeline-marker {
    background: var(--success-color);
    box-shadow: 0 0 0 2px white;
}

.timeline-text {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* ============================================
   MAPA
   ============================================ */
.map-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
}

.map-section h2 {
    margin-bottom: 20px;
}

.map-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    padding: 120px;
    text-align: center;
    color: white;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

/* ============================================
   ARMAZÉM
   ============================================ */
.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.warehouse-card {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
}

.warehouse-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.warehouse-card h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.warehouse-card .capacity {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.warehouse-card .usage {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   SERVIÇOS
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.service-header {
    position: relative;
    margin-bottom: 15px;
}

.service-header i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.service-card .description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.service-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    flex: 1;
}

.service-details p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}

/* ============================================
   CALENDÁRIO
   ============================================ */
.scheduling-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
}

.calendar {
    background: white;
}

.appointments-section h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    transition: var(--transition);
}

.appointment-item:hover {
    background: #f0f0f0;
}

.appointment-item .time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 50px;
}

.appointment-info {
    flex: 1;
}

.appointment-info h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.appointment-info p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 3px;
}

/* ============================================
   RECURSOS
   ============================================ */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.resource-card {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    background: #f8f9fa;
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.resource-header h3 {
    color: var(--dark-color);
}

.resource-count {
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.resource-list {
    list-style: none;
}

.resource-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-list li:last-child {
    border-bottom: none;
}

.member {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.member-info p {
    margin: 0;
    font-size: 0.9rem;
}

.member-info .name {
    color: var(--dark-color);
    font-weight: 600;
}

.member-info .role {
    color: #999;
    font-size: 0.85rem;
}

.resource-name {
    font-size: 0.9rem;
    color: #555;
}

/* ============================================
   RELATÓRIOS
   ============================================ */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.report-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.report-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.report-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.report-card p {
    font-size: 0.85rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.btn-download {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-small {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

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

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .section-header button {
        width: 100%;
    }

    .scheduling-container {
        grid-template-columns: 1fr;
    }

    .financial-summary,
    .logistics-summary,
    .sales-summary,
    .services-summary {
        grid-template-columns: 1fr;
    }

    .graphs-section {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

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

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

    .map-placeholder {
        padding: 60px 20px;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .filters {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .summary-card {
        flex-direction: column;
        text-align: center;
    }

    .summary-card .icon {
        margin: 0 auto;
    }

    .tracking-timeline {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-card {
        margin: 0 auto;
        max-width: 100%;
    }

    .appointment-item {
        flex-direction: column;
        text-align: center;
    }
}
