:root {
    --color-principal: #002d74;
    --color-primari: #1a73e8;
    --color-primari-hover: #155ec2;
    --color-secundari: #6c757d;
    --color-secundari-hover: #5a6268;
    --color-ok: #28a745;
    --color-error: #dc3545;
    --color-fons: #f5f7fa;
    --ombra: 0 0.75rem 2rem rgba(0,0,0,0.08);
    font-size: 16px;
    font-family: system-ui, sans-serif;
}

body {
    margin: 0;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f0f4ff, #e5e9f0);
    color: #333;
}

.contenidor {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--ombra);
    width: min(95vw, 60rem);
}

h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 1.5rem;
    color: var(--color-principal);
}

/* Avisos */
.avís {
    padding: 1rem;
    border-radius: .5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.avís-ok { background: #e6f4ea; color: var(--color-ok); }
.error { color: var(--color-error); margin-top: .5rem; font-size: .9rem; }

/* Botons */
.boto {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border-radius: .75rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
    color: #fff;
}
.boto:hover { transform: scale(1.03); }

.boto-primari { background: var(--color-primari); }
.boto-primari:hover { background: var(--color-primari-hover); }

.boto-secundari { background: var(--color-secundari); }
.boto-secundari:hover { background: var(--color-secundari-hover); }

/* Taula */
.taula {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: .95rem;
}
.taula th, .taula td {
    border: 1px solid #ddd;
    padding: .75rem 1rem;
    text-align: left;
}
.taula th {
    background: #eef3fb;
    color: var(--color-principal);
}
.taula tr:nth-child(even) td {
    background: #fafbff;
}
.taula td.accions a {
    margin-right: .5rem;
}

/* Formulari */
.formulari {
    display: grid;
    gap: 1.25rem;
}

.camp {
    display: flex;
    flex-direction: column;
}

.camp label {
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--color-principal);
}

.camp input {
    padding: 0.7rem;
    border-radius: .5rem;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.camp small {
    color: #555;
    font-size: .85rem;
    margin-top: .3rem;
}

.accions {
    gap: 1rem;
    flex-wrap: wrap;
}

.mb-3 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 600px) {
    .contenidor {
        padding: 1.25rem;
    }
    .taula th, .taula td {
        font-size: .9rem;
        padding: .6rem;
    }
    .accions { flex-direction: column; }
    .boto { width: 100%; text-align: center; }
}

.boto-danger {
    background: #dc3545;
    color: #fff;
}

.boto-danger:hover {
    background: #b02a37;
}   