:root {
    --navy: #073b4c;
    --navy-deep: #052e3a;
    --teal: #0a8791;
    --teal-light: #e9f7f7;
    --ink: #17272d;
    --muted: #718087;
    --line: #dfe7e9;
    --surface: #ffffff;
    --background: #f4f7f7;
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --info-bg: #eef8fa;
    --radius: 22px;
    --shadow:
        0 20px 60px rgba(4, 45, 57, .10);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--ink);
    background: var(--background);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    color: #8dd7d7;
}

.eyebrow.dark {
    color: var(--teal);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--teal);
    color: white;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -.03em;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.brand-name {
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .07em;
}

.brand-subtitle {
    margin-top: 5px;
    font-size: 11px;
    opacity: .67;
    letter-spacing: .05em;
}

.brand-light {
    color: white;
}

.brand-dark {
    color: var(--navy);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
}

.login-hero {
    position: relative;
    min-height: 100vh;
    padding: 48px 7vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    color: white;

    background:
        linear-gradient(
            145deg,
            rgba(5,46,58,.96),
            rgba(7,59,76,.90) 55%,
            rgba(10,135,145,.74)
        );
}

.login-hero::before,
.login-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.login-hero::before {
    width: 600px;
    height: 600px;
    right: -250px;
    bottom: -180px;
    border: 1px solid rgba(255,255,255,.12);
    transform: rotate(25deg);
}

.login-hero::after {
    width: 420px;
    height: 600px;
    right: -80px;
    bottom: -280px;
    border: 1px solid rgba(255,255,255,.10);
    transform: rotate(25deg);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
    padding-bottom: 9vh;
}

.hero-copy h1 {
    margin: 18px 0;
    font-size: clamp(50px, 5vw, 82px);
    line-height: .98;
    letter-spacing: -.055em;
}

.hero-copy p {
    max-width: 500px;
    margin: 0;
    color: rgba(255,255,255,.75);
    font-size: 18px;
    line-height: 1.65;
}

.login-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 55px max(7vw, 45px) 25px;
    background: #f7f9f9;
}

.login-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
}

.mobile-brand {
    display: none;
}

.login-heading {
    margin-bottom: 32px;
}

.login-heading h2 {
    margin: 9px 0 7px;
    color: var(--navy);
    font-size: 42px;
    letter-spacing: -.04em;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
}

.form-stack {
    display: grid;
    gap: 20px;
}

.form-stack label {
    display: grid;
    gap: 8px;
}

.form-stack label > span {
    font-size: 13px;
    font-weight: 800;
    color: #45575e;
}

.form-stack input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    background: white;
    color: var(--ink);
    transition: .2s;
}

.form-stack input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(10,135,145,.09);
}

.form-stack input:disabled {
    background: #f1f4f4;
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    font-weight: 800;
    transition: transform .15s, opacity .15s;
}

.button:not(:disabled):hover {
    transform: translateY(-1px);
}

.button-primary {
    color: white;
    background: var(--navy);
}

.button-secondary {
    color: var(--navy);
    background: var(--teal-light);
}

.button-full {
    width: 100%;
    min-height: 56px;
}

