* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --text-color: #333;
    --light-bg: #f4f4f4;
    --dark-bg: #2c3e50;
    --border-radius: 6px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

nav button {
    background-color: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
}

nav button.active, nav button:hover {
    background-color: var(--primary-color);
    color: white;
}

section {
    background-color: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

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

.section-header h2 {
    color: var(--dark-bg);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary-color);
}

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

.btn-delete:hover {
    background-color: #c0392b;
}

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

.btn-entregado:hover {
    background-color: #27ae60;
}

.btn-add {
    background-color: var(--success-color);
    margin-bottom: 15px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    border: 1px solid #ddd;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.card.completed {
    background-color: rgba(46, 204, 113, 0.2);
    border-color: var(--success-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.card p {
    margin-bottom: 8px;
    color: #666;
}

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

.pack-card {
    cursor: default;
}

.material-list {
    list-style-type: none;
    margin: 10px 0;
}

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

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

.material-list li.entregado {
    text-decoration: line-through;
    color: #999;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

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

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f8f9fa;
    color: var(--dark-bg);
}

table tr:hover {
    background-color: #f8f9fa;
}

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

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

.modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

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

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

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
}

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

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

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

.dashboard-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    border: 1px solid #ddd;
}

.dashboard-card h3 {
    color: var(--dark-bg);
    margin-bottom: 15px;
    text-align: center;
}

.progress-container {
    height: 30px;
    background-color: #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--success-color);
    color: white;
    text-align: center;
    line-height: 30px;
    transition: width 0.5s;
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 10px;
    margin-top: 20px;
}

.chart-bar {
    min-width: 30px;
    flex: 1;
    background-color: var(--primary-color);
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transition: height 0.5s;
    display: flex;
    justify-content: center;
}

.chart-value {
    color: white;
    position: absolute;
    top: -25px;
}

.chart-label {
    color: var(--text-color);
    position: absolute;
    bottom: -25px;
    text-align: center;
    width: 100%;
    font-size: 14px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.login-box {
    background-color: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 400px;
}

.login-box h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    color: var(--danger-color);
    margin-top: 15px;
    text-align: center;
}

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

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

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

.btn-logout {
    background-color: var(--light-bg);
    color: var(--text-color);
}

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

.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.dashboard-tabs button {
    background-color: #fff;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s;
}

.dashboard-tabs button.active, .dashboard-tabs button:hover {
    background-color: var(--primary-color);
    color: white;
}

.delivered-materials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.btn-reset {
    background-color: var(--danger-color);
    color: white;
    margin-left: auto;
}

.btn-reset:hover {
    background-color: #c0392b;
}

.material-chart-container {
    margin: 20px 0;
}

.full-width {
    grid-column: 1 / -1;
}

.horizontal-chart-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.material-chart-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.material-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.horizontal-chart-bar {
    display: flex;
    height: 30px;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.horizontal-chart-delivered {
    background-color: var(--success-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 0 10px;
    transition: width 0.5s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.horizontal-chart-pending {
    background-color: var(--warning-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 0 10px;
    transition: width 0.5s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    nav {
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .delivered-materials {
        grid-template-columns: 1fr;
    }
}