/* WCLAW Gateway — Hermes-client style. Light, clean, dense, fast. */

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f3f4f6;
  color: #1f2328;
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hidden { display: none !important; }
.hc-muted { color: #6b7280; font-size: 13px; }

/* ── Auth gate ── */
.auth-gate { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #eef1f5; }
.auth-card { background: #fff; border: 1px solid #e2e5ea; border-radius: 14px; padding: 30px; width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
.auth-card h1 { margin: 0 0 4px; font-size: 20px; }
.auth-sub { color: #6b7280; margin: 0 0 18px; font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 4px; }
.auth-label { font-size: 12px; color: #6b7280; margin-top: 10px; }
.auth-input { border: 1px solid #d1d5db; border-radius: 9px; padding: 10px 12px; font: inherit; background: #fff; }
.auth-input:focus { outline: none; border-color: #2563eb; }
.btn-primary { background: #2563eb; color: #fff; border: none; border-radius: 9px; padding: 10px 14px; font-weight: 600; cursor: pointer; margin-top: 14px; font-size: 14px; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.btn-secondary { background: #eef1f6; color: #374151; border: 1px solid #e2e5ea; border-radius: 9px; padding: 10px 14px; font-weight: 600; cursor: pointer; margin-top: 14px; font-size: 14px; }
.btn-secondary:hover { background: #e2e6ee; }
.auth-error { color: #dc2626; font-size: 13px; margin-top: 10px; }

/* ── App shell ── */
.hc-app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.hc-sidebar {
  background: #e9ecf1; border-right: 1px solid #dde1e7;
  display: flex; flex-direction: column; min-height: 0;
}
.hc-sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.hc-sidebar-tools .hc-tool { background: none; border: none; color: #8a909a; cursor: pointer; font-size: 15px; }

.hc-nav { padding: 8px 8px 4px; display: flex; flex-direction: column; gap: 1px; }
.hc-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: none; color: #2b3138; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; font-size: 14px; text-align: left;
}
.hc-nav-item:hover { background: #dde1e8; }
.hc-nav-item.active { background: #d6dbe4; font-weight: 600; }
.hc-nav-ico { font-size: 14px; width: 18px; text-align: center; }

.hc-search { display: flex; align-items: center; gap: 7px; margin: 8px 12px; background: #dfe3ea; border-radius: 9px; padding: 7px 10px; }
.hc-search-ico { color: #8a909a; font-size: 12px; }
.hc-search input { flex: 1; border: none; background: transparent; font: inherit; color: #2b3138; outline: none; }

.hc-lists { flex: 1 1 auto; overflow-y: auto; padding: 4px 8px 12px; }
.hc-list-group { margin-bottom: 10px; }
.hc-list-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px; color: #8a909a;
  padding: 8px 8px 4px; text-transform: uppercase;
}
.hc-pinned-head { color: #2563eb; }
.hc-count { color: #a3a8b2; font-weight: 600; }
.hc-list { display: flex; flex-direction: column; gap: 1px; }
.hc-row {
  display: flex; align-items: center; gap: 6px; border-radius: 7px; padding: 0; cursor: pointer;
}
.hc-row:hover { background: #dde1e8; }
.hc-row.active { background: #ced5e0; }
.hc-row-open {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: none; border: none; color: #2b3138; cursor: pointer;
  padding: 7px 4px 7px 10px; text-align: left; font-size: 13.5px;
}
.hc-row-dot { color: #b6bcc6; font-size: 9px; }
.hc-row.active .hc-row-open { font-weight: 600; }
.hc-row-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-row-lock { font-size: 10px; }
.hc-row-badge { font-size: 8.5px; text-transform: uppercase; font-weight: 700; padding: 1px 5px; border-radius: 4px; }
.hc-row-pin { background: none; border: none; color: #c2c7d0; cursor: pointer; font-size: 13px; padding: 4px 7px; }
.hc-row-pin:hover { color: #f59e0b; }

.hc-sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid #dde1e7; }
.hc-foot-home, .hc-foot-add { background: #dfe3ea; border: none; border-radius: 7px; width: 28px; height: 28px; cursor: pointer; font-size: 15px; color: #4b5563; }
.hc-foot-home:hover, .hc-foot-add:hover { background: #d0d6df; }
.hc-foot-user { flex: 1; font-size: 11px; color: #8a909a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-foot-signout { color: #8a909a; text-decoration: none; font-size: 16px; }
.hc-foot-signout:hover { color: #dc2626; }

/* ── Main ── */
.hc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f7f8fa; position: relative; }
.hc-main-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid #e6e9ee; position: relative; }
.hc-title-btn { display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-size: 15px; font-weight: 600; color: #1f2328; }
.hc-caret { color: #9ca3af; font-size: 12px; }
.hc-title-menu { position: absolute; top: 44px; left: 14px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.12); padding: 5px; z-index: 30; min-width: 160px; }
.hc-title-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: #2b3138; }
.hc-title-menu button:hover { background: #f0f2f5; }
.hc-title-menu .hc-danger { color: #dc2626; }
.hc-head-right { display: flex; align-items: center; gap: 14px; }
.hc-head-link { color: #6b7280; text-decoration: none; font-size: 13px; }
.hc-head-link:hover { color: #1f2328; }
.hc-vis-badge { font-size: 10px; padding: 2px 8px; border-radius: 5px; font-weight: 600; }
.hc-vis-shared { background: #e0e7ff; color: #4338ca; }
.hc-vis-private { background: #fef3c7; color: #92400e; }

.hc-view { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }

/* Stream */
.hc-stream { flex: 1 1 auto; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.hc-empty { color: #9ca3af; text-align: center; margin: auto; font-size: 13px; }
.hc-msg { max-width: 820px; }
.hc-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.hc-msg-who { font-weight: 600; font-size: 13px; }
.hc-msg-human .hc-msg-who { color: #1f2328; }
.hc-msg-engine .hc-msg-who { color: #2563eb; }
.hc-msg-time { color: #9ca3af; font-size: 11px; }
.hc-msg-eng { font-size: 9px; text-transform: uppercase; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.hc-msg-body { color: #2b3138; word-wrap: break-word; }
.hc-msg-body ul { margin: 4px 0; padding-left: 20px; }
.hc-msg-body h3, .hc-msg-body h4 { margin: 8px 0 4px; font-size: 14px; }
.hc-msg-body code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.hc-code { background: #f5f6f8; border: 1px solid #e6e9ee; border-radius: 8px; padding: 10px 12px; overflow-x: auto; font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; margin: 6px 0; }
.hc-msg-engine { background: #fff; border: 1px solid #e6e9ee; border-radius: 10px; padding: 10px 14px; }
.hc-msg-error { color: #dc2626; font-size: 13px; }
.hc-files { margin-top: 8px; border-top: 1px dashed #e2e5ea; padding-top: 6px; }
.hc-files-head { font-size: 11px; color: #6b7280; font-weight: 600; margin-bottom: 3px; }
.hc-file { font: 12px ui-monospace, Menlo, monospace; color: #374151; display: flex; gap: 6px; }
.hc-file-status { color: #2563eb; font-weight: 700; width: 16px; }
.hc-pending { color: #2563eb; display: flex; align-items: center; gap: 4px; font-size: 13px; }
.hc-dot2 { width: 5px; height: 5px; border-radius: 50%; background: #2563eb; display: inline-block; animation: hc-pulse 1.2s infinite; }
.hc-dot2:nth-child(2){animation-delay:.2s}.hc-dot2:nth-child(3){animation-delay:.4s}
@keyframes hc-pulse { 0%,80%,100%{opacity:.3} 40%{opacity:1} }

/* Compose */
.hc-compose { flex: 0 0 auto; padding: 12px 24px 8px; border-top: 1px solid #e6e9ee; background: #f7f8fa; }
.hc-engine-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hc-engine-label { color: #6b7280; font-size: 12px; }
.hc-engine-picker { display: flex; gap: 3px; background: #eef0f3; padding: 3px; border-radius: 9px; }
.hc-eopt { background: none; border: none; color: #6b7280; cursor: pointer; padding: 4px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.hc-eopt:hover { color: #1f2328; }
.hc-eopt.active { background: #fff; color: #1f2328; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.hc-eopt-multi { color: #b45309; font-weight: 600; }
.hc-engine-hint { color: #b45309; font-size: 11px; font-weight: 600; }
.hc-compose-form { display: flex; align-items: flex-end; gap: 8px; background: #fff; border: 1px solid #d8dce3; border-radius: 14px; padding: 6px 8px 6px 6px; }
.hc-compose-form:focus-within { border-color: #2563eb; }
.hc-compose-add { background: #eef0f3; border: none; border-radius: 9px; width: 32px; height: 32px; cursor: pointer; font-size: 17px; color: #6b7280; flex: 0 0 auto; }
.hc-compose-add:hover { background: #e2e5ea; }
#hc-input { flex: 1; border: none; background: transparent; resize: none; font: inherit; padding: 7px 4px; max-height: 200px; outline: none; }
.hc-send { background: #2563eb; border: none; border-radius: 9px; width: 32px; height: 32px; cursor: pointer; color: #fff; font-size: 14px; flex: 0 0 auto; }
.hc-send:hover { background: #1d4ed8; }
.hc-send:disabled { opacity: .5; cursor: default; }
.hc-status-line { color: #9ca3af; font-size: 11px; padding: 4px 4px 0; min-height: 14px; }

/* Panels (skills, artifacts) */
.hc-panel { flex: 1 1 auto; overflow-y: auto; padding: 24px 28px; }
.hc-panel h2 { margin: 0 0 4px; font-size: 18px; }
.hc-panel h3 { margin: 24px 0 10px; font-size: 14px; }
.hc-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.hc-template { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #fff; border: 1px solid #e2e5ea; border-radius: 12px; padding: 14px; cursor: pointer; text-align: left; }
.hc-template:hover { border-color: #2563eb; box-shadow: 0 3px 12px rgba(37,99,235,0.08); }
.hc-tpl-ico { font-size: 20px; }
.hc-template strong { font-size: 14px; }
.hc-tpl-sub { font-size: 11px; color: #9ca3af; }
.hc-eng-cards { display: flex; flex-direction: column; gap: 8px; }
.hc-eng-card { background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 12px 14px; }
.hc-eng-card strong { font-size: 13px; }
.hc-eng-card p { margin: 6px 0 0; font-size: 12.5px; color: #6b7280; }
.hc-eng-skai, .hc-eng-claude, .hc-eng-codex { font-size: 9px; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; font-weight: 700; margin-left: 4px; color: #fff; }
.hc-eng-skai { background: #2563eb; } .hc-eng-claude { background: #c2410c; } .hc-eng-codex { background: #15803d; }
/* engine badge colors in lists/messages */
.hc-eng-skai.hc-msg-eng, .hc-row-badge.hc-eng-skai { background: #dbeafe; color: #1e40af; }
.hc-msg-eng.hc-eng-claude { background: #ffedd5; color: #9a3412; }
.hc-msg-eng.hc-eng-codex { background: #dcfce7; color: #166534; }
.hc-msg-eng.hc-eng-skai { background: #dbeafe; color: #1e40af; }
.hc-row-badge.hc-eng-claude { background: #ffedd5; color: #9a3412; }
.hc-row-badge.hc-eng-codex { background: #dcfce7; color: #166534; }

/* Artifacts */
.hc-artifacts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.hc-artifact { background: #fff; border: 1px solid #e2e5ea; border-radius: 12px; padding: 14px 16px; }
.hc-artifact-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hc-artifact-eng { font-size: 9px; padding: 1px 7px; border-radius: 4px; text-transform: uppercase; font-weight: 700; }
.hc-artifact-when { color: #9ca3af; font-size: 11px; margin-left: auto; }
.hc-artifact-sum { font-size: 13px; color: #374151; margin-bottom: 8px; }
.hc-artifact-files { display: flex; flex-direction: column; gap: 2px; }

/* Status bar */
.hc-statusbar { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; padding: 6px 18px; border-top: 1px solid #e6e9ee; background: #eef0f3; font-size: 11.5px; color: #6b7280; }
.hc-sb-item { display: flex; align-items: center; gap: 5px; }
.hc-sb-dim { color: #9ca3af; }
.hc-sb-spacer { flex: 1; }

/* Modals */
.hc-modal { position: fixed; inset: 0; background: rgba(15,23,42,0.35); display: flex; align-items: center; justify-content: center; z-index: 60; }
.hc-modal-card { background: #fff; border-radius: 14px; padding: 22px; width: 420px; max-width: 90vw; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.hc-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hc-modal-head h2 { margin: 0; font-size: 17px; }
.hc-modal-close { background: none; border: none; font-size: 22px; color: #9ca3af; cursor: pointer; }
.hc-form { display: flex; flex-direction: column; gap: 5px; }
.hc-form label { font-size: 12px; color: #6b7280; margin-top: 8px; }
.hc-form input, .hc-form select { border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 11px; font: inherit; }
.hc-form input:focus, .hc-form select:focus { outline: none; border-color: #2563eb; }
.hc-multi-engines { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.hc-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.hc-multi-input { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px; font: inherit; resize: vertical; }
.hc-multi-input:focus { outline: none; border-color: #2563eb; }
/* Multi modal: Collaborate / Compare tabs + pair cards */
.hc-multi-tabs { display: flex; gap: 6px; margin: 6px 0 14px; }
.hc-multi-tab { flex: 1; background: #f0f2f5; border: 1px solid #e2e5ea; border-radius: 9px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: #4b5563; }
.hc-multi-tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.hc-multi-pairs { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.hc-pair { display: block; border: 1px solid #e2e5ea; border-radius: 11px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.hc-pair:hover { border-color: #c7ccd4; }
.hc-pair.active { border-color: #2563eb; background: #f5f8ff; }
.hc-pair input { display: none; }
.hc-pair-flow { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.hc-pair-sub { display: block; font-size: 12px; color: #9ca3af; margin-top: 5px; }
.hc-multi-pane.hidden { display: none; }
/* Effort picker */
.hc-effort-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.hc-effort-label { font-size: 12px; color: #6b7280; font-weight: 600; }
.hc-effort-picker { display: flex; gap: 6px; }
.hc-effort-opt { background: #f0f2f5; border: 1px solid #e2e5ea; border-radius: 8px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: #4b5563; }
.hc-effort-opt:hover { background: #e6e9ef; }
.hc-effort-opt.active { background: #111827; color: #fff; border-color: #111827; }
/* Collaboration thread connector + role pills on engine messages */
.hc-collab-connector { font-size: 12px; color: #6b7280; margin: 2px 0 6px 2px; display: flex; align-items: center; gap: 5px; }
.hc-msg-collab { border-left: 2px solid #e2e5ea; padding-left: 12px; margin-left: 2px; }
.hc-collab-role { font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; margin-left: 6px; color: #fff; }
.hc-collab-build { background: #6b7280; }
.hc-collab-review { background: #15803d; }
.hc-collab-strategy { background: #2563eb; }
.hc-collab-fix { background: #c2410c; }

/* ── v4: tools, team, toasts, user menu, unread ── */

/* Real WCLAW tools grid */
.hc-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 12px 0 8px; }
.hc-tool-link { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e2e5ea; border-radius: 12px; padding: 14px; text-decoration: none; color: #1f2328; }
.hc-tool-link:hover { border-color: #2563eb; box-shadow: 0 3px 12px rgba(37,99,235,0.08); }
.hc-tool-ico { font-size: 22px; }
.hc-tool-link strong { display: block; font-size: 14px; }
.hc-tool-link span { font-size: 12px; color: #9ca3af; }

/* User menu (sidebar footer) */
.hc-foot-user { display: flex; align-items: center; gap: 8px; flex: 1; background: none; border: none; cursor: pointer; padding: 4px 6px; border-radius: 8px; min-width: 0; }
.hc-foot-user:hover { background: #dde1e8; }
.hc-user-avatar { width: 26px; height: 26px; border-radius: 50%; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.hc-foot-user-name { font-size: 12.5px; color: #2b3138; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-user-menu { position: absolute; bottom: 50px; left: 12px; background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.14); padding: 5px; z-index: 40; min-width: 180px; }
.hc-user-menu-head { font-size: 11px; color: #9ca3af; padding: 6px 12px; border-bottom: 1px solid #f0f2f5; margin-bottom: 4px; text-transform: capitalize; }
.hc-user-menu button, .hc-user-menu a { display: block; width: 100%; text-align: left; background: none; border: none; padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: #2b3138; text-decoration: none; }
.hc-user-menu button:hover, .hc-user-menu a:hover { background: #f0f2f5; }

/* Team / users */
.hc-users { display: flex; flex-direction: column; gap: 8px; }
.hc-user-card { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #e2e5ea; border-radius: 12px; padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
.hc-user-main strong { font-size: 14px; }
.hc-user-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.hc-role { font-size: 9px; text-transform: uppercase; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-left: 4px; }
.hc-role-admin { background: #fef3c7; color: #92400e; }
.hc-role-employee, .hc-role-member { background: #e0e7ff; color: #4338ca; }
.hc-inactive { font-size: 10px; color: #dc2626; margin-left: 6px; }
.hc-user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.hc-user-act { background: #f0f2f5; border: 1px solid #e2e5ea; border-radius: 7px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: #374151; }
.hc-user-act:hover { background: #e2e5ea; }
.hc-user-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.hc-user-danger:hover { background: #fee2e2; }

/* Unread badge */
.hc-unread { background: #2563eb; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }

/* Toasts (pop-up messaging) */
.hc-toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: 340px; }
.hc-toast { display: flex; gap: 10px; background: #fff; border: 1px solid #e2e5ea; border-left: 3px solid #2563eb; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,0.16); animation: hc-toast-in 0.3s ease; }
.hc-toast-out { animation: hc-toast-out 0.3s ease forwards; }
@keyframes hc-toast-in { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes hc-toast-out { to { transform: translateX(40px); opacity: 0; } }
.hc-toast-ico { font-size: 20px; }
.hc-toast-title { font-size: 13px; font-weight: 600; }
.hc-toast-text { font-size: 12.5px; color: #6b7280; margin-top: 2px; }

/* ───────── Artifacts / File Library ───────── */
.hc-art-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hc-art-actions { flex-shrink: 0; }
.hc-art-actions .btn-primary { margin-top: 0; }
.hc-art-drop {
  margin: 14px 0 6px; border: 2px dashed #cbd2dc; border-radius: 12px;
  padding: 18px; text-align: center; color: #9099a6; font-size: 13px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.hc-art-drop-on { border-color: #2563eb; background: #eff4ff; color: #2563eb; }
.hc-art-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.hc-art-filter {
  background: #f0f2f5; border: 1px solid #e2e5ea; border-radius: 999px;
  padding: 5px 13px; font-size: 12.5px; cursor: pointer; color: #4b5563;
}
.hc-art-filter:hover { background: #e6e9ef; }
.hc-art-filter.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.hc-art-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px; margin-top: 6px;
}
.hc-art-card {
  position: relative; background: #fff; border: 1px solid #e6e8ec; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.15s, transform 0.1s;
}
.hc-art-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,0.09); transform: translateY(-1px); }
.hc-art-thumb {
  display: block; height: 150px; background: #f3f5f8; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hc-art-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hc-art-thumb-icon { font-size: 52px; }
.hc-art-meta { padding: 10px 12px; min-width: 0; }
.hc-art-name {
  display: block; font-size: 13px; font-weight: 600; color: #1f2937; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hc-art-name:hover { color: #2563eb; text-decoration: underline; }
.hc-art-sub { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.hc-art-note { font-size: 12px; color: #6b7280; margin-top: 5px; }
.hc-art-del {
  position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.92);
  border: 1px solid #e6e8ec; border-radius: 7px; width: 28px; height: 28px;
  cursor: pointer; font-size: 13px; opacity: 0; transition: opacity 0.15s;
}
.hc-art-card:hover .hc-art-del { opacity: 1; }
.hc-art-del:hover { background: #fee2e2; border-color: #fecaca; }

/* ───────── Compose attachments ───────── */
.hc-compose-attach { background: none; border: none; color: #8a909a; cursor: pointer; font-size: 17px; padding: 0 4px; align-self: flex-end; }
.hc-compose-attach:hover { color: #2563eb; }
.hc-attach-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 4px 2px; }
.hc-attach-chip {
  display: inline-flex; align-items: center; gap: 7px; background: #f0f2f5;
  border: 1px solid #e2e5ea; border-radius: 10px; padding: 4px 8px; max-width: 220px;
}
.hc-attach-thumb { width: 26px; height: 26px; object-fit: cover; border-radius: 5px; }
.hc-attach-ico { font-size: 16px; }
.hc-attach-name { font-size: 12px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.hc-attach-x { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.hc-attach-x:hover { color: #dc2626; }
.hc-drop-on { outline: 2px dashed #2563eb; outline-offset: -8px; background: #f5f8ff; }

/* Attachments shown on a sent message */
.hc-msg-atts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hc-msg-att {
  display: inline-flex; align-items: center; gap: 7px; background: #fff;
  border: 1px solid #e6e8ec; border-radius: 9px; padding: 6px 10px; text-decoration: none; color: #374151;
}
.hc-msg-att:hover { border-color: #c7ccd4; }
.hc-msg-att-ico { font-size: 16px; }
.hc-msg-att-name { font-size: 12.5px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-msg-att-img { padding: 0; border: none; overflow: hidden; border-radius: 10px; }
.hc-msg-att-img img { max-width: 220px; max-height: 180px; display: block; object-fit: cover; }

/* ───────── Creative Studio ───────── */
#hc-studio { margin-top: 18px; }
.hc-studio-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.hc-studio-tab { background: #f1f3f7; border: 1px solid #e2e5ea; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; }
.hc-studio-tab:hover { background: #e6e9ef; }
.hc-studio-tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.hc-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.hc-tool { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; background: #fff; border: 1px solid #e2e5ea; border-radius: 12px; padding: 16px 14px; cursor: pointer; text-align: left; transition: border-color .12s, box-shadow .12s; }
.hc-tool:hover { border-color: #2563eb; box-shadow: 0 3px 12px rgba(37,99,235,0.10); }
.hc-tool-ico { font-size: 22px; }
.hc-tool strong { font-size: 14px; }
.hc-tool-sub { font-size: 12px; color: #6b7280; }
/* Tool jobs list */
.hc-tool-jobs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.hc-job { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e8eaee; border-radius: 11px; padding: 11px 14px; }
.hc-job-ico { font-size: 20px; }
.hc-job-main { flex: 1; }
.hc-job-main strong { font-size: 13.5px; }
.hc-job-sub { font-size: 11.5px; color: #9ca3af; }
.hc-job-status { font-size: 12px; font-weight: 600; }
.hc-job-run { color: #2563eb; }
.hc-job-pend { color: #9ca3af; }
.hc-job-done { color: #16a34a; }
.hc-job-err { color: #dc2626; }
/* Tool modal */
.hc-tool-card { width: 480px; }
.hc-modal-x { background: none; border: none; font-size: 20px; color: #9ca3af; cursor: pointer; line-height: 1; }
.hc-modal-x:hover { color: #374151; }
.hc-tf { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.hc-tf-label { font-size: 12.5px; color: #374151; font-weight: 600; }
.hc-tf-label em { color: #dc2626; font-style: normal; }
.hc-tf-input { border: 1px solid #d1d5db; border-radius: 8px; padding: 9px 11px; font: inherit; width: 100%; box-sizing: border-box; resize: vertical; }
.hc-tf-input:focus { outline: none; border-color: #2563eb; }
.hc-tool-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.hc-status-err { color: #dc2626; }