.register-link {
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.register-link a {
    margin-left: 5px;
    color: var(--teal);
    font-weight: 900;
}

.footer-note {
    text-align: center;
    font-size: 11px;
    color: #a2adb1;
}

.alert {
    margin: 0 0 22px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-error {
    color: var(--danger);
    background: var(--danger-bg);
}

.alert-info {
    color: var(--navy);
    background: var(--info-bg);
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    min-height: 82px;
    padding: 14px clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    background: white;
    border-bottom: 1px solid var(--line);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-text {
    display: grid;
    text-align: right;
}

.user-text strong {
    font-size: 13px;
}

.user-text span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.logout-link,
.back-link {
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--teal-light);
    color: var(--navy);
}

.dashboard {
    padding: 34px clamp(20px, 5vw, 72px) 70px;
}

.dashboard-hero {
    min-height: 270px;
    padding: clamp(32px, 5vw, 58px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 30px;
    color: white;

    background:
        linear-gradient(
            120deg,
            var(--navy-deep),
            var(--navy) 60%,
            #0a747e
        );
}

.dashboard-hero h1 {
    margin: 12px 0 8px;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -.045em;
}

.dashboard-hero p {
    margin: 0;
    color: rgba(255,255,255,.72);
}

.hero-building {
    width: min(35%, 350px);
    opacity: .25;
}

.building-line {
    height: 120px;
    border: 2px solid white;
    transform: skewY(-7deg);
}

.building-line.small {
    width: 75%;
    height: 80px;
    margin: -55px 0 0 50px;
}

.building-line.tiny {
    width: 50%;
    height: 55px;
    margin: -35px 0 0 110px;
}

.services-section {
    margin-top: 48px;
}

.section-heading h2 {
    margin: 7px 0 22px;
    color: var(--navy);
    font-size: 30px;
    letter-spacing: -.03em;
}

.service-grid {
    display: grid;
    grid-template-columns: minmax(280px, 480px);
    gap: 20px;
}

.service-card {
    padding: 25px;
    display: grid;
    grid-template-columns: 58px 1fr 30px;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: 0 8px 30px rgba(7,59,76,.04);
    transition: .2s;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.service-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: var(--teal);
    font-size: 29px;
    font-weight: 500;
}

.service-content h3 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 18px;
}

.service-content p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.service-arrow {
    color: var(--teal);
    font-size: 24px;
}

.simple-page {
    min-height: 100vh;
    padding: 45px 20px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(180deg, #f4f8f8, #eef3f3);
}

.simple-card {
    width: min(100%, 570px);
    padding: clamp(28px, 5vw, 50px);
    border-radius: 26px;
    background: white;
    box-shadow: var(--shadow);
}

.standalone-brand {
    margin: 28px 0 45px;
}

.simple-card h1,
.content-page h1 {
    margin: 8px 0 10px;
    color: var(--navy);
    font-size: clamp(34px, 5vw, 48px);
    letter-spacing: -.045em;
}

.lead {
    max-width: 650px;
    margin: 0 0 30px;
    color: var(--muted);
    line-height: 1.65;
}

.preview-form {
    margin: 32px 0;
}

.username-preview {
    padding: 15px;
    display: grid;
    gap: 4px;
    border-radius: 12px;
    background: var(--teal-light);
}

.username-preview span {
    color: var(--muted);
    font-size: 11px;
}

.username-preview strong {
    color: var(--navy);
}

.small-note {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.back-link.bottom {
    display: block;
    margin-top: 25px;
    text-align: center;
}

.content-page {
    padding: 55px clamp(20px, 7vw, 110px) 80px;
}

.search-card {
    max-width: 760px;
    height: 64px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: white;
    box-shadow: 0 8px 30px rgba(7,59,76,.04);
}

.search-card input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-icon {
    color: var(--teal);
    font-size: 25px;
}

.empty-state {
    max-width: 760px;
    margin-top: 25px;
    padding: 60px 25px;
    text-align: center;
    border: 1px dashed #ccd8da;
    border-radius: 20px;
    color: var(--muted);
}

.empty-state h3 {
    color: var(--navy);
}

.empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--teal-light);
    color: var(--teal);
    font-size: 28px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(230px, 1fr)
    );
    gap: 20px;
}

.admin-card {
    min-height: 290px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
}

.admin-card h3 {
    margin: 20px 0 8px;
    color: var(--navy);
}

.admin-card p {
    min-height: 65px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.admin-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--teal-light);
    color: var(--teal);
    font-weight: 900;
}

.coming {
    margin-top: 10px;
    color: #a3adaf;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
}


@media (max-width: 850px) {

    .login-page {
        display: block;
    }

    .login-hero {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 30px 22px;
    }

    .mobile-brand {
        margin-bottom: 65px;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--navy);
    }

    .login-heading h2 {
        font-size: 36px;
    }

    .topbar {
        min-height: 70px;
        padding: 12px 18px;
    }

    .topbar .brand-subtitle {
        display: none;
    }

    .topbar .brand-name {
        font-size: 15px;
    }

    .topbar .brand-mark {
        width: 38px;
        height: 38px;
    }

    .user-text {
        display: none;
    }

    .dashboard {
        padding: 20px 16px 55px;
    }

    .dashboard-hero {
        min-height: 230px;
        padding: 30px 25px;
        border-radius: 22px;
    }

    .dashboard-hero h1 {
        font-size: 38px;
    }

    .hero-building {
        display: none;
    }

    .services-section {
        margin-top: 34px;
    }

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

    .service-card {
        padding: 20px;
    }

    .content-page {
        padding: 35px 18px 60px;
    }

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

    .admin-card {
        min-height: 0;
    }

}


@media (max-width: 430px) {

    .login-panel {
        padding-left: 18px;
        padding-right: 18px;
    }

    .mobile-brand {
        margin-bottom: 50px;
    }

    .service-card {
        grid-template-columns: 52px 1fr 20px;
        gap: 14px;
    }

    .service-icon {
        width: 52px;
        height: 52px;
    }

}


/* ==========================================================
   I TEATRI - PDF IMPORT
   ========================================================== */

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.pdf-upload-card {
    margin-top: 24px;
}

.form-help {
    margin: -4px 0 4px;
    color: #64748b;
    font-size: .88rem;
}

.import-result {
    margin-top: 20px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e6f7f7;
    color: #075e67;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.import-details {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.import-details > div {
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.import-details dt {
    margin-bottom: 4px;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.import-details dd {
    margin: 0;
    color: #172033;
    font-weight: 600;
}

.hash-value {
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo,
        Monaco, Consolas, monospace;
    font-size: .78rem;
}

.import-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.import-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.import-list-row:last-child {
    border-bottom: 0;
}

.import-list-row div {
    min-width: 0;
}

.import-list-row strong {
    display: block;
    overflow-wrap: anywhere;
}

.import-list-row div > span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: .8rem;
}

input[type="file"] {
    width: 100%;
}

@media (max-width: 640px) {
    .import-list-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
