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

:root{
    --ink:#111;
    --paper:#f7f5f0;
    --line:#dedad1;
    --muted:#746f67;
    --lime:#d8ff3e;
    --pink:#ff4d73
}

*{
    box-sizing:border-box
}

html{
    overflow-x:hidden;
}

body{
    margin:0;
    background:var(--paper);
    font-family:Manrope,Arial;
    color:var(--ink);
    overflow-x:hidden;
}

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


/* =========================================================
   HEADER / NAVBAR
   ========================================================= */

header{
    height:72px;
    padding:0 max(24px,calc((100% - 1160px)/2));
    display:flex;
    align-items:center;
    gap:45px;
    border-bottom:1px solid var(--line);
    background:#fbfaf7;
    position:sticky;
    top:0;
    z-index:1000;
}

.brand{
    font:800 24px 'DM Mono';
    letter-spacing:-2px;
    flex:0 0 auto;
}

.logout-link{
    color:var(--pink)!important;
}

.brand i{
    font-style:normal;
    display:inline-grid;
    place-items:center;
    width:27px;
    height:27px;
    border-radius:50%;
    background:var(--lime);
    font-size:16px
}


/* =========================================================
   NAVBAR DESKTOP
   ========================================================= */

header .desktop-nav{
    display:flex;
    gap:26px;
    min-width:0;
}

nav a,
.right{
    font-size:13px;
    font-weight:700;
    color:var(--muted)
}

nav .on,
nav a:hover{
    color:var(--ink)
}

.right{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:17px;
    flex:0 0 auto;
}

.btn{
    display:inline-block;
    border:0;
    border-radius:5px;
    background:var(--ink);
    color:white;
    padding:11px 16px;
    font:700 13px Manrope;
    cursor:pointer
}

.btn:hover{
    background:#333
}

.btn.lime{
    background:var(--lime);
    color:var(--ink)
}

.btn.small{
    padding:8px 12px
}

.admin-badge{
    font:11px 'DM Mono';
    text-transform:uppercase;
    color:#fff;
    background:var(--pink);
    padding:6px 8px;
    border-radius:4px
}


/* =========================================================
   HAMBURGER
   ========================================================= */

.menu-toggle,
.mobile-menu{
    display:none;
}


/* =========================================================
   MAIN
   ========================================================= */

main{
    width:min(1160px,calc(100% - 42px));
    margin:auto;
    min-height:calc(100vh - 72px);
    padding:42px 0 70px
}

.notice{
    padding:13px 16px;
    border-radius:5px;
    margin-bottom:20px;
    font-size:14px
}

.success{
    background:#e5f6bd
}

.error{
    background:#ffe0e6
}

.eyebrow,
.role{
    font:700 11px 'DM Mono';
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--pink)
}

h1{
    font-size:45px;
    letter-spacing:-.07em;
    line-height:1;
    margin:8px 0 18px
}

.hero{
    display:grid;
    grid-template-columns:1.2fr .8fr;
    gap:40px;
    border-bottom:1px solid var(--line);
    padding:25px 0 55px
}

.hero h1{
    font-size:clamp(45px,6vw,77px)
}

.hero h1 em{
    font-style:normal;
    background:var(--lime)
}

p{
    line-height:1.6
}

.muted{
    color:var(--muted);
    font-size:14px
}

.hero-card,
.side,
.card,
.post,
.opportunity,
.form{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px
}

.hero-card{
    background:var(--ink);
    color:#fff;
    padding:28px;
    align-self:end
}

.hero-card b{
    display:block;
    color:var(--lime);
    font-size:45px
}

.grid{
    display:grid;
    grid-template-columns:1.7fr .8fr;
    gap:30px
}

.heading{
    display:flex;
    justify-content:space-between;
    align-items:end;
    margin:36px 0 17px
}

.heading h2{
    margin:0;
    font-size:24px;
    letter-spacing:-.05em
}

.feed{
    display:grid;
    gap:13px
}

.post{
    padding:21px
}

.post-top,
.mini{
    display:flex;
    gap:11px;
    align-items:center
}

.avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#eae5db;
    display:grid;
    place-items:center;
    font-weight:800;
    background-size:cover;
    background-position:center
}

