/* ==========================================================================
   RUANG KERJA AI — MODERN BENTO & PILL WORKSPACE (REFERENCE IMAGE STYLE)
   Deep Navy (#0f1e46) · Ocean Teal (#1799cd) · Neon Lime (#dff952) · Soft Ice (#f4f7fc)
   ========================================================================== */

:root {
  --bg: #eef2f8;
  --panel: #ffffff;
  --panel2: #f4f7fc;
  --panel3: #e7edf7;
  --input-bg: #f4f7fc;
  --line: #e4eaf4;
  --line2: #d2dceb;

  --navy: #0f1e46;
  --navy-hover: #182d63;
  --teal: #1799cd;
  --royal: #1d52b8;
  --lime: #dff952;
  --lime-dark: #c5e232;
  --sky-card: #d9ecff;

  --text: #0f1e46;
  --text-sec: #3b4a6b;
  --muted: #64748b;

  --accent: #1d52b8;
  --accent2: #0f1e46;
  --accent-soft: #eaf1ff;
  --accent-border: #c5d9ff;

  --green: #0f8a5f;
  --green-soft: #e6f9f1;
  --green-border: #b5ebd5;

  --amber: #b45309;
  --amber-soft: #fef6e0;
  --amber-border: #fae19c;

  --red: #d92d20;
  --red-soft: #fef1f0;
  --red-border: #fecdca;

  --shadow-card: 0 1px 2px rgba(15, 30, 70, 0.04), 0 8px 24px rgba(15, 30, 70, 0.05);
  --shadow-hover: 0 2px 6px rgba(15, 30, 70, 0.06), 0 16px 36px rgba(15, 30, 70, 0.10);
  --shadow-float: 0 18px 42px rgba(15, 30, 70, 0.12), 0 4px 12px rgba(15, 30, 70, 0.06);
  --shadow-btn: 0 1px 2px rgba(15, 30, 70, 0.06);

  /* Permukaan "terpilih/aktif" — gelap di mode terang, terang di mode gelap */
  --ink: #0f1e46;
  --ink-hover: #1b3170;
  --on-ink: #ffffff;
  --ink-accent: #dff952;

  /* Form */
  --input-border: #dde5f1;
  --input-hover: #c6d3e6;
  --placeholder: #97a3bb;
  --focus: #1799cd;
  --focus-ring: 0 0 0 4px rgba(23, 153, 205, 0.16);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 160ms;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 26px;
}

html[data-theme="dark"] {
  --bg: #080e1e;
  --panel: #10192e;
  --panel2: #17233f;
  --panel3: #203054;
  --input-bg: #152039;
  --line: #213052;
  --line2: #2d406b;

  --navy: #0a142e;
  --navy-hover: #162652;
  --sky-card: #162b4d;

  --text: #f4f7fc;
  --text-sec: #c3cfe6;
  --muted: #93a2bf;

  --accent: #388bfd;
  --accent2: #58a6ff;
  --accent-soft: #16294a;
  --accent-border: #25467a;

  --green: #34d399;
  --green-soft: #0d2e24;
  --green-border: #17523f;

  --amber: #fbbf24;
  --amber-soft: #2e220c;
  --amber-border: #594114;

  --red: #f87171;
  --red-soft: #301518;
  --red-border: #5e262b;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 40px rgba(0, 0, 0, 0.42);
  --shadow-float: 0 22px 48px rgba(0, 0, 0, 0.5);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.3);

  --ink: #e8eefc;
  --ink-hover: #ffffff;
  --on-ink: #0b1430;
  --ink-accent: #1d52b8;

  --input-border: #26375c;
  --input-hover: #34497a;
  --placeholder: #5f7194;
  --focus: #58a6ff;
  --focus-ring: 0 0 0 4px rgba(88, 166, 255, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.006em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
code, pre { font-family: "JetBrains Mono", "SF Mono", "Cascadia Code", ui-monospace, Consolas, monospace; font-size: 12.5px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; line-height: 1.5; }
.err { color: var(--red); font-size: 12.5px; font-weight: 550; min-height: 18px; }
.full-w { width: 100%; justify-content: center; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 999px; }

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
.login form {
  background: var(--panel);
  box-shadow: var(--shadow-float);
  padding: 32px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  display: grid;
  gap: 20px;
}
.login-hero {
  background: linear-gradient(140deg, #0d2154 0%, #0d5096 55%, #37c5b3 100%);
  color: #ffffff;
  padding: 24px;
  border-radius: 20px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 14px solid var(--lime);
  top: -36px;
  right: -36px;
}
.login-hero h1 { font-size: 24px; font-weight: 650; margin: 4px 0; letter-spacing: -0.03em; }
.login-hero p { margin: 0; font-size: 12.5px; opacity: 0.88; }
.login-fields { display: grid; gap: 14px; }

.lime-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--lime);
  color: #0f1e46;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  width: max-content;
}

/* ==========================================================================
   TOP FLOATING PILL NAVIGATION BAR (Reference Image Header)
   ========================================================================== */
.app-frame {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}
#view {
  min-width: 0;
  max-width: 100%;
}
html.chat-lock,
html.chat-lock body {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.app-frame.chat-mode {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  padding: 12px 20px 14px;
  gap: 12px;
  overflow: hidden;
}
.app-frame.chat-mode > .top-nav,
.app-frame.chat-mode > .sys-banner {
  flex-shrink: 0;
}
.app-frame.chat-mode .main-canvas {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-frame.chat-mode #view {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-frame.chat-mode .full-chat-stage {
  flex: 1 1 0%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0f1e46;
  color: var(--lime);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}
.logo-circle svg { width: 22px; height: 22px; }

.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-meta strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.brand-meta #root-path {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}

/* Center Pill Dock */
.pill-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.pill-dock::-webkit-scrollbar { display: none; }
.pill-dock a { scroll-snap-align: start; }
.pill-dock a {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}
.pill-dock a .nav-ico {
  width: 18px;
  height: 18px;
  color: var(--text);
  flex-shrink: 0;
}
.pill-dock a:hover {
  background: var(--panel2);
}
.pill-dock a.active {
  background: var(--ink);
  color: var(--on-ink);
  padding: 0 17px;
}
.pill-dock a.active .nav-ico {
  color: var(--ink-accent);
}
.nav-badge {
  font-size: 11px;
  font-weight: 650;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--panel2);
  color: var(--text);
}
.nav-badge:empty { display: none; }
.pill-dock a.active .nav-badge {
  background: var(--lime);
  color: #0f1e46;
}

/* Right Action Circles & Profile Pill */
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.circle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--panel);
  border: none;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  position: relative;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
}
.circle-btn.sm { width: 36px; height: 36px; background: var(--panel2); box-shadow: none; }
.circle-btn svg { width: 19px; height: 19px; }
.circle-btn:hover { background: var(--panel2); }
.circle-btn.active { background: var(--ink); color: var(--ink-accent); }

.notif-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
}

/* Quick Search Pill */
.quick-search-wrap {
  position: relative;
}
.search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
#global-search {
  height: 42px;
  width: 155px;
  padding: 0 14px 0 36px;
  border-radius: 999px;
  background: var(--panel);
  border: none;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
#global-search:focus {
  outline: 2px solid var(--teal);
  width: 195px;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  padding: 8px;
  z-index: 60;
  max-height: 340px;
  overflow-y: auto;
}
.search-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
}
.search-hit:hover { background: var(--panel2); }

/* Deep Navy User / Status Pill on Top Right */
.profile-pill {
  height: 42px;
  padding: 4px 14px 4px 5px;
  max-width: 215px;
  border-radius: 999px;
  background: #0f1e46;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  text-align: left;
  font: inherit;
}
.profile-pill:hover { background: #172b5e; }
.profile-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1799cd, #45ccb4);
  color: #ffffff;
  font-size: 12px;
  font-weight: 650;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.profile-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
}
.profile-meta strong {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-meta span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  display: inline-block;
}
.status-dot.ok { background: var(--lime); }
.status-dot.warn { background: #fbbf24; }
.status-dot.err { background: #f87171; }

/* Sub-Header Bar (For Inner Views & Sub-Tabs) */
.subbar > .btn, .subbar .subbar-right { margin-left: auto; }
.subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 4px 0;
}
.subbar.home-mode {
  display: none;
}
.subbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.subbar h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin: 0;
}
.page-sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.hub-switcher {
  display: inline-flex;
  gap: 6px;
  background: var(--panel);
  padding: 5px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.hub-switcher:empty { display: none; }
.hub-pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hub-pill:hover { color: var(--text); }
.hub-pill.on {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-btn);
}
.hub-pill b {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--lime);
  color: #0f1e46;
}

.sys-banner {
  background: var(--sky-card);
  color: #0f1e46;
  padding: 14px 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
}
html[data-theme="dark"] .sys-banner { color: #f4f7fc; }

/* ==========================================================================
   DAILY WORKSPACE ("TODAY" VIEW) & STREAMLINED TASK ROWS
   ========================================================================== */
.today {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 20px;
  align-items: start;
}
.today-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.hero-grad-card.ask {
  min-height: auto;
  padding: 24px 26px;
  gap: 16px;
}
.hero-ask-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-kicker {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 4px;
}
.hero-grad-card.ask h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.hero-chat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 30, 70, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.hero-chat-link svg { width: 15px; height: 15px; color: var(--lime); }
.hero-chat-link:hover { background: rgba(15, 30, 70, 0.62); }

.hero-emp-select {
  width: auto !important;
  max-width: 185px;
  background-color: #0f1e46 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  flex-shrink: 0;
}
.team-scroll {
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  padding-right: 2px;
}

.row-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 650;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--lime);
  color: #0f1e46;
  margin-left: 6px;
}
.link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
}
.link:hover { text-decoration: underline; }
.quiet {
  margin: 0;
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--panel2);
  border-radius: 16px;
}

/* Streamlined Task Row */
.task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--panel2);
  border-radius: 18px;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.task-row:hover { border-color: var(--line2); }
