.hidden { display: none !important; }
.full { width: 100%; justify-content: center; }
.muted { color: var(--muted); }
.link { color: var(--violet-2); font-size: 13px; font-weight: 600; }
.link:hover { color: var(--violet-3); }

/* ---------- LOGIN ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(90% 80% at 30% 20%, #3b1470 0%, #140a24 55%, #07050b 100%); display: flex; align-items: flex-end; padding: 56px; }
.login-art .orb { position: absolute; border-radius: 50%; filter: blur(90px); }
.login-art .o1 { width: 480px; height: 480px; background: #7c3aed; opacity: .4; top: -100px; right: -100px; }
.login-art .o2 { width: 320px; height: 320px; background: #c4b5fd; opacity: .15; bottom: 10%; left: -80px; }
.login-mark { position: absolute; width: 78%; top: 14%; left: 11%; opacity: .9; filter: drop-shadow(0 30px 80px rgba(139,92,246,.7)); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-14px) rotate(0deg) } }
.login-art-copy { position: relative; }
.login-art h1 { font-family: var(--font-display); font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; }
.login-art h1 .serif { color: var(--violet-3); font-size: 1.15em; }
.login-art p { color: var(--muted); max-width: 420px; margin-top: 14px; }
.login-panel { display: flex; flex-direction: column; padding: 28px 40px; background: var(--bg); }
.back { color: var(--muted); font-size: 14px; }
.back:hover { color: var(--text); }
.login-box { width: min(420px, 100%); margin: auto; display: flex; flex-direction: column; gap: 14px; }
.login-logo { width: 54px; filter: drop-shadow(0 0 16px rgba(139,92,246,.7)); }
.login-box h2 { font-family: var(--font-display); font-weight: 600; font-size: 28px; }
.role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-top: 6px; }
.role-tabs button { padding: 10px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.role-tabs button.on { background: linear-gradient(135deg, #8b5cf6, #5b21b6); color: #fff; }
.acc-list { display: grid; gap: 8px; max-height: 340px; overflow: auto; padding-right: 4px; }
.acc { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; transition: border-color .2s; }
.acc:hover { border-color: var(--line-2); }
.acc.on { border-color: var(--violet); background: rgba(139,92,246,.1); }
.acc span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.acc small { color: var(--muted); font-size: 12px; }
.acc i { font-style: normal; color: var(--violet-2); opacity: 0; }
.acc.on i { opacity: 1; }
.btn:disabled { opacity: .4; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--dim); font-size: 13px; cursor: pointer; }
.link-btn:hover { color: var(--muted); }

/* ---------- AVATARS ---------- */
.av { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.av.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; }
.av img { width: 70%; }
.av-admin { background: linear-gradient(135deg, #c4b5fd, #7c3aed); color: #1e0b3a; }
.av-team { background: linear-gradient(135deg, #8b5cf6, #3b0764); color: #fff; }
.av-client { background: #f4f0ff; color: #2e1065; }
.stack { display: flex; }
.stack .av { margin-left: -8px; border: 2px solid var(--surface); }
.stack .av:first-child { margin-left: 0; }

/* ---------- APP SHELL ---------- */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #0f0919, #08060d); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 26px; font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; font-size: 14px; }
.side-brand img { width: 32px; filter: drop-shadow(0 0 10px rgba(139,92,246,.7)); }
.side-brand em { font-style: normal; color: var(--violet-2); font-weight: 400; margin-left: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.side-nav a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.side-nav a.on { color: #fff; background: linear-gradient(90deg, rgba(139,92,246,.28), rgba(139,92,246,.05)); box-shadow: inset 2px 0 0 var(--violet); }
.ni { width: 20px; text-align: center; color: var(--violet-2); }
.badge { margin-left: auto; font-style: normal; font-size: 11px; background: var(--danger); color: #fff; border-radius: 99px; padding: 1px 8px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.me div { display: flex; flex-direction: column; min-width: 0; }
.me b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; background: radial-gradient(60% 40% at 80% 0%, rgba(109,40,217,.16), transparent 70%); }
.topbar { display: flex; align-items: center; gap: 16px; padding: 26px 34px 18px; }
.crumb { color: var(--violet-2); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.topbar h1 { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -.01em; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.view { padding: 8px 34px 40px; flex: 1; min-height: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; color: var(--muted); }
.mobile-only { display: none; }

/* ---------- CARDS / KPI ---------- */
.card { background: linear-gradient(180deg, rgba(25,18,38,.9), rgba(16,11,26,.9)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-family: var(--font-display); font-weight: 500; font-size: 16px; }
.mt { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.kpi small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.kpi b { font-family: var(--font-display); font-weight: 600; font-size: 28px; letter-spacing: -.01em; }
.kpi b.txt { font-size: 19px; line-height: 1.25; }
.kpi span { color: var(--dim); font-size: 13px; }
.hero-kpi { background: radial-gradient(120% 120% at 100% 0%, #5b21b6 0%, #2a1050 45%, #160c26 100%); border-color: var(--line-2); }
.hero-kpi span { color: var(--violet-3); }

.alert, .rule-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; margin-bottom: 18px; }
.alert { background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.3); }
.alert > span { font-size: 22px; color: var(--danger); }
.alert div { flex: 1; display: flex; flex-direction: column; }
.alert small, .rule-banner small { color: var(--muted); font-size: 13px; }
.alert em { font-style: normal; color: #fca5a5; font-weight: 600; font-size: 14px; }
.rule-banner { background: rgba(139,92,246,.08); border: 1px solid var(--line-2); }
.rule-banner > span { font-size: 22px; color: var(--violet-2); }
.rule-banner div { display: flex; flex-direction: column; }
.rule-banner.slim { padding: 10px 16px; }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td b { display: block; }
.tbl td small { color: var(--muted); font-size: 12px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(139,92,246,.05); }
.tbl tr.off { opacity: .45; }
.who { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 99px; background: rgba(139,92,246,.12); color: var(--violet-3); margin: 2px 4px 2px 0; white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; margin: 12px 0; }
.status, .status-btn { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); border: 0; white-space: nowrap; }
.status.ok, .status-btn.ok { background: rgba(74,222,128,.12); color: var(--ok); }
.status.warn { background: rgba(251,191,36,.12); color: var(--warn); }
.status.err { background: rgba(248,113,113,.12); color: var(--danger); }
.status-btn { cursor: pointer; }

.inp { width: 100%; padding: 11px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); outline: none; }
.inp:focus { border-color: var(--violet); }
.inp.sm { padding: 7px 10px; font-size: 13px; width: auto; max-width: 220px; }
select.inp option { background: var(--surface); }

.load { display: grid; gap: 12px; }
.load-row { display: flex; align-items: center; gap: 12px; }
.load-row > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.load-row b { font-size: 14px; }
.load-row small { color: var(--muted); font-size: 12px; }
.load-row > span { color: var(--muted); font-size: 12px; width: 52px; text-align: right; }
.meter { width: 90px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.06); overflow: hidden; }
.meter.wide { width: 50%; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #6d28d9, #c4b5fd); border-radius: 9px; }
.note { color: var(--muted); font-size: 13px; margin-top: 16px; }
.empty { color: var(--dim); text-align: center; padding: 30px 10px; font-size: 14px; }
.empty.sm { padding: 10px; font-size: 13px; }

.chart { width: 100%; height: 200px; display: block; }
.chart-x { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; margin-top: 4px; }

.client-mini { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; transition: border-color .2s; }
.client-mini:hover { border-color: var(--violet); }
.client-mini div { flex: 1; display: flex; flex-direction: column; }
.client-mini small { color: var(--muted); font-size: 12px; }
.client-mini em { font-style: normal; color: var(--violet-2); font-size: 13px; }
.cm-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 13px; background: linear-gradient(135deg, #2a1050, #12091f); border: 1px solid var(--line-2); color: var(--violet-3); flex-shrink: 0; }
.cm-logo.lg { width: 52px; height: 52px; font-size: 16px; border-radius: 16px; }

.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; }
.ccard.click { transition: border-color .2s, transform .2s; }
.ccard.click:hover { border-color: var(--violet); transform: translateY(-2px); }
.cc-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 16px; }
.ccard h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.cc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cc-row > span { color: var(--muted); font-size: 13px; }
.cc-row .pills { margin: 0; justify-content: flex-end; }
.masked { color: var(--dim); font-weight: 500; letter-spacing: .05em; }
.ccard .btn { margin-top: 14px; }

/* tasks & checkboxes */
.tasks { display: grid; gap: 6px; }
.task, .as-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.task:hover, .as-row:hover { background: rgba(255,255,255,.03); }
.task input, .as-row input { display: none; }
.tick { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; }
input:checked + .tick { background: linear-gradient(135deg, #a78bfa, #6d28d9); border-color: transparent; }
input:checked + .tick::after { content: "✓"; font-size: 12px; color: #fff; font-weight: 800; }
.task div, .as-row div { display: flex; flex-direction: column; min-width: 0; }
.task b, .as-row b { font-size: 14px; font-weight: 600; }
.task small, .as-row small { color: var(--muted); font-size: 12px; }
.task.done b { text-decoration: line-through; color: var(--dim); }
.assign { display: grid; gap: 2px; max-height: 360px; overflow: auto; }

/* jabatan */
.jab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.jab { display: flex; flex-direction: column; gap: 8px; }
.jab-top { display: flex; justify-content: space-between; gap: 8px; }
.jab h3 { font-family: var(--font-display); font-weight: 500; font-size: 15px; }
.jab p { font-size: 13px; flex: 1; }
.jab-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; min-height: 32px; }
.jab-foot small { color: var(--muted); font-size: 12px; }

/* ---------- CHAT ---------- */
.chat { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 130px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(12,8,20,.85); }
.ch-list { border-right: 1px solid var(--line); overflow: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.ch-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 12px 10px 6px; }
.ch { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; transition: background .2s; }
.ch:hover { background: rgba(255,255,255,.03); }
.ch.on { background: rgba(139,92,246,.16); }
.ch > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch em { font-style: normal; color: var(--dim); font-size: 11px; align-self: flex-start; margin-top: 2px; }
.ch-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.ch-ico.grp { background: rgba(139,92,246,.18); color: var(--violet-3); }
.ch-lock { margin-top: auto; font-size: 12px; color: var(--dim); padding: 12px; border-radius: 12px; border: 1px dashed var(--line-2); line-height: 1.5; }
.ch-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ch-head div:first-child { display: flex; flex-direction: column; }
.ch-head small { color: var(--muted); font-size: 12px; }
.msgs { flex: 1; min-height: 0; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 78%; }
.msg.mine { align-self: flex-end; }
.bubble-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg.mine .bubble-wrap { align-items: flex-end; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.meta b { font-size: 13px; }
.meta time { color: var(--dim); font-size: 11px; }
.role-tag { font-size: 10px; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.role-tag.admin { background: rgba(196,181,253,.16); color: var(--violet-3); }
.role-tag.client { background: rgba(244,240,255,.1); color: #fff; }
.msg p { background: rgba(255,255,255,.05); padding: 10px 14px; border-radius: 4px 16px 16px 16px; font-size: 14px; word-wrap: break-word; }
.msg.mine p { background: linear-gradient(135deg, #7c3aed, #5b21b6); border-radius: 16px 4px 16px 16px; }
.msg p.blocked, .msg.mine p.blocked { background: rgba(248,113,113,.07); border: 1px dashed rgba(248,113,113,.45); color: #fca5a5; font-size: 13px; }
.msg p { overflow-wrap: anywhere; }
/* deadline & email */
.task { position: relative; }
.task > div { flex: 1; }
.due { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); white-space: nowrap; }
.due.soon { background: rgba(251,191,36,.14); color: var(--warn); }
.due.late { background: rgba(248,113,113,.14); color: var(--danger); }
.warn-txt { color: var(--warn); font-size: 12px; }
.acct small { font-size: 12px; }

/* tag orang */
.composer { position: relative; }
.mention-pop { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 6px); z-index: 5; max-width: 360px; padding: 6px; border-radius: 16px; background: #1a1229; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); display: grid; gap: 2px; }
.mention-pop.hidden { display: none; }
.mp-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; text-align: left; }
.mp-item span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mp-item b { font-size: 14px; }
.mp-item small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-item.on, .mp-item:hover { background: rgba(139,92,246,.2); }
.mention { color: var(--violet-3); font-weight: 700; background: rgba(139,92,246,.18); padding: 0 5px; border-radius: 6px; }
.mention.me { color: #1e0b3a; background: var(--violet-3); }
.msg.mine .mention { color: #fff; background: rgba(255,255,255,.18); }
.msg.tagged p { box-shadow: 0 0 0 1.5px var(--violet-2), 0 8px 24px -10px var(--violet); }
.msg-del { background: none; border: 0; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 6px; opacity: 0; transition: opacity .15s, background .15s; filter: grayscale(1); }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: .7; }
.msg-del:hover { opacity: 1 !important; background: rgba(248,113,113,.15); filter: none; }
@media (hover: none) { .msg-del { opacity: .55; } }
.msg-link { color: var(--violet-3); text-decoration: underline; text-underline-offset: 3px; }
.msg-link:hover { color: #fff; }
.msg.mine .msg-link { color: #fff; text-decoration-color: rgba(255,255,255,.6); }
.msg.mine .msg-link:hover { text-decoration-color: #fff; }
.orig { display: block; margin-top: 6px; color: #fecaca; font-style: italic; opacity: .85; }
.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.composer input { flex: 1; padding: 12px 16px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); outline: none; }
.composer input:focus { border-color: var(--violet); }
.composer-hint { font-size: 12px; color: var(--dim); padding: 0 20px 12px; }

/* security */
.flag { padding: 16px; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 12px; }
.flag.open { border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.04); }
.flag-top { display: flex; align-items: center; gap: 10px; }
.flag-top div { flex: 1; display: flex; flex-direction: column; }
.flag-top small { color: var(--muted); font-size: 12px; }
.flag-reason { margin-top: 12px; font-size: 12px; font-weight: 700; color: #fca5a5; text-transform: uppercase; letter-spacing: .06em; }
.flag blockquote { margin-top: 6px; padding: 10px 14px; border-left: 2px solid var(--danger); background: rgba(0,0,0,.25); border-radius: 0 10px 10px 0; font-size: 14px; color: #fde2e2; }
.flag-act { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btn.danger { color: #fca5a5; border-color: rgba(248,113,113,.35); }
.rules { display: grid; gap: 10px; }
.rule { padding: 12px 14px; border-radius: 12px; background: rgba(139,92,246,.06); border: 1px solid var(--line); display: flex; flex-direction: column; }
.rule b { font-size: 14px; }
.rule small { color: var(--muted); font-size: 12px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(4,2,8,.7); backdrop-filter: blur(6px); }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 26px; border-radius: 24px; background: linear-gradient(180deg, #1a1228, #110b1b); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -20px rgba(109,40,217,.5); }
.modal h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin-bottom: 18px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fld > span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { cursor: pointer; }
.checks input { display: none; }
.checks span { display: inline-block; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.checks input:checked + span { background: rgba(139,92,246,.2); border-color: var(--violet); color: #fff; }
.m-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* login form & accounts */
.login-form { display: grid; gap: 2px; margin-top: 6px; }
.pw { position: relative; }
.pw .inp { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; opacity: .6; font-size: 16px; padding: 6px; }
.pw-eye:hover, .pw-eye.on { opacity: 1; }
.pw-eye.on { filter: drop-shadow(0 0 6px var(--violet)); }
.login-err { color: #fca5a5; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.login-help { color: var(--dim); font-size: 13px; text-align: center; }
.demo-box { margin-top: 6px; padding: 14px; border-radius: 16px; border: 1px dashed var(--line-2); display: grid; gap: 10px; }
.demo-box > small { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; text-align: center; }
.demo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, background .2s; }
.demo-btn:hover { border-color: var(--violet); background: rgba(139,92,246,.1); }
.demo-btn b { font-size: 14px; }
.demo-btn span { font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.acct { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.acct .link-btn { padding: 0; font-size: 12px; color: var(--violet-2); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: rgba(139,92,246,.12); color: var(--violet-3); padding: 2px 8px; border-radius: 6px; }
.pw-show { margin: 14px 0; padding: 16px; text-align: center; border-radius: 14px; border: 1px dashed var(--line-2); }
.pw-show code { font-size: 20px; background: none; color: #fff; user-select: all; }
.who > div { display: flex; flex-direction: column; }

/* foto profil */
.av-photo { background: var(--surface-2); padding: 0; }
.av-photo img { width: 100%; height: 100%; object-fit: cover; }
.av.xl { width: 84px; height: 84px; border-radius: 24px; font-size: 26px; }
.me { cursor: pointer; transition: border-color .2s; }
.me:hover { border-color: var(--violet); }
.pf-photo { display: flex; align-items: center; gap: 18px; padding: 16px; margin-bottom: 16px; border-radius: 18px; background: rgba(139,92,246,.06); border: 1px solid var(--line); }
.pf-photo-act { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pf-btns label { cursor: pointer; }
.acct-links { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; align-items: end; }
.kpi-save { padding-bottom: 14px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 90; padding: 12px 20px; border-radius: 14px; background: #1f1532; border: 1px solid var(--line-2); font-size: 14px; transition: .3s; max-width: calc(100% - 32px); box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(248,113,113,.5); color: #fecaca; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 260px; padding: 28px; }
  .login-mark { width: 50%; left: auto; right: 6%; top: 10%; }
  .login-panel { padding: 20px 16px 40px; }
  .login-logo { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 70; width: 270px; transform: translateX(-100%); transition: transform .3s; }
  body.side-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .mobile-only { display: grid; }
  .topbar { padding: 18px 16px 12px; flex-wrap: wrap; }
  .topbar h1 { font-size: 21px; }
  .view { padding: 4px 16px 30px; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .ch-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 230px; }
  .ch-main { height: 65vh; }
  .msg { max-width: 92%; }
  .card { overflow-x: auto; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 21px; }
  .top-actions { margin-left: 0; width: 100%; }
}