.avatar.photo{
    color:transparent
}

.post small,
.mini small{
    color:var(--muted);
    font-size:11px
}

.post p{
    font-size:14px;
    margin:18px 0
}

.post-actions{
    padding-top:13px;
    border-top:1px solid #eee;
    font-size:12px;
    color:var(--muted)
}

.side{
    padding:20px;
    margin-bottom:13px
}

.side h3{
    font-size:16px;
    margin:0 0 12px
}

.mini{
    padding:9px 0;
    border-top:1px solid #eee;
    font-size:13px
}

.mini:first-of-type{
    border:0
}

.mini .avatar{
    width:31px;
    height:31px;
    font-size:10px
}

.chip,
.filter{
    display:inline-block;
    border-radius:20px;
    padding:6px 9px;
    background:#ece8df;
    font:11px 'DM Mono';
    margin:3px 2px 0 0
}

.filters{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin:20px 0 26px
}

.filter{
    border:1px solid var(--line);
    background:transparent;
    font-family:Manrope;
    font-weight:700
}

.filter.on,
.filter:hover{
    background:var(--ink);
    color:#fff
}

.directory{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px
}

.card{
    padding:20px
}

.card .avatar{
    width:54px;
    height:54px;
    margin-bottom:14px
}

.card h3{
    margin:4px 0;
    font-size:17px
}

.card p{
    font-size:13px;
    color:var(--muted)
}

.opps{
    display:grid;
    gap:12px
}

.opportunity{
    padding:21px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:20px
}

.opportunity h3{
    margin:7px 0;
    font-size:18px
}

.opportunity p{
    font-size:13px;
    color:var(--muted)
}

.opportunity aside{
    text-align:right;
    font-size:12px;
    color:var(--muted)
}

.form{
    max-width:620px;
    margin:25px auto;
    padding:27px
}

.field{
    display:block;
    margin:14px 0;
    font-weight:700;
    font-size:13px
}

.field input,
.field textarea,
.field select{
    display:block;
    width:100%;
    margin-top:6px;
    padding:11px;
    border:1px solid var(--line);
    border-radius:5px;
    background:#fff;
    font:14px Manrope
}

.field textarea{
    min-height:105px;
    resize:vertical
}

.form .btn{
    width:100%;
    margin-top:10px
}

.profile-head{
    display:flex;
    gap:20px;
    align-items:center;
    border-bottom:1px solid var(--line);
    padding:10px 0 30px
}

.profile-head .avatar{
    width:90px;
    height:90px;
    font-size:24px
}

.profile-head h1{
    font-size:38px;
    margin:2px 0
}

.profile-head p{
    margin:4px 0
}

.profile-actions{
    margin-left:auto;
    display:flex;
    gap:8px
}

.profile-grid{
    display:grid;
    grid-template-columns:1fr 2fr;
    gap:30px;
    margin-top:30px
}

.links{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:10px;
    font-size:13px;
    font-weight:700;
    text-decoration:underline
}

.message{
    padding:15px;
    margin-bottom:10px;
    border:1px solid var(--line);
    border-radius:7px;
    background:#fff
}

.stats{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin:22px 0
}

.stat{
    background:var(--ink);
    color:white;
    border-radius:7px;
    padding:19px;
    font-size:12px
}

.stat b{
    display:block;
    color:var(--lime);
    font-size:31px
}

.table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border:1px solid var(--line);
    font-size:12px
}

.table th,
.table td{
    padding:12px;
    text-align:left;
    border-bottom:1px solid var(--line)
}

.table th{
    font:11px 'DM Mono';
    color:var(--muted)
}

.inline{
    display:inline
}


/* =========================================================
   FOOTER
   ========================================================= */

footer{
    background:var(--ink);
    color:white;
    padding:37px max(24px,calc((100% - 1160px)/2));
    display:flex;
    align-items:center;
    gap:25px
}

footer p,
footer small{
    color:#aaa;
    font-size:12px
}


/* =========================================================
   MOBILE - BASE
   ========================================================= */

