/* Garap — gaya antarmuka */
:root {
  --primary: #4f46e5; --primary-600: #4338ca; --primary-50: #eef2ff; --primary-100: #e0e7ff;
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f1f3f8; --border: #e4e7ef; --border-2: #d5d9e4;
  --text: #1e2333; --text-2: #5b6275; --text-3: #8a91a4;
  --ok: #10b981; --ok-50: #ecfdf5; --warn: #f59e0b; --warn-50: #fffbeb; --bad: #ef4444; --bad-50: #fef2f2;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.18); --sidebar: 252px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); font-size: 14px; line-height: 1.5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-3); }
.muted { color: var(--text-3); } .small { font-size: 12.5px; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; } .wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tombol & form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-2); background: var(--surface);
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; white-space: nowrap; transition: .12s; text-decoration: none !important; color: var(--text); }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { color: var(--bad); border-color: #fecaca; }
.btn.danger:hover { background: var(--bad-50); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; position: relative; font-size: 17px; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=search], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 8px 11px; background: #fff; outline: none; transition: border .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
textarea { resize: vertical; min-height: 70px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 13px; color: var(--text-2); }
.form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.form h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); margin: 10px 0; font-size: 13.5px; }
.alert.ok { background: var(--ok-50); color: #047857; } .alert.bad { background: var(--bad-50); color: #b91c1c; } .alert.warn { background: var(--warn-50); color: #92400e; }
.alert.info { background: var(--primary-50); color: var(--primary-600); }

/* ---------- Installer & login ---------- */
.install-body, .login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #eef2ff 0%, #f6f7fb 50%, #ecfeff 100%); }
.install-card, .login-card { width: 100%; max-width: 460px; background: #fff; border-radius: 18px; padding: 28px; box-shadow: var(--shadow-lg); }
.install-brand { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.install-brand small { font-weight: 400; color: var(--text-3); font-size: 12px; }
.logo-dot { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-weight: 800; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; }
.checks li.ok { color: #047857; } .checks li.bad { color: #b91c1c; }
.login-card h1 { font-size: 22px; margin: 18px 0 4px; }

/* ---------- Kerangka ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.sb-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; font-weight: 700; font-size: 17px; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none !important; font-weight: 500; cursor: pointer; }
.sb-link:hover { background: var(--surface-2); }
.sb-link.active { background: var(--primary-50); color: var(--primary-600); }
.sb-link .ico { width: 22px; text-align: center; font-size: 16px; }
.sb-link .badge { margin-left: auto; }
.sb-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.team-ico { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.sb-foot { border-top: 1px solid var(--border); padding: 10px; }
.badge { background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
.icon-btn .badge { position: absolute; top: 1px; right: 0; transform: scale(.9); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--border); }
.topbar .title { font-weight: 700; font-size: 16px; }
.search-box { position: relative; width: min(340px, 40vw); margin-left: auto; }
.search-box input { padding-left: 32px; background: var(--surface-2); border-color: transparent; }
.search-box::before { content: "🔍"; position: absolute; left: 10px; top: 8px; font-size: 13px; opacity: .6; }
.search-pop { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); max-height: 420px; overflow: auto; z-index: 50; padding: 6px; }
.search-pop .grp { font-size: 11px; text-transform: uppercase; color: var(--text-3); padding: 8px 8px 2px; font-weight: 600; }
.search-pop a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-pop a:hover { background: var(--surface-2); }
.content { flex: 1; overflow: auto; min-height: 0; }
.page { max-width: 1120px; margin: 0 auto; padding: 22px 22px 60px; }
.burger { display: none; }

/* ---------- Avatar ---------- */
.av { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; border: 2px solid #fff; text-transform: uppercase; }
.av.lg { width: 40px; height: 40px; font-size: 14px; } .av.sm { width: 22px; height: 22px; font-size: 9.5px; border-width: 1.5px; }
.av-stack { display: inline-flex; } .av-stack .av + .av { margin-left: -7px; }
.online { position: relative; } .online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; background: var(--ok); border-radius: 50%; border: 2px solid #fff; }

/* ---------- Kartu / panel ---------- */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.grid-2 > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { font-size: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 500; }
.chip b { font-size: 15px; }
.task-grp { margin-bottom: 14px; }
.task-grp h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.task-grp h4.late { color: var(--bad); }
.task { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 6px; cursor: pointer; background: #fff; transition: .12s; }
.task:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.task .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); flex: none; cursor: pointer; display: grid; place-items: center; font-size: 11px; color: transparent; background: #fff; }
.task .tick:hover { border-color: var(--ok); color: var(--ok); }
.task .meta { font-size: 12px; color: var(--text-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.feed-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.feed-item:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 28px 14px; color: var(--text-3); }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: .12s; text-decoration: none !important; color: var(--text); display: block; }
.team-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.banner { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #eef2ff, #f5f3ff); border: 1px solid var(--primary-100); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }

/* ---------- Halaman tim ---------- */
.team-head { background: #fff; border-bottom: 1px solid var(--border); padding: 18px 22px 0; }
.team-head .inner { max-width: 1120px; margin: 0 auto; }
.team-title { display: flex; align-items: center; gap: 12px; }
.team-title .team-ico { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; }
.team-title h1 { font-size: 21px; }
.tabs { display: flex; gap: 2px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 500; border-bottom: 2.5px solid transparent; white-space: nowrap; text-decoration: none; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.board-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.board-tile { height: 112px; border-radius: var(--radius); padding: 14px; color: #fff; cursor: pointer; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none !important; box-shadow: var(--shadow); transition: transform .12s; }
.board-tile:hover { transform: translateY(-2px); }
.board-tile b { font-size: 15.5px; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.board-tile .prog { height: 5px; border-radius: 9px; background: rgba(255,255,255,.35); overflow: hidden; }
.board-tile .prog i { display: block; height: 100%; background: #fff; }
.board-tile.new { background: var(--surface-2) !important; color: var(--text-2); border: 2px dashed var(--border-2); align-items: center; justify-content: center; box-shadow: none; }
.bg-blue { background: linear-gradient(135deg, #4f46e5, #0ea5e9); } .bg-green { background: linear-gradient(135deg, #059669, #84cc16); }
.bg-orange { background: linear-gradient(135deg, #ea580c, #f59e0b); } .bg-purple { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.bg-pink { background: linear-gradient(135deg, #db2777, #fb7185); } .bg-teal { background: linear-gradient(135deg, #0d9488, #22d3ee); }
.bg-slate { background: linear-gradient(135deg, #334155, #64748b); } .bg-red { background: linear-gradient(135deg, #dc2626, #f97316); }
.bg-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.bg-pick button { width: 44px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.bg-pick button.on { border-color: var(--text); }

/* ---------- Papan kanban ---------- */
.board-page { display: flex; flex-direction: column; height: 100%; }
.board-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: #fff; flex-wrap: wrap; flex: none; }
.board-bar .bname { font-size: 18px; font-weight: 700; padding: 3px 8px; border-radius: 8px; cursor: text; }
.board-bar .bname:hover { background: rgba(255,255,255,.18); }
.board-bar .btn { background: rgba(255,255,255,.2); border-color: transparent; color: #fff; }
.board-bar .btn:hover, .board-bar .btn.on { background: rgba(255,255,255,.35); }
.board-bar a.crumb { color: rgba(255,255,255,.9); }
.board-bar select, .board-bar input { color: var(--text); }
.board-bar select { width: auto; background: rgba(255,255,255,.92); border: 0; padding: 5px 8px; font-size: 13px; }
.board-bar input.filter { width: 170px; background: rgba(255,255,255,.92); border: 0; padding: 5px 10px; font-size: 13px; }
.lists { flex: 1; display: flex; align-items: flex-start; gap: 12px; padding: 4px 16px 16px; overflow-x: auto; overflow-y: hidden; min-height: 0; }
.list { width: 284px; flex: none; background: #eef0f5; border-radius: 14px; display: flex; flex-direction: column; max-height: 100%; }
.list-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 14px; cursor: grab; }
.list-head .lname { font-weight: 600; flex: 1; padding: 2px 4px; border-radius: 6px; }
.list-head .count { font-size: 12px; color: var(--text-3); background: #fff; border-radius: 99px; padding: 0 8px; }
.list-cards { padding: 2px 8px; overflow-y: auto; min-height: 12px; flex: 1; }
.kcard { background: #fff; border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; box-shadow: 0 1px 1px rgba(16,24,40,.08); cursor: pointer; border: 1px solid transparent; position: relative; }
.kcard:hover { border-color: var(--primary); }
.kcard .cover { height: 30px; margin: -9px -10px 8px; border-radius: 10px 10px 0 0; }
.kcard .ktitle { font-size: 14px; word-wrap: break-word; }
.kcard.done .ktitle { color: var(--text-3); text-decoration: line-through; }
.kcard .klabels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.lbl { display: inline-block; height: 8px; min-width: 36px; border-radius: 99px; }
.lbl-full { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 600; min-height: 22px; }
.kfoot { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.kfoot .pill { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 6px; }
.pill.due-late { background: var(--bad); color: #fff; } .pill.due-soon { background: var(--warn); color: #fff; } .pill.due-done { background: var(--ok); color: #fff; }
.prio { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.prio-urgent { background: #fee2e2; color: #b91c1c; } .prio-high { background: #ffedd5; color: #c2410c; } .prio-low { background: #f1f5f9; color: #64748b; }
.kfoot .av-stack { margin-left: auto; }
.add-card { padding: 6px 8px 10px; }
.add-card .btn { width: 100%; justify-content: flex-start; color: var(--text-2); }
.add-list { width: 284px; flex: none; }
.add-list .btn { width: 100%; background: rgba(255,255,255,.3); color: #fff; border: 0; justify-content: flex-start; padding: 11px 14px; }
.add-list .btn:hover { background: rgba(255,255,255,.45); }
.composer textarea { min-height: 58px; margin-bottom: 6px; }
.sortable-ghost { opacity: .35; }
.sortable-drag { transform: rotate(2.5deg); box-shadow: var(--shadow-lg) !important; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; animation: fade .12s; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); position: relative; animation: pop .15s; }
.modal.wide { max-width: 860px; }
.modal-head { padding: 18px 20px 6px; display: flex; align-items: flex-start; gap: 10px; }
.modal-head h2 { font-size: 18px; flex: 1; }
.modal-body { padding: 10px 20px 20px; }
.modal-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.popover { position: fixed; z-index: 120; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); width: 280px; padding: 12px; max-height: 70vh; overflow: auto; }
.popover h4 { font-size: 13px; text-align: center; color: var(--text-2); margin-bottom: 10px; }
.pick-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.pick-row:hover { background: var(--surface-2); }
.pick-row .chk { margin-left: auto; color: var(--primary); font-weight: 700; }

/* ---------- Detail kartu ---------- */
.card-cover { height: 72px; border-radius: 16px 16px 0 0; }
.card-grid { display: grid; grid-template-columns: 1fr 190px; gap: 22px; }
.card-title-input { font-size: 19px; font-weight: 700; border: 1px solid transparent !important; padding: 4px 8px !important; margin-left: -8px; box-shadow: none !important; resize: none; min-height: 0 !important; overflow: hidden; }
.card-title-input:focus { border-color: var(--primary) !important; }
.sect { margin-top: 20px; }
.sect > h4 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.side-actions { display: flex; flex-direction: column; gap: 6px; }
.side-actions h5 { font-size: 11.5px; text-transform: uppercase; color: var(--text-3); letter-spacing: .05em; margin: 8px 0 2px; }
.side-actions .btn { justify-content: flex-start; background: var(--surface-2); border-color: transparent; }
.side-actions .btn:hover { background: var(--border); }
.card-badges { display: flex; gap: 18px; flex-wrap: wrap; }
.card-badges .lbl-title { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.desc-view { background: var(--surface-2); padding: 10px 12px; border-radius: 10px; cursor: pointer; white-space: pre-wrap; word-wrap: break-word; min-height: 44px; }
.desc-view.empty-desc { color: var(--text-3); }
.progress { height: 7px; background: var(--surface-2); border-radius: 9px; overflow: hidden; flex: 1; }
.progress i { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.progress.full i { background: var(--ok); }
.check-item { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 8px; }
.check-item:hover { background: var(--surface-2); }
.check-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.check-item.done span { text-decoration: line-through; color: var(--text-3); }
.check-item .del { opacity: 0; margin-left: auto; }
.check-item:hover .del { opacity: 1; }
.att { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 10px; }
.att:hover { background: var(--surface-2); }
.att .thumb { width: 64px; height: 46px; border-radius: 8px; background: var(--surface-2) center/cover; display: grid; place-items: center; font-weight: 700; font-size: 11px; color: var(--text-3); flex: none; text-transform: uppercase; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment .bubble { background: var(--surface-2); border-radius: 4px 12px 12px 12px; padding: 8px 12px; white-space: pre-wrap; word-wrap: break-word; margin-top: 3px; }
.comment .who { font-size: 13px; } .comment .who b { margin-right: 6px; }
.mention { color: var(--primary-600); font-weight: 600; background: var(--primary-50); border-radius: 4px; padding: 0 3px; }
.mention-pop { position: fixed; z-index: 140; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; width: 230px; max-height: 220px; overflow: auto; }
.mention-pop div { padding: 6px 8px; border-radius: 7px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.mention-pop div.on, .mention-pop div:hover { background: var(--primary-50); }

/* ---------- Obrolan ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 58px - 112px); max-width: 860px; margin: 0 auto; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 18px 8px; }
.msg { display: flex; gap: 10px; margin-top: 12px; }
.msg.cont { margin-top: 2px; } .msg.cont .av { visibility: hidden; height: 0; }
.msg .mbody { max-width: 78%; }
.msg .bubble { background: #fff; border: 1px solid var(--border); padding: 7px 12px; border-radius: 4px 14px 14px 14px; white-space: pre-wrap; word-wrap: break-word; display: inline-block; }
.msg.me { flex-direction: row-reverse; } .msg.me .mbody { text-align: right; }
.msg.me .bubble { background: var(--primary); color: #fff; border-color: var(--primary); border-radius: 14px 4px 14px 14px; text-align: left; }
.msg.me .bubble .mention { background: rgba(255,255,255,.25); color: #fff; }
.msg .mmeta { font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.msg .deleted { font-style: italic; color: var(--text-3); background: transparent !important; border: 1px dashed var(--border-2) !important; color: var(--text-3) !important; }
.msg .mdel { visibility: hidden; font-size: 12px; } .msg:hover .mdel { visibility: visible; }
.day-sep { text-align: center; margin: 18px 0 6px; font-size: 12px; color: var(--text-3); }
.day-sep span { background: var(--bg); padding: 2px 10px; border-radius: 99px; border: 1px solid var(--border); }
.chat-input { display: flex; gap: 8px; padding: 10px 18px 16px; align-items: flex-end; }
.chat-input textarea { min-height: 42px; max-height: 160px; resize: none; border-radius: 12px; }

/* ---------- Pengumuman ---------- */
.post { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; cursor: pointer; transition: .12s; }
.post:hover { border-color: var(--primary); }
.post h3 { font-size: 16.5px; margin: 6px 0; }
.post .excerpt { color: var(--text-2); white-space: pre-wrap; max-height: 66px; overflow: hidden; }
.post-full { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.65; }
.pin { font-size: 11.5px; font-weight: 600; color: #b45309; background: var(--warn-50); padding: 2px 8px; border-radius: 99px; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { font-size: 20px; min-width: 190px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--border); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal .dow { background: var(--surface-2); padding: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-2); }
.cal .day { background: #fff; min-height: 108px; padding: 5px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day:hover { background: #fafbff; }
.cal .day.other { background: #fafafc; } .cal .day.other .dnum { color: var(--text-3); }
.cal .dnum { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .dnum { background: var(--primary); color: #fff; }
.cal .ev { font-size: 11.5px; padding: 2px 6px; border-radius: 5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal .ev.card { background: #fff !important; color: var(--text); border-left: 3px solid; border-radius: 3px; }
.cal .ev.card.done { text-decoration: line-through; color: var(--text-3); }
.cal .more { font-size: 11px; color: var(--text-3); padding-left: 4px; }

/* ---------- Tabel & daftar ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.table th { background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12.5px; }
.table tr:last-child td { border-bottom: 0; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.tag.admin, .tag.owner { background: var(--primary-50); color: var(--primary-600); } .tag.off { background: var(--bad-50); color: #b91c1c; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--primary-50); }
.notif-pop { position: absolute; right: 12px; top: 54px; width: 360px; max-width: calc(100vw - 24px); background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 60; max-height: 70vh; display: flex; flex-direction: column; }
.notif-pop .np-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 6px; }
.notif-pop .np-list { overflow: auto; padding: 4px 8px 10px; }
.checkin-q { margin-bottom: 16px; }
.answer { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.answer .txt { white-space: pre-wrap; word-wrap: break-word; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1e2333; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .15s; max-width: 90vw; }
.toast.bad { background: #b91c1c; } .toast.ok { background: #047857; }

/* ---------- Responsif ---------- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .side-actions { flex-direction: row; flex-wrap: wrap; } .side-actions h5 { width: 100%; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 82vw; max-width: 300px; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open::after { content: ""; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 80; }
  .burger { display: inline-grid; }
  .search-box { width: auto; flex: 1; }
  .topbar .title { display: none; }
  .page { padding: 16px 14px 60px; }
  .list, .add-list { width: 82vw; max-width: 300px; }
  .cal .day { min-height: 70px; } .cal .ev { font-size: 10px; padding: 1px 3px; }
  .modal-bg { padding: 0; } .modal { border-radius: 0; min-height: 100vh; } .card-cover { border-radius: 0; }
  .chat { height: calc(100vh - 58px - 104px); }
  .msg .mbody { max-width: 88%; }
  .hide-sm { display: none !important; }
}

/* ================= v1.1 ================= */
.att-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.msg.me .att-list { justify-content: flex-end; }
.att-img img { max-width: 240px; max-height: 200px; border-radius: 10px; display: block; border: 1px solid var(--border); object-fit: cover; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--border); max-width: 260px; color: var(--text); text-decoration: none !important; font-size: 13px; }
.att-chip:hover { border-color: var(--primary); }
.mtools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-top: 2px; visibility: hidden; }
.msg:hover .mtools, .msg .mtools:has(.react:not(.add)) { visibility: visible; }
.msg.me .mtools { justify-content: flex-end; }
.mtools a { color: var(--text-3); }
.reacts { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.react { border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 0 7px; font-size: 12.5px; cursor: pointer; line-height: 22px; }
.react.mine { background: var(--primary-50); border-color: var(--primary); color: var(--primary-600); }
.react.add { color: var(--text-3); font-size: 11px; }
.emoji-row { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.emoji-row button { font-size: 22px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.emoji-row button:hover { background: var(--surface-2); }
.edited { font-size: 11px; opacity: .7; }
.seen { font-size: 11px; color: var(--primary); margin-top: 2px; }
.pend-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px 18px 0; }
.pend { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 8px; padding: 4px 6px 4px 8px; font-size: 12.5px; max-width: 220px; }
.pend img { width: 30px; height: 30px; object-fit: cover; border-radius: 5px; }
.pend button { border: 0; background: none; cursor: pointer; color: var(--text-3); }
.chat-input .icon-btn { flex: none; height: 42px; }

/* DM */
.dm-wrap { display: grid; grid-template-columns: 300px 1fr; height: 100%; }
.dm-list { border-right: 1px solid var(--border); background: #fff; overflow-y: auto; }
.dm-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--border); }
.dm-item:hover { background: var(--surface-2); } .dm-item.active { background: var(--primary-50); }
.dm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.dm-back { display: none; font-size: 24px; text-decoration: none !important; }
#dm-chat { flex: 1; min-height: 0; }
#dm-chat .chat, .dm-main .chat { height: calc(100vh - 58px - 62px); }

/* Dokumen & markdown */
.docs-grid { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.docs-side { position: sticky; top: 0; max-height: calc(100vh - 200px); overflow: auto; }
.doc-item { display: block; padding: 8px; border-radius: 8px; color: var(--text); text-decoration: none !important; font-weight: 500; }
.doc-item:hover { background: var(--surface-2); } .doc-item.active { background: var(--primary-50); color: var(--primary-600); }
.docs-main { min-height: 360px; }
.doc-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-edit textarea { min-height: 420px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.doc-preview { border: 1px dashed var(--border-2); border-radius: 8px; padding: 10px 14px; max-height: 520px; overflow: auto; }
.md { line-height: 1.65; font-size: 14.5px; word-wrap: break-word; }
.md h2 { font-size: 20px; margin: 16px 0 6px; } .md h3 { font-size: 17px; margin: 14px 0 6px; } .md h4 { font-size: 15px; margin: 12px 0 4px; }
.md p { margin: 0 0 4px; } .md ul, .md ol { margin: 4px 0 8px; padding-left: 22px; } .md ul.md-check { list-style: none; padding-left: 4px; }
.md blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--primary-100); color: var(--text-2); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; } .md-gap { height: 8px; }

/* Laporan */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 26px; } .stat span { font-size: 12.5px; color: var(--text-3); }
.stat.bad b { color: var(--bad); } .stat.warn b { color: #d97706; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.bar-col span { font-size: 10px; color: var(--text-3); margin-top: 3px; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar-pair i { width: 42%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.b-done { background: var(--ok); } .b-new { background: var(--primary-100); }

/* Template papan, tugas, banner */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tpl { border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 11px; cursor: pointer; display: flex !important; flex-direction: column; gap: 2px !important; color: var(--text) !important; }
.tpl input { display: none; } .tpl.on { border-color: var(--primary); background: var(--primary-50); }
.tasks-filter { margin-bottom: 12px; gap: 8px; } .tasks-filter select { width: auto; }
.trow { cursor: pointer; } .trow:hover td { background: #fafbff; }
.trow input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--ok); }
.warn-panel { border-color: #fcd34d; background: #fffdf5; }
.install-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 150; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; width: min(440px, calc(100vw - 24px)); }

@media (max-width: 900px) {
  .docs-grid { grid-template-columns: 1fr; } .docs-side { position: static; max-height: 260px; }
  .doc-edit { grid-template-columns: 1fr; } .doc-preview { display: none; }
}
@media (max-width: 760px) {
  .dm-wrap { grid-template-columns: 1fr; }
  .dm-wrap.has-thread .dm-list { display: none; } .dm-wrap:not(.has-thread) .dm-main { display: none; }
  .dm-back { display: inline-grid; }
  #dm-chat .chat, .dm-main .chat { height: calc(100vh - 58px - 62px); }
  .att-img img { max-width: 180px; }
  .mtools { visibility: visible; }
}
.panel.form > h3 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0 0 4px; }