.task-row.running { border-color: var(--teal); }
.task-row.blocked { border-color: var(--amber); }
.task-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.task-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.task-row-top strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.task-row-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Streamlined Team List on Right Panel */
.team-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--panel2);
  border-radius: 16px;
}
.team-who {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.team-who strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-who small {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}
.sdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.sdot.ok { background: var(--green); }
.sdot.run { background: var(--teal); }

/* ==========================================================================
   3-COLUMN BENTO DASHBOARD (Exact Reference Image Architecture)
   ========================================================================== */
.bento-home {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.05fr;
  gap: 20px;
  align-items: stretch;
}

.bento-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* 1. Top-Left Hero Gradient Card ("Welcome back" + Floating Pill Command Bar) */
.hero-grad-card {
  background: linear-gradient(145deg, #0d1f52 0%, #0d488a 46%, #1388b8 76%, #49ceb5 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(13, 35, 90, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 310px;
}
/* Dot-Matrix Pattern + Neon Lime Ring from Reference Image */
.hero-grad-card::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 115px;
  width: 72px;
  height: 56px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
}
.hero-grad-card::after {
  content: "";
  position: absolute;
  width: 155px;
  height: 155px;
  border-radius: 50%;
  border: 18px solid var(--lime);
  top: -58px;
  right: -45px;
  pointer-events: none;
}

.hero-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
  width: max-content;
  position: relative;
  z-index: 1;
}

.hero-headline {
  position: relative;
  z-index: 1;
}
.hero-big-num {
  font-size: 54px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 4px 0 8px;
}
.hero-big-num small {
  font-size: 20px;
  font-weight: 500;
  opacity: 0.9;
  margin-left: 4px;
}
.hero-headline h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-headline p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
}

/* Employee Selector Chips Inside Hero Card */
.hero-emp-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-emp-pill {
  background: rgba(15, 30, 70, 0.35);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
}
.hero-emp-pill:hover { background: rgba(15, 30, 70, 0.55); }
.hero-emp-pill.on {
  background: var(--lime);
  color: #0f1e46;
  border-color: var(--lime);
  font-weight: 650;
}

/* Floating White Pill Input Bar Inside Hero Card */
.hero-pill-bar {
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(10, 25, 65, 0.2);
}
.hero-pill-bar input {
  border: none !important;
  background: transparent !important;
  color: #0f1e46 !important;
  font-size: 13px;
  font-weight: 550;
  padding: 6px 0 !important;
  box-shadow: none !important;
}
.hero-pill-bar input::placeholder { color: #697a98; font-weight: 500; }
.hero-lime-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime);
  color: #0f1e46;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 650;
}
.hero-lime-btn:hover { background: var(--lime-dark); }
.hero-lime-btn svg { width: 18px; height: 18px; }
.hero-chat-btn {
  height: 40px;
  padding: 0 13px;
  border-radius: 999px;
  background: #eef2f8;
  color: #0f1e46;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.hero-chat-btn:hover { background: #dfe6f2; }

/* 2. Bento White Card Standard */
.bento-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bento-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bento-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Segmented Usage Bar & 4 Counters (Bottom-Left Reference Card) */
.usage-big-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.usage-num-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.usage-num {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.usage-sub {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.3;
}
.usage-sub strong { font-weight: 600; color: var(--text); }
.usage-sub span { color: var(--muted); }

.capsule-bar {
  display: flex;
  gap: 6px;
  height: 11px;
  width: 100%;
}
.cap-seg {
  height: 100%;
  border-radius: 999px;
  min-width: 14px;
}
.usage-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 4px;
}
.u-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.u-stat strong {
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.u-stat span { font-size: 11.5px; color: var(--muted); }
.u-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* 3. Center Column Inner Recommendation/Task Cards (Reference Image Center) */
.rec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rec-item {
  background: var(--panel2);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-item-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sq-ico {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  flex-shrink: 0;
}
.sq-ico svg { width: 20px; height: 20px; }
.sq-ico.teal { background: var(--teal); }
.sq-ico.royal { background: var(--royal); }
.sq-ico.navy { background: #0f1e46; color: var(--lime); }

.rec-item-title {
  flex: 1;
  min-width: 0;
}
.rec-item-title small {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.rec-item-title strong {
  font-size: 15px;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-item-desc {
  font-size: 12.5px;
  color: var(--text-sec);
  line-height: 1.45;
}
.white-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  color: var(--text);
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: max-content;
  box-shadow: 0 2px 8px rgba(15, 30, 70, 0.05);
}
.white-pill-btn:hover { background: var(--ink); color: var(--on-ink); }

/* 4. Bottom-Center Soft Sky Notification Card */
.sky-bento {
  background: var(--sky-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.sky-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
}
.sky-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sky-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 5. Top-Right Completion & Vertical Pill Bar Chart Card */
.pct-big {
  font-size: 44px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}
.pct-big small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}
.slim-bar-track {
  height: 7px;
  background: var(--panel2);
  border-radius: 999px;
  overflow: hidden;
}
.slim-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
}
.callout-strip {
  background: var(--panel2);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Vertical Pill Bar Chart */
.v-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: end;
  height: 126px;
  padding: 14px 8px 0;
  border-bottom: 1px solid var(--line);
}
.v-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.v-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 96px;
}
.v-pill {
  width: 11px;
  border-radius: 999px;
  min-height: 12px;
}
.v-pill.soft { background: #cfe4f9; }
.v-pill.solid { background: #1454a6; }
html[data-theme="dark"] .v-pill.soft { background: #22375c; }
html[data-theme="dark"] .v-pill.solid { background: #38bdf8; }
.v-lbl {
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 6. Bottom-Right Deep Navy Station Card (Concentric Lime Rings) */
.navy-station-card {
  background: #0f1e46;
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 195px;
  box-shadow: 0 14px 32px rgba(15, 30, 70, 0.18);
  cursor: pointer;
}
.navy-station-card::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1.5px solid rgba(223, 249, 82, 0.55);
  top: -55px;
  right: -55px;
  box-shadow: 0 0 0 24px transparent, 0 0 0 25.5px rgba(223, 249, 82, 0.38),
              0 0 0 50px transparent, 0 0 0 51.5px rgba(223, 249, 82, 0.22);
  pointer-events: none;
}
.navy-station-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.navy-station-top span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.navy-station-foot {
  position: relative;
  z-index: 1;
}
.navy-station-foot h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.navy-station-foot p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.76);
}

/* ==========================================================================
   GENERAL BUTTONS, INPUTS, CARDS & PAGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line2);
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  box-shadow: var(--shadow-btn);
  position: relative;
}
.btn:hover { background: var(--panel2); border-color: var(--input-hover); }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn.primary, .btn.navy-pill {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(15, 30, 70, 0.18);
}
.btn.primary:hover, .btn.navy-pill:hover {
  background: var(--ink-hover);
  border-color: var(--ink-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 22px rgba(15, 30, 70, 0.24);
}
html[data-theme="dark"] .btn.primary {
  background: var(--lime);
  border-color: var(--lime);
  color: #0f1e46;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(223, 249, 82, 0.14);
}
html[data-theme="dark"] .btn.primary:hover {
  background: #ecff7a;
  border-color: #ecff7a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 24px rgba(223, 249, 82, 0.22);
}
.btn.lime {
  background: var(--lime);
  border-color: var(--lime);
  color: #0f1e46;
}
.btn.lime:hover { background: var(--lime-dark); border-color: var(--lime-dark); }
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-sec);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--panel2); border-color: transparent; color: var(--text); }
.btn.tiny { min-height: 30px; padding: 0 13px; font-size: 12px; gap: 5px; }
.btn.tiny svg { width: 14px; height: 14px; }
.btn.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-border);
  box-shadow: none;
}
.btn.danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
html[data-theme="dark"] .btn.danger:hover { color: #1a0a0c; }

input, textarea, select {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 42px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.003em;
  width: 100%;
  box-shadow: inset 0 1px 1px rgba(15, 30, 70, 0.03);
}
input::placeholder, textarea::placeholder {
  color: var(--placeholder);
  font-weight: 400;
  opacity: 1;
}
input:hover, textarea:hover, select:hover { border-color: var(--input-hover); }
select {
  max-width: 100%;
  min-width: 0;
  cursor: pointer;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus {
  outline: none;
  background-color: var(--panel);
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}
input:disabled, textarea:disabled, select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
input.invalid, textarea.invalid, select.invalid {
  border-color: var(--red) !important;
  background-color: var(--red-soft);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent);
}
.field-err {
  color: var(--red);
  font-size: 12px;
  font-weight: 550;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.field-err::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  flex-shrink: 0;
}
label {
  display: grid;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-sec);
  min-width: 0;
}

.bento-card, .card, .today-main, .split > *, .two > *, .grid > *, .row-list > * {
  min-width: 0;
  max-width: 100%;
}

.grid { display: grid; gap: 16px; }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

.card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

/* Task Pipeline Cards across Task Page */
.task-card {
  background: var(--panel);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 12px;
  border: 1.5px solid transparent;
}
.task-card.running {
  border-color: var(--teal);
}
.task-card.blocked {
  border-color: var(--amber);
}
.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.task-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
.task-title:hover { color: var(--teal); }

.prog-wrap { display: grid; gap: 5px; }
.prog-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 550; }
.prog-track { height: 7px; background: var(--panel2); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--teal); border-radius: 999px; }
.prog-fill.done { background: var(--green); }
.prog-fill.blocked { background: var(--amber); }

.task-summary {
  font-size: 12.5px;
  color: var(--text-sec);
  background: var(--panel2);
  border-radius: 14px;
  padding: 11px 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.bubble .att, .bubble .txt .att {
  display: block; max-width: 100%; width: auto; height: auto;
  max-height: 340px; margin: 6px 0; border-radius: 10px; object-fit: contain;
}
.att-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
  max-width: 100%;
}
.att-img-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 440px;
}
.att-img-grid.single {
  grid-template-columns: 1fr;
  max-width: 380px;
}
.att-img-btn {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  width: 100%;
  max-height: 320px;
}
.att-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
}
.att-img-grid.single .att-img-btn { max-height: 340px; }
.att-img-grid.single .att-img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
}
.md-img-btn {
  display: inline-block;
  padding: 0;
  margin: 6px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
  max-width: 100%;
}
.md-img {
  display: block;
  max-width: min(460px, 100%);
  height: auto;
  max-height: 360px;
  object-fit: contain;
}
.att-video-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  max-width: 420px;
  width: 100%;
}
.att-video {
  display: block;
  width: 100%;
  max-height: 290px;
  background: #070d1e;
}
.att-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  font-size: 12px;
}
.att-fname {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-card-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.att-fsize {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.att-act-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--text-sec);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.att-act-btn svg { width: 14px; height: 14px; }
.att-act-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.att-audio-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  min-width: min(260px, 100%);
  max-width: 380px;
}
.att-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.att-audio {
  width: 100%;
  height: 36px;
  min-width: 210px;
  max-width: 100%;
}
.att-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  min-width: min(250px, 100%);
  max-width: 430px;
  flex-wrap: wrap;
}
.att-ext-badge {
  min-width: 42px;
  height: 42px;
  padding: 0 7px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #0f1e46;
}
.att-ext-badge.pdf { background: #fee2e2; color: #b91c1c; }
.att-ext-badge.vid { background: #ede9fe; color: #6d28d9; }
.att-ext-badge.aud { background: #e0f2fe; color: #0369a1; }
.att-ext-badge.doc { background: #dbeafe; color: #1d4ed8; }
.att-ext-badge.xls { background: #dcfce7; color: #15803d; }
.att-ext-badge.ppt { background: #ffedd5; color: #c2410c; }
.att-ext-badge.zip { background: #fef3c7; color: #b45309; }
.att-ext-badge.code { background: #e0e7ff; color: #3730a3; }
.att-ext-badge.txt { background: #f1f5f9; color: #334155; }
.att-ext-badge.file { background: var(--panel3); color: var(--text-sec); }
.att-doc-meta {
  flex: 1;
  min-width: 110px;
  display: grid;
  gap: 1px;
  line-height: 1.25;
}
.att-doc-meta strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-doc-meta small { font-size: 11px; color: var(--muted); }
.att-doc-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.att-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.att-pill-btn svg { width: 13px; height: 13px; }
.att-pill-btn:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.msg-row.mine .att-video-card,
.msg-row.mine .att-audio-card,
.msg-row.mine .att-doc-card {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.msg-row.mine .att-fsize,
.msg-row.mine .att-doc-meta small { color: rgba(255, 255, 255, 0.78); }
.msg-row.mine .att-pill-btn,
.msg-row.mine .att-act-btn {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}
.msg-row.mine .att-pill-btn:hover,
.msg-row.mine .att-act-btn:hover {
  background: var(--lime);
  color: #0f1e46;
  border-color: var(--lime);
}
.att-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.att-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--panel2);
  border: none;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.att-chip:hover { background: var(--ink); color: var(--on-ink); }

/* Employee Cards */
.emp {
  display: grid;
  gap: 14px;
  align-content: space-between;
}
.emp .name { display: flex; align-items: center; gap: 12px; }
.emp .name strong { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.emp-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ava {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f1e46, #1799cd);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  flex: 0 0 auto;
}
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 18px; }
.ava.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 11px; }
.photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }

/* Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--panel2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sec);
}
.pill.on, .pill.done {
  background: var(--lime);
  color: #0f1e46;
}
.pill.off, .pill.run {
  background: var(--amber-soft);
  color: var(--amber);
}
.pill.bad {
  background: var(--red-soft);
  color: var(--red);
}
.pill.blue {
  background: #e0f2fe;
  color: #0369a1;
}
html[data-theme="dark"] .pill.blue { background: #0c4a6e; color: #bae6fd; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill-row, .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel2);
  border: none;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
  cursor: pointer;
}
.chip:hover { background: var(--panel3); }
.chip.on {
  background: var(--ink);
  color: var(--on-ink);
}
.chip button { background: none; border: none; color: inherit; font-size: 14px; cursor: pointer; padding: 0 2px; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alert.warn, .warn { background: var(--amber-soft); color: var(--amber); border-radius: 16px; padding: 11px 15px; }
.alert.err { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green); }
.alert.info { background: var(--sky-card); color: var(--text); }

/* Tables, Toolbars & Pagination */
.tbl-wrap {
  background: var(--panel);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
  padding: 6px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--panel2); }

.tabs {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  background: var(--panel2);
  padding: 4px;
  border-radius: 999px;
  margin: 10px 0 14px;
}
.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
}
.tab:hover { color: var(--text); }
.tab.on {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 30, 70, 0.08), 0 2px 8px rgba(15, 30, 70, 0.06);
}
html[data-theme="dark"] .tab.on { background: var(--panel3); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.toolbar-search { max-width: 260px; min-width: 170px; border-radius: 999px !important; padding: 8px 16px !important; }
.toolbar-select { width: auto !important; min-width: 140px; max-width: 220px; border-radius: 999px !important; padding: 8px 14px !important; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  font-size: 12.5px;
  color: var(--muted);
}
.pager-btns { display: flex; align-items: center; gap: 8px; }

/* Forms, Steps & Logs */
.form { display: grid; gap: 12px; max-width: 620px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.pre, .log {
  white-space: pre-wrap;
  background: var(--panel2);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-sec);
  max-height: 340px;
  overflow: auto;
  margin: 0;
}
h2.section {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 18px 0 12px;
}
h3.sub {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 14px 0 8px;
}

.step-feed {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel2);
  border-radius: 16px;
  padding: 12px;
}
.step-item {
  font-size: 12px;
  padding: 10px 12px;
  background: var(--panel);
  border-radius: 12px;
  display: grid;
  gap: 4px;
}
.step-item .step-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* ==========================================================================
   FULL-SCREEN SINGLE-PANE CHAT STUDIO (ChatGPT / Claude / Linear Style)
   ========================================================================== */
.full-chat-stage {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.fc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  height: 60px;
  flex-shrink: 0;
}

/* Employee Switcher Dropdown in Chat Header */
.fc-emp-dropdown {
  position: relative;
  min-width: 0;
  max-width: 58%;
}
.fc-emp-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--panel2);
  cursor: pointer;
  user-select: none;
  max-width: 100%;
  min-width: 0;
}
.fc-emp-trigger::-webkit-details-marker { display: none; }
.fc-emp-trigger:hover { background: var(--panel3); }
.fc-emp-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
  min-width: 0;
  overflow: hidden;
}
.fc-emp-info strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-emp-info small {
  font-size: 11px;
  color: var(--muted);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-chev {
  width: 16px;
  height: 16px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}
.fc-chev svg { width: 16px; height: 16px; }

.fc-dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 310px;
  max-width: calc(100vw - 24px);
  max-height: min(400px, calc(100dvh - 180px));
  background: var(--panel);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--line);
  padding: 10px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fc-dd-title {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 4px 8px;
}
.fc-dd-list {
  overflow-y: auto;
  display: grid;
  gap: 4px;
  max-height: 330px;
}
.fc-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.fc-dd-item:hover { background: var(--panel2); }
.fc-dd-item.on { background: var(--ink); color: var(--on-ink); }
.fc-dd-item.on small { color: color-mix(in srgb, var(--on-ink) 72%, transparent); }
.fc-dd-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.fc-dd-meta strong { font-size: 13px; font-weight: 600; }
.fc-dd-meta small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Action Icons in Chat Header */
.fc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.fc-pop { position: relative; }
.fc-pop summary { list-style: none; }
.fc-pop summary::-webkit-details-marker { display: none; }
.fc-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel2);
  border: none;
  color: var(--text-sec);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.fc-icon-btn svg { width: 17px; height: 17px; }
