@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700;9..144,900&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
    --bg-1: #09131f;
    --bg-2: #12263a;
    --bg-3: #18344e;
    --accent: #ffb703;
    --accent-soft: #ffd166;
    --paper: #f3efe4;
    --ink: #0b1220;
    --muted: #4b5b73;
    --ok: #2a9d8f;
    --warn: #ef476f;
    --shadow: 0 24px 60px rgba(8, 16, 27, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 10% 10%, #224d71 0%, transparent 40%),
                radial-gradient(circle at 90% 25%, #355f85 0%, transparent 45%),
                linear-gradient(140deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
}

.backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(transparent 97%, rgba(255, 255, 255, 0.05) 98%),
                      linear-gradient(90deg, transparent 97%, rgba(255, 255, 255, 0.04) 98%);
    background-size: 38px 38px;
    opacity: 0.5;
}

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 19, 31, 0.95);
    border-bottom: 1px solid rgba(255, 183, 3, 0.2);
    backdrop-filter: blur(10px);
    animation: slide-down 400ms ease both;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-container {
    width: min(980px, 92vw);
    margin: 0 auto;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    flex-shrink: 0;
}

.header-logo {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.4rem;
    margin: 0;
    color: var(--accent);
    font-weight: 700;
}

.header-nav {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.header-link {
    color: #d0dded;
    text-decoration: none;
    font-weight: 500;
    transition: all 200ms ease;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.header-link:hover {
    color: var(--accent-soft);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-name {
    color: var(--accent-soft);
    font-weight: 600;
    font-size: 0.95rem;
}

.user-classe {
    color: #4b5b73;
    font-size: 0.8rem;
}

.logout-btn {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--warn), #ff6b8a);
    color: white;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 200ms ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.3);
}

/* Auth Pages */
.auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: linear-gradient(140deg, var(--paper), #faf7f0);
    border-radius: 20px;
    border: 1px solid rgba(11, 18, 32, 0.08);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    animation: fade-in 650ms ease both;
}

.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-header h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 2rem;
    margin: 0 0 0.5rem;
    color: var(--ink);
}

.auth-subtitle {
    color: var(--muted);
    margin: 0;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: stretch;
}

.auth-submit {
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(11, 18, 32, 0.08);
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 200ms ease;
}

.auth-link:hover {
    color: #ffaa00;
}

.demo-hint {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 183, 3, 0.08);
    border: 1px solid rgba(255, 183, 3, 0.2);
    border-radius: 10px;
    font-size: 0.85rem;
    color: #404d63;
}

.demo-hint p {
    margin: 0;
}

.demo-hint code {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    animation: slide-up 400ms ease both;
}

.alert-icon {
    margin-right: 0.5rem;
}

.alert-error {
    background: #ffdbe5;
    border: 1px solid #f4a0bd;
    color: #7f1230;
}

.alert-success {
    background: #d5f5ef;
    border: 1px solid #7bcbbd;
    color: #134b43;
}

.alert-success {
    background: #d5f5ef;
    border: 1px solid #8ee8de;
    color: #134b43;
}

.alert-warning {
    background: #fff1d6;
    border: 1px solid #f2d18d;
    color: #7c4a00;
}

.update-indicator {
    color: var(--ok);
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fade-in 300ms ease both;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    position: relative;
    z-index: 1001;
    background: linear-gradient(140deg, var(--paper), #faf7f0);
    border-radius: 20px;
    border: 1px solid rgba(11, 18, 32, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    animation: slide-up 400ms ease both;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.8rem;
    margin: 0;
    color: var(--ink);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms ease;
    border-radius: 8px;
}

.modal-close:hover {
    color: var(--ink);
    background: rgba(11, 18, 32, 0.05);
}

.modal-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(11, 18, 32, 0.08);
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

@media (max-width: 640px) {
    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }
}

.page {
    width: min(980px, 92vw);
    margin: 0 auto;
    padding: 2.5rem 0 3.5rem;
    position: relative;
    z-index: 1;
}

.hero {
    color: #f9fbff;
    margin-bottom: 1.75rem;
    animation: fade-in 650ms ease both;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(255, 183, 3, 0.15);
    color: var(--accent-soft);
    border: 1px solid rgba(255, 209, 102, 0.32);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
}

.hero h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
    margin: 0.75rem 0 0.65rem;
}

.hero-subtitle {
    width: min(700px, 100%);
    font-size: 1.06rem;
    color: #d8e4f2;
    margin: 0;
}

