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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 40px 30px;
    border-bottom: 3px solid #34495e;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

header p {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 300;
}

main {
    padding: 40px;
}

/* Secciones */
.form-section, .table-section {
    margin-bottom: 50px;
}

.form-section h2, .table-section h2 {
    color: #2c3e50;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* Formulario */
#product-form {
    background: #fafafa;
    padding: 32px;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

/* Botones */
.btn {
    padding: 11px 22px;
    border: none;
    border-radius: 2px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background: #34495e;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-edit {
    background: #34495e;
    color: white;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-edit:hover {
    background: #2c3e50;
}

.btn-delete {
    background: white;
    color: #e74c3c;
    padding: 8px 16px;
    font-size: 0.85rem;
    border: 1px solid #e74c3c;
}

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

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

/* Tabla */
.table-wrapper {
    overflow-x: auto;
    border-radius: 2px;
    border: 1px solid #e0e0e0;
}

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

thead {
    background: #fafafa;
    border-bottom: 2px solid #e0e0e0;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

tbody tr:hover {
    background: #fafafa;
}

tbody tr:last-child td {
    border-bottom: none;
}

.loading, .no-data {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
    font-style: italic;
    font-size: 0.95rem;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 2px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 16px;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-content p {
    margin-bottom: 28px;
    color: #7f8c8d;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Footer */
footer {
    background: #fafafa;
    padding: 24px;
    text-align: center;
    color: #95a5a6;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.6rem;
    }

    header {
        padding: 30px 20px;
    }

    main {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    #product-form {
        padding: 24px;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 12px;
    }

    .actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    main {
        padding: 16px;
    }

    #product-form {
        padding: 20px;
    }

    th, td {
        padding: 10px;
        font-size: 0.8rem;
    }

    .modal-content {
        padding: 24px;
    }
}