@media(max-width:720px){

    header{
        height:60px;
        padding:0 15px;
        gap:0;
        overflow:visible;
        position:sticky;
        top:0;
        z-index:1000;
    }

    header .brand{
        flex:0 0 auto;
        font-size:21px;
    }

    header .brand i{
        width:25px;
        height:25px;
        font-size:14px;
    }

    header .desktop-nav{
        display:none;
    }

    header > .right{
        display:none;
    }

    .menu-toggle{
        margin-left:auto;
        width:42px;
        height:42px;
        padding:8px;
        border:0;
        outline:0;
        background:transparent;
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        gap:5px;
        cursor:pointer;
        z-index:1002;
        -webkit-tap-highlight-color:transparent;
    }

    .menu-toggle span{
        display:block;
        width:25px;
        height:2px;
        background:var(--ink);
        border-radius:2px;
        transition:
            transform .25s ease,
            opacity .2s ease;
    }

    .menu-toggle.active span:nth-child(1){
        transform:translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2){
        opacity:0;
    }

    .menu-toggle.active span:nth-child(3){
        transform:translateY(-7px) rotate(-45deg);
    }

    .mobile-menu{
        position:absolute;
        top:60px;
        left:0;
        right:0;
        width:100%;
        background:#fbfaf7;
        border-bottom:1px solid var(--line);
        padding:18px 15px 20px;
        display:none;
        flex-direction:column;
        box-shadow:0 10px 25px rgba(0,0,0,.08);
        max-height:calc(100dvh - 60px);
        overflow-y:auto;
        z-index:1001;
    }

    .mobile-menu.open{
        display:flex;
    }

    .mobile-menu nav{
        display:flex;
        flex-direction:column;
        gap:0;
        width:100%;
    }

    .mobile-menu nav a{
        display:block;
        width:100%;
        padding:14px 5px;
        border-bottom:1px solid var(--line);
        font-size:15px;
        font-weight:700;
        color:var(--muted);
    }

    .mobile-menu nav a:first-child{
        border-top:1px solid var(--line);
    }

    .mobile-menu nav a:hover{
        color:var(--ink);
    }

    .mobile-menu nav a.on{
        color:var(--ink);
        position:relative;
    }

    .mobile-menu nav a.on::before{
        content:"";
        display:inline-block;
        width:7px;
        height:7px;
        margin-right:9px;
        border-radius:50%;
        background:var(--lime);
        vertical-align:middle;
    }

    .mobile-account{
        display:flex;
        flex-direction:column;
        gap:0;
        margin-top:15px;
        padding-top:5px;
        border-top:2px solid var(--ink);
    }

    .mobile-account > a{
        display:block;
        padding:13px 5px;
        border-bottom:1px solid var(--line);
        font-size:13px;
        font-weight:700;
        color:var(--muted);
    }

    .mobile-account > a:hover{
        color:var(--ink);
    }

    .mobile-account .admin-badge{
        display:inline-block;
        width:max-content;
        margin:10px 0;
        color:#fff;
    }

    .mobile-account .btn{
        display:inline-block;
        width:max-content;
        margin-top:12px;
        color:#fff;
        border-bottom:0;
    }

    main{
        width:calc(100% - 30px);
        padding-top:20px;
        padding-bottom:25px;
    }

    .hero,
    .grid,
    .profile-grid{
        grid-template-columns:1fr
    }

    .directory{
        grid-template-columns:1fr 1fr
    }

    .opportunity{
        grid-template-columns:1fr
    }

    .opportunity aside{
        text-align:left
    }

    .profile-head{
        align-items:flex-start;
        flex-wrap:wrap
    }

    .profile-actions{
        margin:0
    }

    .stats{
        grid-template-columns:1fr 1fr
    }

    footer{
        display:block
    }
}


/* =========================================================
   MAP / EVENTS / STUDIOS
   ========================================================= */

.map{
    height:500px;
    width:100%;
    border:1px solid var(--line);
    border-radius:8px;
    z-index:1
}

.event-list,
.studio-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;
    margin-top:22px
}

.event-card,
.studio-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden
}

.event-date{
    background:var(--lime);
    padding:13px 17px;
    font:700 13px 'DM Mono';
    text-transform:uppercase
}

.event-card section,
.studio-card{
    padding:17px
}

.event-card h3,
.studio-card h3{
    font-size:18px;
    margin:8px 0
}

.event-card p,
.studio-card p{
    font-size:13px;
    color:var(--muted);
    margin:7px 0
}

