@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f5f2ec;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #ffffff;
    --text: #2f2a2a;
    --muted: #6e6662;
    --line: rgba(96, 73, 67, 0.12);
    --shadow: 0 20px 50px rgba(80, 60, 56, 0.10);
    --teal: #8fdad2;
    --teal-strong: #4ebcb0;
    --terracotta: #e4876c;
    --terracotta-soft: #f8d9cf;
    --sand: #efd7c5;
    --olive: #9aa08a;
    --cream: #fffaf4;
    --riposo: #dde9dd;
    --corso: #e8d7c2;
    --clienti: #f9d7cb;
    --social: #d7f0ec;
    --raccolta: #d9f1ea;
    --centro: #efe5d4;
    --evento: #f8e8d7;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(143, 218, 210, 0.35), transparent 24%),
        radial-gradient(circle at top right, rgba(228, 135, 108, 0.18), transparent 20%),
        linear-gradient(180deg, #f7f4ef 0%, #f3efe8 100%);
}

.page-shell {
    width: min(1440px, calc(100% - 40px));
    margin: 32px auto 48px;
}

.hero {
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,250,244,0.92));
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 22px;
}

.hero__brand {
    display: flex;
    align-items: center;
    gap: 22px;
}

.hero__logo {
    width: 108px;
    height: 108px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 12px 22px rgba(80, 60, 56, 0.12));
}

.eyebrow {
    margin: 0 0 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--teal-strong);
}

h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.05;
}

.hero__subtitle {
    margin: 12px 0 0;
    max-width: 78ch;
    color: var(--muted);
    line-height: 1.65;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.hero__dates {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(143, 218, 210, 0.16);
    border: 1px solid rgba(78, 188, 176, 0.18);
    font-weight: 600;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.72);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ghost-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(80, 60, 56, 0.08);
    background: rgba(255,255,255,0.92);
}

.ghost-button--light {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
}

.calendar-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 16px;
}

.day-card {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.day-card--off {
    background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(221, 233, 221, 0.72));
}

.day-card__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.day-card__day {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.day-card__date {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.day-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(143, 218, 210, 0.10);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.55;
    border: 1px solid rgba(78, 188, 176, 0.14);
}

.entries {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.entry {
    padding: 14px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid rgba(96, 73, 67, 0.08);
}

.entry--empty {
    background: rgba(255,255,255,0.45);
    border-style: dashed;
}

.entry__time strong {
    font-size: 0.9rem;
}

.entry__body h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.entry__topline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entry__description,
.entry__note {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.92rem;
}

.entry__note {
    color: #8a5f50;
    font-weight: 600;
}

.day-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.badge-clienti { background: var(--clienti); }
.badge-social { background: var(--social); }
.badge-raccolta { background: var(--raccolta); }
.badge-corso { background: var(--corso); }
.badge-centro { background: var(--centro); }
.badge-evento { background: var(--evento); }
.badge-riposo { background: var(--riposo); }
.badge-default { background: rgba(239, 229, 212, 0.72); }

.bottom-panels {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 1.5rem;
}

.legend-list {
    display: grid;
    gap: 14px;
}

.legend-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(96, 73, 67, 0.08);
    line-height: 1.6;
}

.legend-item strong {
    display: block;
    margin-bottom: 4px;
}

.panel--accent {
    background:
        linear-gradient(160deg, rgba(78, 188, 176, 0.88), rgba(95, 166, 153, 0.9)),
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
    color: white;
}

.panel--accent .eyebrow,
.panel--accent h2,
.panel--accent p {
    color: white;
}

.panel--accent p {
    line-height: 1.7;
}

.admin-link-wrap {
    margin-top: 22px;
}

@media (max-width: 1280px) {
    .calendar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bottom-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .page-shell {
        width: min(100% - 20px, 1440px);
        margin: 20px auto 28px;
    }

    .hero,
    .panel,
    .day-card {
        border-radius: 22px;
    }

    .hero__brand {
        align-items: flex-start;
    }

    .hero__logo {
        width: 78px;
        height: 78px;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .hero__actions {
        align-items: stretch;
    }

    .hero__actions > * {
        width: 100%;
    }

    .hero__dates {
        justify-content: center;
    }
}

.hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.soft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
    background: rgba(143, 218, 210, 0.16);
    border: 1px solid rgba(78, 188, 176, 0.16);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.soft-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(80, 60, 56, 0.08);
    background: rgba(143, 218, 210, 0.22);
}

.regulation-section {
    margin-top: 24px;
}

.regulation-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.regulation-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 70ch;
    line-height: 1.65;
}

.regulation-meta {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(96, 73, 67, 0.08);
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
}

.regulation-content {
    display: grid;
    gap: 14px;
}

.regulation-content h3 {
    margin: 6px 0 0;
    font-size: 1.1rem;
}

.regulation-content p {
    margin: 0;
    line-height: 1.75;
    color: var(--text);
}

.rules-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}

.rules-list li {
    line-height: 1.65;
    color: var(--text);
}

@media (max-width: 860px) {
    .hero__links > * {
        width: 100%;
    }

    .regulation-section__head {
        flex-direction: column;
    }

    .regulation-meta {
        width: 100%;
        justify-items: stretch;
    }
}
