/* =====================================================
   Base layout
===================================================== */

body {
    font-family: system-ui, Arial, sans-serif;
    background: #f3f4f6;
    margin: 0;
}

.wrap {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 14px;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
}


/* =====================================================
   Links
===================================================== */

a {
    color: #0b57d0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* =====================================================
   Tables
===================================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #eeeeee;
    text-align: left;
}


/* =====================================================
   Buttons
===================================================== */

.btn {
    display: inline-block;
    background: #0b57d0;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn:hover {
    text-decoration: none;
    filter: brightness(0.95);
}

/* Bottone secondario chiaro */
.btn-light {
    background: #f3f4f6;
    color: #374151;
}

/* Bottone Apri */
.btn-view {
    background: #2563eb;   /* blu */
    color: #ffffff;
}

/* Bottone Modifica */
.btn-edit {
    background: #f59e0b;   /* arancione */
    color: #ffffff;
}

/* Hover */
.btn-view:hover {
    filter: brightness(0.9);
}

.btn-edit:hover {
    filter: brightness(0.9);
}

/* =====================================================
   Forms
===================================================== */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

input,
textarea {
    padding: 10px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    font-size: 14px;
}


/* =====================================================
   Grid layout
===================================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
}

/* Tablet */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 520px) {
    .grid {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   Photos grid
===================================================== */

.photos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

@media (max-width: 900px) {
    .photos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 520px) {
    .photos {
        grid-template-columns: repeat(2, 1fr);
    }
}

.photos img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}


/* =====================================================
   Misc
===================================================== */

.hint {
    color: #666666;
    font-size: 13px;
}