.event-card .btn,
.studio-card .btn{
    margin-top:11px
}

.price{
    font-size:24px;
    font-weight:800;
    letter-spacing:-.05em
}

.price small,
.location{
    font-size:12px;
    color:var(--muted);
    font-weight:600
}

@media(max-width:720px){

    .event-list,
    .studio-grid{
        grid-template-columns:1fr
    }

    .map{
        height:380px
    }
}


/* =========================================================
   VERIFIED / ROLE CHECKS
   ========================================================= */

.verified{
    display:inline-grid;
    place-items:center;
    background:#286bd9;
    color:#fff;
    border-radius:50%;
    width:16px;
    height:16px;
    font-size:10px;
    vertical-align:middle;
    margin-left:4px
}

.role-checks{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
    margin-top:8px
}

.role-check{
    font-size:12px;
    font-weight:600;
    padding:9px;
    border:1px solid var(--line);
    border-radius:5px;
    background:#fff
}

.role-check input{
    width:auto;
    display:inline;
    margin:0 6px 0 0
}

@media(max-width:720px){

    .role-checks{
        grid-template-columns:1fr
    }
}


/* =========================================================
   TABS / MEDIA / SEARCH
   ========================================================= */

.tabs{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin:18px 0
}

.tabs a{
    border:1px solid var(--line);
    padding:8px 11px;
    border-radius:5px;
    font-size:12px;
    font-weight:700
}

.tabs a:hover{
    background:var(--ink);
    color:#fff
}

.media-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px
}

.media{
    padding:16px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:7px
}

.media b{
    display:block;
    font-size:14px
}

.media small{
    color:var(--muted)
}

.social{
    display:flex;
    gap:12px;
    align-items:center;
    border-top:1px solid #eee;
    padding-top:12px;
    font-size:12px;
    color:var(--muted)
}

.social button{
    border:0;
    background:none;
    color:inherit;
    font:inherit;
    cursor:pointer;
    padding:0
}

.search{
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    padding:15px;
    display:grid;
    grid-template-columns:2fr 1fr 1fr auto;
    gap:9px
}

.search input,
.search select{
    border:1px solid var(--line);
    border-radius:5px;
    padding:10px;
    font:13px Manrope
}

.booking{
    border-top:1px solid var(--line);
    padding-top:12px;
    margin-top:15px
}

.booking input{
    border:1px solid var(--line);
    padding:8px;
    border-radius:4px;
    font:12px Manrope
}

.dash-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px
}

.dash-card{
    background:#fff;
    border:1px solid var(--line);
    padding:20px;
    border-radius:8px
}

.dash-card b{
    display:block;
    font-size:30px
}

.notification{
    display:block;
    padding:15px;
    border:1px solid var(--line);
    background:#fff;
    border-radius:7px;
    margin-bottom:8px
}

.notification.unread{
    border-left:4px solid var(--lime)
}

@media(max-width:720px){

    .media-grid,
    .dash-grid{
        grid-template-columns:1fr
    }

    .search{
        grid-template-columns:1fr
    }
}


/* =========================================================
   CHAT - DESKTOP
   ========================================================= */

.messages-layout{
    display:grid;
    grid-template-columns:300px minmax(0,1fr);
    gap:20px;
    align-items:stretch;
    width:100%;
    height:min(680px,calc(100vh - 155px));
    min-height:520px;
}

.messages-layout > .side{
    margin:0;
    min-width:0;
    min-height:0;
    overflow:hidden;
}

.conversations{
    display:flex;
    flex-direction:column;
    min-width:0;
}

.conversations h3{
    flex:0 0 auto;
}

.conversation-list{
    min-width:0;
    min-height:0;
    overflow-y:auto;
    padding-right:4px;
}

.conversation-list .mini{
    border-radius:6px;
    padding:10px 8px;
    margin:2px 0;
    min-width:0;
}

.conversation-list .mini:hover,
.conversation-list .mini.active{
    background:var(--paper);
}

.conversation-info{
    min-width:0;
    overflow:hidden;
}

.conversation-info b,
.conversation-info small{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    display:inline-block;
    max-width:100%;
}


/* =========================================================
   CHAT CARD
   ========================================================= */

