:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #1abc9c;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --border: #e9ecef;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7f9;
    color: var(--dark);
}

.container {
   display: flex;
    min-height: 100vh;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Sidebar - MANTIDO IGUAL */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    background: var(--primary);
    color: white;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
}

.logo {
    padding: 0 0 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.logo span {
    color: var(--accent);
}

.menu-section {
    margin-bottom: 1.5rem;
}

.menu-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.3rem;
    transition: all 0.2s;
    cursor: pointer;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background: var(--secondary);
    color: white;
}

.menu-item i {
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

/* Main Content - AJUSTADO para seguir o padrão da gerencia */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Header - NOVO estilo igual ao da gerencia */
.header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

.user-role {
    font-size: 0.8rem;
    color: var(--gray);
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Content Wrapper - NOVO */
.content-wrapper {
    padding: 2rem;
}

/* Quick Actions - AJUSTADO para action-card */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--secondary);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.action-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary), #2980b9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.action-content p {
    margin: 0 0 1rem 0;
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.4;
}

.action-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: #2980b9;
}

/* Dashboard Sections - MANTIDO */
.dashboard-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray);
}

.btn-outline:hover {
    background: var(--light);
}

/* Status List - MANTIDO */
.status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.status-item {
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-title {
    font-weight: 500;
}

.status-value {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--secondary);
}

.item-list {
    list-style: none;
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child {
    border-bottom: none;
}

.item-name {
    color: var(--dark);
}

.item-value {
    font-weight: 500;
    color: var(--secondary);
}

/* Products List - MANTIDO */
.products-list {
    margin-top: 1.5rem;
}

.product-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.product-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-quantity {
    font-weight: 500;
    color: var(--secondary);
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    width: 100px;
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: 3px;
}

.progress-blue {
    background: var(--secondary);
}

.progress-green {
    background: var(--success);
}

.progress-purple {
    background: #6f42c1;
}

/* Responsividade */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .logo h1 span,
    .sidebar .menu-title,
    .sidebar .menu-item span {
        display: none;
    }

    .sidebar .menu-item {
        justify-content: center;
        padding: 0.8rem;
    }

    .sidebar .menu-item i {
        margin-right: 0;
    }

    .content-wrapper {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .status-list {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .action-card {
        flex-direction: column;
        text-align: center;
    }
    
    .action-icon {
        align-self: center;
    }
}

/* MODAL DE ATUALIZAÇÕES */
.modal-updates {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-updates-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.modal-updates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eaeaea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-updates-header h2 {
    margin: 0;
    font-size: 1.4em;
}

.close-updates-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-updates-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-updates-body {
    padding: 25px;
}

.update-version {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #eaeaea;
}

.version-badge {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.version-date {
    color: #666;
    font-size: 0.9em;
}

.updates-list {
    margin-bottom: 20px;
}

.update-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    transition: transform 0.2s;
}

.update-item:hover {
    transform: translateX(5px);
    background: #f0f2ff;
}

.update-icon {
    font-size: 1.5em;
    margin-right: 15px;
    margin-top: 2px;
}

.update-text strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.update-text p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.updates-footer {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.whats-new ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
    color: #555;
}

.whats-new li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.modal-updates-actions {
    padding: 20px 25px;
    border-top: 1px solid #eaeaea;
    text-align: center;
}

.dont-show-again {
    display: block;
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
}

.dont-show-again input {
    margin-right: 8px;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .modal-updates-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-updates-header {
        padding: 15px 20px;
    }
    
    .modal-updates-body {
        padding: 20px;
    }
    
    .update-item {
        flex-direction: column;
        text-align: center;
    }
    
    .update-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}