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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.navbar {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-btn.active {
    background: #667eea;
    color: white;
}

.nav-btn:hover {
    background: #5a67d8;
    color: white;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.section {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.section.active {
    display: block;
}

.section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.form input,
.form select,
.form textarea {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.form textarea {
    resize: vertical;
    min-height: 80px;
}

.form button {
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 200px;
}

.form button:hover {
    background: #5a67d8;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #667eea;
}

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

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.btn.edit {
    background: #48bb78;
    color: white;
}

.btn.delete {
    background: #e53e3e;
    color: white;
}

.btn:hover {
    opacity: 0.8;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
}

.close {
    float: right;
    font-size: 2rem;
    cursor: pointer;
}

#editForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#editForm input,
#editForm select,
#editForm textarea {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}

#editForm button {
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .form {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.9rem;
    }
}