.fc-icon-btn:hover { background: var(--panel3); color: var(--text); }
.fc-icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

.fc-pop-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 310px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  padding: 14px;
  display: grid;
  gap: 8px;
  z-index: 65;
}
.fc-hist-list {
  max-height: min(290px, calc(100dvh - 280px));
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

/* Searchable Clickable Model Picker Popover */
.fc-model-pop {
  width: 340px;
  max-width: calc(100vw - 32px);
}
.fc-model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fc-model-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.fc-model-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  background: var(--panel2);
  padding: 2px 8px;
  border-radius: 999px;
}
.fc-model-refresh {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel2);
  border: none;
  color: var(--text-sec);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.fc-model-refresh svg { width: 14px; height: 14px; }
.fc-model-refresh:hover { background: var(--panel3); color: var(--text); }
.fc-model-refresh:disabled { opacity: 0.45; cursor: default; }

.fc-model-list {
  max-height: min(290px, calc(100dvh - 280px));
  overflow-y: auto;
  display: grid;
  gap: 3px;
  padding-right: 2px;
}
.fc-model-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 11px;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fc-model-item:hover {
  background: var(--panel2);
}
.fc-model-item.on {
  background: var(--ink);
  color: var(--on-ink);
}
.fc-model-item.on small, .fc-model-item.on code {
  color: color-mix(in srgb, var(--on-ink) 85%, transparent);
}
.fc-model-item.manual {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.fc-model-name {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.fc-model-name code {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-model-name strong {
  font-size: 12.5px;
  font-weight: 600;
}
.fc-model-name small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-model-meta {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px 6px 2px;
}

/* Full-Height Centered Message Stream */
.fc-msgs-wrap {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.full-chat-stage .fc-msgs {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  background: var(--panel2);
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  overscroll-behavior: contain;
}
.fc-stream {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 0 auto;
}
.fc-history, .fc-pending, .fc-typing-slot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fc-pending:empty, .fc-typing-slot:empty {
  display: none;
}
.fc-msg-counter {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel2);
  padding: 5px 11px;
  border-radius: 999px;
  margin-right: 2px;
}

/* Pagination: Load Earlier Messages Pill */
.fc-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
}
.fc-load-more-btn {
  background: var(--panel);
  color: var(--text-sec);
  border: 1px solid var(--line2);
  padding: 7px 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 30, 70, 0.04);
}
.fc-load-more-btn:hover {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}

/* Floating Jump-to-Bottom Pill */
.fc-scroll-btn {
  position: absolute;
  right: 20px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f1e46;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  padding: 8px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-float);
  z-index: 25;
}
.fc-scroll-btn svg { width: 15px; height: 15px; color: var(--lime); }
.fc-scroll-btn:hover { background: var(--navy-hover); }

