@font-face{font-family:'Staatliches';font-style:normal;font-weight:400 700;font-display:swap;src:url('/assets/fonts/Staatliches-Regular.ttf') format('truetype');}
@font-face{font-family:'Gerbera';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/Gerbera.ttf') format('truetype');}
@font-face{font-family:'Gerbera';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/Gerbera-Bold.ttf') format('truetype');}
@font-face{font-family:'Arvo';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/Arvo-Regular.ttf') format('truetype');}
@font-face{font-family:'Arvo';font-style:italic;font-weight:400;font-display:swap;src:url('/assets/fonts/Arvo-Italic.ttf') format('truetype');}

:root{
  --teal-950:#002A38;
  --teal-700:#0B5369;
  --teal-600:#006C81;
  --gold-700:#8A6A28;
  --gold-600:#A37E32;
  --gold-500:#C49C48;
  --gold-300:#E3CE96;
  --white:#FFFFFF;
  --cream:#F6F1E7;
  --paper-cool:#EBEEE7;
  --ink:#14252B;
  --line:#DCD2BE;
  --danger:#B5482F;
  --success:#3E8E6F;
  --font-display:'Staatliches','Arial Narrow',sans-serif;
  --font-body:'Gerbera',system-ui,-apple-system,sans-serif;
  --font-quote:'Arvo',Georgia,serif;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{background:var(--teal-950); color:var(--ink); font-family:var(--font-body); -webkit-font-smoothing:antialiased;}
h1,h2,h3{font-family:var(--font-display); font-weight:400; letter-spacing:.06em; text-transform:uppercase; margin:0;}
a{color:inherit;}
button{font-family:inherit; cursor:pointer;}

.screen{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(196,156,72,.18), transparent 55%),
    linear-gradient(180deg, var(--teal-700), var(--teal-950));
}
.screen .card{width:100%; max-width:412px; background:var(--white); border-radius:3px; padding:42px 38px 36px;
  box-shadow:0 40px 80px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(196,156,72,.28);}
.wordmark{display:flex; flex-direction:column; align-items:center; gap:12px; margin-bottom:6px;}
.wordmark img{width:46px; height:46px;}
.wordmark h1{font-size:24px; letter-spacing:.16em; color:var(--teal-700); text-align:center;}
.wordmark p{font-family:var(--font-body); font-size:11px; letter-spacing:.24em; text-transform:uppercase; color:var(--gold-600); margin:0; font-weight:700;}
.form{margin-top:28px; display:flex; flex-direction:column; gap:16px;}
.field label{display:block; font-family:var(--font-body); font-weight:700; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:#9a8f78; margin-bottom:6px;}
.field input{width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:2px; background:var(--cream); font-family:var(--font-body); font-size:14px; color:var(--ink);}
.field input:focus{outline:none; border-color:var(--teal-600); background:#fff;}
.btn{margin-top:6px; width:100%; padding:13px; border:none; border-radius:2px; background:var(--teal-700); color:var(--cream); font-family:var(--font-display); font-size:16px; letter-spacing:.12em; text-transform:uppercase; transition:background .15s ease;}
.btn:hover{background:var(--teal-600);}
.btn:disabled{opacity:.6; cursor:default;}
.error-msg{background:#FBEAE4; border:1px solid rgba(181,72,47,.35); color:var(--danger); font-family:var(--font-body); font-size:12.5px; padding:10px 12px; border-radius:2px;}
.foot{margin-top:18px; text-align:center; font-family:var(--font-body); font-size:11.5px; color:#a89e88;}

.app-shell{min-height:100vh; background:var(--paper-cool);}
.topbar{display:flex; align-items:center; justify-content:space-between; padding:18px 40px; border-bottom:1px solid var(--line); background:var(--white);}
.topbar .brand{display:flex; align-items:center; gap:10px;}
.topbar .brand img{width:26px; height:26px;}
.topbar .brand span{font-family:var(--font-display); font-size:16px; letter-spacing:.1em; color:var(--teal-700);}
.topbar .who{font-family:var(--font-body); font-size:13px; color:#6d6656;}
.topbar .signout{background:none; border:1px solid var(--line); border-radius:2px; padding:7px 14px; font-family:var(--font-body); font-weight:700; font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--teal-700);}
.topbar .signout:hover{border-color:var(--gold-500); color:var(--gold-700);}
.content{padding:40px; max-width:720px; margin:0 auto;}
.content h2{font-size:22px; color:var(--teal-700); margin-bottom:10px;}
.content p{font-family:var(--font-body); color:#6d6656; font-size:14px; line-height:1.6;}

/* ============================================================
   Client portal — persistent left sidebar shell
   ============================================================ */
.sidebar-shell{min-height:100vh; background:var(--paper-cool); display:flex;}
.sidebar{width:250px; height:100vh; position:sticky; top:0; overflow-y:auto; flex-shrink:0; background:var(--teal-950); display:flex; flex-direction:column; padding:26px 20px;}
.sidebar-brand{display:flex; align-items:center; gap:10px; margin-bottom:30px; text-decoration:none;}
.sidebar-brand img{width:24px; height:24px;}
.sidebar-brand span{font-family:var(--font-display); font-size:13.5px; letter-spacing:.09em; color:var(--cream);}
.sidebar-nav{display:flex; flex-direction:column; gap:4px;}
.sidebar-nav a{display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:3px; font-family:var(--font-body); font-weight:700; font-size:13.5px; color:#AEC1C6; text-decoration:none; border:1px solid transparent;}
.sidebar-nav a svg{width:17px; height:17px; flex-shrink:0;}
.sidebar-nav a:hover{color:var(--cream);}
.sidebar-nav a.active{background:rgba(196,156,72,.14); border-color:rgba(196,156,72,.4); color:var(--gold-300);}
.nav-badge{width:8px; height:8px; border-radius:50%; background:var(--gold-500); margin-left:auto; flex-shrink:0; box-shadow:0 0 0 2px rgba(196,156,72,.35);}
.sidebar-spacer{flex:1;}
.sidebar-foot{border-top:1px solid rgba(255,255,255,.14); padding-top:16px; margin-top:16px;}
.sidebar-foot .name{font-family:var(--font-body); font-weight:700; font-size:13px; color:var(--cream);}
.sidebar-foot .meta{font-family:var(--font-body); font-size:11px; color:#8CA0A6; margin-top:2px; margin-bottom:14px;}
.sidebar-foot .signout svg{width:17px; height:17px; display:none;}
.sidebar-foot .signout{width:100%; background:none; border:1px solid rgba(255,255,255,.22); border-radius:2px; padding:9px; font-family:var(--font-body); font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:#CBD8DA;}
.sidebar-foot .signout:hover{border-color:var(--gold-500); color:var(--gold-300);}
.main-area{flex:1; min-width:0;}
.main-content{padding:40px;}
.page-head{margin-bottom:26px; padding-bottom:20px; border-bottom:1px solid var(--line);}
.page-head h2{font-size:26px; color:var(--teal-700); margin-bottom:6px;}
.page-head p{font-family:var(--font-body); color:#6d6656; font-size:14px;}
/* Narrow screens: keep the sidebar on the left as a slim icon rail. */
@media (max-width:860px){
  .sidebar{width:64px; padding:16px 8px; align-items:center;}
  .sidebar-brand{margin-bottom:22px;}
  .sidebar-brand span{display:none;}
  .sidebar-brand img{width:28px; height:28px;}
  .sidebar-nav{align-items:center; gap:6px;}
  .sidebar-nav a{padding:11px; position:relative;}
  .sidebar-nav a span{display:none;}
  .sidebar-nav a svg{width:20px; height:20px;}
  .nav-badge{position:absolute; top:6px; right:6px; margin-left:0;}
  .sidebar-foot{width:100%; display:flex; justify-content:center;}
  .sidebar-foot .name, .sidebar-foot .meta{display:none;}
  .sidebar-foot .signout{width:44px; height:40px; padding:0; display:flex; align-items:center; justify-content:center;}
  .sidebar-foot .signout span{display:none;}
  .main-content{padding:22px 16px;}
}

/* shared client-portal components */
.card{background:var(--white); border:1px solid var(--line); border-radius:3px; padding:22px 26px; margin-bottom:20px; break-inside:avoid;}
.card h3{font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; font-family:var(--font-body); font-weight:700; color:#8a8270; margin-bottom:14px;}
.section-head{display:flex; align-items:baseline; justify-content:space-between; margin:30px 0 14px;}
.section-head:first-child{margin-top:0;}
.section-head h3{font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; font-family:var(--font-body); font-weight:700; color:#8a8270;}
.lib-row{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid var(--line);}
.lib-row:last-child{border-bottom:none; padding-bottom:2px;}
.lib-row .t{font-family:var(--font-body); font-weight:700; font-size:14px; color:var(--ink);}
.lib-row .kind{font-family:var(--font-body); font-size:11px; color:#9b937f; margin-top:2px; text-transform:uppercase; letter-spacing:.04em;}
.lib-row.locked .t{color:#8a9799;}
.lock-badge{display:flex; align-items:center; gap:6px; font-family:var(--font-body); font-weight:700; font-size:11px; color:#8FA5AC; flex-shrink:0;}
.lock-badge svg{width:13px; height:13px;}
.empty{font-family:var(--font-body); color:#9b937f; font-size:13px; padding:14px 0;}
.open-btn{display:inline-block; background:none; border:1px solid var(--line); border-radius:2px; padding:6px 12px; font-family:var(--font-body); font-weight:700; font-size:11.5px; color:var(--teal-700); text-decoration:none; flex-shrink:0;}
.open-btn:hover{border-color:var(--gold-500); color:var(--gold-700);}

/* ============================================================
   Men in Italy — group portal components
   ============================================================ */
.sidebar-brand span small{display:block; font-family:var(--font-body); font-weight:700; font-size:9.5px; letter-spacing:.2em; color:var(--gold-500); margin-top:2px;}
.muted{color:#9b937f; font-weight:400;}
.main-content{max-width:980px;}
.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.btn-sm{background:var(--teal-700); color:var(--cream); border:none; padding:9px 16px; border-radius:2px; font-family:var(--font-body); font-weight:700; font-size:12.5px; text-decoration:none; display:inline-flex; align-items:center; gap:6px;}
.btn-sm:hover{background:var(--teal-600);}
.btn-sm:disabled{opacity:.55; cursor:default;}
.btn-ghost{background:none; border:1px solid var(--line); color:var(--teal-700); padding:7px 13px; border-radius:2px; font-family:var(--font-body); font-weight:700; font-size:12px; text-decoration:none; display:inline-flex; align-items:center; gap:6px;}
.btn-ghost:hover{border-color:var(--gold-500); color:var(--gold-700);}
.btn-link{background:none; border:none; padding:0; font-family:var(--font-body); font-size:11.5px; font-weight:700; color:#a49c86;}
.btn-link:hover{color:var(--danger);}
.input, .textarea, .select{width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:2px; background:var(--cream); font-family:var(--font-body); font-size:14px; color:var(--ink);}
.input:focus, .textarea:focus, .select:focus{outline:none; border-color:var(--teal-600); background:#fff;}
.textarea{resize:vertical; min-height:90px; line-height:1.5;}
.form-label{display:block; font-family:var(--font-body); font-weight:700; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:#9a8f78; margin:0 0 5px;}
.form-row{margin-bottom:14px;}
.hidden{display:none !important;}

.avatar{width:34px; height:34px; border-radius:50%; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; background:var(--gold-500); color:#fff; font-family:var(--font-body); font-weight:700; font-size:13px; letter-spacing:.02em;}
.avatar.host{background:var(--teal-700); color:var(--gold-300);}

.toast{position:fixed; left:50%; bottom:24px; transform:translate(-50%, 20px); opacity:0; background:var(--teal-950); color:var(--cream); padding:11px 18px; border-radius:3px; font-family:var(--font-body); font-size:13px; z-index:100; transition:all .25s ease; box-shadow:0 10px 30px rgba(0,0,0,.25); max-width:calc(100vw - 32px);}
.toast.show{opacity:1; transform:translate(-50%, 0);}
.toast.error{background:var(--danger);}

.day-divider{display:flex; align-items:center; gap:12px; margin:18px 0 10px; font-family:var(--font-body); font-weight:700; font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:#a49c86;}
.day-divider::before, .day-divider::after{content:''; flex:1; height:1px; background:var(--line);}

/* attachments */
.attach{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:8px; padding:9px 12px; background:var(--cream); border:1px solid var(--line); border-radius:3px; font-family:var(--font-body); font-size:13px; max-width:460px;}
.attach a{color:var(--teal-700); font-weight:700; text-decoration:none; word-break:break-word;}
.attach a:hover{text-decoration:underline;}
.attach .attach-dl{margin-left:auto; font-size:11.5px;}
.attach-icon{font-family:var(--font-body); font-weight:700; font-size:9.5px; letter-spacing:.06em; background:var(--teal-700); color:var(--gold-300); padding:4px 6px; border-radius:2px;}
.attach.image{padding:0; background:none; border:none;}
.attach.image img{display:block; max-width:100%; max-height:340px; border-radius:3px; border:1px solid var(--line); background:var(--cream);}
.attach.media{flex-direction:column; align-items:stretch;}
.attach-head{display:flex; align-items:center; gap:10px; font-weight:700;}
.attach.media audio, .attach.media video{width:100%; max-height:320px;}
.attach.gone{color:#a49c86; font-style:italic;}

/* composer (chat + forum replies) */
.composer{background:var(--white); border:1px solid var(--line); border-radius:3px; padding:12px;}
.composer textarea{width:100%; border:none; resize:none; font-family:var(--font-body); font-size:14px; color:var(--ink); min-height:46px; max-height:220px; outline:none; line-height:1.45; background:transparent;}
.composer-bar{display:flex; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap;}
.attach-btn{display:inline-flex; align-items:center; gap:6px; background:none; border:1px solid var(--line); border-radius:2px; padding:7px 11px; font-family:var(--font-body); font-weight:700; font-size:12px; color:var(--teal-700); cursor:pointer;}
.attach-btn:hover{border-color:var(--gold-500);}
.attach-btn svg{width:15px; height:15px;}
.pending-file{display:flex; align-items:center; gap:8px; font-family:var(--font-body); font-size:12.5px; color:var(--ink); background:var(--cream); border:1px solid var(--line); border-radius:14px; padding:4px 6px 4px 12px; max-width:100%;}
.pending-file span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.pending-file button{background:none; border:none; color:#a49c86; font-size:16px; line-height:1; padding:0 4px;}
.progress{flex:1; min-width:80px; height:4px; background:var(--line); border-radius:2px; overflow:hidden;}
.progress > div{height:100%; width:0; background:var(--gold-500); transition:width .15s;}
.composer-bar .spacer{flex:1;}

/* chat */
.chat-page{display:flex; flex-direction:column; height:calc(100vh - 80px); min-height:420px;}
.chat-scroll{flex:1; overflow-y:auto; padding:4px 4px 14px;}
.chat-msg{display:flex; gap:11px; padding:7px 0;}
.chat-msg .body{min-width:0; flex:1;}
.chat-msg .who{font-family:var(--font-body); font-weight:700; font-size:13px; color:var(--ink);}
.chat-msg .who .muted{font-size:11.5px; margin-left:6px;}
.chat-msg .text{font-family:var(--font-body); font-size:14px; color:#2b3a3f; line-height:1.5; margin-top:2px; word-wrap:break-word;}
.chat-msg .text a{color:var(--teal-600);}
.chat-msg .del{visibility:hidden; margin-left:8px;}
.chat-msg:hover .del{visibility:visible;}
.chat-msg.cont{padding-top:0;}
.chat-msg.cont .avatar{visibility:hidden; height:0;}
.chat-msg.cont .who{display:none;}
@media (max-width:860px){ .chat-msg .del{visibility:visible;} }

/* resources */
.filters{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; align-items:center;}
.chip{background:var(--white); border:1px solid var(--line); border-radius:20px; padding:6px 13px; font-family:var(--font-body); font-weight:700; font-size:12px; color:#6d6656;}
.chip.active{background:var(--teal-700); border-color:var(--teal-700); color:var(--cream);}
.filters .input{max-width:220px; margin-left:auto; padding:7px 11px; font-size:13px; background:var(--white);}
.res-row{background:var(--white); border:1px solid var(--line); border-radius:3px; padding:14px 16px; margin-bottom:8px;}
.res-main{display:flex; align-items:center; gap:14px;}
.res-kind{width:44px; height:44px; flex-shrink:0; border-radius:3px; background:var(--teal-950); color:var(--gold-300); display:flex; align-items:center; justify-content:center; font-family:var(--font-body); font-weight:700; font-size:9.5px; letter-spacing:.06em; overflow:hidden;}
.res-kind img{width:100%; height:100%; object-fit:cover;}
.res-info{flex:1; min-width:0;}
.res-info .t{font-family:var(--font-body); font-weight:700; font-size:14.5px; color:var(--ink); word-break:break-word;}
.res-info .meta{font-family:var(--font-body); font-size:12px; color:#9b937f; margin-top:3px;}
.res-info .desc{font-family:var(--font-body); font-size:13px; color:#5d5748; margin-top:5px; line-height:1.45;}
.res-actions{display:flex; gap:6px; flex-shrink:0; align-items:center;}
.res-player{margin-top:12px;}
.res-player audio, .res-player video{width:100%; max-height:420px;}
.src-tag{display:inline-block; font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--gold-700); background:rgba(196,156,72,.12); padding:2px 7px; border-radius:10px; margin-left:6px;}
@media (max-width:640px){ .res-main{flex-wrap:wrap;} .res-actions{width:100%; justify-content:flex-end;} .filters .input{max-width:none; margin-left:0;} }

/* forum */
.thread-row{display:flex; gap:14px; align-items:center; background:var(--white); border:1px solid var(--line); border-radius:3px; padding:15px 18px; margin-bottom:8px; text-decoration:none;}
.thread-row:hover{border-color:var(--gold-500);}
.thread-row .t{font-family:var(--font-body); font-weight:700; font-size:15px; color:var(--ink);}
.thread-row .meta{font-family:var(--font-body); font-size:12px; color:#9b937f; margin-top:3px;}
.thread-row .count{margin-left:auto; text-align:center; font-family:var(--font-body); flex-shrink:0;}
.thread-row .count b{display:block; font-size:17px; color:var(--teal-700);}
.thread-row .count span{font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:#9b937f;}
.pin-tag{display:inline-block; font-family:var(--font-body); font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--cream); background:var(--gold-600); padding:2px 7px; border-radius:10px; margin-right:6px; vertical-align:2px;}
.post{background:var(--white); border:1px solid var(--line); border-radius:3px; padding:18px 20px; margin-bottom:10px;}
.post.op{border-color:rgba(196,156,72,.55); box-shadow:0 0 0 1px rgba(196,156,72,.15);}
.post-head{display:flex; align-items:center; gap:10px; margin-bottom:10px;}
.post-head .who{font-family:var(--font-body); font-weight:700; font-size:13.5px; color:var(--ink);}
.post-head .when{font-family:var(--font-body); font-size:11.5px; color:#9b937f;}
.post-head .tools{margin-left:auto; display:flex; gap:12px;}
.post .text{font-family:var(--font-body); font-size:14.5px; color:#2b3a3f; line-height:1.6; word-wrap:break-word;}
.post .text a{color:var(--teal-600);}
.thread-title{font-family:var(--font-display); font-size:28px; letter-spacing:.05em; color:var(--teal-700); margin:4px 0 16px; text-transform:none;}
.back-link{display:inline-block; font-family:var(--font-body); font-weight:700; font-size:12.5px; color:var(--teal-700); text-decoration:none; margin-bottom:8px;}
.replies-head{font-family:var(--font-body); font-weight:700; font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:#8a8270; margin:24px 0 10px;}

/* dashboard */
.welcome{background:linear-gradient(135deg, var(--teal-700), var(--teal-950)); color:var(--cream); border-radius:3px; padding:28px 30px; margin-bottom:22px; position:relative; overflow:hidden;}
.welcome::after{content:''; position:absolute; right:-40px; top:-40px; width:200px; height:200px; background:url('/assets/logos/mark-gold.png') center/contain no-repeat; opacity:.12;}
.welcome h2{font-size:30px; color:var(--gold-300); letter-spacing:.08em;}
.welcome p{font-family:var(--font-quote); font-style:italic; font-size:14.5px; color:#cfdcdf; margin:8px 0 0; max-width:560px; line-height:1.55;}
.dash-grid{display:grid; grid-template-columns:1fr 1fr; gap:20px;}
.dash-grid .card{margin-bottom:0;}
.dash-grid .wide{grid-column:1 / -1;}
@media (max-width:900px){ .dash-grid{grid-template-columns:1fr;} }
.card-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px;}
.card-head h3{margin:0;}
.card-head a{font-family:var(--font-body); font-weight:700; font-size:12px; color:var(--teal-700); text-decoration:none;}
.mini-row{display:flex; gap:10px; align-items:flex-start; padding:9px 0; border-bottom:1px solid var(--line); text-decoration:none; color:inherit;}
.mini-row:last-child{border-bottom:none;}
.mini-row .t{font-family:var(--font-body); font-weight:700; font-size:13.5px; color:var(--ink);}
.mini-row .s{font-family:var(--font-body); font-size:12.5px; color:#6d6656; margin-top:2px; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}
.mini-row .m{font-family:var(--font-body); font-size:11px; color:#a49c86; margin-top:3px;}
.mini-row .res-kind{width:34px; height:34px; font-size:8.5px;}
.member-strip{display:flex; flex-wrap:wrap; gap:8px;}

/* members */
.member-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:12px;}
.member-card{background:var(--white); border:1px solid var(--line); border-radius:3px; padding:18px; display:flex; gap:12px; align-items:flex-start;}
.member-card .n{font-family:var(--font-body); font-weight:700; font-size:14.5px; color:var(--ink);}
.member-card .r{font-family:var(--font-body); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--gold-700); margin-top:2px;}
.member-card .a{font-family:var(--font-body); font-size:13px; color:#5d5748; margin-top:8px; line-height:1.45;}

/* admin */
.admin-table{width:100%; border-collapse:collapse; background:var(--white); border:1px solid var(--line); font-family:var(--font-body); font-size:13.5px;}
.admin-table th{text-align:left; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:#9a8f78; padding:10px 14px; border-bottom:1px solid var(--line); background:var(--cream);}
.admin-table td{padding:11px 14px; border-bottom:1px solid var(--line); vertical-align:middle;}
.admin-table tr.inactive td{color:#a49c86;}
.admin-table .acts{display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end;}
.table-wrap{overflow-x:auto;}
.modal-backdrop{position:fixed; inset:0; background:rgba(0,42,56,.6); display:flex; align-items:center; justify-content:center; padding:16px; z-index:50;}
.modal{background:var(--white); border-radius:3px; padding:26px 28px; width:100%; max-width:480px; max-height:calc(100vh - 32px); overflow-y:auto;}
.modal h3{font-family:var(--font-quote); font-weight:700; font-size:19px; color:var(--teal-700); text-transform:none; letter-spacing:0; margin-bottom:16px;}
.modal-actions{display:flex; gap:10px; justify-content:flex-end; margin-top:18px;}
.link-box{display:flex; gap:8px;} .link-box .input{font-size:12px;}
@media (max-width:860px){ .sidebar-foot .signout svg{display:block;} }
@media (max-width:860px){ .chat-page{height:calc(100vh - 44px);} }

/* conversations: list of chats on the left, the open one on the right */
.convo-layout{display:grid; grid-template-columns:300px minmax(0, 1fr); gap:22px; height:100vh; max-width:1200px; padding-top:28px; padding-bottom:20px;}
.convo-list{overflow-y:auto; min-height:0; border-right:1px solid var(--line); padding-right:16px;}
.convo-list-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px;}
.convo-list-head h2{font-size:24px; color:var(--teal-700);}
.convo-section{font-family:var(--font-body); font-weight:700; font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:#a49c86; margin:18px 4px 8px;}
.convo-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:3px; text-decoration:none; color:inherit; border:1px solid transparent; margin-bottom:3px;}
.convo-item:hover{background:var(--white);}
.convo-item.active{background:var(--white); border-color:var(--gold-500);}
.convo-item-body{min-width:0; flex:1;}
.convo-item .t{font-family:var(--font-body); font-weight:700; font-size:13.5px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.convo-item .s{font-family:var(--font-body); font-size:12px; color:#8a8270; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:2px;}
.convo-item-meta{display:flex; flex-direction:column; align-items:flex-end; gap:5px; font-family:var(--font-body); font-size:10.5px; color:#a49c86; flex-shrink:0;}
.convo-item-meta .dot{width:8px; height:8px; border-radius:50%; background:var(--gold-500);}
.convo-icon{width:32px; height:32px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:var(--teal-950); color:var(--gold-300); font-family:var(--font-display); font-size:17px;}
.convo-pane{display:flex; flex-direction:column; min-height:0; min-width:0;}
.convo-head{padding-bottom:12px; border-bottom:1px solid var(--line); margin-bottom:6px;}
.convo-title-row{display:flex; align-items:baseline; justify-content:space-between; gap:12px;}
.convo-title{font-family:var(--font-display); font-weight:400; font-size:24px; letter-spacing:.05em; text-transform:uppercase; color:var(--teal-700); margin:0;}
.convo-tools{display:flex; gap:14px; flex-shrink:0;}
.convo-sub{font-family:var(--font-body); font-size:12.5px; color:#8a8270; margin-top:4px;}
.convo-back{display:none;}
.convo-pane .post.op{margin:10px 0 6px;}
@media (max-width:1000px){
  .convo-layout{grid-template-columns:1fr; height:100vh; padding-top:16px; padding-bottom:12px;}
  .convo-list{display:none; border-right:none; padding-right:0;}
  .convo-back{display:inline-block;}
  body.show-list .convo-list{display:block;}
  body.show-list .convo-pane{display:none;}
  .convo-title{font-size:20px;}
}

/* commitments checklist */
.cm-progress{display:flex; align-items:center; gap:12px; margin:-6px 0 16px; font-family:var(--font-body); font-size:12.5px; color:#6d6656; font-weight:700;}
.cm-progress-bar{flex:1; max-width:340px; height:8px; background:var(--white); border:1px solid var(--line); border-radius:6px; overflow:hidden;}
.cm-progress-bar > div{height:100%; width:0; background:linear-gradient(90deg, var(--gold-600), var(--gold-500)); transition:width .3s;}
.cm-table{width:100%; border-collapse:collapse; background:var(--white); border:1px solid var(--line); font-family:var(--font-body); font-size:13.5px;}
.cm-table th{text-align:left; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:#9a8f78; padding:10px 12px; border-bottom:1px solid var(--line); background:var(--cream);}
.cm-table td{padding:12px; border-bottom:1px solid var(--line); vertical-align:top; color:#2b3a3f; line-height:1.45;}
.cm-person td{background:rgba(11,83,105,.05); padding:10px 12px;}
.cm-person td > div{display:flex; align-items:center; gap:10px;}
.cm-person b{font-size:14.5px; color:var(--teal-700);}
.cm-person .muted{font-size:12px;}
.cm-unlinked{margin-left:auto; font-size:10.5px; color:#a49c86; font-style:italic;}
.cm-check{width:20px; height:20px; accent-color:var(--teal-700); cursor:pointer; margin:1px 0 0;}
.cm-check:disabled{cursor:not-allowed; opacity:.55;}
.cm-row.done .cm-text > div:not(.cm-done-at){text-decoration:line-through; color:#8a8270;}
.cm-kind{display:inline-block; font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:2px 7px; border-radius:10px; margin-bottom:5px;}
.cm-kind.personal{background:rgba(11,83,105,.09); color:var(--teal-700);}
.cm-kind.group{background:rgba(196,156,72,.16); color:var(--gold-700);}
.cm-edited{font-size:11px; color:#a49c86; margin-top:4px;}
.cm-done-at{font-size:11.5px; color:var(--success); font-weight:700; margin-top:4px;}
.due{display:inline-block; margin-top:5px; font-size:11px; font-weight:700; color:#8a8270; background:var(--cream); border:1px solid var(--line); border-radius:10px; padding:2px 8px;}
.due.soon{color:var(--gold-700); border-color:rgba(196,156,72,.5); background:rgba(196,156,72,.1);}
.due.overdue{color:var(--danger); border-color:rgba(181,72,47,.4); background:#FBEAE4;}
.cm-actions{text-align:right; white-space:nowrap;}
.cm-actions .btn-ghost{padding:5px 10px; font-size:11.5px;}
.cm-actions .btn-link{display:block; margin:8px 0 0 auto;}
.cm-notes-row td{background:var(--cream); padding-top:4px;}
.cm-notes{max-width:640px;}
.cm-note{display:flex; gap:9px; padding:7px 0;}
.cm-note .who{font-weight:700; font-size:12.5px;}
.cm-note .who .muted{font-weight:400; font-size:11px; margin-left:4px;}
.cm-note .text{font-size:13px; margin-top:1px;}
.cm-note-form{display:flex; gap:8px; align-items:flex-end; margin-top:6px;}
.cm-note-form .textarea{min-height:44px; background:var(--white);}
@media (max-width:760px){
  .cm-table thead{display:none;}
  .cm-table, .cm-table tbody, .cm-table tr, .cm-table td{display:block; width:100%;}
  .cm-row{display:grid !important; grid-template-columns:36px 1fr; padding:10px 0; border-bottom:1px solid var(--line);}
  .cm-row td{border:none; padding:3px 10px 3px 0;}
  .cm-row td.cm-tick{grid-row:span 4; padding-left:10px;}
  .cm-row td[data-label]::before{content:attr(data-label); display:block; font-size:9.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#a49c86; margin-top:4px;}
  .cm-row td.cm-text::before{display:none;}
  .cm-actions{text-align:left;}
  .cm-actions .btn-link{display:inline; margin:0 0 0 10px;}
  .cm-notes-row td:first-child{display:none;}
  .cm-note-form{flex-direction:column; align-items:stretch;}
  .filters .select{max-width:none !important; margin-left:0 !important;}
}
