/* =========================================================
   PRIMOTÜ — Futuristic dark-navy theme (Phase 2)
   Niloload pagkatapos ng styles.css. Dito lang binabago ang itsura;
   walang binabago sa logic. Para ibalik ang lumang itsura, tanggalin
   ang <link> nito sa app.html.
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Sora:wght@600;700&display=swap");

:root {
  --bg: #070B1A;
  --card-bg: #0E1530;
  --card-2: #131C3E;
  --border: #26325c;
  --text-main: #E8ECF8;
  --text-muted: #9AA6C7;
  --navy: #FFC93C;          /* ginagamit ng lumang CSS bilang pang-diin na kulay */
  --navy-light: #FFC93C;
  --gold: #FFC93C;
  --gold-2: #F5A800;
  --cyan: #7DF9FF;
  --link: #8FB4FF;
  --danger: #ff6b76;
  --radius: 14px;
}

body {
  font-family: Inter, -apple-system, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(53, 84, 180, .28), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255, 201, 60, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text-main);
}
a { color: var(--link); }
h1, .page-title, .brand, .card-h { font-family: Sora, Inter, sans-serif; }

/* ---------- LOGIN ---------- */
.login-wrap { background: transparent; padding: 1rem; flex-direction: column; gap: 0.5rem; }
.login-card {
  background: rgba(14, 21, 48, .92);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(125, 249, 255, .05), 0 30px 80px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.login-card h1 { color: var(--text-main); }
.login-card p.sub { color: var(--text-muted); }
.login-hero { text-align: center; margin-bottom: 0.4rem; }
.login-hero .o3d { width: 104px; height: 120px; margin: 0 auto; filter: drop-shadow(0 8px 18px rgba(245,168,0,.3)); }
.login-hero .tag { font-family: Sora, sans-serif; font-weight: 700; letter-spacing: .14em; color: var(--gold); font-size: .78rem; }
.lang-toggle { position: fixed; top: 12px; right: 12px; z-index: 30; display: flex; gap: 4px; }
.lang-toggle button {
  background: var(--card-bg); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 11px; font-size: .75rem; cursor: pointer;
}
.lang-toggle button.on { color: #0A1020; background: var(--gold); border-color: var(--gold); font-weight: 700; }

/* ---------- FORMS / BUTTONS ---------- */
.field label { color: var(--text-muted); }
input, select, textarea, .field input, .field select, .field textarea, .comm-textarea, .row input, .row select {
  background: #0A1128 !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px;
}
input::placeholder, textarea::placeholder { color: #66739c; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(255, 201, 60, .15); }
input[readonly] { opacity: .65; }
input[type="checkbox"] { accent-color: var(--gold); }

.btn-primary {
  background: linear-gradient(180deg, #FFD468, var(--gold-2));
  color: #0A1020; font-weight: 700; border: 0; border-radius: 12px;
  box-shadow: 0 6px 20px rgba(245, 168, 0, .25);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary.btn-accent { background: linear-gradient(180deg, #FFD468, var(--gold-2)); color: #0A1020; }
.btn-sm {
  background: var(--card-2); color: var(--text-main); border: 1px solid var(--border); border-radius: 10px;
}
.btn-sm:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm.gold { background: var(--gold); color: #0A1020; border-color: var(--gold); font-weight: 700; }
.error-msg { color: var(--danger); }

/* ---------- SHELL ---------- */
.sidebar {
  background: rgba(8, 13, 32, .92);
  border-right: 1px solid var(--border);
}
.sidebar .brand { color: var(--gold); letter-spacing: .08em; }
.nav-item { color: var(--text-muted); border-radius: 10px; }
.nav-item:hover { background: var(--card-2); color: var(--text-main); }
.nav-item.active { background: rgba(255, 201, 60, .12); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.nav-group {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #66739c;
  margin: 1rem 0 .3rem; padding: 0 .9rem;
}
.main { background: transparent; }
.page-title { color: var(--text-main); }
.page-sub { color: var(--text-muted); }

.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.lbl { color: var(--text-muted); }
.progress-track { background: #0A1128; }
.progress-fill { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.status-active { background: rgba(2, 195, 154, .15); color: #4be3c0; }
.tag, .type-tag { background: rgba(125, 249, 255, .1); color: var(--cyan); border: 1px solid rgba(125, 249, 255, .25); }
.type-tag.win { background: rgba(255, 201, 60, .12); color: var(--gold); border-color: rgba(255, 201, 60, .3); }
.type-tag.announcement { background: rgba(143, 180, 255, .12); color: var(--link); border-color: rgba(143, 180, 255, .3); }

/* feed */
.post-card.pinned { border-color: rgba(255, 201, 60, .5); }
.post-name { color: var(--text-main); }
.post-name:hover { color: var(--gold); }
.handle { color: var(--text-muted); font-size: .8rem; }
.act-btn { color: var(--text-muted); }
.act-btn:hover, .act-btn.on { color: var(--gold); }
.act-btn.danger:hover { color: var(--danger); }
.comment-bubble { background: #0A1128; }
.vis-tag { font-size: .68rem; color: var(--cyan); border: 1px solid rgba(125,249,255,.25); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.profile-card { border-color: rgba(255, 201, 60, .35); }

/* friends / company */
.person-row { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.person-row:last-child { border-bottom: 0; }
.person-row .grow { flex: 1; min-width: 0; }
.person-row .nm { font-weight: 600; }
.company-hero { text-align: center; padding: 1.6rem 1rem; }
.company-hero h2 { font-family: Sora, sans-serif; margin: 0 0 .3rem; color: var(--gold); }
.company-hero .stat { color: var(--cyan); font-size: .85rem; margin-top: .6rem; }

/* ---------- ORBI (kasama sa gilid) ---------- */
#orbi { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 28px); }
#orbi .bubble {
  background: #0E1530; color: var(--text-main); border: 1px solid var(--gold); border-radius: 14px 14px 4px 14px;
  padding: 10px 12px; font-size: .84rem; line-height: 1.45; width: 250px; max-width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
#orbi .bubble b { color: var(--gold); }
#orbi .bubble .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#orbi .bubble button {
  background: var(--card-2); color: var(--text-main); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 10px; font-size: .72rem; cursor: pointer;
}
#orbi .bubble button:hover { border-color: var(--gold); color: var(--gold); }
#orbi .avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; }
#orbi .avatar-btn .o3d { filter: drop-shadow(0 6px 14px rgba(245, 168, 0, .35)); }
#orbi .bob { animation: orbi-bob 3.6s ease-in-out infinite; }
#orbi .foot-l { animation: orbi-step 1.2s ease-in-out infinite; }
#orbi .foot-r { animation: orbi-step 1.2s ease-in-out infinite .6s; }
@keyframes orbi-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes orbi-step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { #orbi .bob, #orbi .foot-l, #orbi .foot-r { animation: none; } }
#orbi.min .bubble { display: none; }

/* ---------- MOBILE ---------- */
@media (max-width: 720px) {
  .nav-group { display: none; }
  #orbi .avatar-btn .o3d { width: 50px !important; height: 58px !important; }
  #orbi .bubble { width: 220px; }
}

/* EN/TL toggle: sa kanto sa ilalim kapag nasa loob na ng app (para hindi matakpan ang Notifications) */
body.app-on .lang-toggle { top: auto; right: auto; bottom: 14px; left: 14px; }

/* status pills (dark) */
.status-inactive { background: rgba(255, 107, 118, .15) !important; color: #ff9aa2 !important; }
.status-pill { border: 1px solid transparent; }

/* ---------- MOBILE MENU (☰) ---------- */
.mbar, .mback { display: none; }
@media (max-width: 720px) {
  .app-shell.visible .mbar {
    display: flex; position: fixed; top: 0; left: 0; right: 0; height: 54px; align-items: center; gap: .8rem;
    padding: 0 .8rem; background: rgba(7, 11, 26, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border); z-index: 50;
  }
  .hamb { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-bg);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; padding: 0; }
  .hamb span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--gold); transition: transform .2s, opacity .2s; }
  .menu-open .hamb span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .hamb span:nth-child(2) { opacity: 0; }
  .menu-open .hamb span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mtitle { font-family: Sora, Inter, sans-serif; font-weight: 700; color: var(--text-main); font-size: 1rem; }

  .app-shell.visible .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; width: 280px; max-width: 84vw; display: block; overflow-y: auto;
    transform: translateX(-104%); transition: transform .22s ease; z-index: 70; padding: 1.2rem .9rem 2rem;
    background: #080D20; box-shadow: 8px 0 40px rgba(0, 0, 0, .6);
  }
  .app-shell.menu-open .sidebar { transform: none; }
  .sidebar .brand { display: block !important; margin-bottom: 1rem; }
  .nav-group { display: block !important; }
  .nav-item { padding: .8rem .9rem; font-size: .95rem; }
  .app-shell.visible .mback {
    display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .6); opacity: 0; pointer-events: none;
    transition: opacity .2s; z-index: 60;
  }
  .app-shell.menu-open .mback { opacity: 1; pointer-events: auto; }
  .app-shell.visible .main { padding: 4.4rem 1rem 6rem; }
  body.app-on .lang-toggle { top: 8px; bottom: auto; left: auto; right: 10px; z-index: 55; }
  body.menu-on .lang-toggle { display: none; }
}

@media (max-width: 720px) {
  /* Friends: pangalan sa taas, mga button sa ilalim para hindi sumikip */
  .person-row { flex-wrap: wrap; }
  .person-row .grow { flex: 1 1 150px; }
  .person-row > div:last-child { width: 100%; display: flex; gap: .5rem; }
}

/* ---------- BOTTOM TAB BAR (phone) ---------- */
.tabbar { display: none; }
@media (max-width: 720px) {
  .app-shell.visible .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 13, 32, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
    transition: transform .22s ease;
  }
  .tabbar.hide, .tabbar.kb { transform: translateY(110%); }
  .app-shell.menu-open .tabbar { z-index: 40; }
  .tabbar button {
    position: relative; background: none; border: 0; color: var(--text-muted); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px;
    font: 600 .66rem/1 Inter, sans-serif; -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
  .tabbar button:active svg { transform: scale(.88); }
  .tabbar button.on { color: var(--gold); }
  .tabbar button.on svg { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 201, 60, .55)); }
  .tabbar button.on::after { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); box-shadow: 0 0 10px rgba(255, 201, 60, .7); }
  .tabbar .fab {
    width: 54px; height: 54px; margin: -22px auto 0; padding: 0; border-radius: 50%; justify-content: center;
    background: linear-gradient(180deg, #FFD468, var(--gold-2)); color: #0A1020; border: 3px solid #080D20;
    box-shadow: 0 8px 22px rgba(245, 168, 0, .45);
  }
  .tabbar .fab svg { width: 26px; height: 26px; stroke-width: 2.6; }
  .tabbar .fab.on::after { display: none; }
  .tabbar .tbadge {
    position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
    background: #ff4d5e; color: #fff; font: 700 .62rem/17px Inter, sans-serif; text-align: center; font-style: normal;
    box-shadow: 0 0 0 2px #080D20;
  }
  .tabbar .tbadge[hidden] { display: none; }
  /* Orbi, hindi matatakpan ng tab bar */
  #orbi { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
  .app-shell.visible .main { padding-bottom: 7.5rem; }
}

/* hover/tap ng mga button sa post (dark) */
.act-btn:hover { background: rgba(255, 255, 255, .05); }
.act-btn.danger:hover { background: rgba(255, 107, 118, .14); color: #ff9aa2; }
.act-btn.on { background: transparent; }

/* Back to landing page (login screen only) */
.home-back { position: fixed; top: 12px; left: 12px; z-index: 30; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; text-decoration: none; color: #FFC93C; background: rgba(14,21,48,.85); border: 1px solid rgba(255,201,60,.4); }
.home-back:hover { background: #FFC93C; color: #0A1020; }
body.app-on .home-back { display: none; }

/* ===== Part 21: Home + locks ===== */
.home-hero { position: relative; }
.home-hi { font-family: Sora, sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.plan-pill { position: absolute; top: 14px; right: 14px; padding: 3px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.plan-pill.paid { background: rgba(255, 201, 60, .16); color: var(--gold); border: 1px solid rgba(255, 201, 60, .5); }
.plan-pill.free { background: rgba(125, 249, 255, .1); color: var(--cyan); border: 1px solid rgba(125, 249, 255, .4); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem; }
.stat-tile { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: .9rem .5rem; color: var(--text-main); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; }
.stat-tile b { font-family: Sora, sans-serif; font-size: 1.5rem; color: var(--gold); }
.stat-tile span { font-size: .72rem; opacity: .75; text-align: center; }
.stat-tile:hover { border-color: var(--gold); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.tool-tile { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: .9rem .6rem; color: var(--text-main); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; text-align: center; }
.tool-tile:hover { border-color: var(--gold); }
.tool-tile .tt-ic { font-size: 1.6rem; }
.tool-tile .tt-name { font-weight: 600; font-size: .88rem; }
.tool-tile .tt-sub { font-size: .72rem; color: var(--cyan); }
.tool-tile.is-locked { opacity: .78; border-style: dashed; }
.tool-tile.is-locked .tt-sub { color: var(--gold); }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .tool-grid { grid-template-columns: repeat(2, 1fr); } }
.nav-item.locked::after { content: " 🔒"; font-size: .8em; opacity: .85; }
.tab-panel.is-locked > *:not(.lock-card) { display: none !important; }
.lock-card { text-align: center; background: var(--card-bg); border: 1px dashed rgba(255, 201, 60, .55); border-radius: 18px; padding: 2rem 1.2rem; margin-top: 1rem; }
.lock-ic { font-size: 2.4rem; }
.lock-title { font-family: Sora, sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--gold); margin: .3rem 0; }
.lock-desc { margin-bottom: .4rem; }

/* ---- Part 23: hashtags, mentions, photo preview, notifications ---- */
.hashtag{background:none;border:0;padding:0;font:inherit;color:var(--accent,#FFC933);cursor:pointer;font-weight:600}
.hashtag:hover{text-decoration:underline}
.mention{color:#7DF9FF;font-weight:600}
.hashtag-on{color:var(--accent,#FFC933)}
.chip-row{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin:.5rem 0}
.chip-row .lbl{margin-right:.2rem}
.hashtag.chip{background:rgba(255,201,51,.12);border:1px solid rgba(255,201,51,.35);border-radius:999px;padding:.15rem .6rem;font-size:.82rem}
.hashtag.chip i{font-style:normal;opacity:.6;margin-left:.2rem}
.img-prev{position:relative;margin:.5rem 0;display:flex;align-items:flex-start;gap:.6rem}
.img-prev img{max-width:160px;max-height:160px;border-radius:10px;border:1px solid rgba(255,255,255,.15);display:block}
.mbar-bell{position:relative;margin-left:auto;background:none;border:0;color:inherit;font-size:1.25rem;padding:.3rem .5rem;cursor:pointer}
.mbar-badge{position:absolute;top:-2px;right:-2px;background:var(--danger,#e23);color:#fff;border-radius:999px;font-size:.62rem;padding:1px 5px;line-height:1.2}
@media (max-width:820px){
  .notif-panel{position:fixed!important;top:3.4rem!important;left:.6rem!important;right:.6rem!important;width:auto!important;max-height:70vh!important}
  .notif-btn{display:none}
  .mbar .mbar-bell{margin-right:96px}   /* iwas sa EN/TL toggle sa kanan */
}

/* ---- Part 24: profile page ---- */
.prof-cover{height:150px;border-radius:14px;background:linear-gradient(135deg,#1a2a6c 0%,#0b1230 55%,#3b2a00 100%);background-size:cover;background-position:center;position:relative;border:1px solid var(--border)}
.prof-cover.edit{height:110px}
.prof-cam{position:absolute;right:10px;bottom:10px;background:rgba(7,11,26,.75);color:#fff;border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:.3rem .7rem;font-size:.78rem;cursor:pointer}
.prof-cam.sm{right:-2px;bottom:-2px;width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center}
.prof-head{display:flex;flex-wrap:wrap;gap:.9rem;align-items:flex-end;padding:0 .8rem;margin:-44px 0 .6rem}
.prof-avatar{position:relative;width:96px;height:96px;border-radius:50%;border:4px solid var(--bg,#070B1A);background:#0A1128;flex:none}
.prof-avatar>img,.prof-avatar>span{width:100%;height:100%;border-radius:50%;object-fit:cover;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;color:#fff}
.prof-avatar.edit{width:72px;height:72px;border-width:2px}
.prof-avatar.edit>span{font-size:1.4rem}
.prof-id{flex:1;min-width:180px;padding-top:46px}
.prof-id h2{margin:0;font-size:1.3rem;line-height:1.2}
.prof-title{color:var(--gold);font-weight:600;margin:.1rem 0}
.prof-actions{display:flex;gap:.4rem;flex-wrap:wrap;padding-top:46px}
.prof-tabs{display:flex;gap:.2rem;border-bottom:1px solid var(--border);margin:.4rem 0 .8rem;overflow-x:auto}
.prof-tabs button{background:none;border:0;border-bottom:3px solid transparent;color:var(--text-muted);padding:.6rem .9rem;font-weight:600;cursor:pointer;white-space:nowrap}
.prof-tabs button.on{color:var(--gold);border-bottom-color:var(--gold)}
.about-row{padding:.5rem 0;border-bottom:1px solid var(--border)}
.about-row:last-child{border-bottom:0}
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.photo-grid img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;display:block}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.avatar[data-av]{padding:0;overflow:hidden}
.jt{color:var(--text-muted);font-size:.78rem}
.crop-ov{position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(3,5,12,.85);z-index:200;display:flex;align-items:center;justify-content:center;padding:16px}
.crop-box{background:#0B1330;border:1px solid var(--border);border-radius:16px;padding:1rem;max-width:100%}
.crop-view{border-radius:10px;overflow:hidden;margin:.6rem auto;border:1px solid var(--border)}
.crop-view canvas{display:block;touch-action:none;cursor:grab}
.crop-zoom{width:100%}
@media (max-width:720px){.prof-cover{height:120px}.prof-head{margin-top:-40px}.prof-avatar{width:84px;height:84px}.prof-id,.prof-actions{padding-top:0}.prof-id{flex-basis:100%}}

/* ===== W1 Workspace ===== */
.ws-switch { position: relative; margin: .2rem .6rem .8rem; }
.ws-cur, .ws-item { width: 100%; display: flex; align-items: center; gap: .6rem; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-main); border-radius: 12px; padding: .5rem .6rem; cursor: pointer; font: inherit; text-align: left; }
.ws-cur:hover, .ws-item:hover:not(:disabled) { border-color: var(--gold); }
.ws-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: #0f1830; border: 1px solid var(--border); border-radius: 12px; padding: .35rem; display: flex; flex-direction: column; gap: .25rem; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.ws-item { background: transparent; border-color: transparent; }
.ws-item.on { background: rgba(255,201,60,.1); }
.ws-item:disabled { opacity: .55; cursor: default; }
.ws-item.add { color: var(--gold); font-weight: 600; }
.ws-logo { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,201,60,.16); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; overflow: hidden; }
.ws-logo img, .ws-av img { width: 100%; height: 100%; object-fit: cover; }
.ws-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-nm small { font-weight: 400; opacity: .65; font-size: .72rem; }
.ws-av { border-radius: 50%; background: rgba(125,249,255,.14); color: var(--cyan); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; flex: none; }
.ws-msg { padding: .5rem .7rem; border-radius: 10px; font-size: .85rem; margin: .5rem 0; }
.ws-msg.bad { background: rgba(255,90,90,.12); color: #ff8a8a; }
.ws-msg.ok { background: rgba(80,220,140,.12); color: #6fe3a5; }
.ws-banner { background: rgba(255,201,60,.1); border: 1px solid rgba(255,201,60,.4); color: var(--text-main); border-radius: 12px; padding: .7rem .9rem; margin-bottom: 1rem; }
.ws-banner.warn { background: rgba(255,150,50,.12); border-color: rgba(255,150,50,.5); }
.ws-banner.bad { background: rgba(255,90,90,.12); border-color: rgba(255,90,90,.5); }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.ws-person { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; margin: 0; }
.ws-person:hover { border-color: var(--gold); }
.ws-ann { padding: .2rem 0; }
.ws-ann.pin { border-left: 3px solid var(--gold); padding-left: .7rem; }
.ws-ann-h { display: flex; flex-direction: column; margin-bottom: .3rem; }
.ws-chk { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.ws-chk input { width: auto; }
.ws-link { display: flex; gap: .5rem; margin-top: .6rem; }
.ws-link input { flex: 1; }
.ws-edit { padding: .5rem 0 .8rem 3.2rem; }
.ws-done { text-align: center; padding: 2rem 1rem; }
@media (max-width: 720px) { .ws-edit { padding-left: 0; } .ws-switch { margin-top: .6rem; } }
.ws-clock .btn-sm { margin-top: .3rem; }
.ws-table { margin-top: .6rem; }
.person-row select { max-width: 170px; }

/* ===== Messages (chat) ===== */
.nav-badge, .mbar-chat .mbar-badge { background: #ff4d4f; color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700; padding: 1px 6px; margin-left: .3rem; }
.mbar-chat { position: relative; margin-left: auto; background: none; border: 0; color: inherit; font-size: 1.25rem; padding: .3rem .5rem; cursor: pointer; }
.mbar-chat + .mbar-bell { margin-left: 0; }
.mbar-chat .mbar-badge { position: absolute; top: 0; right: 0; margin: 0; }
@media (max-width: 720px) { .mbar .mbar-chat { margin-right: 0; } .mbar .mbar-chat ~ .mbar-bell { margin-right: 96px; margin-left: 0; } .mbar .mbar-chat { margin-left: auto; } }

.chat-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 3rem); min-height: 480px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.chat-side { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; padding: .8rem; gap: .6rem; }
.chat-side-h { display: flex; align-items: center; justify-content: space-between; font-size: 1.15rem; }
.chat-list { overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item { display: flex; align-items: center; gap: .7rem; width: 100%; background: transparent; border: 0; color: var(--text-main); padding: .55rem .5rem; border-radius: 12px; cursor: pointer; font: inherit; text-align: left; }
.chat-item:hover, .chat-item.on { background: rgba(255,255,255,.07); }
.ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-top { display: flex; justify-content: space-between; gap: .5rem; }
.ci-top small { opacity: .6; font-size: .72rem; white-space: nowrap; }
.ci-last { opacity: .7; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.unread .ci-last, .chat-item.unread .ci-top b { color: #fff; font-weight: 700; opacity: 1; }
.ci-dot { background: var(--gold); color: #0A1020; border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; padding: 0 5px; }
.chat-pick-h { display: flex; align-items: center; gap: .6rem; }
.chat-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-empty { margin: auto; text-align: center; display: flex; flex-direction: column; gap: .4rem; align-items: center; padding: 1rem; }

.chat-thread { display: flex; flex-direction: column; height: 100%; min-height: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--c-a) 13%, #0b1226) 0%, #0b1226 70%); }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; border-bottom: 1px solid var(--border); background: rgba(8,12,28,.55); }
.chat-head .grow { flex: 1; min-width: 0; line-height: 1.2; }
.chat-back { display: none; background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; }
.chat-ic { background: rgba(255,255,255,.07); border: 0; color: inherit; width: 38px; height: 38px; border-radius: 50%; font-size: 1.15rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chat-ic:hover { background: rgba(255,255,255,.14); }
.chat-msgs { flex: 1; overflow-y: auto; padding: .8rem .9rem 1rem; display: flex; flex-direction: column; min-height: 0; }
.msg-day { align-self: center; font-size: .72rem; opacity: .6; margin: .8rem 0 .4rem; }
.msg-sys { align-self: center; font-size: .78rem; opacity: .75; margin: .6rem 0; text-align: center; }
.msg-more { text-align: center; margin-bottom: .6rem; }
.msg { display: flex; align-items: flex-end; gap: .4rem; max-width: 100%; margin-top: 2px; position: relative; }
.msg.first { margin-top: 10px; }
.msg.mine { justify-content: flex-end; }
.msg-gap { width: 28px; flex: none; }
.msg-col { display: flex; flex-direction: column; max-width: min(74%, 520px); position: relative; }
.msg.mine .msg-col { align-items: flex-end; }
.bub { padding: .5rem .85rem; border-radius: 20px; background: rgba(255,255,255,.1); line-height: 1.35; word-break: break-word; white-space: pre-wrap; cursor: pointer; }
.bub a { color: inherit; text-decoration: underline; }
.msg.mine .bub { background: linear-gradient(135deg, var(--c-a), var(--c-b)); color: var(--c-t); }
.msg.mine.cont .bub { border-top-right-radius: 6px; } .msg.mine:not(.last) .bub { border-bottom-right-radius: 6px; }
.msg.theirs.cont .bub { border-top-left-radius: 6px; } .msg.theirs:not(.last) .bub { border-bottom-left-radius: 6px; }
.bub.gone { background: transparent; border: 1px dashed rgba(255,255,255,.25); font-style: italic; opacity: .65; cursor: default; }
.bub-emoji { font-size: 2.6rem; line-height: 1.1; cursor: pointer; }
.bub-img { margin-bottom: 3px; }
.msg-img { max-width: 260px; max-height: 320px; border-radius: 16px; display: block; cursor: zoom-in; background: rgba(255,255,255,.06); }
.msg.pending { opacity: .55; }
.msg-meta { font-size: .68rem; opacity: .5; margin: 2px 6px 0 38px; }
.msg-meta.mine { align-self: flex-end; margin: 2px 6px 0 0; }
.msg-seen { align-self: flex-end; font-size: .72rem; opacity: .7; margin: 2px 6px 0; color: var(--c-a); }
.msg-rx { display: flex; gap: 3px; margin-top: -6px; position: relative; z-index: 1; padding: 0 6px; }
.msg-rx button { background: #17213f; border: 1px solid var(--border); color: inherit; border-radius: 999px; padding: 0 7px; font-size: .8rem; height: 22px; cursor: pointer; }
.msg-rx button.mine { border-color: var(--c-a); }
.msg-pop { display: none; position: absolute; bottom: calc(100% + 2px); z-index: 5; background: #101a36; border: 1px solid var(--border); border-radius: 18px; padding: .3rem .4rem; box-shadow: 0 8px 24px rgba(0,0,0,.5); width: max-content; max-width: 280px; flex-wrap: wrap; gap: 2px; }
.msg.mine .msg-pop { right: 0; } .msg.theirs .msg-pop { left: 0; }
.msg.open .msg-pop { display: flex; }
.msg-pop button { background: none; border: 0; font-size: 1.35rem; cursor: pointer; padding: 2px 4px; border-radius: 8px; transition: transform .12s; }
.msg-pop button:hover { transform: scale(1.25); }
.msg-pop .act { font-size: .8rem; color: var(--text-main); width: 100%; text-align: left; padding: .3rem .4rem; border-top: 1px solid var(--border); border-radius: 0; }
.msg-pop .act:hover { transform: none; background: rgba(255,255,255,.08); }
@media (hover: hover) { .msg:hover .msg-pop { display: flex; } }

.chat-compose { border-top: 1px solid var(--border); background: rgba(8,12,28,.55); padding: .5rem .7rem; position: relative; }
.chat-bar { display: flex; align-items: flex-end; gap: .45rem; }
.chat-bar textarea { flex: 1; resize: none; border-radius: 20px; padding: .55rem .9rem; max-height: 120px; line-height: 1.3; }
.chat-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; flex: none; color: var(--c-a); }
.chat-send.go { background: linear-gradient(135deg, var(--c-a), var(--c-b)); color: var(--c-t); font-size: 1.05rem; }
.chat-closed { text-align: center; opacity: .7; padding: .6rem; font-size: .85rem; }
.chat-photo-prev { display: flex; align-items: flex-start; gap: .4rem; margin-bottom: .4rem; }
.chat-photo-prev img { max-height: 90px; border-radius: 12px; }
.chat-photo-prev button { background: rgba(255,255,255,.12); border: 0; color: inherit; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; }
.chat-emoji { background: #101a36; border: 1px solid var(--border); border-radius: 14px; margin-bottom: .5rem; overflow: hidden; }
.emo-tabs { display: flex; gap: 2px; padding: .3rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.emo-tabs button { background: none; border: 0; font-size: 1.25rem; padding: .25rem .45rem; border-radius: 8px; cursor: pointer; }
.emo-tabs button.on { background: rgba(255,255,255,.12); }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; padding: .4rem; max-height: 210px; overflow-y: auto; }
.emo-grid button { background: none; border: 0; font-size: 1.5rem; padding: .2rem; border-radius: 8px; cursor: pointer; }
.emo-grid button:hover { background: rgba(255,255,255,.12); }

.chat-ov { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.chat-modal { background: #101a36; border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem; width: min(380px, 100%); }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.theme-grid button { display: flex; align-items: center; gap: .6rem; background: rgba(255,255,255,.05); border: 2px solid transparent; color: inherit; border-radius: 12px; padding: .5rem; cursor: pointer; font: inherit; }
.theme-grid button.on { border-color: var(--gold); }
.theme-grid .sw { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.chat-zoom { max-width: 94vw; max-height: 90vh; border-radius: 12px; }
.chat-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #101a36; border: 1px solid var(--border); padding: .6rem 1rem; border-radius: 999px; opacity: 0; transition: .25s; z-index: 500; pointer-events: none; max-width: 90vw; }
.chat-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .chat-wrap { grid-template-columns: 1fr; height: calc(100vh - 8.5rem); }
  .chat-main { display: none; }
  .chat-wrap.thread-open .chat-side { display: none; }
  .chat-wrap.thread-open .chat-main { display: flex; }
  .chat-back { display: inline-block; }
  .msg-col { max-width: 80%; }
  .msg-img { max-width: 220px; }
}

/* ===== W3 Payroll ===== */
.py-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.py-tabs button { background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-main); border-radius: 999px; padding: .45rem .9rem; font: inherit; cursor: pointer; }
.py-tabs button.on { background: var(--gold); color: #0A1020; border-color: var(--gold); font-weight: 700; }
.py-f { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; color: var(--text-muted); min-width: 130px; flex: 1; }
.py-f input, .py-f select { font-size: .95rem; }
.py-sub { margin: 1rem 0 .4rem; font-weight: 600; font-size: .9rem; }
.py-run { cursor: pointer; border-radius: 10px; }
.py-run:hover { background: rgba(255,255,255,.04); }
.py-nums { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; }
.py-slipcard { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; }
.py-slipcard:hover { border-color: var(--gold); }
.py-sc-r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.py-sc-r b { font-size: 1.25rem; color: var(--gold); }
.py-person summary { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; cursor: pointer; list-style: none; }
.py-person summary::-webkit-details-marker { display: none; }
.py-person summary .tag { margin-left: auto; }
.py-person[open] summary { margin-bottom: .8rem; }
.py-checks { display: flex; flex-direction: column; gap: .4rem; margin: .6rem 0; }
.py-checks label, .py-sw { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.py-checks input, .py-sw input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--gold); }
.py-sw { padding: .55rem 0; border-bottom: 1px solid var(--border); }
.py-sw span { display: flex; flex-direction: column; }
.py-sw small { color: var(--text-muted); font-size: .8rem; }
.py-item { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .4rem 0; border-bottom: 1px dashed var(--border); }
.py-doc { max-width: 640px; margin: 0 auto; }
.py-head { display: flex; align-items: center; gap: .8rem; border-bottom: 2px solid var(--gold); padding-bottom: .7rem; margin-bottom: .8rem; }
.py-head img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.py-co { font-family: Sora, Inter, sans-serif; font-weight: 700; font-size: 1.15rem; }
.py-who { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.py-per { text-align: right; }
.py-sec { margin: .9rem 0 .3rem; font-weight: 700; color: var(--gold); letter-spacing: .04em; font-size: .8rem; text-transform: uppercase; }
.py-tbl { width: 100%; border-collapse: collapse; }
.py-tbl td { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.py-tbl td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.py-tbl td.x { width: 36px; text-align: right; }
.py-tot { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 .4rem; }
.py-tot > div { flex: 1; min-width: 120px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem; display: flex; flex-direction: column; }
.py-tot span { font-size: .75rem; color: var(--text-muted); }
.py-tot b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.py-tot .net { background: rgba(255,201,60,.1); border-color: rgba(255,201,60,.4); }
.py-tot .net b { color: var(--gold); font-size: 1.3rem; }
.py-note { margin-top: .6rem; font-size: .78rem; }
.py-meta { margin: .2rem 0 .4rem; }
#slipPrintHost { display: none; }
@media print {
  body.slip-printing > *:not(#slipPrintHost) { display: none !important; }
  body.slip-printing { background: #fff !important; }
  body.slip-printing #slipPrintHost { display: block !important; color: #111; background: #fff; padding: 24px; }
  body.slip-printing #slipPrintHost * { color: #111 !important; border-color: #bbb !important; background: transparent !important; }
  body.slip-printing #slipPrintHost .py-tot > div { border: 1px solid #bbb; }
  body.slip-printing #slipPrintHost .tag { display: none; }
}
@media (max-width: 720px) { .py-slipcard { flex-direction: column; align-items: flex-start; } .py-sc-r { align-items: flex-start; text-align: left; } .py-f { min-width: 100%; } }
.row > .grow { flex: 1; }
.py-f { align-items: stretch; text-align: left; }
.py-f select, .py-f input { width: 100%; box-sizing: border-box; }

/* ===== W4 Tasks ===== */
.tk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.tk-filter { margin-left: auto; max-width: 200px; }
.tk-sec { margin: 1.1rem 0 .4rem; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.tk-sec.late { color: #ff8a8a; } .tk-sec.dim { opacity: .75; }
.tk-list { padding: .3rem .6rem; }
.tk-row { display: flex; align-items: center; gap: .7rem; padding: .65rem .2rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.tk-row:last-child { border-bottom: 0; }
.tk-row:hover { background: rgba(255,255,255,.03); }
.tk-row.done .tk-title { text-decoration: line-through; opacity: .6; }
.tk-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: transparent; color: #0A1020; font-weight: 800; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tk-check:hover:not(:disabled) { border-color: var(--gold); }
.tk-row.done .tk-check { background: var(--gold); border-color: var(--gold); }
.tk-check:disabled { opacity: .5; cursor: default; }
.tk-main { flex: 1; min-width: 0; }
.tk-title { font-weight: 600; word-break: break-word; }
.tk-meta { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; margin-top: .25rem; font-size: .76rem; color: var(--text-muted); }
.tk-pri { padding: .05rem .5rem; border-radius: 999px; font-weight: 700; font-size: .7rem; background: rgba(143,180,255,.15); color: #8fb4ff; }
.tk-pri.urgent { background: rgba(255,90,90,.18); color: #ff8a8a; } .tk-pri.high { background: rgba(255,160,60,.18); color: #ffb060; } .tk-pri.low { background: rgba(255,255,255,.08); color: var(--text-muted); }
.tk-due { color: var(--text-muted); } .tk-due.late { color: #ff8a8a; font-weight: 700; } .tk-due.soon { color: var(--gold); font-weight: 700; }
.tk-team { background: rgba(125,249,255,.1); color: var(--cyan); border-radius: 6px; padding: .02rem .4rem; }
.tk-avs { display: inline-flex; align-items: center; flex: none; }
.tk-avs .ws-av { margin-left: -6px; border: 2px solid #0f1830; } .tk-avs .ws-av:first-child { margin-left: 0; }
.tk-more { margin-left: 4px; font-size: .72rem; color: var(--text-muted); }
.tk-board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: .8rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; }
.tk-col { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; padding: .6rem; min-height: 140px; }
.tk-col-h { font-weight: 700; margin: 0 .2rem .6rem; display: flex; align-items: center; gap: .5rem; }
.tk-card { background: #111c3a; border: 1px solid var(--border); border-radius: 12px; padding: .65rem .7rem; margin-bottom: .55rem; cursor: pointer; }
.tk-card:hover { border-color: var(--gold); }
.tk-card[draggable="true"] { cursor: grab; }
.tk-foot { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.tk-arrows { margin-left: auto; display: inline-flex; gap: .3rem; }
.tk-arrows .btn-sm { padding: .15rem .5rem; }
.tk-empty { text-align: center; padding: 1rem 0; }
.tk-ov { position: fixed; inset: 0; background: rgba(3,6,16,.7); z-index: 200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 4vh 1rem; }
.tk-modal { width: 100%; max-width: 620px; background: #0f1830; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.tk-mh { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.tk-x { margin-left: auto; }
.tk-mb { padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.tk-mb textarea { width: 100%; box-sizing: border-box; }
.tk-stat { display: flex; gap: .4rem; }
.tk-stat button { flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-main); border-radius: 10px; padding: .45rem; font: inherit; cursor: pointer; }
.tk-stat button.on { background: var(--gold); color: #0A1020; border-color: var(--gold); font-weight: 700; }
.tk-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .6rem; max-height: 170px; overflow-y: auto; }
.tk-person { display: flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .9rem; }
.tk-person input, .tk-ck input { width: 17px; height: 17px; accent-color: var(--gold); }
.tk-ck { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .25rem 0; }
.tk-ck label { display: flex; align-items: center; gap: .5rem; cursor: pointer; flex: 1; }
.tk-ck .dn { text-decoration: line-through; opacity: .6; }
.tk-cm { padding: .5rem .7rem; background: rgba(255,255,255,.04); border-radius: 10px; margin-bottom: .4rem; }
.tk-link { background: none; border: 0; color: var(--link, #8fb4ff); cursor: pointer; font: inherit; padding: 0; margin-left: .4rem; }
@media (max-width: 720px) { .tk-board { grid-template-columns: repeat(3, 82vw); scroll-snap-type: x mandatory; } .tk-col { scroll-snap-align: start; } .tk-ov { padding: 0; } .tk-modal { border-radius: 0; min-height: 100vh; } }

/* ===== W4 Documents ===== */
.dc-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; margin: .2rem 0 1rem; }
.dc-used { margin-left: auto; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.dc-folder { position: relative; cursor: pointer; margin: 0; }
.dc-folder:hover { border-color: var(--gold); }
.dc-ic { font-size: 1.6rem; }
.dc-fn { font-weight: 700; margin: .2rem 0; word-break: break-word; }
.dc-edit { position: absolute; top: .5rem; right: .5rem; padding: .15rem .45rem; }
.dc-drop { border: 2px dashed var(--border); border-radius: 14px; padding: 1rem; text-align: center; margin: .6rem 0; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.dc-drop.hot { border-color: var(--gold); background: rgba(255,201,60,.06); }
.dc-drop label { cursor: pointer; }
.dc-file .dc-ic { font-size: 1.4rem; flex: none; }
.tk-mb label.py-f { text-align: left; align-items: stretch; }

/* ===== W5 Group chat + Reports ===== */
.gc-av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, rgba(255,201,60,.25), rgba(125,249,255,.18)); border: 1px solid var(--border); flex: none; }
.gc-sender { font-size: .72rem; opacity: .75; margin: 0 0 2px 8px; font-weight: 600; }
.msg.gc-ann .bub { border: 1px solid var(--gold); box-shadow: 0 0 0 2px rgba(255,201,60,.15); }
.gc-ann-h { font-size: .72rem; font-weight: 800; letter-spacing: .02em; margin-bottom: 2px; opacity: .9; }
.gc-mention { background: rgba(125,249,255,.18); color: var(--cyan); border-radius: 6px; padding: 0 4px; font-weight: 600; }
.msg.mine .gc-mention { background: rgba(0,0,0,.18); color: inherit; }
.gc-mention.me { background: rgba(255,201,60,.3); color: var(--gold); }
.msg.gc-me .bub { box-shadow: 0 0 0 2px rgba(255,201,60,.35); }
.gc-file { display: flex; align-items: center; gap: .6rem; background: rgba(255,255,255,.08); border: 1px solid var(--border); color: inherit; font: inherit; text-align: left; border-radius: 14px; padding: .5rem .7rem; cursor: pointer; margin-bottom: 3px; max-width: 280px; }
.gc-file:hover { border-color: var(--gold); }
.gc-fi { font-size: 1.6rem; }
.gc-fn { display: flex; flex-direction: column; min-width: 0; }
.gc-fn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.gc-fn small { opacity: .7; font-size: .72rem; }
.gc-file-prev { display: flex; align-items: center; gap: .4rem; font-size: .88rem; }
.gc-pins { display: flex; align-items: center; gap: .5rem; padding: .35rem .8rem; background: rgba(255,201,60,.08); border-bottom: 1px solid var(--border); font-size: .82rem; }
.gc-pin-t { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-annbtn.on { background: var(--gold); }
.gc-sug { position: absolute; left: .6rem; right: .6rem; bottom: 62px; background: #101a36; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 6; overflow: hidden; }
.gc-sug button { display: flex; align-items: center; gap: .6rem; width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: .45rem .7rem; cursor: pointer; }
.gc-sug button:hover { background: rgba(255,255,255,.08); }
.gc-sug small { display: block; opacity: .65; font-size: .72rem; }
.chat-compose { position: relative; }
.gc-wide { width: min(480px, 100%); max-height: 88vh; overflow-y: auto; }
.gc-row { display: flex; align-items: flex-start; gap: .5rem; margin: .5rem 0; cursor: pointer; }
.gc-mems, .gc-picks { display: flex; flex-direction: column; gap: .3rem; max-height: 260px; overflow-y: auto; margin-top: .4rem; }
.gc-mem, .gc-pick { display: flex; align-items: center; gap: .6rem; padding: .3rem .2rem; }
.gc-mem small, .gc-pick small { display: block; opacity: .65; font-size: .74rem; }
.gc-pick { cursor: pointer; border-radius: 10px; } .gc-pick:hover { background: rgba(255,255,255,.05); }
.gc-pinrow { border: 1px solid var(--border); border-radius: 12px; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.mbar-chat { position: relative; }

.rp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.rp-tile { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: 2px; }
.rp-tile b { font-family: Sora, sans-serif; font-size: 1.45rem; color: var(--gold); }
.rp-tile span { font-size: .8rem; opacity: .85; }
.rp-tile small { font-size: .72rem; opacity: .6; }
.rp-ic { font-size: 1.2rem; }
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.rp-two > .card { margin-bottom: 0; min-width: 0; }
.rp-scroll { overflow-x: auto; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rp-tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .65; padding: .4rem .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rp-tbl td { padding: .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rp-tbl th.n, .rp-tbl td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-tbl td small { display: block; }
.rp-warn { color: #ffc93c; } .rp-bad { color: #ff8f8f; font-weight: 700; }
.rp-bar { display: inline-block; width: 70px; height: 7px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: .4rem; }
.rp-bar i { display: block; height: 100%; background: #4be3c0; } .rp-bar i.warn { background: #ffc93c; }
.rp-line { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; }
.rp-line > span:first-child { min-width: 90px; } .rp-line .rp-bar { flex: 1; width: auto; margin: 0; }
.rp-chip { display: inline-block; background: rgba(125,249,255,.1); border: 1px solid rgba(125,249,255,.25); border-radius: 999px; padding: 1px 8px; font-size: .76rem; margin: 1px 0; }
.rp-chip.bad { background: rgba(255,107,118,.12); border-color: rgba(255,107,118,.4); color: #ff9aa2; }
.rp-spark { display: flex; align-items: flex-end; gap: .5rem; height: 140px; padding-top: .5rem; }
.rp-spark > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.rp-spark i { display: block; width: 70%; min-height: 3px; background: linear-gradient(180deg, var(--gold), #ff9f1c); border-radius: 6px 6px 0 0; }
.rp-spark b { font-size: .8rem; } .rp-spark small { font-size: .68rem; opacity: .6; }
@media (max-width: 800px) { .rp-two { grid-template-columns: 1fr; } .rp-tiles { grid-template-columns: repeat(2, 1fr); } }
.rp-filters .py-f { min-width: 0; flex: 1 1 140px; }
.rp-tbl td:first-child, .rp-tbl th:first-child { min-width: 130px; }
@media (max-width: 800px) { .rp-filters .py-f { flex: 1 1 calc(50% - .6rem); } .rp-filters .py-f:first-child { flex-basis: 100%; } }

/* ===== W6 Tools (modules) ===== */
body.mod-off-time .nav-item[data-tab="wsTime"], body.mod-off-time .nav-item[data-tab="wsSch"], body.mod-off-time [data-wsgoto="wsSch"], body.mod-off-time .nav-item[data-tab="wsLeave"], body.mod-off-time .nav-item[data-tab="wsApprovals"],
body.mod-off-tasks .nav-item[data-tab="wsTasks"], body.mod-off-docs .nav-item[data-tab="wsDocs"], body.mod-off-groups .nav-item[data-tab="wsGroups"],
body.mod-off-payroll .nav-item[data-tab="wsPayroll"], body.mod-off-payroll .nav-item[data-tab="wsPayslips"], body.mod-off-reports .nav-item[data-tab="wsReports"],
body.mod-off-time [data-wsgoto="wsTime"], body.mod-off-time [data-wsgoto="wsLeave"], body.mod-off-time [data-wsgoto="wsApprovals"],
body.mod-off-tasks [data-wsgoto="wsTasks"], body.mod-off-docs [data-wsgoto="wsDocs"], body.mod-off-payroll [data-wsgoto="wsPayroll"], body.mod-off-payroll [data-wsgoto="wsPayslips"] { display: none !important; }
.ws-mods { display: flex; flex-direction: column; gap: .4rem; margin: .7rem 0; }
.ws-mod { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ws-mod:hover { border-color: var(--gold); }
.ws-mod-i { font-size: 1.4rem; }
.ws-mod b { display: block; } .ws-mod small { display: block; opacity: .65; font-size: .76rem; }
.ws-mod input { width: 20px; height: 20px; flex: none; }
.ws-coming { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.ws-soon { border: 1px dashed var(--border); border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; opacity: .7; }
.ws-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; margin-top: .4rem; }
.ws-preset { display: flex; flex-direction: column; gap: 2px; text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text-main); border-radius: 12px; padding: .6rem .7rem; font: inherit; cursor: pointer; }
.ws-preset > span { font-size: 1.4rem; } .ws-preset small { opacity: .65; font-size: .74rem; }
.ws-preset.on { border-color: var(--gold); background: rgba(255,201,60,.1); }

/* Community keeps Content Library + My Link; Daily Task, My Team, My Allowance and My Store are workspace tools */
body:not(.in-ws) .nav-item[data-tab="dailyTask"], body:not(.in-ws) .nav-item[data-tab="myTeam"],
body:not(.in-ws) .nav-item[data-tab="myAllowance"], body:not(.in-ws) .nav-item[data-tab="myStore"] { display: none !important; }

/* ---- W8: CRM + activity log ---- */
.cr-board { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: .7rem; align-items: start; overflow-x: auto; padding: .6rem 0 .8rem; }
.cr-col { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; padding: .55rem; min-height: 120px; }
.cr-col-h { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.cr-col-h small { width: 100%; opacity: .65; }
.cr-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .6rem; margin-bottom: .45rem; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.cr-card:hover, .cr-row:hover { border-color: var(--gold); }
.cr-card span { font-size: .85rem; opacity: .85; } .cr-card small { opacity: .6; }
.cr-mv { margin-top: .3rem; font-size: .8rem; padding: .25rem; }
.cr-row { cursor: pointer; }
.cr-note { background: rgba(255,255,255,.04); border-radius: 10px; padding: .55rem .7rem; white-space: pre-wrap; font-size: .9rem; }
.cr-act { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.au-row { display: flex; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--border); align-items: baseline; flex-wrap: wrap; }
.au-row small { opacity: .6; margin-left: auto; }
.au-adm { color: var(--gold); font-weight: 700; }
body.mod-off-crm .nav-item[data-tab="wsCrm"] { display: none !important; }

/* ---- W9: Real Estate pack ---- */
.re-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin: .8rem 0; }
.re-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: .8rem; display: flex; flex-direction: column; gap: .25rem; cursor: pointer; }
.re-card:hover { border-color: var(--gold); }
.re-cap { cursor: default; } .re-cap:hover { border-color: var(--border); }
.re-card.re-sold, .re-card.re-rented, .re-card.re-off { opacity: .6; }
.re-price { color: var(--gold); font-weight: 700; font-family: Sora, sans-serif; }
.re-tag { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .2rem; }
.re-capbody { white-space: pre-wrap; font-size: .88rem; opacity: .9; margin: .3rem 0 .5rem; }
.re-vrow { align-items: flex-start; gap: .6rem; flex-wrap: wrap; }
.re-me { background: rgba(255,200,40,.08); border-radius: 8px; }
.re-st-sold, .re-st-rented { background: rgba(60,200,120,.2); } .re-st-reserved { background: rgba(255,180,0,.2); }
body.mod-off-realestate .nav-item[data-tab="wsRe"] { display: none !important; }

/* ---- W10: My Website + listing photos ---- */
.si-link { background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 8px; padding: .35rem .6rem; word-break: break-all; }
.si-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.si-theme { text-align: left; background: rgba(255,255,255,.04); border: 2px solid var(--border); border-radius: 14px; padding: .6rem; color: var(--text-main); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; }
.si-theme.on { border-color: var(--gold); background: rgba(255,200,40,.08); }
.si-theme small { opacity: .65; font-size: .75rem; }
.si-prev { position: relative; height: 70px; border: 1px solid; border-radius: 8px; overflow: hidden; display: block; }
.si-prev i { position: absolute; bottom: 6px; width: 30%; height: 28px; border: 1px solid; border-radius: 4px; } .si-prev i:nth-of-type(1) { left: 6px; } .si-prev i:nth-of-type(2) { left: 36%; }
.si-prev b { position: absolute; right: 8px; bottom: 8px; width: 22%; height: 10px; border-radius: 4px; }
.si-prev em { position: absolute; left: 8px; top: 4px; font-style: normal; font-weight: 700; font-size: 1rem; }
.re-photos { display: flex; gap: .4rem; flex-wrap: wrap; }
.re-ph { position: relative; width: 72px; height: 56px; } .re-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.re-ph button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #e5484d; color: #fff; font-size: .7rem; cursor: pointer; line-height: 1; }
body.mod-off-site .nav-item[data-tab="wsSite"] { display: none !important; }
#siAccent { width: 100%; height: 42px; padding: 3px; cursor: pointer; }
#tab-wsSite .card .py-f { margin-bottom: .6rem; }

body.mod-off-pos .nav-item[data-tab="wsPos"] { display: none !important; }
.po-sell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .po-sell { grid-template-columns: 1fr; } .po-right { position: sticky; bottom: 0; z-index: 5; } }
.po-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; margin-top: .8rem; }
.po-tile { background: var(--card-bg); border: 1px solid var(--border); color: var(--text-main); border-radius: 12px; padding: .5rem; display: flex; flex-direction: column; gap: .15rem; text-align: left; font: inherit; cursor: pointer; }
.po-tile:hover { border-color: var(--gold); } .po-tile.out { opacity: .45; cursor: not-allowed; }
.po-tile img, .po-ph { width: 100%; height: 76px; object-fit: cover; border-radius: 8px; background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.po-pr { color: var(--gold); font-weight: 700; } .po-tile small { color: var(--text-muted, #9aa4bd); }
.po-line { display: flex; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--border); } .po-line small { display: block; color: var(--text-muted, #9aa4bd); }
.po-qty { display: flex; align-items: center; gap: .4rem; } .po-qty button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text-main); cursor: pointer; font-size: 1rem; }
.po-lt { min-width: 70px; text-align: right; }
.po-total { display: flex; justify-content: space-between; font-size: 1.15rem; padding: .7rem 0; } .po-total b { color: var(--gold); }
.po-low { color: #ff7a7a; font-weight: 700; } .po-off { opacity: .5; } .po-row { cursor: pointer; }
.po-hist { display: flex; gap: .6rem; font-size: .8rem; padding: .2rem 0; }
.po-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .8rem 0; } .po-kpis .card { display: flex; flex-direction: column; } .po-kpis b { font-size: 1.3rem; color: var(--gold); }
.po-bar { display: grid; grid-template-columns: 56px 1fr auto; gap: .5rem; align-items: center; font-size: .8rem; padding: .15rem 0; } .po-bar i { display: block; height: 10px; background: var(--gold); border-radius: 5px; }
.nav-item[data-count]::after { content: attr(data-count); background: var(--gold); color: #0A1020; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; margin-left: .5rem; }

body.mod-off-research .nav-item[data-tab="wsRs"] { display: none !important; }
.rs-bar { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; gap: .6rem; align-items: center; font-size: .85rem; padding: .2rem 0; }
.rs-bar i { display: block; height: 10px; background: rgba(255,255,255,.08); border-radius: 5px; overflow: hidden; } .rs-bar u { display: block; height: 100%; background: var(--gold); text-decoration: none; }
.rs-texts { display: flex; flex-direction: column; gap: .4rem; max-height: 260px; overflow: auto; } .rs-texts div { background: rgba(255,255,255,.04); border-radius: 8px; padding: .5rem .7rem; font-size: .9rem; }
.rs-q { border: 1px solid var(--border); border-radius: 12px; padding: .7rem; display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0; }
.rs-ideas { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
.rs-idea { display: flex; gap: .8rem; align-items: flex-start; background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: .8rem; cursor: pointer; } .rs-idea:hover { border-color: var(--gold); } .rs-idea.off { opacity: .5; }
.rs-score { min-width: 62px; text-align: center; border-radius: 12px; padding: .4rem 0; background: color-mix(in srgb, var(--gold) calc(var(--s) * 0.5%), rgba(255,255,255,.05)); } .rs-score b { display: block; font-size: 1.4rem; } .rs-score small { color: var(--text-muted, #9aa4bd); }
.rs-ai { background: rgba(125,249,255,.08); border: 1px solid rgba(125,249,255,.25); border-radius: 10px; padding: .5rem .7rem; margin-top: .5rem; font-size: .88rem; }
a.rs-tool { text-decoration: none; color: inherit; }

body.mod-off-orders .nav-item[data-tab="wsOrd"] { display: none !important; }
.or-modal { max-width: 720px; }
.or-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; } .or-sizes label { display: flex; flex-direction: column; font-size: .75rem; gap: .15rem; } .or-sizes input { padding: .4rem; }
.or-tot { background: rgba(255,255,255,.05); border-radius: 10px; padding: .6rem .8rem; line-height: 1.7; } .or-big { color: var(--gold); font-size: 1.1rem; }
.or-sum { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; margin-top: .6rem; max-width: 420px; margin-left: auto; } .or-sum b { text-align: right; }
.or-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .4rem; margin-top: .8rem; }
.or-stage { display: flex; align-items: center; gap: .4rem; padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text-main); font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.or-stage i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: .7rem; flex: none; }
.or-stage.done { border-color: rgba(125,249,255,.4); } .or-stage.done i { background: var(--cyan, #7DF9FF); color: #0A1020; }
.or-stage.now { border-color: var(--gold); background: rgba(255,201,41,.12); font-weight: 700; } .or-stage.now i { background: var(--gold); color: #0A1020; }
.or-stage:disabled { cursor: default; }
.or-sizes input { width: 100%; min-width: 0; }
.rs-q > input, .rs-q > textarea { width: 100%; padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text-main); font: inherit; }
.or-modal .tk-mb { overflow-x: hidden; }

/* W16 client link + W17 variants */
.or-link { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; } .or-link input { flex: 1; min-width: 0; background: var(--bg-dark, rgba(255,255,255,.05)); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; font: inherit; font-size: .85rem; }
.or-acc { border-color: var(--gold); } #orMocks .re-ph img { height: 90px; width: auto; }
.po-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5rem; }
.po-vbtn { background: var(--card-bg); border: 1px solid var(--border); color: var(--text-main); border-radius: 10px; padding: .55rem; display: flex; flex-direction: column; gap: .1rem; text-align: left; font: inherit; cursor: pointer; } .po-vbtn:hover { border-color: var(--gold); } .po-vbtn.out { opacity: .4; cursor: not-allowed; } .po-vbtn span { color: var(--gold); font-weight: 700; } .po-vbtn small { color: var(--text-muted, #9aa4bd); }
.po-vr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 32px; gap: .3rem; margin: .3rem 0; } .po-vr input { min-width: 0; width: 100%; background: var(--bg-dark, rgba(255,255,255,.05)); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: .4rem .5rem; font: inherit; font-size: .85rem; }
@media (max-width: 560px) { .po-vr { grid-template-columns: 1fr 1fr; padding-bottom: .5rem; border-bottom: 1px solid var(--border); } .po-vr .chat-ic { justify-self: end; } }
.po-lblist { max-height: 40vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: .3rem .5rem; } .lb-r { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--border); } .lb-r:last-child { border-bottom: 0; } .lb-n { width: 64px; background: var(--bg-dark, rgba(255,255,255,.05)); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: .35rem; font: inherit; }

/* W18 purchasing */
body.mod-off-pos .nav-item[data-tab="wsPur"] { display: none !important; }
.pu-line { display: grid; grid-template-columns: minmax(0, 1fr) 80px 96px 32px; gap: .3rem; margin: .3rem 0; align-items: center; } .pu-line select, .pu-line input { min-width: 0; width: 100%; background: var(--bg-dark, rgba(255,255,255,.05)); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: .45rem .5rem; font: inherit; font-size: .9rem; }
.pu-rcv { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--border); } .pu-rcv input { width: 90px; background: var(--bg-dark, rgba(255,255,255,.05)); color: inherit; border: 1px solid var(--border); border-radius: 8px; padding: .4rem; font: inherit; } .pu-rcv small { display: block; color: var(--text-muted, #9aa4bd); }
.pu-modal { max-width: 680px; }
@media (max-width: 560px) { .pu-line { grid-template-columns: 1fr 1fr 32px; } .pu-line select { grid-column: 1 / -1; } }
.pu-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; } .pu-stats .card { margin: 0; }

/* W19 production progress */
.or-prog { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; flex-wrap: wrap; } .or-pl { min-width: 120px; } .or-prog .rp-bar { min-width: 80px; }

/* part 46: collections + shop payments */
.rc-row { flex-wrap: wrap; border-bottom: 1px solid var(--border); padding: .6rem 0; }
.rc-row .grow { flex: 1 1 200px; min-width: 0; } .rc-amt { text-align: right; } .rc-act { display: flex; gap: .3rem; flex-wrap: wrap; }
.rc-sum { margin-bottom: .6rem; }
.si-pm { display: flex; gap: 1rem; flex-wrap: wrap; margin: .4rem 0; }
@media (max-width: 560px) { .rc-row { display: grid; grid-template-columns: 1fr auto; } .rc-act { grid-column: 1 / -1; } .si-rate input { min-width: 0 !important; flex: 1 1 100% !important; } }

/* part 47: AI Orbi chat */
.oc-panel { position: fixed; right: 14px; bottom: 14px; z-index: 60; width: min(380px, calc(100vw - 28px)); height: min(520px, calc(100vh - 100px)); flex-direction: column; background: var(--bg-card, #0f1830); color: inherit; border: 1px solid var(--gold, #f5a800); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.5); overflow: hidden; }
.oc-h { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border); } .oc-h small { margin-left: auto; opacity: .7; font-size: .72rem; }
.oc-x { background: none; border: 0; color: inherit; font-size: 1rem; cursor: pointer; }
.oc-log { flex: 1; overflow-y: auto; padding: .7rem; display: flex; flex-direction: column; gap: .5rem; }
.oc-m { max-width: 88%; padding: .5rem .7rem; border-radius: 12px; font-size: .9rem; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.oc-m.me { align-self: flex-end; background: var(--gold, #f5a800); color: #111; } .oc-m.bot { align-self: flex-start; background: rgba(255,255,255,.07); } .oc-m.err { border: 1px solid #b3261e; }
.oc-chips { display: flex; gap: .35rem; flex-wrap: wrap; padding: 0 .7rem .4rem; } .oc-chip { background: none; border: 1px solid var(--border); color: inherit; border-radius: 99px; padding: .25rem .6rem; font-size: .78rem; cursor: pointer; } .oc-chip:hover { border-color: var(--gold); color: var(--gold); }
.oc-f { display: flex; gap: .4rem; padding: .5rem .7rem; border-top: 1px solid var(--border); } .oc-f input { flex: 1; min-width: 0; background: rgba(255,255,255,.05); color: inherit; border: 1px solid var(--border); border-radius: 10px; padding: .5rem .6rem; font: inherit; }
.oc-note { font-size: .68rem; opacity: .6; text-align: center; padding: 0 .6rem .5rem; }
@media (max-width: 700px) { .oc-panel { right: 8px; left: 8px; width: auto; bottom: 76px; height: min(70vh, 520px); } }

/* W24 packages: locked tools */
.ws-mod-lock { opacity: .85; border-style: dashed; }
.ws-exp { display: block; color: var(--gold); font-size: .72rem; margin-top: .15rem; }
.ws-exp.bad { color: #ff8a8a; }
.tool-tile.tool-lock { opacity: .7; border-style: dashed; }
.tool-tile.tool-lock[disabled] { cursor: default; }

/* W24: Leads needs CRM */
body.mod-off-crm .nav-item[data-tab="wsLeads"], body.mod-off-crm [data-wsgoto="wsLeads"] { display: none !important; }

/* ===== W36 Schedule / W37 Invoicing ===== */
.sc-wrap { overflow-x: auto; margin: .5rem 0; }
.sc-grid { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .84rem; }
.sc-grid th, .sc-grid td { border: 1px solid var(--border); padding: .35rem .3rem; text-align: center; vertical-align: middle; }
.sc-grid thead th { font-size: .78rem; } .sc-grid .today { background: rgba(245, 197, 24, .12); }
.sc-grid .sc-name { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--card, var(--bg)); }
.sc-grid td { height: 52px; min-width: 84px; } .sc-grid td.can { cursor: pointer; } .sc-grid td.can:hover { outline: 2px solid var(--gold); outline-offset: -2px; }
.sc-chip { display: inline-flex; flex-direction: column; padding: .15rem .45rem; border-radius: 8px; color: #111; font-weight: 700; font-size: .78rem; line-height: 1.2; }
.sc-chip small { font-weight: 500; opacity: .75; font-size: .68rem; }
.sc-off, .sc-lv { opacity: .6; font-size: .76rem; }
@media (max-width: 700px) { .iv-line { grid-template-columns: 1fr 56px 80px 28px !important; } }

/* ===== W38 Career Profile ===== */
.cp-skill { background: rgba(245, 197, 24, .18); color: inherit; margin: 0 .2rem .2rem 0; }
#cpPrint { display: none; }
@media print { body.cp-printing > *:not(#cpPrint) { display: none !important; } body.cp-printing #cpPrint { display: block !important; color: #000; background: #fff; padding: 1.5rem; font-family: Georgia, serif; } }