/* Bottom Centered Pro Composer */
.fc-composer-wrap {
  padding: 12px 18px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(15, 30, 70, 0.04);
  flex-shrink: 0;
  position: relative;
  z-index: 12;
}
.fc-composer {
  max-width: 820px;
  margin: 0 auto;
}
.fc-stage-bar {
  max-width: 820px;
  margin: 0 auto 8px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.fc-stage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 6px 8px;
  flex: 0 0 auto;
  min-width: 175px;
  max-width: 245px;
}
.fc-stage-item.err { border-color: var(--red); background: var(--red-soft); }
.fc-stage-preview-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.fc-stage-thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
}
.fc-stage-ico {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  font-size: 9.5px !important;
  border-radius: 9px;
}
.fc-stage-meta {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  line-height: 1.2;
}
.fc-stage-meta strong {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-stage-meta small {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-stage-prog {
  height: 4px;
  background: var(--line2);
  border-radius: 999px;
  overflow: hidden;
}
.fc-stage-prog i { display: block; height: 100%; background: var(--teal); }
.fc-stage-btns { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.fc-stage-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: var(--text-sec);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.fc-stage-btn:hover { background: var(--ink); color: var(--on-ink); }
.fc-stage-btn.del:hover { background: var(--red); color: #fff; }
.fc-drop-overlay {
  position: absolute;
  inset: 10px;
  z-index: 45;
  border-radius: 20px;
  border: 2.5px dashed var(--teal);
  background: rgba(23, 153, 205, 0.14);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.fc-drop-box {
  background: var(--panel);
  color: var(--text);
  padding: 20px 28px;
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  text-align: center;
  display: grid;
  gap: 4px;
}

/* Lightbox, Image Cropper & Media Manager Drawer */
.rk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(8, 14, 30, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rk-lb-box {
  width: 100%;
  max-width: 1060px;
  max-height: 92dvh;
  background: var(--panel);
  border-radius: 22px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rk-lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.rk-lb-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.rk-lb-title strong {
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rk-lb-title span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rk-lb-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.rk-lb-stage {
  position: relative;
  flex: 1;
  min-height: 240px;
  max-height: calc(92dvh - 64px);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090f21;
  padding: 14px;
}
.rk-lb-img {
  max-width: 100%;
  max-height: calc(88dvh - 90px);
  object-fit: contain;
  border-radius: 8px;
}
.rk-lb-img.zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.rk-lb-video {
  max-width: 100%;
  max-height: calc(88dvh - 90px);
  width: auto;
  border-radius: 10px;
}
.rk-lb-pdf {
  width: 100%;
  height: 78dvh;
  border: none;
  border-radius: 8px;
  background: #ffffff;
}
.rk-lb-audio-box {
  background: var(--panel);
  color: var(--text);
  padding: 28px 24px;
  border-radius: 20px;
  display: grid;
  gap: 12px;
  place-items: center;
  text-align: center;
  width: 100%;
  max-width: 480px;
}
.rk-lb-text-wrap {
  width: 100%;
  align-self: stretch;
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  overflow: auto;
}
.rk-lb-trunc {
  background: var(--amber-soft);
  color: var(--amber);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 550;
  border-bottom: 1px solid var(--amber-border);
}
.rk-lb-pre {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.rk-lb-nav {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 30, 70, 0.78);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 4;
}
.rk-lb-nav.prev { margin-right: auto; }
.rk-lb-nav.next { margin-left: auto; }

.crop-ratios { display: flex; gap: 6px; flex-wrap: wrap; }
.crop-ratios .btn.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.crop-stage {
  background: #090f21;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
#crop-canvas {
  width: 100%;
  height: auto;
  max-height: 360px;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.mm-toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
.mm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 10px;
}
.mm-card {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.mm-thumb {
  width: 100%;
  height: 112px;
  border-radius: 11px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: var(--panel);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.mm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-ico { display: grid; place-items: center; width: 100%; height: 100%; }
.mm-info { display: grid; gap: 2px; min-width: 0; }
.mm-info strong {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mm-info small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mm-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.conv-side {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.conv-head strong { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.conv-emp-select {
  width: auto !important;
  max-width: 135px;
  padding: 5px 10px !important;
  font-size: 11.5px !important;
  border-radius: 999px !important;
  font-weight: 550;
}

/* Quick Employee Strip at Top of Chat Sidebar */
.conv-quick-emps {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.conv-ava-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--panel2);
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
  flex-shrink: 0;
}
.conv-ava-pill:hover { background: var(--panel3); }
.conv-ava-pill.on { background: var(--ink); color: var(--on-ink); }
.conv-ava-pill .ava.sm { width: 22px; height: 22px; border-radius: 50%; font-size: 9px; }

.conv-search { padding: 10px 12px 6px; }
.conv-search input {
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
}
.conv-list { flex: 1; overflow-y: auto; padding: 6px 10px 12px; display: grid; gap: 4px; align-content: start; }
.conv {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.conv:hover { background: var(--panel2); }
.conv.on { background: var(--ink); color: var(--on-ink); }
.conv.on .conv-top em, .conv.on .conv-sub { color: color-mix(in srgb, var(--on-ink) 72%, transparent); }
.conv-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.conv-top strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-top em { font-style: normal; font-size: 10.5px; color: var(--muted); flex-shrink: 0; }
.conv-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-empty { padding: 24px 14px; text-align: center; }

.chat-main {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.chat-head {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}
.chat-who { display: grid; line-height: 1.25; }
.chat-who strong { font-size: 15px; font-weight: 600; }
.svg-inline { display: inline-flex; width: 13px; height: 13px; }
.svg-inline svg { width: 13px; height: 13px; }

.model-pop { position: relative; }
.model-pop summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.model-pop .pop-body {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 270px;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow-float);
  padding: 14px;
  display: grid;
  gap: 8px;
  z-index: 40;
}
.icon-btn {
  background: var(--panel2);
  border: none;
  color: var(--text-sec);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); }

.msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  background: var(--panel2);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dayline { text-align: center; margin: 10px 0 4px; }
.dayline span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sec);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 4px 14px;
  border-radius: 999px;
}
.msg-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.msg-row.grouped { margin-top: -8px; }
.msg-row.mine { justify-content: flex-end; }
.msg-row.theirs { justify-content: flex-start; }
.msg-ava { flex-shrink: 0; margin-top: 2px; }
.ava-spacer { width: 32px; height: 1px; }

.bubble {
  max-width: 82%;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.68;
  letter-spacing: -0.004em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.msg-row.mine .bubble {
  max-width: 76%;
  background: #0f1e46;
  color: #f8fafc;
  border-bottom-right-radius: 6px;
}
.msg-row.mine.grouped .bubble {
  border-top-right-radius: 10px;
}
.msg-row.mine.queued .bubble {
  opacity: 0.88;
}
.msg-row.theirs .bubble {
  max-width: 88%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-top-left-radius: 6px;
  box-shadow: 0 3px 12px rgba(15, 30, 70, 0.04);
}
.msg-row.theirs.grouped .bubble {
  border-top-left-radius: 14px;
}

/* Rich Readable Markdown Typography Inside Chat Bubbles */
.md-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.md-p {
  margin: 0;
  line-height: 1.68;
}
.md-h {
  margin: 4px 0 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.md-h1, .md-h2 { font-size: 17px; }
.md-h3, .md-h4 { font-size: 15.5px; }
.md-ul, .md-ol {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.md-ul li, .md-ol li {
  line-height: 1.65;
  padding-left: 2px;
}
.md-quote {
  margin: 2px 0;
  padding: 10px 14px;
  border-left: 3.5px solid var(--teal);
  background: var(--panel2);
  border-radius: 0 12px 12px 0;
  color: var(--text-sec);
  font-size: 14.5px;
}
.msg-row.mine .md-quote {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-left-color: var(--lime);
}
.md-hr {
  border: none;
  border-top: 1px solid var(--line2);
  margin: 6px 0;
}
.md-inline-code {
  background: var(--panel2);
  color: var(--royal);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 550;
}
html[data-theme="dark"] .md-inline-code {
  color: #7dd3fc;
}
.msg-row.mine .md-inline-code {
  background: rgba(255, 255, 255, 0.15);
  color: var(--lime);
  border-color: rgba(255, 255, 255, 0.2);
}
.md-body a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 550;
}
.msg-row.mine .md-body a { color: var(--lime); }

/* Fenced Code Block with Header & Copy Button */
.md-code-wrap {
  background: #0b1528;
  color: #e6edf7;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e2f52;
  margin: 2px 0;
  max-width: 100%;
}
.md-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  background: #132242;
  border-bottom: 1px solid #1e2f52;
  font-size: 11.5px;
  font-weight: 600;
  color: #93a8cc;
  text-transform: lowercase;
}
.md-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #e6edf7;
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
}
.md-code-copy svg { width: 12px; height: 12px; }
.md-code-copy:hover { background: var(--lime); color: #0f1e46; }
.md-pre {
  margin: 0;
  padding: 13px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

/* Markdown Tables Inside Chat */
.md-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line2);
  border-radius: 12px;
  margin: 2px 0;
}
.md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.5;
}
.md-table th, .md-table td {
  padding: 9px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.md-table th {
  background: var(--panel2);
  font-weight: 600;
  color: var(--text);
}
.md-table tr:last-child td { border-bottom: none; }

/* Typing / Processing Bubble */
.msg-row.theirs .bubble.typing-bubble {
  width: min(88%, 660px);
}
.typing-bubble {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-sec);
  padding: 12px 16px;
  min-width: min(240px, 100%);
  max-width: 100%;
}
.typing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}
.typing-dots { flex-shrink: 0; }
.typing-who {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.typing-bubble em {
  font-style: normal;
  color: var(--teal);
  font-weight: 550;
}
.typing-timer {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel2);
  padding: 2px 9px;
  border-radius: 999px;
  min-width: 38px;
  text-align: center;
  flex-shrink: 0;
}
.btn-stop-chat {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
  padding: 4px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-stop-chat:hover {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}
.btn-stop-chat:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Jawaban live saat stream berjalan */
.typing-live {
  color: var(--text);
  font-size: 14px;
  line-height: 1.62;
  border-left: 2px solid var(--teal);
  padding-left: 12px;
  margin-top: 2px;
}
.typing-live > p:last-child::after,
.typing-live > ul:last-child > li:last-child::after,
.typing-live > ol:last-child > li:last-child::after,
.typing-live > blockquote:last-child::after,
.typing-live > h4:last-child::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--teal);
  border-radius: 2px;
  animation: rkCaret 1s steps(2) infinite;
}
@keyframes rkCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Kartu persetujuan tindakan */
.perm-card {
  margin-top: 6px;
  border: 1px solid var(--amber-border, #e9c46a);
  background: var(--amber-soft, #fff8e5);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.perm-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  color: var(--text);
}
.perm-badge {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a5b00;
  background: #ffe9b0;
  border-radius: 999px;
  padding: 3px 9px;
}
.perm-cmd {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  background: #1f2430;
  color: #e8edf7;
  border-radius: 10px;
  padding: 9px 11px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.perm-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.perm-acts .btn.small {
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 10px;
}
.perm-hint {
  font-size: 11.5px;
  color: var(--muted);
}

/* Antrean pesan di atas composer */
.fc-queue-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--panel2);
  max-height: 148px;
  overflow-y: auto;
}
.queue-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.queue-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: rkCaret 1.2s ease-in-out infinite;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-sec);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 8px;
}
.queue-txt {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-x {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 3px;
}
.queue-x:hover { color: var(--red); }
.typing-preview {
  margin: 0;
  padding: 9px 12px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-sec);
  max-height: 110px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Live Step Movement Timeline inside Chat & Live Activity Card */
/* Activity panel — jejak tool live (gaya "Activity: N tools") */
.act-panel {
  margin: 10px 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
  overflow: hidden;
}
.act-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-sec);
}
.act-head::-webkit-details-marker { display: none; }
.act-chev { color: var(--muted); transition: transform .15s ease; }
.act-panel[open] .act-chev { transform: rotate(90deg); }
.act-title { flex: 1; }
.act-timer { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 550; }
.act-list { display: grid; gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.act-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--panel);
}
.act-row.now { background: var(--amber-soft); }
.act-row.err { background: var(--red-soft); }
.act-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border-radius: 6px;
  background: #0f1e46;
  color: #fff;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.act-row.now .act-ico { background: #1f4bd8; }
.act-row.err .act-ico { background: var(--red); }
.act-body { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; }
.act-name {
  flex: 0 0 auto;
  max-width: 45%;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-cmd {
  flex: 1 1 auto;
  min-width: 0;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-mark { text-align: right; font-size: 10px; color: var(--muted); }
.act-row.now .act-mark { color: #1f4bd8; }
.act-row.err .act-mark { color: var(--red); }
.typing-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 11px;
}
.typing-step {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  min-width: 0;
}
.typing-step.now {
  color: var(--text);
  font-weight: 550;
}
.typing-step.err {
  color: var(--red);
}
.typing-step-mark {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--green);
  flex-shrink: 0;
}
.typing-step.now .typing-step-mark {
  color: var(--teal);
}
.typing-step.err .typing-step-mark {
  color: var(--red);
}
.typing-step-body {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  flex: 1;
  min-width: 0;
}
.typing-step-lbl {
  font-weight: 600;
}
.typing-step-det {
  color: var(--muted);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.typing-step-ts {
  font-size: 10.5px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Live Hermes Activity Card & Feed */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid var(--green-border);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}
.live-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}
.live-filter-sel {
  width: auto !important;
  max-width: 175px;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 550;
}
.live-sec-lbl {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 2px 0 -4px;
}
.live-active-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-active-item {
  background: var(--panel2);
  border: 1.5px solid var(--teal);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.live-active-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.live-who {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.live-who-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.live-who-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.live-item-title {
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-dur {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
}
.live-active-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.live-step-now {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sec);
  background: var(--panel);
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  min-width: 0;
}
.live-step-now span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.live-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 2px;
}
.live-feed.drawer-feed {
  max-height: 55vh;
}
.live-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  background: var(--panel2);
  border-radius: 14px;
  border: 1px solid transparent;
  min-width: 0;
}
.live-row.clickable { cursor: pointer; }
.live-row.clickable:hover { border-color: var(--teal); background: var(--panel); }
.live-kind {
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--panel3);
  color: var(--text-sec);
}
.live-kind.chat { background: #e0f2fe; color: #0369a1; }
.live-kind.task { background: var(--lime); color: #0f1e46; }
.live-kind.hermes { background: #ede9fe; color: #5b21b6; }
.live-kind.academy { background: var(--amber-soft); color: var(--amber); }
html[data-theme="dark"] .live-kind.chat { background: #0c4a6e; color: #bae6fd; }
html[data-theme="dark"] .live-kind.hermes { background: #3b0764; color: #ddd6fe; }

.live-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.live-row-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.live-row-act {
  color: var(--text-sec);
  font-weight: 550;
}
.live-row-det {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-row-ts {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.typing-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
}

.bubble .meta {
  font-size: 11px;
  opacity: 0.72;
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.msg-act {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  opacity: 0.8;
}
.msg-act:hover { opacity: 1; background: var(--panel2); }
.msg-act svg { width: 12.5px; height: 12.5px; }
.chat-empty { margin: auto; text-align: center; padding: 32px; display: grid; gap: 10px; place-items: center; color: var(--muted); }
.chat-empty .big { font-size: 18px; font-weight: 650; color: var(--text); }

/* Pro Composer Bar */
.composer-bar {
  padding: 12px 18px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.composer {
  display: flex;
  gap: 6px;
  align-items: center;
  background: var(--panel2);
  padding: 6px 8px 6px 10px;
  border-radius: 26px;
  border: 1.5px solid transparent;
}
.composer:focus-within {
  background: var(--panel);
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(15, 30, 70, 0.06);
}
.comp-ico-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-sec);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.comp-ico-btn svg { width: 19px; height: 19px; }
.comp-ico-btn:hover { background: var(--panel3); color: var(--text); }
.comp-ico-btn.rec { background: var(--red); color: #ffffff; }

.composer textarea {
  min-height: 40px;
  max-height: 190px;
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 9px 10px !important;
  font-size: 14.5px;
  line-height: 1.55;
}
.comp-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime);
  color: #0f1e46;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.comp-send-btn svg { width: 19px; height: 19px; }
.comp-send-btn:hover { background: var(--lime-dark); }
.comp-send-btn:disabled { opacity: .45; cursor: not-allowed; background: var(--line); color: var(--muted); }

/* Wizard, Org, Presets & Misc */
.steps { display: flex; align-items: center; gap: 6px; }
.dotstep {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel2);
}
.dotstep.on { color: var(--on-ink); background: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 14%, transparent); }
.dotstep.done { background: var(--lime); color: #0f1e46; }
.steps .sep { width: 14px; height: 2px; background: var(--line2); }
.spacer { flex: 1; }
.wizhead { margin: 12px 0; }
.wizhead strong { font-size: 16px; font-weight: 600; }
.recs, .recruit, .preset-grid { display: grid; gap: 10px; }
.rec, .recruit-card, .preset-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--panel2);
  border: 1.5px solid transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
}
.recruit-card { flex-direction: column; gap: 4px; }
.rec:hover, .recruit-card:hover, .preset-card:hover { border-color: var(--teal); }
.rec.on, .preset-card.on { border-color: var(--accent); background: var(--accent-soft); }
.rec input, .preset-card input { width: auto; margin-top: 3px; }
.rec span { display: grid; gap: 2px; }
.pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }

/* Footer merek */
.app-footer {
  margin: 28px 0 8px; text-align: center;
  font-size: 12px; letter-spacing: 0.02em; color: var(--text-sec);
}
.login .app-footer { margin: 4px 0 0; }
/* Halaman chat dikunci setinggi layar — footer akan memakan ruang komposer. */
.app-frame.chat-mode .app-footer { display: none; }

/* Pengaturan → Sistem → Pasang di HP */
.hp-access { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 8px; }
.hp-qr { width: 180px; height: 180px; border-radius: 14px; background: #fff; padding: 6px; flex: none; }
.hp-access > .grid { flex: 1 1 220px; }
.hp-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hp-url code { overflow-wrap: anywhere; font-size: 14px; }
.hp-steps { margin: 12px 0 0; padding-left: 20px; line-height: 1.7; font-size: 13.5px; }

/* Panduan setelah rekrut: Profil → Tools → Koneksi */
.onboard {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 4px 0 12px; padding: 12px 14px; border-radius: 18px;
  background: var(--accent-soft); border: 1.5px solid var(--accent);
}
.onboard .steps { flex-wrap: wrap; }
.onboard-step {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 6px;
  background: none; border: 0; font: inherit; font-size: 13px; color: var(--text-sec); cursor: pointer;
}
.onboard-step.on { color: var(--text); font-weight: 600; }

/* Tab Tools */
.tool-list, .abil-list { display: grid; gap: 8px; }
.tool-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px;
  background: var(--panel2); border: 1.5px solid transparent; cursor: pointer;
}
.tool-row:hover { border-color: var(--teal); }
.tool-row.on { border-color: var(--accent); background: var(--accent-soft); }
.tool-row input { width: auto; margin-top: 3px; }
.tool-row > span { display: grid; gap: 2px; }

/* Wizard: daftar kemampuan yang dilatih AI */
.abil-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px;
  border-radius: 14px; background: var(--panel2);
}
.abil-item > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.chan, .chan-block, .chan-cfg, .keyrow {
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--panel2);
}
.chan { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.chan-cfg { margin-top: 10px; display: grid; gap: 10px; }
.chan-block summary, .keyrow summary { cursor: pointer; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.chan-block summary::after, .keyrow summary::after {
  content: "▾";
  font-size: 11px;
  color: var(--muted);
  transition: transform .15s;
}
.chan-block[open] summary::after, .keyrow[open] summary::after { transform: rotate(180deg); }
.qrbox { display: grid; gap: 8px; justify-items: center; padding: 14px; border-radius: 18px; background: var(--panel); width: max-content; max-width: 100%; margin-top: 8px; }
.qrbox img { width: 220px; height: auto; max-width: 100%; background: #fff; padding: 6px; border-radius: 12px; }
.org-node { display: flex; gap: 12px; align-items: center; background: var(--panel2); border-radius: 16px; padding: 12px 16px; margin-bottom: 8px; }
.org-node .org-who { display: grid; gap: 2px; flex: 1; }
.actlist { display: grid; gap: 6px; margin-bottom: 14px; }
.actlist .line { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: var(--panel2); border-radius: 12px; padding: 9px 12px; font-size: 12.5px; }
.empty-box { text-align: center; padding: 28px 18px; background: var(--panel2); border-radius: 20px; color: var(--muted); display: grid; gap: 4px; place-items: center; }
.empty-box strong { color: var(--text); font-size: 14px; }

/* Board columns */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--panel2); border-radius: 22px; min-width: 270px; width: 270px; flex: 0 0 auto; padding: 14px; display: grid; gap: 10px; }
.col h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-sec); margin: 0; display: flex; justify-content: space-between; }

/* Floating Inspector Sheet, Modal & Toast */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 70, 0.35);
  display: flex;
  justify-content: flex-end;
  padding: 12px;
  z-index: 75;
}
.drawer-panel {
  width: 100%;
  max-width: 580px;
  height: 100%;
  background: var(--panel);
  border-radius: 26px;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 70, 0.4);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 85;
}
.modal-box {
  background: var(--panel);
  border-radius: 26px;
  box-shadow: var(--shadow-float);
  padding: 24px;
  width: 100%;
  max-width: 440px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 650; }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f1e46;
  color: #ffffff;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 550;
  box-shadow: var(--shadow-float);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(460px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toast::before {
  content: "\2713";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  color: #0f1e46;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.toast.bad { background: var(--red); color: #ffffff; }
.toast.bad::before { content: "!"; background: #ffffff; color: var(--red); }

/* Responsive Breakpoints */
.mobile-nav { display: none; }

@media (max-width: 1320px) {
  .app-frame { padding: 12px 16px 28px; gap: 12px; }
  .app-frame.chat-mode { padding: 10px 16px 12px; }
  .top-nav { flex-wrap: nowrap; gap: 10px; }
  .top-nav-right { gap: 7px; }
  .brand-meta { display: none; }
  .pill-dock { gap: 6px; }
  .pill-dock a { height: 40px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
  .pill-dock a.active { padding: 0 14px; }
  .circle-btn, .logo-circle { width: 40px; height: 40px; }
  #global-search { width: 125px; height: 40px; }
  #global-search:focus { width: 160px; }
  .profile-pill { height: 40px; padding: 4px 12px 4px 5px; }
}

@media (max-width: 1140px) {
  .today { grid-template-columns: 1fr; }
  .bento-home { grid-template-columns: 1fr 1fr; }
  .bento-col:last-child { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
  .profile-meta { display: none; }
  .profile-pill { padding: 3px; }
  #global-search { width: 105px; }
}

@media (max-width: 960px) {
  .quick-search-wrap { display: none; }
}

@media (max-width: 860px) {
  .app-frame { padding: 10px 10px 78px; gap: 10px; }
  .app-frame.chat-mode {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    padding: 8px 8px calc(76px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    overflow: hidden;
  }
  .top-nav { flex-wrap: nowrap; gap: 6px; width: 100%; }
  .top-nav-left { flex-shrink: 0; }
  .top-nav-right { flex: 1; min-width: 0; justify-content: flex-end; gap: 6px; }
  .brand-meta { display: none; }
  .pill-dock { display: none; }
  .bento-home, .bento-col:last-child, .split, .two {
    grid-template-columns: 1fr;
    height: auto;
  }
  /* Tabel rutinitas jadi kartu bertumpuk di mobile — tidak ada kolom terpotong. */
  .tbl-wrap { overflow-x: visible; }
  .tbl-wrap table, .tbl-wrap tbody, .tbl-wrap tr, .tbl-wrap td { display: block; width: 100%; }
  .tbl-wrap thead { display: none; }
  .tbl-wrap tr { padding: 10px 8px; border-bottom: 1px solid var(--line); }
  .tbl-wrap tr:last-child { border-bottom: none; }
  .tbl-wrap td { padding: 3px 0; border: none; }
  .tbl-wrap td.row { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
  /* Komposer chat sudah menyisakan ruang nav bawah — jangan dobel padding. */
  .app-frame.chat-mode .main-canvas { padding-bottom: 0; }
  .act-name { max-width: 38%; }
  .act-cmd { font-size: 10.5px; }
  .app-frame.chat-mode .full-chat-stage,
  .full-chat-stage {
    flex: 1 1 0%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    border-radius: 20px;
  }
  .fc-header { padding: 8px 10px; height: 52px; gap: 6px; }
  .fc-icon-btn { width: 30px; height: 30px; }
  .fc-actions { gap: 4px; }
  .fc-emp-info strong, .fc-emp-info small { max-width: 42vw; }
  .fc-icon-btn svg { width: 16px; height: 16px; }
  .full-chat-stage .fc-msgs { padding: 14px 10px 18px; }
  .fc-scroll-btn { right: 12px; bottom: 10px; }
  .fc-composer-wrap { padding: 8px 10px 10px; }
  .bubble, .msg-row.mine .bubble, .msg-row.theirs .bubble {
    max-width: 90%;
    padding: 11px 14px;
    font-size: 14.5px;
  }
  .msg-row.theirs .bubble.typing-bubble { width: 90%; }

  .bento-col:last-child { grid-column: span 1; }
  .bento-card, .card { padding: 16px 14px; border-radius: 20px; }
  .hero-grad-card.ask { padding: 18px 16px; gap: 12px; border-radius: 20px; }
  .hero-grad-card.ask h2 { font-size: 19px; }
  .hero-emp-strip { gap: 5px; max-height: 132px; overflow-y: auto; }
  .hero-emp-pill { padding: 4px 9px; font-size: 11px; }
  .hero-pill-bar { padding: 5px 5px 5px 12px; gap: 6px; }
  .hero-pill-bar input { min-width: 0; flex: 1; font-size: 13px; }
  .hero-chat-btn { height: 36px; padding: 0 10px; font-size: 11px; }
  .hero-lime-btn { width: 36px; height: 36px; }

  .toolbar { padding: 10px 12px; border-radius: 16px; }
  .toolbar-left { width: 100%; }
  .toolbar-search, .toolbar-select { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  .task-row { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .task-row .sq-ico { width: 36px; height: 36px; }
  .live-active-item { padding: 10px 12px; }
  .live-row { padding: 8px 10px; gap: 8px; }
  .live-filter-sel { max-width: 145px; }
  .org-node { flex-wrap: wrap; margin-left: 0 !important; }
  .sys-banner { flex-direction: column; align-items: flex-start; padding: 12px 14px; }
  .subbar { gap: 10px; }
  .hub-switcher { max-width: 100%; overflow-x: auto; }

  .quick-search-wrap { display: block; flex: 1; min-width: 0; max-width: 210px; }
  #global-search, #global-search:focus {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px 0 30px;
    font-size: 12.5px;
  }
  .search-ico { left: 10px; width: 14px; height: 14px; }
  .circle-btn, .logo-circle { width: 36px; height: 36px; }
  .circle-btn svg, .logo-circle svg { width: 16px; height: 16px; }
  .profile-meta { display: none; }
  .profile-pill { padding: 2px; height: 36px; }
  .profile-ava { width: 32px; height: 32px; font-size: 11px; }
  .drawer-backdrop { padding: 0; }
  .drawer-panel { max-width: 100%; border-radius: 0; }
  .toast { bottom: 74px; right: 16px; left: 16px; text-align: center; }

  /* konten terakhir jangan tertimbun nav bawah */
  .main-canvas { padding-bottom: calc(60px + 28px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    height: 60px;
    background: #0f1e46;
    border-radius: 999px;
    box-shadow: var(--shadow-float);
    z-index: 70;
    padding: 0 6px;
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 550;
    color: rgba(255, 255, 255, 0.65);
  }
  .mobile-nav a svg { width: 18px; height: 18px; }
  .mobile-nav a.active { color: var(--lime); font-weight: 650; }
}

@media (max-width: 640px) {
  .fc-pop-panel,
  .fc-model-pop,
  .fc-dropdown-menu {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 108px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 196px);
    overflow-y: auto;
  }
  .fc-msg-counter { display: none; }
  .comp-ico-btn { width: 34px; height: 34px; }
  .comp-send-btn { width: 36px; height: 36px; }
  .composer { padding: 5px 6px 5px 8px; gap: 4px; }
  .fc-stage-item { min-width: 150px; max-width: 210px; }
  .att-img-grid { grid-template-columns: 1fr; }
  .att-audio { min-width: 165px; }
  .att-doc-card, .att-audio-card, .att-video-card { min-width: 0; max-width: 100%; }
  .rk-lightbox { padding: 8px; }
  .rk-lb-box { max-height: 96dvh; border-radius: 16px; }
  .mm-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Ruang Rapat AI */
.mr-picks { display: flex; flex-wrap: wrap; gap: 8px; max-height: 190px; overflow: auto; }
.mr-pick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 12.5px; cursor: pointer; background: var(--card2, rgba(255,255,255,.03)); }
.mr-pick input { width: auto; margin: 0; }
.mr-agenda { white-space: pre-wrap; border-left: 2px solid var(--line); padding-left: 10px; margin-bottom: 10px; }
.mr-live { color: var(--accent2); margin-bottom: 8px; animation: mrPulse 1.6s ease-in-out infinite; }
@keyframes mrPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.mr-summary { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
  background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mr-summary .txt { white-space: pre-wrap; font-size: 13px; line-height: 1.55; }
.mr-round { margin-bottom: 14px; }
.mr-round-h { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 8px; font-weight: 550; }
.mr-transcript { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.mr-transcript .msg-row.mine { justify-content: flex-start; }
.mr-transcript .bubble { max-width: 100%; }
.mr-action { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.mr-action.done { opacity: .6; }
@media (max-width: 560px) {
  .btn.tiny, .btn.sm { min-height: 40px; padding-left: 12px; padding-right: 12px; }
  .toolbar { padding: 10px 12px; gap: 8px; }
  .toolbar-search { height: 40px; }
  .grid, .list { gap: 10px; }
  .card { padding: 14px; }
  code, .mono { overflow-wrap: anywhere; word-break: break-word; }
  .fs, .fs * { min-width: 0; }
  .mr-transcript { max-height: 45vh; }
  .quick-search-wrap { display: none; }
  .fc-emp-info small { display: none; }
  .team-scroll { max-height: none; }
}

/* ==========================================================================
   UI POLISH LAYER — gerak, fokus, kontrol form kustom, overlay & mode gelap
   Transisi sengaja hanya dipasang di elemen interaktif (bukan `*`) supaya
   daftar panjang (chat, feed live) tetap ringan.
   ========================================================================== */

::selection { background: color-mix(in srgb, var(--teal) 28%, transparent); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---- Gerak terarah ---- */
.btn, .circle-btn, .pill-dock a, .hub-pill, .tab, .chip, .att-chip, .white-pill-btn,
.hero-emp-pill, .hero-lime-btn, .hero-chat-btn, .hero-chat-link, .icon-btn, .fc-icon-btn,
.comp-ico-btn, .comp-send-btn, .conv, .conv-ava-pill, .fc-dd-item, .fc-model-item,
.fc-model-refresh, .fc-emp-trigger, .search-hit, .task-row, .team-row, .live-row, .rec,
.recruit-card, .preset-card, .att-pill-btn, .att-act-btn, .fc-load-more-btn, .fc-scroll-btn,
.profile-pill, .link, .msg-act, .btn-stop-chat, .md-code-copy, .fc-stage-btn, .mr-pick,
.mobile-nav a, .bento-card.emp, .task-card, .navy-station-card, .rec-item, .mm-card,
input, textarea, select, #global-search {
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    box-shadow 220ms var(--ease),
    transform 140ms var(--ease),
    opacity var(--dur) var(--ease),
    width 220ms var(--ease);
}

/* ---- Fokus keyboard yang jelas ---- */
:where(a, button, summary, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
:where(input, textarea, select):focus-visible { outline: none; }
#global-search:focus {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-card);
}

/* ---- Navigasi atas: satu dok pil yang menyatu ---- */
.pill-dock {
  background: var(--panel);
  padding: 4px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  gap: 2px;
}
.pill-dock a {
  height: 38px;
  background: transparent;
  box-shadow: none;
  color: var(--text-sec);
}
.pill-dock a .nav-ico { color: currentColor; }
.pill-dock a:hover { background: var(--panel2); color: var(--text); }
.pill-dock a.active {
  box-shadow: 0 4px 14px rgba(15, 30, 70, 0.22);
}
.pill-dock a.active:hover { background: var(--ink-hover); color: var(--on-ink); }
.pill-dock a.active .nav-ico { color: var(--ink-accent); }
html[data-theme="dark"] .pill-dock a.active { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.circle-btn:hover { box-shadow: var(--shadow-hover); }
.circle-btn:active, .hero-lime-btn:active, .comp-send-btn:active,
.fc-icon-btn:active, .comp-ico-btn:active, .icon-btn:active { transform: scale(0.92); }
.hero-lime-btn:hover, .comp-send-btn:hover:not(:disabled) {
  box-shadow: 0 6px 16px rgba(197, 226, 50, 0.45);
}
.profile-pill:hover { box-shadow: var(--shadow-hover); }

/* ---- Select: panah kustom ---- */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a89a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px 15px;
  padding-right: 38px !important;
  text-overflow: ellipsis;
}
.hero-emp-select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dff952' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
select option { font-weight: 500; }

/* ---- Checkbox & radio kustom ---- */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px !important;
  height: 18px !important;
  min-height: 0;
  min-width: 18px;
  padding: 0 !important;
  margin: 0;
  border: 1.5px solid var(--line2);
  border-radius: 6px;
  background-color: var(--panel);
  box-shadow: none;
  display: inline-grid;
  place-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  vertical-align: middle;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 140ms var(--ease);
  background: var(--on-ink);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 140ms var(--ease);
  background: var(--on-ink);
}
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--focus); }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  background-color: var(--ink);
  border-color: var(--ink);
}
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--focus);
}

/* ---- File input ---- */
input[type="file"] {
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  background-color: var(--panel2);
  border-style: dashed;
  border-width: 1.5px;
}
input[type="file"]:hover { border-color: var(--focus); background-color: var(--accent-soft); }
input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--on-ink);
  background: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  margin-right: 12px;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
input[type="file"]::file-selector-button:hover { background: var(--ink-hover); }

/* Input di dalam bilah kustom: tanpa bingkai & cincin ganda */
.hero-pill-bar input, .composer textarea {
  min-height: 0;
  box-shadow: none !important;
}

/* ---- Kartu: tepi tajam + angkat saat hover ---- */
.card, .bento-card, .toolbar, .pager, .tbl-wrap {
  border: 1px solid rgba(15, 30, 70, 0.045);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .bento-card,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .pager,
html[data-theme="dark"] .tbl-wrap { border-color: rgba(255, 255, 255, 0.05); }

.bento-card.emp:hover, .task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.navy-station-card:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(15, 30, 70, 0.26); }

/* Deskripsi karyawan dipotong 3 baris supaya kartu rata */
.emp .rec-item-title small {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.5;
  margin-top: 2px;
  font-size: 12px;
}
.emp .rec-item-title strong { font-size: 15.5px; }
.emp-card-actions { align-items: center; }

/* Baris tugas: aksen kiri, bukan bingkai oranye penuh */
.task-row { border: 1px solid transparent; }
.task-row:hover {
  background: var(--panel);
  border-color: var(--line2);
  box-shadow: var(--shadow-card);
}
.task-row.running, .task-card.running {
  border-color: color-mix(in srgb, var(--teal) 40%, transparent);
  box-shadow: inset 4px 0 0 var(--teal);
}
.task-row.blocked, .task-card.blocked {
  border-color: color-mix(in srgb, var(--amber) 35%, transparent);
  box-shadow: inset 4px 0 0 var(--amber);
}
.task-row.running:hover { box-shadow: inset 4px 0 0 var(--teal), var(--shadow-card); }
.task-row.blocked:hover { box-shadow: inset 4px 0 0 var(--amber), var(--shadow-card); }
.team-row:hover { background: var(--panel3); }
.rec:hover, .recruit-card:hover, .preset-card:hover { box-shadow: var(--shadow-card); }
.recruit-card:hover { transform: translateY(-1px); }

/* ---- Tab segmen ---- */
.tabs { box-shadow: inset 0 1px 2px rgba(15, 30, 70, 0.05); }
.tab { padding: 7px 15px; }
.chip:active, .tab:active, .hub-pill:active { transform: scale(0.97); }

/* ---- Tabel ---- */
tbody tr:hover td { background: color-mix(in srgb, var(--panel2) 70%, transparent); }
th { font-size: 10.5px; letter-spacing: 0.07em; }

/* ---- Empty state ---- */
.empty-box, .quiet {
  background: transparent;
  border: 1.5px dashed var(--line2);
}
.empty-box { padding: 36px 20px; gap: 6px; }
.empty-box::before {
  content: "";
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231799cd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / 22px no-repeat,
    var(--accent-soft);
}
.card.empty-box { box-shadow: none; }

/* ---- Overlay: drawer, modal, toast, dropdown ---- */
@keyframes rkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rkSlideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes rkPop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes rkDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rkToast { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rkPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px transparent; }
}
@keyframes rkBounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-4px); opacity: 1; } }

.drawer-backdrop, .modal-backdrop {
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  backdrop-filter: blur(6px) saturate(1.1);
}
.drawer-backdrop:not(.hidden) { animation: rkFade 180ms var(--ease); }
.drawer-backdrop:not(.hidden) .drawer-panel { animation: rkSlideIn 280ms var(--ease); }
.modal-backdrop:not(.hidden) { animation: rkFade 160ms var(--ease); }
.modal-backdrop:not(.hidden) .modal-box { animation: rkPop 240ms var(--ease); }
.rk-lightbox:not(.hidden) { animation: rkFade 180ms var(--ease); }
.toast:not(.hidden) { animation: rkToast 260ms var(--ease); }
.search-dropdown:not(.hidden) { animation: rkDrop 160ms var(--ease); }
.drawer-head, .modal-head { gap: 12px; }
.drawer-head .circle-btn.sm:hover, .modal-head .circle-btn.sm:hover { background: var(--panel3); transform: rotate(90deg); }

/* ---- Indikator hidup ---- */
.live-badge-dot, .sdot.run, .notif-dot { color: var(--green); animation: rkPulse 1.8s ease-out infinite; }
.sdot.run, .notif-dot { color: var(--teal); }
.typing-dots i { animation: rkBounce 1.2s ease-in-out infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

/* ---- Mobile nav: indikator pil aktif ---- */
.mobile-nav a { border-radius: 999px; margin: 6px 2px; }
.mobile-nav a.active { background: rgba(223, 249, 82, 0.12); }

/* ---- Login ---- */
.login {
  background:
    radial-gradient(900px 500px at 15% 10%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, color-mix(in srgb, var(--lime) 18%, transparent), transparent 60%),
    var(--bg);
}
.login form {
  max-width: 420px;
  border: 1px solid rgba(15, 30, 70, 0.05);
  animation: rkPop 360ms var(--ease);
}
.login input { min-height: 46px; }
.login .btn.full-w { min-height: 48px; font-size: 14px; }

/* ---- Ruang Rapat: pemilih peserta jadi chip ---- */
.mr-pick {
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  background: var(--panel2);
  border-color: var(--line);
  font-weight: 550;
  color: var(--text);
  display: inline-flex;
}
.mr-pick:hover { border-color: var(--input-hover); }
.mr-pick:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.mr-summary, .mr-action { border-radius: 14px; }

/* ---- Perbaikan mode gelap ---- */
html[data-theme="dark"] .msg-row.mine .bubble { background: #1e3a74; }
html[data-theme="dark"] .perm-badge { background: #4a3708; color: #ffd66b; }
html[data-theme="dark"] .act-row.now .act-mark { color: #7aa7ff; }
html[data-theme="dark"] .login form { border-color: rgba(255, 255, 255, 0.06); }

/* ---- Hormati preferensi gerak minimal ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Responsif untuk dok navigasi baru ---- */
@media (max-width: 1320px) {
  .pill-dock a { height: 36px; }
}

/* ==========================================================================
   FORM SECTIONS — formulir di drawer dikelompokkan per bagian
   ========================================================================== */
.drawer-body { padding: 18px 22px 32px; }
.drawer-body .form { max-width: none; }

/* Header identitas karyawan */
.emp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-soft), var(--panel2));
  border: 1px solid var(--line);
}
.emp-hero-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.emp-hero-meta { display: grid; gap: 4px; min-width: 0; }
.emp-hero-meta strong { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-model-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-sec);
  font-size: 11.5px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emp-model-pill svg { width: 13px; height: 13px; color: var(--teal); flex-shrink: 0; }
.emp-hero-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn.danger-ghost {
  color: var(--red);
  background: var(--panel);
  border-color: var(--red-border);
  box-shadow: none;
  padding: 0 9px;
}
.btn.danger-ghost:hover { background: var(--red); border-color: var(--red); color: #fff; }

.drawer-body > .tabs { margin: 0 0 16px; }

/* Bagian formulir */
.fs {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 30, 70, 0.03);
}
.fs-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 0;
}
.fs-head h4 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.fs-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.fs-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}
.fs-ico svg { width: 17px; height: 17px; }
.fs-body { display: grid; gap: 16px; padding: 16px 18px 18px; }
.fs-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--panel2);
  border-top: 1px solid var(--line);
}
.fs-inline { display: flex; gap: 8px; align-items: stretch; }
.fs-inline select { flex: 1; }
.fs-inline .btn { min-height: 42px; }
.fs textarea[rows="2"] { min-height: 66px; }
.fs textarea[rows="3"] { min-height: 86px; }
.fs textarea[rows="5"] { min-height: 130px; }

