:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --danger-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --sidebar-width: 250px;
    --header-height: 70px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100%;
    transition: all 0.3s;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 30px;
    font-size: 1.5rem;
    font-weight: 600;
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 5px;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar nav ul li a i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar nav ul li.active a {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}
.container {
    width: 90%; /* Ajusta a largura para ser relativa */
    max-width: 1200px; /* Define um limite máximo */
    margin: 0 auto;
    padding: 20px;
}

.content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

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

.notification-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile span {
    font-weight: 500;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem; /* Tamanho maior para telas grandes */
}
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem; /* Reduz o tamanho do título */
    }
}
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f0f4ff;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

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

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.bg-blue {
    background: var(--primary-color);
}

.bg-green {
    background: var(--success-color);
}

.bg-orange {
    background: var(--warning-color);
}

.bg-red {
    background: var(--danger-color);
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter select {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.card-body {
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
   
    color: var(--gray-color);
    text-transform: uppercase;
    background-color: #333;
    
    
}
.responsive-table {
    overflow-x: auto; /* Permite rolagem horizontal */
}
form {
    margin-bottom: 20px;
}

tr:hover {
    background: #f9f9f9;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.in-stock {
    background: #e6f7ee;
    color: var(--success-color);
}

.status.low-stock {
    background: #fff4e6;
    color: var(--warning-color);
}

.status.out-of-stock {
    background: #feecef;
    color: var(--danger-color);
}

.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-color);
    transition: all 0.3s;
}

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

.action-btn.delete:hover {
    color: var(--danger-color);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: all 0.3s;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: all 0.3s;
}

.close-modal:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
}

.modal.small .modal-content {
    max-width: 400px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

button {
    width: 100%; /* Botão ocupa toda a largura em telas pequenas */
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover {
    background-color: #555;
}
/* Ajustes para telas médias */
@media (min-width: 768px) {
    button {
        width: auto; /* Retorna ao tamanho normal em telas maiores */
    }

    input[type="text"], input[type="number"] {
        width: 40%; /* Reduz o tamanho dos inputs em telas maiores */
    }
}

/* Ajustes para telas pequenas */
@media (max-width: 480px) {
    .container {
        padding: 10px; /* Reduz o espaçamento interno */
    }

    th, td {
        font-size: 0.9rem; /* Diminui o tamanho da fonte */
    }
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

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

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar .logo span,
    .sidebar nav ul li a span {
        display: none;
    }
    
    .sidebar .logo i,
    .sidebar nav ul li a i {
        margin-right: 0;
        font-size: 1.5rem;
    }
    
    .sidebar nav ul li a {
        justify-content: center;
        padding: 15px 0;
    }
    
    .content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .user-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card-actions {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}