/* Yateer Team Chat — front-end app. Colours/fonts come from CSS variables printed by PHP. */
.ytc-root{--ytc-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;--ytc-fs:14px;--ytc-mfs:14px;--ytc-radius:14px;--ytc-primary:#4f46e5;--ytc-primary-txt:#fff;--ytc-bg:#f4f5fb;--ytc-panel:#fff;--ytc-text:#1f2937;--ytc-muted:#6b7280;--ytc-border:#e5e7eb;--ytc-me:#4f46e5;--ytc-me-txt:#fff;--ytc-other:#eef0f6;--ytc-other-txt:#1f2937;--ytc-sidebar:#1e1b4b;--ytc-sidebar-txt:#e0e7ff;--ytc-pop-w:380px;--ytc-pop-h:560px;--ytc-pop-off:20px}
.ytc-root.ytc-inline{position:relative;width:100%;max-width:100%;min-height:480px;margin:0 auto 24px}
.ytc-root .ytc-boot,.ytc-root .ytc-fatal{display:flex;align-items:center;justify-content:center;height:100%;min-height:200px;font-family:var(--ytc-font);color:var(--ytc-muted);padding:20px;text-align:center}

/* ---------- reset inside the app (themes love to style buttons) ---------- */
.ytc-root .ytc-app,.ytc-root .ytc-app *,.ytc-root .ytc-app *::before,.ytc-root .ytc-app *::after{box-sizing:border-box}
.ytc-root .ytc-app{font-family:var(--ytc-font);font-size:var(--ytc-fs);line-height:1.45;color:var(--ytc-text);-webkit-font-smoothing:antialiased;text-align:left}
.ytc-root .ytc-app button{font:inherit;color:inherit;background:none;border:0;margin:0;padding:0;text-transform:none;letter-spacing:normal;box-shadow:none;min-height:0;min-width:0;width:auto;line-height:inherit;cursor:pointer;border-radius:0;text-decoration:none;text-shadow:none;outline-offset:2px}
.ytc-root .ytc-app button:hover,.ytc-root .ytc-app button:focus{background-color:transparent;color:inherit}
.ytc-root .ytc-app button:focus:not(:focus-visible){outline:none}
.ytc-root .ytc-app button:focus-visible{outline:2px solid var(--ytc-primary)}
.ytc-root .ytc-app input,.ytc-root .ytc-app select,.ytc-root .ytc-app textarea{font:inherit;color:var(--ytc-text);background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:calc(var(--ytc-radius)*.6);padding:9px 12px;margin:0;width:100%;max-width:100%;box-shadow:none;height:auto;min-height:0;line-height:1.4}
.ytc-root .ytc-app input[type=checkbox],.ytc-root .ytc-app input[type=radio]{width:auto;padding:0;accent-color:var(--ytc-primary)}
.ytc-root .ytc-app input:focus,.ytc-root .ytc-app select:focus,.ytc-root .ytc-app textarea:focus{outline:none;border-color:var(--ytc-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--ytc-primary) 18%,transparent)}
.ytc-root .ytc-app a{color:var(--ytc-primary)}
.ytc-root .ytc-app h2,.ytc-root .ytc-app h3,.ytc-root .ytc-app h4{font-family:inherit;color:inherit;margin:0;padding:0;line-height:1.25;letter-spacing:normal;text-transform:none}
.ytc-root .ytc-app p{margin:0}
.ytc-root .ytc-app img{max-width:100%;border:0;box-shadow:none;margin:0}
.ytc-root .ytc-app svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.ytc-root [hidden],.ytc-root .ytc-app [hidden]{display:none!important}
.ytc-root .ytc-app mark{background:#fde68a;color:#111;border-radius:3px;padding:0 1px}

/* ---------- dark mode ---------- */
.ytc-root .ytc-app.ytc-dark{--ytc-bg:#0f1115;--ytc-panel:#181b21;--ytc-text:#e6e8ec;--ytc-muted:#9aa1ad;--ytc-border:#2a2f38;--ytc-other:#242832;--ytc-other-txt:#e6e8ec;--ytc-sidebar:#0b0d11}

/* ---------- layout ---------- */
.ytc-root .ytc-app{position:relative;display:grid;grid-template-columns:78px minmax(260px,330px) 1fr;grid-template-rows:100%;height:100%;width:100%;background:var(--ytc-bg);border:1px solid var(--ytc-border);border-radius:var(--ytc-radius);overflow:hidden}
.ytc-root .ytc-app.ytc-info-open.ytc-wide{grid-template-columns:78px minmax(260px,330px) 1fr 320px}
.ytc-root .ytc-app.ytc-full{grid-template-columns:78px 1fr}
.ytc-root .ytc-app.ytc-full .ytc-list{display:none}

.ytc-rail{background:var(--ytc-sidebar);color:var(--ytc-sidebar-txt);display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 0;overflow-y:auto;overflow-x:hidden}
.ytc-brand{width:44px;height:44px;border-radius:12px;background:var(--ytc-primary);color:var(--ytc-primary-txt);display:flex;align-items:center;justify-content:center;margin-bottom:10px;overflow:hidden;flex:0 0 auto}
.ytc-brand img{width:100%;height:100%;object-fit:cover}
.ytc-root .ytc-app .ytc-rail-btn{position:relative;width:62px;padding:8px 0 6px;border-radius:12px;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--ytc-sidebar-txt);opacity:.72;transition:.15s;flex:0 0 auto}
.ytc-root .ytc-app .ytc-rail-btn span{font-size:10.5px;font-weight:500}
.ytc-root .ytc-app .ytc-rail-btn:hover{opacity:1;background:rgba(255,255,255,.08);color:var(--ytc-sidebar-txt)}
.ytc-root .ytc-app .ytc-rail-btn.active{opacity:1;background:rgba(255,255,255,.14);color:var(--ytc-sidebar-txt)}
.ytc-root .ytc-app .ytc-rail-btn.active svg{color:var(--ytc-primary);filter:brightness(1.35)}
.ytc-rail-sp{flex:1}
.ytc-rail .ytc-badge{position:absolute;top:2px;right:8px}
.ytc-me-btn{position:relative}
.ytc-pres{position:absolute;top:28px;left:37px;width:11px;height:11px;border-radius:50%;border:2px solid var(--ytc-sidebar);background:#22c55e}
.ytc-pres-away{background:#f59e0b}.ytc-pres-busy{background:#ef4444}.ytc-pres-invisible{background:#9ca3af}

.ytc-badge{min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#ef4444;color:#fff;font-size:10.5px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;line-height:1}

.ytc-list{background:var(--ytc-panel);border-right:1px solid var(--ytc-border);display:flex;flex-direction:column;min-width:0;min-height:0}
.ytc-list-head{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 10px}
.ytc-list-head h3{font-size:1.35em;font-weight:700}
.ytc-head-acts{display:flex;gap:4px;align-items:center}
.ytc-root .ytc-app .ytc-icon-btn{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--ytc-muted);transition:.15s;flex:0 0 auto}
.ytc-root .ytc-app .ytc-icon-btn:hover{background:var(--ytc-bg);color:var(--ytc-text)}
.ytc-root .ytc-app .ytc-icon-btn.on{color:var(--ytc-primary)}
.ytc-search{display:flex;align-items:center;gap:8px;margin:0 14px 10px;padding:0 12px;background:var(--ytc-bg);border-radius:calc(var(--ytc-radius)*.7);color:var(--ytc-muted);border:1px solid transparent}
.ytc-search:focus-within{border-color:var(--ytc-primary)}
.ytc-search svg{width:17px;height:17px}
.ytc-root .ytc-app .ytc-search input{border:0;background:transparent;padding:9px 0;box-shadow:none}
.ytc-search-sm{margin:0 0 8px}
.ytc-chips{display:flex;gap:6px;padding:0 14px 10px;flex-wrap:wrap}
.ytc-root .ytc-app .ytc-chips button{padding:5px 12px;border-radius:99px;background:var(--ytc-bg);color:var(--ytc-muted);font-size:.88em;font-weight:500}
.ytc-root .ytc-app .ytc-chips button.on{background:var(--ytc-primary);color:var(--ytc-primary-txt)}
.ytc-scroll{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0;scrollbar-width:thin}
.ytc-item{display:flex;align-items:center;gap:12px;padding:10px 14px;cursor:pointer;border-left:3px solid transparent;transition:background .12s}
.ytc-item:hover{background:var(--ytc-bg)}
.ytc-item.active{background:color-mix(in srgb,var(--ytc-primary) 10%,var(--ytc-panel));border-left-color:var(--ytc-primary)}
.ytc-item-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ytc-item-top,.ytc-item-bot{display:flex;align-items:center;gap:8px;min-width:0}
.ytc-item-top b{flex:1;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ytc-item-top time{font-size:.78em;color:var(--ytc-muted);flex:0 0 auto}
.ytc-item-bot small{flex:1;color:var(--ytc-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.9em}
.ytc-item.unread .ytc-item-top b{font-weight:800}
.ytc-item.unread .ytc-item-bot small{color:var(--ytc-text);font-weight:600}
.ytc-item.unread time{color:var(--ytc-primary);font-weight:700}
.ytc-unread{min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--ytc-primary);color:var(--ytc-primary-txt);font-size:.75em;display:inline-flex;align-items:center;justify-content:center}
.ytc-muted-ico{font-size:.8em;opacity:.7}
.ytc-list-empty{padding:40px 20px;text-align:center;color:var(--ytc-muted)}
.ytc-root .ytc-app .ytc-link{color:var(--ytc-primary);font-weight:600;padding:4px 0;font-size:.92em}
.ytc-sec-title{padding:12px 16px 4px;font-size:.75em;text-transform:uppercase;letter-spacing:.06em;color:var(--ytc-muted);font-weight:700}
.ytc-sec-title small{font-weight:400}
.ytc-root .ytc-app .ytc-star{color:var(--ytc-border);padding:6px;border-radius:50%}
.ytc-root .ytc-app .ytc-star svg{width:18px;height:18px}
.ytc-root .ytc-app .ytc-star.on{color:#f59e0b}.ytc-root .ytc-app .ytc-star.on svg{fill:#f59e0b}

/* avatars */
.ytc-av{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;font-weight:600;flex:0 0 auto;object-fit:cover;line-height:1;user-select:none;overflow:hidden}
.ytc-av-group{background:color-mix(in srgb,var(--ytc-primary) 18%,var(--ytc-panel));color:var(--ytc-primary)}
.ytc-av-wrap{position:relative;display:inline-flex;flex:0 0 auto}
.ytc-online{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:50%;background:#22c55e;border:2px solid var(--ytc-panel)}

/* ---------- main ---------- */
.ytc-main{min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--ytc-bg);position:relative}
.ytc-empty-main{margin:auto;text-align:center;padding:40px 24px;color:var(--ytc-muted);max-width:380px}
.ytc-empty-main h3{color:var(--ytc-text);font-size:1.3em;margin-bottom:6px}
.ytc-empty-emoji{font-size:48px;margin-bottom:10px}
.ytc-empty-actions{display:flex;gap:8px;justify-content:center;margin-top:18px;flex-wrap:wrap}

.ytc-chat{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}
.ytc-chat-head{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--ytc-panel);border-bottom:1px solid var(--ytc-border);min-height:64px;flex:0 0 auto}
.ytc-root .ytc-app .ytc-back{display:none}
.ytc-root .ytc-app .ytc-chat-who{display:flex;align-items:center;gap:12px;flex:1;min-width:0;text-align:left}
.ytc-chat-title{display:flex;flex-direction:column;min-width:0}
.ytc-chat-title b{font-size:1.08em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ytc-chat-sub{color:var(--ytc-muted);font-size:.84em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ytc-typing{color:var(--ytc-primary);font-weight:600;display:inline-flex;align-items:center;gap:2px}
.ytc-typing i,.ytc-loading-dots i{display:inline-block;width:4px;height:4px;border-radius:50%;background:currentColor;animation:ytcDot 1.2s infinite}
.ytc-typing i:nth-child(2),.ytc-loading-dots i:nth-child(2){animation-delay:.15s}.ytc-typing i:nth-child(3),.ytc-loading-dots i:nth-child(3){animation-delay:.3s}
.ytc-typing i:first-child{margin-left:4px}
@keyframes ytcDot{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.ytc-loading-dots{display:flex;gap:6px;justify-content:center;padding:40px;color:var(--ytc-muted)}
.ytc-loading-dots i{width:8px;height:8px}

.ytc-msgs{flex:1;overflow-y:auto;overflow-x:hidden;padding:16px 18px 8px;min-height:0;scroll-behavior:auto;outline:none;scrollbar-width:thin}
.ytc-root .ytc-app .ytc-older{display:block;margin:0 auto 12px;font-size:.85em;color:var(--ytc-primary);padding:6px 14px;border-radius:99px;background:var(--ytc-panel);border:1px solid var(--ytc-border)}
.ytc-chat-empty{text-align:center;color:var(--ytc-muted);padding:40px 20px;display:flex;flex-direction:column;align-items:center;gap:12px}
.ytc-day{text-align:center;margin:14px 0 10px;position:sticky;top:0;z-index:2}
.ytc-day span{display:inline-block;background:var(--ytc-panel);color:var(--ytc-muted);font-size:.78em;font-weight:600;padding:4px 12px;border-radius:99px;box-shadow:0 1px 2px rgba(0,0,0,.06);border:1px solid var(--ytc-border)}
.ytc-sys{text-align:center;color:var(--ytc-muted);font-size:.82em;margin:8px auto;max-width:80%;background:color-mix(in srgb,var(--ytc-muted) 10%,transparent);padding:4px 12px;border-radius:99px;width:fit-content}
.ytc-msg{display:flex;align-items:flex-end;gap:8px;margin-top:10px;position:relative}
.ytc-msg.grouped{margin-top:2px}
.ytc-msg.me{justify-content:flex-end}
.ytc-msg-av{width:30px;flex:0 0 30px}
.ytc-bubble-wrap{max-width:min(72%,560px);display:flex;flex-direction:column;position:relative}
.ytc-msg.me .ytc-bubble-wrap{align-items:flex-end}
.ytc-sender{font-size:.78em;font-weight:700;color:var(--ytc-primary);margin:0 0 2px 10px}
.ytc-bubble{position:relative;padding:7px 11px 6px;border-radius:var(--ytc-radius);font-size:var(--ytc-mfs);word-wrap:break-word;overflow-wrap:anywhere;box-shadow:0 1px 1px rgba(0,0,0,.05)}
.ytc-msg.other .ytc-bubble{background:var(--ytc-other);color:var(--ytc-other-txt);border-bottom-left-radius:4px}
.ytc-msg.me .ytc-bubble{background:var(--ytc-me);color:var(--ytc-me-txt);border-bottom-right-radius:4px}
.ytc-msg.grouped.other .ytc-bubble{border-top-left-radius:6px}
.ytc-msg.grouped.me .ytc-bubble{border-top-right-radius:6px}
.ytc-msg.pending .ytc-bubble{opacity:.65}
.ytc-msg.flash .ytc-bubble{animation:ytcFlash 2s}
@keyframes ytcFlash{0%,40%{box-shadow:0 0 0 4px #fbbf24}100%{box-shadow:none}}
.ytc-text{white-space:normal}
.ytc-root .ytc-app .ytc-text a{color:inherit;text-decoration:underline}
.ytc-text code{background:rgba(0,0,0,.12);padding:1px 5px;border-radius:4px;font-family:ui-monospace,Consolas,monospace;font-size:.9em}
.ytc-meta{float:right;margin:6px 0 -2px 10px;font-size:.7em;opacity:.7;white-space:nowrap;line-height:1.6}
.ytc-ticks{margin-left:4px;letter-spacing:-3px}
.ytc-ticks.read{color:#38bdf8;opacity:1;font-weight:700}
.ytc-msg.me .ytc-ticks.read{color:#7dd3fc}
.ytc-deleted{font-style:italic;opacity:.7}
.ytc-quote{border-left:3px solid currentColor;background:rgba(0,0,0,.08);border-radius:6px;padding:4px 8px;margin:1px 0 5px;font-size:.88em;cursor:pointer;display:flex;flex-direction:column;opacity:.9}
.ytc-quote span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.ytc-img{display:block;margin:-3px -7px 4px;border-radius:calc(var(--ytc-radius)*.7);overflow:hidden;cursor:zoom-in;line-height:0}
.ytc-root .ytc-app .ytc-img img{display:block;width:auto;height:auto;max-width:min(320px,100%);max-height:340px;min-width:80px;min-height:60px;object-fit:cover;background:rgba(0,0,0,.06)}
.ytc-bubble.is-media{padding:4px}
.ytc-bubble.is-media .ytc-img{margin:0}
.ytc-bubble.is-media .ytc-meta{position:absolute;right:10px;bottom:8px;background:rgba(0,0,0,.45);color:#fff;padding:0 6px;border-radius:99px;margin:0;opacity:1}
.ytc-root .ytc-app .ytc-filecard{display:flex;align-items:center;gap:10px;padding:8px 10px;background:rgba(0,0,0,.07);border-radius:10px;text-decoration:none;color:inherit;margin-bottom:3px;min-width:200px}
.ytc-filecard small{display:block;opacity:.75;font-size:.8em}
.ytc-fi{font-size:26px;line-height:1}
.ytc-acts{position:absolute;top:-14px;display:none;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:10px;box-shadow:0 4px 14px rgba(0,0,0,.1);padding:2px;z-index:3}
.ytc-msg.other .ytc-acts{right:-10px;transform:translateX(100%)}
.ytc-msg.me .ytc-acts{left:-10px;transform:translateX(-100%)}
.ytc-msg:hover .ytc-acts,.ytc-msg:focus-within .ytc-acts{display:flex}
.ytc-root .ytc-app .ytc-acts button{width:30px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--ytc-muted);border-radius:7px}
.ytc-root .ytc-app .ytc-acts button:hover{background:var(--ytc-bg);color:var(--ytc-text)}
.ytc-acts svg{width:16px!important;height:16px!important}
.ytc-root .ytc-app .ytc-new-pill{position:absolute;left:50%;bottom:86px;transform:translateX(-50%);background:var(--ytc-primary);color:var(--ytc-primary-txt);padding:6px 14px;border-radius:99px;font-size:.85em;font-weight:600;box-shadow:0 4px 14px rgba(0,0,0,.2);z-index:4}
.ytc-drop{position:absolute;inset:0;background:color-mix(in srgb,var(--ytc-primary) 18%,transparent);border:3px dashed var(--ytc-primary);z-index:10;display:flex;align-items:center;justify-content:center;font-size:1.3em;font-weight:700;color:var(--ytc-primary);pointer-events:none}

.ytc-composer{background:var(--ytc-panel);border-top:1px solid var(--ytc-border);padding:8px 10px;position:relative;flex:0 0 auto}
.ytc-compose-row{display:flex;align-items:flex-end;gap:4px}
.ytc-root .ytc-app .ytc-composer textarea{flex:1;resize:none;max-height:140px;min-height:40px;border-radius:20px;padding:9px 14px;background:var(--ytc-bg);border-color:transparent;overflow-y:auto}
.ytc-root .ytc-app .ytc-send{width:42px;height:42px;border-radius:50%;background:var(--ytc-primary);color:var(--ytc-primary-txt);display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:transform .1s}
.ytc-root .ytc-app .ytc-send:hover{background:var(--ytc-primary);color:var(--ytc-primary-txt);transform:scale(1.05)}
.ytc-reply-bar,.ytc-upload-bar{display:flex;align-items:center;gap:10px;background:var(--ytc-bg);border-left:3px solid var(--ytc-primary);border-radius:8px;padding:6px 6px 6px 10px;margin-bottom:8px}
.ytc-reply-bar div{flex:1;min-width:0;display:flex;flex-direction:column;font-size:.88em}
.ytc-reply-bar b{color:var(--ytc-primary)}
.ytc-reply-bar span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ytc-muted)}
.ytc-upload-bar img{width:44px;height:44px;border-radius:6px;object-fit:cover}
.ytc-upload-bar>div{flex:1;min-width:0}
.ytc-prog{height:4px;background:var(--ytc-border);border-radius:4px;margin-top:6px;overflow:hidden}
.ytc-prog i{display:block;height:100%;background:var(--ytc-primary);transition:width .2s}
.ytc-emoji{position:absolute;bottom:100%;left:10px;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.15);padding:8px;display:grid;grid-template-columns:repeat(8,1fr);gap:2px;width:300px;max-width:calc(100% - 20px);z-index:5}
.ytc-root .ytc-app .ytc-emoji button{font-size:20px;padding:4px;border-radius:6px;line-height:1.2}
.ytc-root .ytc-app .ytc-emoji button:hover{background:var(--ytc-bg)}

/* ---------- info drawer ---------- */
.ytc-info{background:var(--ytc-panel);border-left:1px solid var(--ytc-border);display:flex;flex-direction:column;min-height:0;min-width:0}
.ytc-root .ytc-app:not(.ytc-wide) .ytc-info{position:absolute;top:0;right:0;bottom:0;width:min(340px,100%);z-index:20;box-shadow:-10px 0 30px rgba(0,0,0,.12)}
.ytc-info-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--ytc-border);min-height:64px}
.ytc-info-body{padding-bottom:20px}
.ytc-profile-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:22px 16px}
.ytc-profile-card h3{font-size:1.25em;margin-top:6px}
.ytc-profile-card p{color:var(--ytc-muted)}
.ytc-profile-card small{color:var(--ytc-muted)}
.ytc-profile-lg h2{font-size:1.6em;margin-top:8px}
.ytc-info-sec{padding:12px 18px;border-top:1px solid var(--ytc-border)}
.ytc-info-sec>label{display:flex;justify-content:space-between;align-items:center;font-size:.75em;text-transform:uppercase;letter-spacing:.06em;font-weight:700;color:var(--ytc-muted);margin-bottom:6px}
.ytc-member{display:flex;align-items:center;gap:10px;padding:6px 0;position:relative}
.ytc-member-t{flex:1;min-width:0;display:flex;flex-direction:column}
.ytc-member-t b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ytc-member-t small{color:var(--ytc-muted);font-size:.85em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ytc-tag{font-style:normal;font-size:.7em;font-weight:700;background:color-mix(in srgb,var(--ytc-primary) 14%,transparent);color:var(--ytc-primary);padding:2px 7px;border-radius:99px}
.ytc-root .ytc-app .ytc-mini{width:30px;height:30px}
.ytc-mini svg{width:16px!important;height:16px!important}
.ytc-more{position:relative}
.ytc-more summary{list-style:none;cursor:pointer;padding:4px 8px;border-radius:6px;color:var(--ytc-muted)}
.ytc-more summary::-webkit-details-marker{display:none}
.ytc-more>div{position:absolute;right:0;top:100%;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.12);z-index:5;min-width:130px;padding:4px}
.ytc-root .ytc-app .ytc-more button{display:block;width:100%;text-align:left;padding:7px 10px;border-radius:6px}
.ytc-root .ytc-app .ytc-more button:hover{background:var(--ytc-bg)}
.ytc-toggle{display:flex!important;justify-content:flex-start!important;align-items:center;gap:10px;cursor:pointer;text-transform:none!important;letter-spacing:normal!important;font-size:1em!important;font-weight:500!important;color:var(--ytc-text)!important;padding:4px 0}

/* ---------- buttons ---------- */
.ytc-root .ytc-app .ytc-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 16px;border-radius:calc(var(--ytc-radius)*.6);background:var(--ytc-panel);border:1px solid var(--ytc-border);font-weight:600;color:var(--ytc-text);transition:.15s;white-space:nowrap}
.ytc-root .ytc-app .ytc-btn:hover{border-color:var(--ytc-primary);color:var(--ytc-primary);background:var(--ytc-panel)}
.ytc-root .ytc-app .ytc-btn svg{width:17px;height:17px}
.ytc-root .ytc-app .ytc-btn-primary{background:var(--ytc-primary);border-color:var(--ytc-primary);color:var(--ytc-primary-txt)}
.ytc-root .ytc-app .ytc-btn-primary:hover{background:var(--ytc-primary);color:var(--ytc-primary-txt);filter:brightness(1.08)}
.ytc-root .ytc-app .ytc-btn-danger{color:#dc2626;border-color:#fecaca}
.ytc-root .ytc-app .ytc-btn-danger:hover{background:#fef2f2;color:#dc2626;border-color:#dc2626}
.ytc-root .ytc-app .ytc-btn-block{width:100%}
.ytc-root .ytc-app .ytc-btn-sm{padding:6px 12px;font-size:.88em;margin-top:6px}
.ytc-root .ytc-app .ytc-btn-xs{padding:3px 9px;font-size:.78em;border-radius:99px}
.ytc-root .ytc-app .ytc-btn:disabled{opacity:.6;cursor:wait}

/* ---------- modal / lightbox / toast ---------- */
.ytc-modal{position:absolute;inset:0;background:rgba(10,12,20,.45);z-index:50;display:flex;align-items:flex-start;justify-content:center;padding:40px 14px;overflow-y:auto;backdrop-filter:blur(2px)}
.ytc-modal-box{background:var(--ytc-panel);border-radius:var(--ytc-radius);width:100%;max-width:520px;padding:22px;position:relative;box-shadow:0 20px 60px rgba(0,0,0,.3);animation:ytcPop .18s ease-out}
@keyframes ytcPop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.ytc-modal-box h3{font-size:1.2em;margin-bottom:14px;padding-right:30px}
.ytc-root .ytc-app .ytc-modal-x{position:absolute;right:12px;top:12px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--ytc-muted)}
.ytc-root .ytc-app .ytc-modal-x:hover{background:var(--ytc-bg)}
.ytc-form label{display:block;font-weight:600;font-size:.9em;margin-bottom:12px}
.ytc-form label input,.ytc-form label select,.ytc-form label textarea{margin-top:5px!important;font-weight:400}
.ytc-row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ytc-form-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;align-items:center;flex-wrap:wrap}
.ytc-sp{flex:1}
.ytc-lbl{font-weight:600;font-size:.9em;margin:6px 0;display:flex;justify-content:space-between}
.ytc-count{color:var(--ytc-muted);font-weight:400}
.ytc-pick{max-height:300px;overflow-y:auto;border:1px solid var(--ytc-border);border-radius:10px}
.ytc-form .ytc-pick-row,.ytc-pick-row{display:flex!important;align-items:center;gap:10px;padding:8px 12px;margin:0!important;cursor:pointer;font-weight:400!important;border-bottom:1px solid var(--ytc-border)}
.ytc-pick-row:last-child{border-bottom:0}
.ytc-pick-row:hover{background:var(--ytc-bg)}
.ytc-pick-txt{display:flex;flex-direction:column;min-width:0}
.ytc-pick-txt small{color:var(--ytc-muted);font-size:.85em}
.ytc-group-top{display:flex;gap:12px;align-items:flex-end}
.ytc-group-top label{flex:1}
.ytc-root .ytc-app .ytc-group-av{width:52px;height:52px;border-radius:50%;background:var(--ytc-bg);font-size:26px;margin-bottom:12px;border:2px dashed var(--ytc-border);flex:0 0 auto}
.ytc-av-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}
.ytc-root .ytc-app .ytc-av-grid button{aspect-ratio:1;border-radius:50%;font-size:22px;display:flex;align-items:center;justify-content:center;transition:transform .12s;border:3px solid transparent}
.ytc-root .ytc-app .ytc-av-grid button:hover{transform:scale(1.1)}
.ytc-root .ytc-app .ytc-av-grid button.on{border-color:var(--ytc-text)}
.ytc-av-foot label{margin:0}
.ytc-lightbox{position:absolute;inset:0;background:rgba(0,0,0,.88);z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;cursor:zoom-out}
.ytc-lightbox img{max-width:100%;max-height:calc(100% - 40px);object-fit:contain;border-radius:6px}
.ytc-root .ytc-app .ytc-lb-dl{color:#fff;margin-top:10px;font-size:.9em}
.ytc-toasts{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);z-index:70;display:flex;flex-direction:column;gap:6px;align-items:center;pointer-events:none;width:90%}
.ytc-toast{background:#111827;color:#fff;padding:10px 16px;border-radius:10px;font-size:.9em;box-shadow:0 8px 24px rgba(0,0,0,.25);animation:ytcPop .2s;transition:opacity .3s;max-width:100%}
.ytc-toast.bad{background:#dc2626}.ytc-toast.out{opacity:0}

/* ---------- login ---------- */
.ytc-root .ytc-app.ytc-solo{display:flex}
.ytc-root .ytc-app.ytc-solo>div{flex:1}
.ytc-login{flex:1;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at 20% 10%,color-mix(in srgb,var(--ytc-primary) 20%,transparent),transparent 45%),radial-gradient(circle at 90% 90%,color-mix(in srgb,var(--ytc-primary) 14%,transparent),transparent 40%),var(--ytc-bg);overflow-y:auto}
.ytc-login-card{background:var(--ytc-panel);border-radius:calc(var(--ytc-radius)*1.3);padding:32px 28px;width:100%;max-width:380px;box-shadow:0 20px 50px rgba(0,0,0,.1);border:1px solid var(--ytc-border);text-align:center}
.ytc-login-card h2{font-size:1.5em;margin:10px 0 4px}
.ytc-login-card>p{color:var(--ytc-muted);margin-bottom:20px}
.ytc-login-card label{display:block;text-align:left;font-weight:600;font-size:.88em;margin-bottom:14px}
.ytc-login-card label input{margin-top:5px!important;font-weight:400;padding:11px 14px}
.ytc-login-icon{width:60px;height:60px;border-radius:18px;background:var(--ytc-primary);color:var(--ytc-primary-txt);display:inline-flex;align-items:center;justify-content:center}
.ytc-login-icon svg{width:30px!important;height:30px!important}
.ytc-login-logo{max-height:60px;width:auto!important}
.ytc-pw{position:relative;display:block}
.ytc-root .ytc-app .ytc-pw-eye{position:absolute;right:8px;top:50%;transform:translateY(-35%);padding:4px 6px;opacity:.6}
.ytc-login-err{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;border-radius:8px;padding:8px 12px;margin-bottom:14px;font-size:.9em;text-align:left}
.ytc-root .ytc-app .ytc-login-card .ytc-btn{padding:12px;margin-top:4px;font-size:1.02em}
.ytc-login-foot{display:block;margin-top:16px;color:var(--ytc-muted)}

/* ---------- pages (work, support, history, profile) ---------- */
.ytc-page{flex:1;overflow-y:auto;padding:22px 26px;min-height:0;display:flex;flex-direction:column;gap:14px}
.ytc-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.ytc-page-head h2{font-size:1.5em;margin-bottom:2px}
.ytc-page .ytc-chips{padding:0}
.ytc-muted{color:var(--ytc-muted)}
.ytc-small{font-size:.85em}
.ytc-center{text-align:center}
.ytc-green{color:#16a34a}
.ytc-card{background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:var(--ytc-radius);padding:18px}
.ytc-card h4{font-size:1.02em;margin-bottom:12px}

.ytc-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
.ytc-col{background:color-mix(in srgb,var(--ytc-muted) 8%,transparent);border-radius:var(--ytc-radius);padding:10px;min-height:120px;display:flex;flex-direction:column;gap:8px}
.ytc-col-head{font-weight:700;padding:4px 6px}
.ytc-col-head small{color:var(--ytc-muted);font-weight:500;margin-left:4px}
.ytc-col-empty{color:var(--ytc-muted);font-size:.88em;text-align:center;padding:16px}
.ytc-task{background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:calc(var(--ytc-radius)*.75);padding:10px 12px;cursor:pointer;border-left:4px solid #94a3b8;transition:box-shadow .15s}
.ytc-task:hover{box-shadow:0 4px 14px rgba(0,0,0,.08)}
.ytc-task.prio-high{border-left-color:#f59e0b}.ytc-task.prio-urgent{border-left-color:#ef4444}.ytc-task.prio-low{border-left-color:#22c55e}.ytc-task.prio-normal{border-left-color:var(--ytc-primary)}
.ytc-task b{display:block;margin:4px 0 2px}
.ytc-task p{color:var(--ytc-muted);font-size:.88em}
.ytc-task-top{display:flex;justify-content:space-between;gap:6px;font-size:.75em}
.ytc-prio{text-transform:uppercase;font-weight:700;letter-spacing:.05em;color:var(--ytc-muted)}
.ytc-due.over{color:#dc2626;font-weight:700}
.ytc-task-foot{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:.85em;gap:6px}
.ytc-task-foot span{display:flex;align-items:center;gap:6px}
.ytc-col-done .ytc-task b{text-decoration:line-through;opacity:.65}

.ytc-tickets{display:flex;flex-direction:column;gap:8px}
.ytc-root .ytc-app .ytc-ticket{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:var(--ytc-radius);text-align:left;width:100%}
.ytc-root .ytc-app .ytc-ticket:hover{border-color:var(--ytc-primary);background:var(--ytc-panel)}
.ytc-tk-id{font-weight:700;color:var(--ytc-muted);font-size:.9em}
.ytc-tk-main{flex:1;min-width:0;display:flex;flex-direction:column}
.ytc-tk-main small{color:var(--ytc-muted)}
.ytc-status{display:inline-block;font-size:.75em;font-weight:700;text-transform:capitalize;padding:3px 10px;border-radius:99px;background:#e5e7eb;color:#374151;white-space:nowrap}
.st-open{background:#dbeafe;color:#1e40af}.st-pending{background:#fef3c7;color:#92400e}.st-answered{background:#ede9fe;color:#5b21b6}.st-resolved{background:#dcfce7;color:#166534}.st-closed{background:#f3f4f6;color:#6b7280}
.ytc-ticket-view{padding-bottom:10px}
.ytc-ticket-view .ytc-page-head{justify-content:flex-start;flex-wrap:nowrap}
.ytc-thread{flex:1;display:flex;flex-direction:column;gap:10px;overflow-y:auto;min-height:120px}
.ytc-tr{max-width:80%;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:var(--ytc-radius);padding:10px 14px}
.ytc-tr.me{align-self:flex-end;background:color-mix(in srgb,var(--ytc-primary) 8%,var(--ytc-panel))}
.ytc-tr.staff{border-left:4px solid var(--ytc-primary)}
.ytc-tr-head{display:flex;justify-content:space-between;gap:10px;font-size:.85em;margin-bottom:4px}
.ytc-tr-head time{color:var(--ytc-muted)}
.ytc-tr .ytc-img{margin:6px 0 0}
.ytc-tr-form{display:flex;gap:8px;align-items:flex-end;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:var(--ytc-radius);padding:8px}
.ytc-root .ytc-app .ytc-tr-form textarea{flex:1;border:0;resize:vertical;min-height:44px}
.ytc-tr-form label{cursor:pointer}
.ytc-tr-form label.on{color:var(--ytc-primary);background:var(--ytc-bg)}
.ytc-file-in{border:1px dashed var(--ytc-border);border-radius:10px;padding:10px}

.ytc-hist-form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ytc-hist-form .ytc-search{margin:0;flex:1 1 260px;background:var(--ytc-panel);border-color:var(--ytc-border)}
.ytc-root .ytc-app .ytc-hist-form select{width:auto;max-width:220px}
.ytc-hist-form label{display:flex;align-items:center;gap:6px;font-size:.88em;color:var(--ytc-muted)}
.ytc-root .ytc-app .ytc-hist-form input[type=date]{width:auto;padding:7px 8px}
.ytc-hist-res{display:flex;flex-direction:column;gap:6px}
.ytc-root .ytc-app .ytc-hit{display:flex;gap:12px;padding:10px 14px;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:calc(var(--ytc-radius)*.8);text-align:left;width:100%;align-items:flex-start}
.ytc-root .ytc-app .ytc-hit:hover{border-color:var(--ytc-primary);background:var(--ytc-panel)}
.ytc-hit-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ytc-hit-top{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.ytc-hit-top small{color:var(--ytc-muted)}
.ytc-hit-top time{margin-left:auto;font-size:.78em;color:var(--ytc-muted)}
.ytc-hit-body{overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
.ytc-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.ytc-g-img{aspect-ratio:1;border-radius:10px;overflow:hidden;display:block}
.ytc-g-img img{width:100%;height:100%;object-fit:cover}
.ytc-gallery .ytc-filecard{background:var(--ytc-panel);border:1px solid var(--ytc-border);min-width:0}

.ytc-profile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;align-items:start}
.ytc-profile-grid .ytc-profile-card{padding:6px 0 14px}
.ytc-root .ytc-app .ytc-av-edit{position:relative;border-radius:50%;overflow:hidden;display:block}
.ytc-av-edit .ytc-av-lbl{position:absolute;inset:auto 0 0 0;background:rgba(0,0,0,.55);color:#fff;font-size:.75em;padding:5px 0 8px;opacity:0;transition:.15s}
.ytc-av-edit:hover .ytc-av-lbl{opacity:1}
.ytc-person{display:flex;flex-direction:column;height:100%}
.ytc-person-body{padding:10px 0 30px}
.ytc-person-acts{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:14px}
.ytc-person-grid{max-width:520px;margin:0 auto}

/* ---------- narrow (mobile + popup) ---------- */
.ytc-root .ytc-app.ytc-narrow{grid-template-columns:100%!important;grid-template-rows:minmax(0,1fr) auto}
.ytc-narrow .ytc-rail{grid-row:2;flex-direction:row;justify-content:space-around;padding:4px 4px calc(4px + env(safe-area-inset-bottom));overflow:visible;gap:0;border-top:1px solid rgba(255,255,255,.08)}
.ytc-narrow .ytc-brand,.ytc-narrow .ytc-rail-sp,.ytc-root .ytc-app.ytc-narrow .ytc-theme{display:none}
.ytc-root .ytc-app.ytc-narrow .ytc-rail-btn{width:auto;flex:1;padding:6px 0 4px;border-radius:10px}
.ytc-narrow .ytc-rail .ytc-badge{right:calc(50% - 22px)}
.ytc-narrow .ytc-pres{left:calc(50% + 6px);top:24px}
.ytc-narrow .ytc-list,.ytc-narrow .ytc-main{grid-row:1;grid-column:1}
.ytc-narrow .ytc-main{display:none}
.ytc-narrow.ytc-show-main .ytc-main,.ytc-narrow.ytc-full .ytc-main{display:flex}
.ytc-narrow.ytc-show-main .ytc-list{display:none}
.ytc-narrow.ytc-show-main .ytc-rail{display:none}
.ytc-root .ytc-app.ytc-narrow .ytc-back{display:inline-flex}
.ytc-narrow .ytc-bubble-wrap{max-width:84%}
.ytc-narrow .ytc-msgs{padding:12px 10px 6px}
.ytc-narrow .ytc-page{padding:16px 14px}
.ytc-narrow .ytc-board{grid-template-columns:1fr}
.ytc-narrow .ytc-row2{grid-template-columns:1fr}
.ytc-narrow .ytc-acts{top:auto;bottom:-6px}
.ytc-narrow .ytc-msg.other .ytc-acts{right:auto;left:0;transform:translateY(100%)}
.ytc-narrow .ytc-msg.me .ytc-acts{left:auto;right:0;transform:translateY(100%)}
.ytc-narrow .ytc-av-grid{grid-template-columns:repeat(6,1fr)}
.ytc-narrow .ytc-modal{padding:16px 10px}
.ytc-narrow .ytc-info{width:100%!important}
.ytc-narrow .ytc-tr{max-width:95%}
@media (hover:none){.ytc-acts{display:none!important}.ytc-msg.show-acts .ytc-acts{display:flex!important}}

/* ---------- popup ---------- */
.ytc-root.ytc-popup{position:fixed;bottom:var(--ytc-pop-off);z-index:999990;font-family:var(--ytc-font);font-size:var(--ytc-fs)}
.ytc-root.ytc-pos-right{right:var(--ytc-pop-off)}
.ytc-root.ytc-pos-left{left:var(--ytc-pop-off)}
.ytc-root .ytc-launcher{display:flex;align-items:center;gap:8px;height:58px;min-width:58px;padding:0 18px;border-radius:99px;background:var(--ytc-primary);color:var(--ytc-primary-txt);border:0;box-shadow:0 10px 30px color-mix(in srgb,var(--ytc-primary) 45%,transparent),0 4px 10px rgba(0,0,0,.15);cursor:pointer;font:600 15px/1 var(--ytc-font);position:relative;transition:transform .15s;margin:0;justify-content:center}
.ytc-root .ytc-launcher:hover{transform:translateY(-2px);background:var(--ytc-primary);color:var(--ytc-primary-txt)}
.ytc-root .ytc-launcher svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ytc-root .ytc-launcher .ytc-badge{position:absolute;top:-4px;right:-4px;border:2px solid #fff;height:22px;min-width:22px}
.ytc-root.ytc-popup.is-open .ytc-launcher{transform:scale(.9)}
.ytc-pop-win{position:absolute;bottom:72px;width:var(--ytc-pop-w);height:var(--ytc-pop-h);max-height:calc(100vh - 110px);background:var(--ytc-panel);border-radius:calc(var(--ytc-radius) + 4px);box-shadow:0 24px 70px rgba(0,0,0,.28);display:flex;flex-direction:column;overflow:hidden;animation:ytcPop .2s ease-out}
.ytc-pos-right .ytc-pop-win{right:0}.ytc-pos-left .ytc-pop-win{left:0}
.ytc-pop-bar{display:flex;align-items:center;justify-content:space-between;padding:10px 12px 10px 16px;background:var(--ytc-primary);color:var(--ytc-primary-txt);flex:0 0 auto}
.ytc-pop-bar b{font-size:1.02em}
.ytc-root .ytc-pop-x{background:none;border:0;color:inherit;cursor:pointer;padding:4px;border-radius:50%;display:flex;margin:0}
.ytc-root .ytc-pop-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.ytc-pop-body{flex:1;min-height:0;display:flex}
.ytc-pop-body>.ytc-app{border:0;border-radius:0;flex:1}
@media(max-width:640px){
	.ytc-pop-win{position:fixed;inset:0;width:100%;height:100%;max-height:none;border-radius:0;bottom:0}
	.ytc-root.ytc-popup.is-open .ytc-launcher{display:none}
	.ytc-root.ytc-inline{height:calc(100vh - 80px)!important;min-height:420px}
}
.ytc-root .ytc-app .ytc-page .ytc-chips button:not(.on){background:var(--ytc-panel);border:1px solid var(--ytc-border)}

/* v2: support desk */
.ytc-chip-sm{font-style:normal;font-size:.68em;font-weight:700;background:color-mix(in srgb,var(--ytc-primary) 14%,transparent);color:var(--ytc-primary);padding:1px 6px;border-radius:5px;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto}
.ytc-client-chip{display:inline-block;align-self:flex-start;font-size:.75em;font-weight:700;background:#eef2ff;color:#3730a3;padding:1px 8px;border-radius:6px;margin-bottom:2px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ytc-dark .ytc-client-chip{background:#312e81;color:#e0e7ff}
.ytc-client-chip-lg{font-size:.9em;padding:3px 10px;margin:0}
.ytc-tk-prio{font-size:1.1em}
.ytc-tk-filters select{flex:0 1 auto}
.ytc-tk-client{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;background:var(--ytc-panel);border:1px solid var(--ytc-border);border-radius:var(--ytc-radius);padding:10px 14px;font-size:.9em;color:var(--ytc-muted)}
.ytc-root .ytc-app .ytc-tk-client a{text-decoration:none}
.ytc-tk-title{flex:1;min-width:0}
.ytc-root .ytc-app .ytc-tk-status{width:auto;flex:0 0 auto;text-transform:capitalize}
.ytc-ticket-view .ytc-page-head{align-items:center}
.ytc-root.ytc-admin-embed{margin:0}