/* Foto */
.fs-photo { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.fs-photo .ava.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 20px; box-shadow: 0 6px 16px rgba(15, 30, 70, 0.18); }
.fs-photo-meta { display: grid; gap: 2px; min-width: 0; }
.fs-photo-meta strong { font-size: 14px; font-weight: 600; }
.fs-photo-meta span { font-size: 12px; color: var(--muted); }
.fs-photo-meta label.btn { display: inline-flex; cursor: pointer; }

/* Field: label + kontrol + petunjuk */
label.field { gap: 7px; color: var(--text); font-size: 13px; font-weight: 550; }
label.field em {
  font-style: normal;
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  background: var(--panel2);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.hint { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.4; margin-top: -2px; }

/* Kanal: samakan dengan bagian formulir */
.chan-cfg { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; }

@media (max-width: 560px) {
  .emp-hero-acts .btn span { display: none; }
  .emp-hero-acts .btn { padding: 0 9px; }
  .fs-head, .fs-body, .fs-photo { padding-left: 14px; padding-right: 14px; }
  .fs-foot { padding: 10px 14px; }
}

/* Textarea tumbuh mengikuti isi (Chromium 123+), dengan batas atas */
.fs textarea { field-sizing: content; max-height: 320px; }
.field-label { display: inline-flex; align-items: center; gap: 2px; }
/* Subjudul drawer: maksimal 2 baris */
#rk-drawer-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   FORM SYSTEM v3 — tipografi Inter, kontrol ringan & elegan
   Acuan: shadcn/ui (input h-9/h-10, rounded-md, border 1px, shadow-xs,
   teks 14px regular, label medium, ring fokus 3px).
   ========================================================================== */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-ui: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;

  --field-bg: #ffffff;
  --field-border: #e1e7f0;
  --field-border-hover: #c9d3e2;
  --field-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  --field-ring: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent);
  --field-radius: 10px;
  --label: #1c2a4d;
  --label-focus: #1d52b8;
}
html[data-theme="dark"] {
  --field-bg: rgba(255, 255, 255, 0.035);
  --field-border: #2a3a5e;
  --field-border-hover: #3a4d7a;
  --field-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  --label: #dde5f5;
  --label-focus: #7cb4ff;
}