.hero-meta {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #d0dded;
}

.launch-panel,
.placeholder-panel {
    background: linear-gradient(140deg, rgba(243, 239, 228, 0.98), rgba(250, 247, 240, 0.95));
    border-radius: 18px;
    border: 1px solid rgba(11, 18, 32, 0.08);
    box-shadow: var(--shadow);
}

.launch-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.launch-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 220px;
    padding: 1.4rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.launch-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(8, 16, 27, 0.12);
}

.launch-card.launch-disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.launch-card.launch-disabled:hover {
    transform: none;
    box-shadow: none;
}

.launch-laboratory {
    background: linear-gradient(145deg, #fff7e0, #ffe6a8);
    border: 1px solid rgba(255, 183, 3, 0.28);
}

.launch-safety {
    background: linear-gradient(145deg, #e6f3ff, #cfe7ff);
    border: 1px solid rgba(69, 123, 157, 0.22);
}

.launch-kicker {
    display: inline-block;
    width: fit-content;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(11, 18, 32, 0.08);
    color: rgba(11, 18, 32, 0.8);
    font-weight: 700;
}

.launch-card h2 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.3rem, 2.8vw, 1.9rem);
}

.launch-card p {
    margin: 0;
    line-height: 1.55;
    color: #1a2b43;
}

.launch-action,
.primary-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.launch-action {
    margin-top: auto;
    background: rgba(11, 18, 32, 0.9);
    color: #fff9ec;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: var(--ink);
}

.placeholder-panel {
    margin-top: 1rem;
    margin-bottom: 1.75rem;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.placeholder-panel p {
    margin: 0;
    color: #1a2b43;
    line-height: 1.55;
}

.primary-button:hover,
.launch-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(8, 16, 27, 0.14);
}