.chat-card{
    min-width:0;
    min-height:0;
    width:100%;
    background:#fff;
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}


/* =========================================================
   CHAT HEADER
   ========================================================= */

.chat-header{
    flex:0 0 auto;
    min-height:76px;
    padding:14px 18px;
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    background:#fff;
    min-width:0;
}

.chat-user{
    display:flex;
    align-items:center;
    gap:11px;
    min-width:0;
    flex:1 1 auto;
}

.chat-user .avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
}

.chat-user > div:last-child{
    min-width:0;
    overflow:hidden;
}

.chat-user h2{
    margin:0;
    font-size:18px;
    letter-spacing:-.04em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.chat-user small{
    color:var(--muted);
    font-size:11px;
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.chat-status{
    flex:0 0 auto;
    font:10px 'DM Mono';
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--muted);
    white-space:nowrap;
}


/* =========================================================
   CHAT MESSAGES
   ========================================================= */

.chat-messages{
    flex:1 1 auto;
    min-width:0;
    min-height:0;
    width:100%;
    overflow-y:auto;
    overflow-x:hidden;
    padding:20px;
    background:#fbfaf7;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
}

.chat-message{
    display:flex;
    width:100%;
    min-width:0;
    margin:0 0 10px;
}

.chat-message.theirs{
    justify-content:flex-start;
}

.chat-message.mine{
    justify-content:flex-end;
}

.message-bubble{
    max-width:min(72%,560px);
    min-width:0;
    padding:10px 13px 8px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#fff;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.chat-message.mine .message-bubble{
    background:var(--lime);
    border-color:var(--lime);
}

.message-author{
    font-size:10px;
    font-weight:800;
    margin-bottom:3px;
    color:var(--muted);
    overflow:hidden;
    text-overflow:ellipsis;
}

.chat-message.mine .message-author{
    color:#555;
}

.message-body{
    font-size:13px;
    line-height:1.55;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.message-time{
    margin-top:5px;
    text-align:right;
    font:9px 'DM Mono';
    color:var(--muted);
}


/* =========================================================
   CHAT FORM
   ========================================================= */

.chat-form{
    flex:0 0 auto;
    width:100%;
    min-width:0;
    display:flex;
    align-items:flex-end;
    gap:9px;
    padding:12px;
    border-top:1px solid var(--line);
    background:#fff;
}

.chat-form textarea{
    flex:1 1 auto;
    width:auto;
    min-width:0;
    min-height:43px;
    max-height:130px;
    resize:none;
    overflow-y:auto;
    padding:11px 12px;
    margin:0;
    border:1px solid var(--line);
    border-radius:6px;
    background:#fff;
    font:13px Manrope;
    line-height:1.4;
    outline:none;
}

.chat-form textarea:focus{
    border-color:#aaa;
}

.chat-send{
    flex:0 0 auto;
    min-height:43px;
    white-space:nowrap;
}

.chat-send:disabled{
    opacity:.55;
    cursor:wait;
}

.chat-empty{
    width:100%;
    margin:auto;
    text-align:center;
    padding:30px;
}

.chat-empty h3{
    margin:0 0 8px;
}


/* =========================================================
   SCROLLBAR DISCRETA
   ========================================================= */

.chat-messages::-webkit-scrollbar,
.conversation-list::-webkit-scrollbar{
    width:7px;
}

.chat-messages::-webkit-scrollbar-thumb,
.conversation-list::-webkit-scrollbar-thumb{
    background:#d5d0c7;
    border-radius:20px;
}

.chat-messages::-webkit-scrollbar-track,
.conversation-list::-webkit-scrollbar-track{
    background:transparent;
}


/* =========================================================
   CHAT MOBILE
   ========================================================= */

@media(max-width:720px){

    /*
       MOBILE CHAT
       -----------------------------------------------------
       Layout:
       1. Box "Conversazioni" sempre visibile
       2. Chat sotto
       3. La chat prende tutto lo spazio rimanente
    */

    .messages-layout{
        display:flex;
        flex-direction:column;

        width:100%;

        height:calc(100dvh - 105px);

        min-height:0;

        gap:10px;

        margin:0;
    }


    /* =====================================================
       BOX CONVERSAZIONI MOBILE
       ===================================================== */

    .messages-layout > .conversations{
        display:flex;

        flex:0 0 clamp(120px,22dvh,160px);

        width:100%;

        min-width:0;
        min-height:0;

        max-height:none;

        margin:0;

        padding:13px;

        overflow:hidden;

        border-radius:8px;
    }

    .conversations h3{
        flex:0 0 auto;

        margin:0 0 9px;

        font-size:15px;
    }

    .conversation-list{
        flex:1 1 auto;

        width:100%;

        min-width:0;
        min-height:0;

        overflow-y:auto;
        overflow-x:hidden;

        padding-right:2px;
    }

    .conversation-list .mini{
        width:100%;

        min-width:0;

        padding:8px 6px;

        margin:1px 0;

        border-radius:6px;
    }

    .conversation-list .mini .avatar{
        width:30px;
        height:30px;

        flex:0 0 30px;
    }

    .conversation-info{
        flex:1 1 auto;

        min-width:0;

        max-width:100%;
    }

    .conversation-info b,
    .conversation-info small{
        max-width:100%;
    }


    /* =====================================================
       CHAT CARD MOBILE
       ===================================================== */

    .chat-card{
        flex:1 1 auto;

        width:100%;

        height:auto;

        min-width:0;
        min-height:0;

        display:flex;
        flex-direction:column;

        border-radius:8px;

        overflow:hidden;
    }


    /* =====================================================
       HEADER CHAT MOBILE
       ===================================================== */

    .chat-header{
        flex:0 0 auto;

        min-height:64px;

        height:auto;

        padding:10px 12px;

        gap:10px;

        overflow:hidden;
    }

    .chat-user{
        flex:1 1 auto;

        min-width:0;

        gap:9px;
    }

    .chat-user .avatar{
        width:40px;
        height:40px;

        flex:0 0 40px;
    }

    .chat-user > div:last-child{
        min-width:0;

        overflow:hidden;
    }

    .chat-user h2{
        max-width:100%;

        font-size:16px;

        white-space:nowrap;

        overflow:hidden;

        text-overflow:ellipsis;
    }

    .chat-user small{
        max-width:100%;

        font-size:10px;

        white-space:nowrap;

        overflow:hidden;

        text-overflow:ellipsis;
    }

    .chat-status{
        flex:0 0 auto;

        font-size:9px;

        white-space:nowrap;
    }


    /* =====================================================
       AREA MESSAGGI MOBILE
       ===================================================== */

    .chat-messages{
        flex:1 1 auto;

        min-width:0;
        min-height:0;

        width:100%;

        padding:14px 10px;

        overflow-x:hidden;
        overflow-y:auto;

        -webkit-overflow-scrolling:touch;

        overscroll-behavior:contain;
    }


    /* =====================================================
       MESSAGGI MOBILE
       ===================================================== */

    .chat-message{
        width:100%;

        min-width:0;

        display:flex;

        margin:0 0 8px;
    }

    .message-bubble{
        max-width:84%;

        min-width:0;

        padding:9px 11px 7px;

        border-radius:9px;

        overflow-wrap:anywhere;

        word-break:break-word;
    }

    .message-author{
        font-size:9px;

        margin-bottom:3px;

        overflow:hidden;

        text-overflow:ellipsis;
    }

    .message-body{
        font-size:13px;

        line-height:1.5;

        overflow-wrap:anywhere;

        word-break:break-word;
    }

    .message-time{
        margin-top:4px;

        font-size:8px;
    }


    /* =====================================================
       FORM INVIO MOBILE
       ===================================================== */

    .chat-form{
        flex:0 0 auto;

        width:100%;

        min-width:0;

        display:flex;

        align-items:flex-end;

        gap:7px;

        padding:8px;

        padding-bottom:calc(8px + env(safe-area-inset-bottom));

        border-top:1px solid var(--line);

        background:#fff;
    }

    .chat-form textarea{
        flex:1 1 auto;

        width:auto;

        min-width:0;

        min-height:43px;

        max-height:110px;

        padding:10px 11px;

        font-size:13px;

        line-height:1.4;

        resize:none;

        overflow-y:auto;
    }

    .chat-send{
        flex:0 0 auto;

        min-height:43px;

        padding:10px 12px;

        white-space:nowrap;
    }


    /* =====================================================
       CHAT VUOTA
       ===================================================== */

    .chat-empty{
        width:100%;

        margin:auto;

        padding:25px 18px;

        text-align:center;
    }

    .chat-empty h3{
        margin:0 0 8px;

        font-size:18px;
    }

    .chat-empty p{
        font-size:13px;
    }
}
.market-grid,.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.service-card,.project-card{background:#fff;border:1px solid var(--line);border-radius:9px;padding:20px}.service-card h3,.project-card h3{margin:7px 0;font-size:19px}.service-meta{display:flex;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin:12px 0}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.calendar-day{min-height:110px;border:1px solid var(--line);background:#fff;border-radius:6px;padding:8px;font-size:12px}.calendar-day b{display:block;margin-bottom:6px}.calendar-event{display:block;background:var(--lime);border-radius:4px;padding:4px;margin:3px 0;font-size:10px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #eee;font-size:13px}.task.done{text-decoration:line-through;color:var(--muted)}.project-head{display:flex;justify-content:space-between;gap:16px;align-items:start;border-bottom:1px solid var(--line);padding-bottom:22px}@media(max-width:720px){.market-grid,.project-grid{grid-template-columns:1fr}.calendar-grid{grid-template-columns:repeat(7,minmax(45px,1fr));overflow:auto}.calendar-day{min-height:75px;font-size:10px}}
.theme-toggle{border:1px solid var(--line);background:transparent;border-radius:50%;width:30px;height:30px;cursor:pointer;color:inherit}.dark{--paper:#111;--ink:#f7f5f0;--line:#343434;--muted:#b7b1aa;background:#111}.dark header{background:#151515}.dark .post,.dark .side,.dark .card,.dark .form,.dark .service-card,.dark .project-card,.dark .calendar-day,.dark .message,.dark .studio-card,.dark .event-card{background:#1b1b1b}.dark input,.dark textarea,.dark select{background:#222;color:#fff}.dark .hero-card,.dark footer{background:#050505}.premium-card{transition:transform .2s ease,box-shadow .2s ease}.premium-card:hover{transform:translateY(-4px);box-shadow:0 16px 30px rgba(0,0,0,.12)}.release-cover{aspect-ratio:1;border-radius:8px;background:#242424 center/cover no-repeat;display:grid;place-items:center;color:var(--lime);font-size:34px;font-weight:800}.channel-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.channel-card{padding:18px;border:1px solid var(--line);border-radius:8px;background:#fff}.audio-player{width:100%;margin-top:12px}.post-media{width:100%;max-height:360px;object-fit:cover;border-radius:7px;margin-top:10px}@media(max-width:720px){.channel-grid{grid-template-columns:1fr 1fr}}


/* =========================================================
   CHAT MOBILE - TELEFONI MOLTO PICCOLI
   ========================================================= */

@media(max-width:380px){

    .messages-layout{
        height:calc(100dvh - 100px);

        gap:8px;
    }

    .messages-layout > .conversations{
        flex-basis:115px;

        padding:11px;
    }

    .conversations h3{
        font-size:14px;

        margin-bottom:7px;
    }

    .conversation-list .mini{
        padding:7px 5px;
    }

    .conversation-list .mini .avatar{
        width:28px;
        height:28px;

        flex-basis:28px;
    }

    .chat-header{
        padding:9px 10px;

        min-height:60px;
    }

    .chat-user .avatar{
        width:36px;
        height:36px;

        flex-basis:36px;
    }

    .chat-user h2{
        font-size:15px;
    }

    .chat-status{
        font-size:8px;
    }

    .chat-messages{
        padding:12px 8px;
    }

    .message-bubble{
        max-width:88%;

        padding:8px 10px 6px;
    }

    .message-body{
        font-size:12px;
    }

    .chat-form{
        gap:6px;

        padding:7px;

        padding-bottom:calc(7px + env(safe-area-inset-bottom));
    }

    .chat-form textarea{
        min-height:41px;

        padding:9px 10px;

        font-size:12px;
    }

    .chat-send{
        min-height:41px;

        padding:9px 10px;

        font-size:12px;
    }
}