html, body {
  font-family: var(--font-ui);
  letter-spacing: -0.011em;
  font-feature-settings: "cv11", "calt";
}
code, pre, .perm-cmd, .act-cmd { letter-spacing: 0; }

/* ---- Kontrol form ---- */
input, textarea, select {
  background-color: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  min-height: 40px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: var(--text);
  box-shadow: var(--field-shadow);
}
textarea { padding: 10px 12px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--placeholder); font-weight: 400; }
input:hover, textarea:hover, select:hover { border-color: var(--field-border-hover); }
input:focus, textarea:focus, select:focus {
  background-color: var(--field-bg);
  border-color: var(--focus);
  box-shadow: var(--field-ring), var(--field-shadow);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus { background-color: rgba(255, 255, 255, 0.05); }
select, select option { font-weight: 400; }
input[type="file"] { background-color: var(--panel2); box-shadow: none; }

/* Label: medium, bukan bold. Berubah warna saat field-nya aktif. */
label {
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
  gap: 6px;
  letter-spacing: -0.006em;
}
.form label:focus-within, label.field:focus-within, .login-fields label:focus-within { color: var(--label-focus); }
.hint, .form .muted.tiny {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}
.field-err { font-weight: 500; font-size: 12.5px; }

/* ---- Tombol ---- */
.btn {
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: -0.008em;
}
.btn.tiny { font-size: 12.5px; min-height: 32px; }
.btn.primary, .btn.navy-pill, .btn.lime { font-weight: 550; }
.btn[aria-busy="true"] {
  opacity: 1;
  cursor: progress;
  color: transparent !important;
}
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--spin, var(--text));
  border-right-color: transparent;
  animation: rkSpin 0.6s linear infinite;
}
.btn.primary, .btn.navy-pill { --spin: var(--on-ink); }
html[data-theme="dark"] .btn.primary { --spin: #0f1e46; }
.btn.danger { --spin: var(--red); }
@keyframes rkSpin { to { transform: rotate(360deg); } }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
}
.link-btn svg { width: 14px; height: 14px; }
.link-btn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Tab & chip ---- */
.tab { font-weight: 500; font-size: 13px; }
.tab.on { font-weight: 550; }
.chip { font-weight: 500; }

