:root {
    --primary: #d35400; /* Naranja Obrantis */
    --dark: #2c3e50;
    --bg: #f4f7f6;
    --white: #ffffff;
}

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

body { background: var(--bg); color: #333; padding-bottom: 20px; }

/* Overlay PIN */
.overlay { position: fixed; inset: 0; background: var(--dark); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.modal-pin { background: white; padding: 2rem; border-radius: 10px; text-align: center; }
.modal-pin input { display: block; width: 100%; margin: 10px 0; padding: 10px; font-size: 1.5rem; text-align: center; }

/* Header & Tabs */
.app-header { background: var(--dark); color: white; padding: 1rem; position: sticky; top: 0; z-index: 100; }
.tabs { display: flex; gap: 5px; margin-top: 10px; }
.tab-btn { flex: 1; padding: 10px; border: none; background: #34495e; color: white; border-radius: 5px; cursor: pointer; }
.tab-btn.active { background: var(--primary); }

/* Contenido */
.tab-content { display: none; padding: 15px; max-width: 800px; margin: auto; }
.tab-content.active { display: block; }

.actions { display: flex; gap: 10px; margin-bottom: 20px; }
.actions input { flex: 1; padding: 8px; border-radius: 5px; border: 1px solid #ccc; }

/* Grid de Listas */
.grid-list { display: grid; gap: 10px; }
.card { background: white; padding: 15px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); border-left: 5px solid var(--primary); }
.card h4 { margin-bottom: 5px; }
.card p { font-size: 0.85rem; color: #666; }
.card-actions { margin-top: 10px; display: flex; gap: 10px; justify-content: flex-end; }

/* Modales con Scroll para móvil */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; overflow-y: auto; padding: 10px; }
.modal-body { background: white; width: 100%; max-width: 500px; margin: 20px auto; padding: 20px; border-radius: 8px; }
.modal-body input, .modal-body select, .modal-body textarea { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; }
.row { display: flex; gap: 10px; }
.modal-footer { display: flex; justify-content: space-between; position: sticky; bottom: -20px; background: white; padding-top: 10px; }

/* Botones */
button { cursor: pointer; padding: 8px 15px; border-radius: 4px; border: none; font-weight: bold; }
.btn-add { background: var(--primary); color: white; }
.btn-save { background: #27ae60; color: white; }
.btn-cancel { background: #95a5a6; color: white; }
.btn-delete { background: #c0392b; color: white; font-size: 0.7rem; }

@media (max-width: 600px) {
    .actions { flex-direction: column; }
    .row { flex-direction: column; }
}