.dot {
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

.board {
    display: grid;
    gap: 1rem;
}

.note {
    background: linear-gradient(140deg, var(--paper), #faf7f0);
    border-radius: 18px;
    border: 1px solid rgba(11, 18, 32, 0.08);
    box-shadow: var(--shadow);
    padding: 1.2rem 1.25rem 1rem;
    animation: slide-up 500ms ease both;
}

.note:nth-child(2) {
    animation-delay: 80ms;
}

.note:nth-child(3) {
    animation-delay: 140ms;
}

.note-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.note h2 {
    font-family: "Fraunces", Georgia, serif;
    margin: 0;
    font-size: clamp(1.2rem, 2.8vw, 1.6rem);
}

.note time {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.note p {
    margin: 0 0 0.8rem;
    color: #1a2b43;
    line-height: 1.55;
}

.note-tag {
    display: inline-block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.32rem 0.55rem;
    border-radius: 7px;
    font-weight: 700;
}

.note-urgent {
    border-left: 6px solid var(--warn);
}

.note-urgent .note-tag {
    color: #7f1230;
    background: #ffdbe5;
}

.note-info {
    border-left: 6px solid #457b9d;
}

.note-info .note-tag {
    color: #163a59;
    background: #d6ebff;
}

.note-notice {
    border-left: 6px solid var(--ok);
}

.note-notice .note-tag {
    color: #134b43;
    background: #d5f5ef;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
.page-nav {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: fade-in 650ms ease both;
    animation-delay: 100ms;
}

.nav-link {
    color: #d0dded;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 200ms ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-soft);
}

.nav-link.active {
    color: var(--accent);
    font-weight: 700;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.public-nav {
    justify-content: space-between;
}

.login-link {
    color: var(--accent);
    font-weight: 600;
}

.login-link:hover {
    color: var(--accent-soft);
}

/* Forms Section */
.forms-section {
    display: grid;
    gap: 1.5rem;
}

.form-card {
    background: linear-gradient(140deg, var(--paper), #faf7f0);
    border-radius: 18px;
    border: 1px solid rgba(11, 18, 32, 0.08);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    animation: slide-up 500ms ease both;
}

.form-card:nth-child(2) {
    animation-delay: 80ms;
}

.form-card:nth-child(3) {
    animation-delay: 140ms;
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-card h2 {
    font-family: "Fraunces", Georgia, serif;
    margin: 0 0 0.3rem;
    font-size: clamp(1.2rem, 2.8vw, 1.6rem);
    color: var(--ink);
}

.form-description {
    color: var(--muted);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-status {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.45rem 0.7rem;
    border-radius: 7px;
    font-weight: 700;
    white-space: nowrap;
}

.status-open {
    color: #134b43;
    background: #d5f5ef;
}

.status-closed {
    color: #7f1230;
    background: #ffdbe5;
}

.form-card-meta {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(11, 18, 32, 0.08);
}

.deadline {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.deadline strong {
    color: var(--ink);
}

/* Form Elements */
.form-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}

.required {
    color: var(--warn);
    margin-left: 0.3rem;
}

.form-input {
    padding: 0.75rem 0.95rem;
    border: 1.5px solid rgba(11, 18, 32, 0.12);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
    transition: all 200ms ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.1);
}

.form-input::placeholder {
    color: var(--muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: "Space Grotesk", sans-serif;
}

.form-label-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 500;
    margin-top: 0.25rem;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}

.form-submit {
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: var(--ink);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 200ms ease;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 183, 3, 0.3);
}

.form-submit:active:not(:disabled) {
    transform: translateY(0);
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.users-filter-card,
.users-table-card {
    margin-bottom: 1.25rem;
}

.users-filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.users-filter-actions {
    display: flex;
    align-items: end;
}

.users-table-wrapper {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1080px;
}

.users-table th,
.users-table td {
    border-bottom: 1px solid rgba(11, 18, 32, 0.12);
    padding: 0.6rem;
    vertical-align: middle;
}

.users-table th {
    text-align: left;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3e4b61;
}

.users-id-cell {
    font-weight: 700;
    color: #2a3a50;
}

.users-inline-input {
    width: 100%;
    min-width: 120px;
    padding: 0.55rem 0.6rem;
    font-size: 0.88rem;
}

.users-class-input {
    min-width: 70px;
    text-transform: uppercase;
}

.users-inline-submit {
    margin-top: 0;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
}

.users-reset-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.users-inline-checkbox {
    margin-top: 0;
    white-space: nowrap;
    font-size: 0.8rem;
}

.users-danger {
    background: linear-gradient(135deg, #f9afbd, #ef476f);
    color: #33000f;
}

.users-empty {
    text-align: center;
    color: var(--muted);
    padding: 1.2rem;
}

.users-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .header-container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-nav {
        order: 3;
        width: 100%;
        gap: 1rem;
        justify-content: flex-start;
    }

    .header-right {
        gap: 1rem;
    }

    .user-name {
        font-size: 0.85rem;
    }

    .logout-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    .auth-card {
        padding: 1.75rem;
    }

    .auth-header h1 {
        font-size: 1.6rem;
    }

    .auth-submit {
        padding: 0.85rem 1rem;
    }

    .page-nav {
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .form-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .users-filter-grid {
        grid-template-columns: 1fr;
    }

    .users-pagination {
        flex-direction: column;
    }

    .page {
        padding-top: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.98rem;
    }

    .note {
        border-radius: 14px;
        padding: 1rem 0.95rem 0.85rem;
    }

    .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

/* ============================================================
   Lab programme & admin
   ============================================================ */

.section-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.4rem;
    color: var(--accent);
    margin: 0 0 1.2rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 183, 3, 0.2);
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.lab-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: border-color 0.2s;
}

.lab-card:hover {
    border-color: rgba(255, 183, 3, 0.35);
}

.lab-card--iscritto {
    border-color: rgba(42, 157, 143, 0.5);
    background: rgba(42, 157, 143, 0.06);
}

.lab-card--pieno {
    opacity: 0.6;
}

.lab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.lab-orario {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lab-time {
    font-size: 0.8rem;
    color: var(--accent-soft);
    margin-top: 0.15rem;
}

.lab-aula {
    font-size: 0.78rem;
    color: var(--accent-soft);
    background: rgba(255, 183, 3, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

.lab-titolo {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.05rem;
    color: var(--paper);
    margin: 0;
}

.lab-descrizione {
    font-size: 0.87rem;
    color: rgba(243, 239, 228, 0.65);
    margin: 0;
    line-height: 1.5;
}

.lab-resp {
    font-size: 0.8rem;
    color: rgba(243, 239, 228, 0.45);
    margin: 0;
}

.lab-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.lab-posti {
    font-size: 0.82rem;
    color: rgba(243, 239, 228, 0.55);
}

.lab-posti--pieno {
    color: var(--warn);
}

.lab-badge-iscritto {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ok);
}

.lab-action-form {
    display: inline;
}

.lab-btn {
    border: none;
    border-radius: 8px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lab-btn--iscriviti {
    background: var(--accent);
    color: var(--ink);
}

.lab-btn--iscriviti:hover {
    opacity: 0.85;
}

.lab-btn--disiscrivi {
    background: transparent;
    border: 1px solid rgba(243, 239, 228, 0.25);
    color: rgba(243, 239, 228, 0.7);
}

.lab-btn--disiscrivi:hover {
    border-color: var(--warn);
    color: var(--warn);
}

.lab-btn--disabled {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(243, 239, 228, 0.3);
    cursor: not-allowed;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
}

.lab-btn--rifiuta {
    background: transparent;
    border: 1px solid rgba(239, 71, 111, 0.4);
    color: var(--warn);
    margin-top: 0.5rem;
}

.lab-btn--rifiuta:hover {
    background: rgba(239, 71, 111, 0.1);
}

.lab-btn--revoca {
    background: transparent;
    border: 1px solid rgba(255, 183, 3, 0.3);
    color: var(--accent-soft);
    margin-top: 0.5rem;
}

.lab-btn--revoca:hover {
    background: rgba(255, 183, 3, 0.1);
}

/* Admin lab proposal cards */
.lab-proposal-card {
    margin-bottom: 1rem;
}

.lab-proposal-card--approved {
    border-color: rgba(42, 157, 143, 0.3);
}

.lab-proposal-card--rejected {
    opacity: 0.55;
}

.lab-stato {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    align-self: flex-start;
}

.lab-stato--pending {
    background: rgba(255, 183, 3, 0.15);
    color: var(--accent);
}

.lab-stato--approvato {
    background: rgba(42, 157, 143, 0.15);
    color: var(--ok);
}

.lab-stato--rifiutato {
    background: rgba(239, 71, 111, 0.12);
    color: var(--warn);
}

.lab-desc-full {
    font-size: 0.88rem;
    color: rgba(243, 239, 228, 0.7);
    line-height: 1.55;
    margin: 0.2rem 0 0;
}

.lab-note {
    font-size: 0.82rem;
    color: rgba(243, 239, 228, 0.45);
    margin: 0.2rem 0 0;
}

.lab-approval-form {
    margin-top: 0.8rem;
}

.lab-approval-form > summary {
    display: inline-block;
    cursor: pointer;
    list-style: none;
    margin-bottom: 0.8rem;
}

.lab-approval-form > summary::-webkit-details-marker {
    display: none;
}

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

/* Launch card for programme */
.launch-program {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.12), rgba(42, 157, 143, 0.04));
    border-color: rgba(42, 157, 143, 0.25);
}

.launch-program:hover {
    border-color: rgba(42, 157, 143, 0.5);
}

/* Multi-day slot rows in admin approval form */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.slot-row {
    display: grid;
    grid-template-columns: 1fr 90px 90px 1fr 28px;
    gap: 0.5rem;
    align-items: center;
}

.slot-input {
    min-width: 0;
}

.slot-remove-btn {
    background: transparent;
    border: 1px solid rgba(239, 71, 111, 0.35);
    color: var(--warn);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.slot-remove-btn:hover {
    background: rgba(239, 71, 111, 0.12);
}

.lab-btn--add-slot {
    background: transparent;
    border: 1px dashed rgba(255, 183, 3, 0.4);
    color: var(--accent-soft);
    margin-top: 0.2rem;
}

.lab-btn--add-slot:hover {
    background: rgba(255, 183, 3, 0.07);
}

.slot-summary-list {
    list-style: none;
    padding: 0;
    margin: 0.3rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.slot-summary-list li {
    font-size: 0.78rem;
    color: rgba(243, 239, 228, 0.55);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
}

/* ── Form-card Light Mode Overrides ── */
.form-card .lab-desc-full,
.form-card .lab-note,
.form-card .lab-time,
.form-card .lab-orario {
    color: var(--ink);
}

.form-card .slot-summary-list li {
    color: var(--muted);
    background: rgba(0, 0, 0, 0.05);
}

.form-card .lab-btn--add-slot,
.form-card .lab-btn--revoca,
.form-card .lab-btn--disiscrivi {
    color: var(--accent-vivid);
    border-color: rgba(230, 138, 0, 0.4);
}
.form-card .lab-btn--add-slot:hover,
.form-card .lab-btn--revoca:hover,
.form-card .lab-btn--disiscrivi:hover {
    background: rgba(230, 138, 0, 0.07);
}

@media (max-width: 600px) {
    .slot-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    .slot-remove-btn {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
}