/* ---- Drawer: header identitas tanpa kotak ---- */
.emp-hero {
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 2px 0 18px;
  margin-bottom: 18px;
}
.emp-hero-meta strong { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.emp-model-pill { font-weight: 500; font-size: 12px; background: var(--panel2); }
.emp-hero-acts .btn.tiny { background: var(--panel); border-color: var(--field-border); }
.emp-hero-acts .btn.tiny:hover { border-color: var(--field-border-hover); background: var(--panel2); }
.emp-hero-acts .btn.danger-ghost { border-color: var(--red-border); }
#rk-drawer-title { font-weight: 600; letter-spacing: -0.02em; }

/* ---- Bagian formulir (kartu ala halaman pengaturan) ---- */
.fs {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  margin-bottom: 16px;
  transition: border-color 200ms var(--ease), box-shadow 260ms var(--ease);
}
.fs:focus-within {
  border-color: var(--line2);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -14px rgba(15, 30, 70, 0.22);
}
html[data-theme="dark"] .fs:focus-within { box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.6); }
.fs-head { padding: 18px 20px 0; display: block; }
.fs-head h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.fs-head p { font-size: 13px; font-weight: 400; margin-top: 3px; }
.fs-body { padding: 18px 20px 20px; gap: 18px; }
.fs-photo { padding: 18px 20px; }
.fs-photo-meta strong { font-size: 14px; font-weight: 600; }
.fs-photo-meta span { font-size: 12.5px; }

.fs-foot {
  justify-content: space-between;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--panel2) 70%, var(--panel));
}
.fs-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  min-width: 0;
}
.fs-note > i {
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber);
  animation: rkPulse 1.6s ease-out infinite;
  flex-shrink: 0;
}
.fs-note .when-dirty { display: none; }
.fs.dirty .fs-note { color: var(--amber); font-weight: 500; }
.fs.dirty .fs-note > i { display: inline-block; }
.fs.dirty .fs-note .when-clean { display: none; }
.fs.dirty .fs-note .when-dirty { display: inline; }
.fs.dirty .fs-foot .btn.primary { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 16%, transparent), 0 6px 18px rgba(15, 30, 70, 0.2); }
.fs-foot:only-child, .fs-foot:empty { display: none; }

.fs-inline .btn { min-height: 40px; }

/* Skill di dalam bagian: chip lembut, bukan blok navy */
.fs .chip.on {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-weight: 500;
  padding: 5px 8px 5px 12px;
}
.fs .chip.on button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  opacity: 0.7;
}
.fs .chip.on button:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 15%, transparent); }

/* Opsional badge */
label.field em { font-weight: 500; }

/* Judul halaman & kartu: semibold yang tenang */
.subbar h1 { font-weight: 650; letter-spacing: -0.028em; }
.drawer-head h3, .modal-head h3 { font-weight: 600; }

/* Angka tabular hanya di tempat yang butuh — global tnum melebarkan tanda hubung di Inter */
html, body { font-variant-numeric: normal; }
.typing-timer, .act-timer, .live-dur, .count, .nav-badge, .usage-num, .pct-big, .u-stat strong,
.hero-big-num, .fc-msg-counter, .pager b, td, .prog-meta, .live-row-ts, .typing-step-ts,
.conv-top em, .bubble .meta, .att-fsize, .fc-model-count { font-variant-numeric: tabular-nums; }
.form { gap: 18px; }
.form > .row:last-child { margin-top: 4px; }

/* ---- Penyesuaian ponsel (390-560px) — ditaruh paling akhir agar menang urutan */
@media (max-width: 560px) {
  /* target sentuh minimal 40px (sebelumnya 26-35px: chip saran, tombol ikon, chip lampiran) */
  .white-pill-btn, .btn.tiny, .btn.sm, .chip, .att-chip, .fc-icon-btn, .seg button {
    height: auto;
    min-height: 40px;
  }
  .tab, .btn { min-height: 40px; }
  .chip { padding-top: 8px; padding-bottom: 8px; }
  /* meta tugas: dua baris utuh, bukan terpotong tengah kata */
  .task-row-meta {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
  }
  .task-row-meta span { white-space: normal; }

  .fc-composer-wrap { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  /* komposer chat: tombol ikon & kirim 40px, panel riwayat tidak keluar layar */
  .comp-ico-btn { width: 40px; height: 40px; }
  .comp-send-btn { min-width: 44px; height: 40px; }
  .fc-pop-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    top: auto;
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* ponsel: kepala halaman lebih ringkas supaya konten pertama tidak baru di 46% layar */
  .hero-grad-card { padding: 16px; }
  .chat-empty { padding: 12px 0 4px; gap: 10px; }
  .chat-empty .big { font-size: 19px; }
  .chat-empty .ava.lg { width: 56px; height: 56px; }
  /* baris simpan form di dalam drawer menempel di bawah */
  .drawer-body .form > .row:last-child {
    position: sticky;
    bottom: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 10px 0;
    margin: 0 -2px;
    z-index: 2;
  }
  /* toolbar: pencarian satu baris penuh, filter bisa digeser (dulu 162px tinggi) */
  .toolbar { padding: 10px 12px; gap: 8px; }
  .toolbar .toolbar-left { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .toolbar .toolbar-left::-webkit-scrollbar { display: none; }
  .toolbar .toolbar-search { flex: 1 0 100%; max-width: none; min-width: 0; }
  .toolbar .toolbar-select { flex: 0 0 auto; min-width: 0; max-width: 60vw; }
  /* menu pilih karyawan tidak keluar layar */
  .fc-dropdown-menu {
    left: auto;
    right: 0;
    width: min(310px, calc(100vw - 32px));
  }
}

/* 960-1140px: tetap dua kolom (rail 260px) — dulu rail jatuh ~1900px ke bawah. */
@media (min-width: 961px) and (max-width: 1140px) {
  .today { grid-template-columns: minmax(0, 1fr) 260px; }
}

/* Footer aksi drawer preset: 20 kartu = 2.800 px, tombol Rekrut dulu di luar layar. */
.preset-foot{position:sticky;bottom:0;z-index:2;background:var(--card);margin-top:14px;
  padding:10px 0 calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
.preset-foot .row{margin-top:8px}
