:root {
  --bg: #eff2f8;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --surface-muted: #f2f4fa;
  --rail: #34284f;
  --rail-soft: #46376a;
  --ink: #1c2540;
  --muted: #7d879b;
  --line: #e6eaf3;
  --accent: #5b4cf0;
  --accent-soft: rgba(91, 76, 240, 0.12);
  --danger: #f04461;
  --success: #22b07d;
  --shadow: 0 22px 50px rgba(31, 41, 63, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-ui: "Pretendard Variable", "Segoe UI Variable", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(91, 76, 240, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f8fc 0%, #edf1f8 100%);
  color: var(--ink);
  font-family: var(--font-ui);
}

.install-prompt {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  background: rgba(52, 40, 79, 0.96);
  box-shadow: 0 20px 42px rgba(26, 20, 44, 0.26);
  color: #ffffff;
  backdrop-filter: blur(14px);
}

.install-prompt-copy {
  display: grid;
  gap: 4px;
}

.install-prompt-copy strong {
  font-size: 14px;
}

.install-prompt-copy span {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.install-prompt .ghost-button {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.install-prompt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.web-push-prompt {
  bottom: calc(94px + env(safe-area-inset-bottom, 0px));
}

.web-push-prompt .primary-button {
  padding: 10px 14px;
}

body.modal-open {
  overflow: hidden;
}

.background-glow {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.65;
  pointer-events: none;
}

.background-glow-left {
  top: -120px;
  left: -140px;
  width: 260px;
  height: 260px;
  background: rgba(91, 76, 240, 0.12);
}

.background-glow-right {
  right: -120px;
  bottom: -140px;
  width: 300px;
  height: 300px;
  background: rgba(23, 170, 135, 0.1);
}

.hidden {
  display: none !important;
}

.login-screen,
.app-shell {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: #7a82a4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.login-brand {
  padding: 10px 12px 12px 2px;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.login-copy {
  max-width: 32rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.login-form,
.seed-panel,
.panel,
.room-panel,
.conversation-shell,
.inspector {
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.login-form,
.seed-panel,
.panel {
  border-radius: var(--radius-lg);
}

.login-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.login-option {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.login-option input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.login-option span {
  display: grid;
  gap: 2px;
}

.login-option strong {
  font-size: 14px;
}

.login-option small {
  color: var(--muted);
  font-size: 12px;
}

.seed-panel {
  display: none !important;
}

.seed-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 14px;
}

.seed-header h2,
.section-title-row h3,
.list-title-group h2,
.conversation-header h2,
.empty-state h3,
#meName {
  margin: 0;
}

.seed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.field,
.switch-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.switch-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

input,
select,
textarea {
  font: inherit;
  font-size: 16px;
}

button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9dfec;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(91, 76, 240, 0.52);
  box-shadow: 0 0 0 4px rgba(91, 76, 240, 0.12);
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: default;
  opacity: 0.56;
  transform: none;
}

.primary-button {
  background: linear-gradient(135deg, #5b4cf0, #7166ff);
  color: #ffffff;
}

.ghost-button {
  background: var(--surface-muted);
  color: var(--ink);
}

.danger-button {
  background: rgba(240, 68, 97, 0.12);
  color: #cc2f50;
}

.compact-button {
  padding: 10px 14px;
  font-size: 13px;
}

.send-button {
  min-width: 96px;
}

.seed-account {
  border: 1px solid #e1e6f1;
  background: #ffffff;
  color: var(--ink);
}

.error-text {
  margin: 0;
  color: #c12749;
  font-size: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 104px minmax(360px, 420px) minmax(480px, 1fr) minmax(280px, 320px);
  gap: 18px;
  height: var(--app-viewport-height, 100vh);
  min-height: var(--app-viewport-height, 100vh);
  padding:
    calc(18px + env(safe-area-inset-top, 0px))
    calc(18px + env(safe-area-inset-right, 0px))
    calc(18px + env(safe-area-inset-bottom, 0px))
    calc(18px + env(safe-area-inset-left, 0px));
}

.app-shell.is-customer-mode {
  grid-template-columns: 104px minmax(320px, 400px) minmax(480px, 1fr) minmax(260px, 300px);
}

.app-shell.is-room-inspector-collapsed {
  grid-template-columns: 104px minmax(360px, 420px) minmax(480px, 1fr);
}

.app-shell.is-customer-mode.is-room-inspector-collapsed {
  grid-template-columns: 104px minmax(320px, 400px) minmax(480px, 1fr);
}

.app-shell.is-work-support-mode,
.app-shell.is-work-support-mode.is-room-inspector-collapsed {
  grid-template-columns: 104px minmax(280px, 330px) minmax(560px, 1fr);
}

.app-shell.is-work-support-mode > .inspector,
.app-shell.is-work-support-mode .composer,
.app-shell.is-work-support-mode .typing-status-bar,
.app-shell.is-work-support-mode #messageSearchInput,
.app-shell.is-work-support-mode .header-search,
.app-shell.is-work-support-mode .message-date-search,
.app-shell.is-work-support-mode #reloadMessagesButton,
.app-shell.is-work-support-mode #roomAttachmentsButton,
.app-shell.is-work-support-mode #roomInspectorToggleButton {
  display: none !important;
}

.app-shell.is-work-support-mode .conversation-shell {
  grid-template-areas:
    "conversation-header"
    "message-list";
  grid-template-rows: auto minmax(0, 1fr);
}

.app-shell.is-room-inspector-collapsed > .inspector {
  display: none;
}

.app-shell.is-customer-mode [data-internal-only] {
  display: none !important;
}

[data-customer-only] {
  display: none !important;
}

.app-shell.is-customer-mode [data-customer-only] {
  display: grid !important;
}

.app-shell.is-customer-mode .profile-panel {
  display: none;
}

.app-shell.is-customer-mode .inspector {
  grid-template-rows: auto minmax(0, 1fr);
}

.app-nav,
.room-panel,
.conversation-shell,
.inspector {
  min-height: 0;
}

.app-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 0;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--rail) 0%, #2e2547 100%);
  box-shadow: var(--shadow);
}

.app-nav-top {
  display: grid;
  gap: 22px;
}

.profile-dock {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0;
  padding: 0 12px;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
}

.profile-dock:hover,
.nav-icon-button:hover {
  transform: none;
}

.profile-dock-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--rail);
  font-size: 12px;
  font-weight: 700;
}

.avatar-token {
  --avatar-hue: 248;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: hsl(var(--avatar-hue) 65% 92%);
  color: hsl(var(--avatar-hue) 35% 28%);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.avatar-lg {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.avatar-photo {
  overflow: hidden;
  background: #eef1f6;
}

.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 11px;
  border: 2px solid #ffffff;
}

.nav-icon-stack {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.nav-icon-stack-bottom {
  gap: 14px;
}

.nav-icon-button {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  width: 66px;
  min-height: 54px;
  padding: 0;
  border-radius: 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
}

.nav-icon-button.is-active {
  background: linear-gradient(135deg, #5b4cf0, #735dff);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(91, 76, 240, 0.34);
}

.nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  color: currentColor;
  font-size: 14px;
  font-weight: 800;
}

.nav-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.nav-more-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-more-icon i {
  display: block;
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 999px;
  background: currentColor;
}

.nav-label {
  max-width: 58px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon-button.is-active .nav-label {
  color: #ffffff;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.room-panel,
.conversation-shell,
.inspector {
  border-radius: var(--radius-xl);
}

.room-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  min-height: 0;
}

.list-header {
  display: grid;
  gap: 14px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.list-header-row,
.list-title-group,
.list-action-group,
.list-summary-row,
.room-card-top,
.room-preview-row,
.section-title-row,
.composer-actions,
.meta-row,
.conversation-header,
.header-actions,
.conversation-title-group,
.message-search-panel-header,
.notification-card-top,
.erp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.section-title-row {
  flex-wrap: wrap;
}

.conversation-header {
  align-items: flex-start;
  flex-wrap: wrap;
}

.conversation-title-group {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.conversation-subtitle {
  flex-basis: 100%;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.list-title-group h2 {
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.list-action-group {
  gap: 10px;
}

.list-icon-button {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface-muted);
  color: #6f7795;
  font-weight: 700;
}

.list-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box {
  position: relative;
  display: block;
}

.search-box::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  width: 14px;
  height: 14px;
  border: 2px solid #8b93ac;
  border-radius: 999px;
  transform: translateY(-50%);
}

.search-box::after {
  content: "";
  position: absolute;
  top: calc(50% + 6px);
  left: 28px;
  width: 8px;
  height: 2px;
  background: #8b93ac;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-box input {
  padding-left: 42px;
  background: #ffffff;
}

.quick-panel {
  display: grid;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.room-list,
.notification-list,
.message-list {
  overflow: auto;
}

.room-list {
  display: grid;
  align-content: start;
}

.client-create-form,
.new-room-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 8px;
}

.client-create-form input,
.new-room-create-form input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
}

.client-create-form button,
.new-room-create-form button {
  grid-column: 1 / -1;
}

.selected-member-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
}

.selected-member-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
}

.primary-list-button {
  background: linear-gradient(135deg, #5b4cf0, #735dff);
  color: #ffffff;
}

.mobile-nav-backdrop {
  display: none;
}

.new-conversation-modal {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: center;
  padding: 22px;
}

.new-conversation-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(18, 24, 38, 0.36);
  backdrop-filter: blur(8px);
}

.new-conversation-sheet {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 28px));
  max-height: min(86vh, 760px);
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(16, 24, 40, 0.22);
}

.new-conversation-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.new-conversation-sheet-header h3 {
  margin: 0;
  font-size: 20px;
}

.new-conversation-panel {
  margin: 0;
  border-radius: 14px;
}

.selected-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid rgba(91, 76, 240, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.user-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.client-result-list {
  display: grid;
  gap: 8px;
}

.client-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(91, 76, 240, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  color: inherit;
  text-align: left;
}

.client-result-card:hover {
  background: rgba(91, 76, 240, 0.06);
}

.client-result-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-result-copy strong,
.client-result-copy span,
.client-result-empty {
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-result-copy span,
.client-result-empty {
  color: var(--muted);
  font-size: 12px;
}

.client-result-empty {
  padding: 10px 2px;
}

.customer-quick-panel {
  border-bottom: 1px solid var(--line);
}

.customer-quick-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.room-invite-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

.room-invite-panel button {
  width: 100%;
  white-space: normal;
}

.room-invite-panel input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
}

.ticket-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ticket-create-form {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ticket-toolbar {
  display: grid;
  min-width: 0;
}

.ticket-create-form input,
.ticket-create-form textarea,
.ticket-create-form select,
.ticket-toolbar select,
.ticket-assignee-select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
}

.ticket-list {
  display: grid;
  gap: 8px;
}

.ticket-card,
.ticket-message-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.ticket-card-customer {
  background: #ffffff;
}

.ticket-card.is-ticket-target {
  border-color: rgba(21, 128, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.ticket-card-header,
.ticket-message-header,
.ticket-card-meta,
.ticket-message-meta,
.ticket-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ticket-card-header,
.ticket-message-header {
  justify-content: space-between;
}

.ticket-card-header strong,
.ticket-message-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-card-meta,
.ticket-message-meta,
.ticket-empty,
.ticket-card p,
.ticket-message-card p {
  color: var(--muted);
  font-size: 12px;
}

.ticket-erp-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(91, 76, 240, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
}

.ticket-erp-sync span {
  color: #4e42d4;
  font-weight: 800;
}

.ticket-erp-sync small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-erp-sync-processed span {
  color: #166534;
}

.ticket-erp-sync-unregistered span {
  color: #6b7280;
}

.ticket-erp-sync-failed span {
  color: #b91c1c;
}

.ticket-status-chip,
.ticket-status-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(91, 76, 240, 0.1);
  color: #4e42d4;
  font-size: 11px;
  font-weight: 800;
}

.ticket-status-actions {
  flex-wrap: wrap;
}

.ticket-priority-actions {
  padding-top: 2px;
}

.ticket-review-actions {
  padding-top: 2px;
}

.ticket-status-button {
  border: 0;
  background: #ffffff;
  color: var(--muted);
}

.ticket-status-button.is-active {
  background: #4e42d4;
  color: #ffffff;
}

.ticket-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.ticket-progress-step {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  padding: 5px 4px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ticket-progress-step.is-done {
  background: rgba(21, 128, 61, 0.12);
  color: #166534;
}

.ticket-log-toggle {
  justify-self: start;
}

.ticket-log-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.ticket-log-item {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-left: 3px solid rgba(91, 76, 240, 0.42);
  background: #ffffff;
}

.ticket-log-item strong {
  font-size: 12px;
}

.ticket-log-item span,
.ticket-log-item p {
  color: var(--muted);
  font-size: 12px;
}

.ticket-log-item p {
  white-space: pre-line;
}

.room-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.room-card-static {
  grid-template-columns: 1fr;
  cursor: default;
}

.room-card:hover {
  background: rgba(91, 76, 240, 0.04);
}

.room-card.active {
  background: linear-gradient(90deg, rgba(91, 76, 240, 0.09), rgba(91, 76, 240, 0.02));
}

.room-card-static {
  cursor: default;
}

.room-avatar-stack {
  position: relative;
  width: 48px;
  min-width: 48px;
  height: 48px;
}

.room-avatar-stack .avatar-sm {
  position: absolute;
}

.room-avatar-stack .avatar-sm:nth-child(1) {
  left: 0;
  top: 0;
  z-index: 3;
}

.room-avatar-stack .avatar-sm:nth-child(2) {
  left: 14px;
  top: 9px;
  z-index: 2;
}

.room-avatar-stack .avatar-sm:nth-child(3) {
  left: 8px;
  top: 18px;
  z-index: 1;
}

.room-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.room-name-row,
.room-meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.room-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.notification-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
  color: var(--ink);
}

.room-count,
.room-direct-label,
.room-role-chip {
  color: #7e87a3;
  font-size: 13px;
  font-weight: 700;
}

.room-direct-label {
  flex: 0 0 auto;
  color: #5b4cf0;
}

.room-attention-chip,
.room-notice-chip,
.room-ticket-chip {
  padding: 2px 7px;
  border-radius: 999px;
}

.room-attention-chip {
  background: rgba(236, 74, 94, 0.12);
  color: var(--danger);
}

.room-notice-chip {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5b00;
}

.room-ticket-chip {
  background: rgba(21, 128, 61, 0.12);
  color: #166534;
}

.room-time,
.room-preview,
.notification-body,
.meta-text,
.composer-hint,
.message-time,
.message-meta,
.empty-state p {
  color: var(--muted);
}

.room-time,
.message-meta {
  font-size: 12px;
}

.room-preview-row {
  align-items: flex-start;
}

.room-preview {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-preview.is-typing {
  color: #4e42d4;
  font-weight: 700;
}

.unread-badge,
.notification-count,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.unread-badge,
.notification-count {
  background: var(--danger);
  color: #ffffff;
}

.status-chip {
  background: #eff1f8;
  color: #7b839c;
}

.status-soft {
  background: rgba(34, 176, 125, 0.14);
  color: var(--success);
}

.status-mention {
  background: rgba(236, 74, 94, 0.12);
  color: var(--danger);
}

.status-notice {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5b00;
}

.status-live {
  background: rgba(34, 176, 125, 0.14);
  color: var(--success);
}

.status-idle {
  background: rgba(91, 76, 240, 0.12);
  color: #5b4cf0;
}

.conversation-shell {
  position: relative;
  display: grid;
  grid-template-areas:
    "conversation-header"
    "message-search"
    "pinned-messages"
    "project-history"
    "room-attachments"
    "message-list"
    "typing-status"
    "composer";
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  min-height: 0;
}

.conversation-header {
  grid-area: conversation-header;
}

.message-search-panel {
  grid-area: message-search;
}

.pinned-messages-panel {
  grid-area: pinned-messages;
}

.project-history-panel {
  grid-area: project-history;
}

.room-attachments-panel {
  grid-area: room-attachments;
}

.message-list {
  grid-area: message-list;
}

.message-scroll-bottom {
  grid-area: message-list;
  align-self: end;
  justify-self: end;
  z-index: 3;
  min-height: 40px;
  margin: 0 24px 20px 0;
  padding: 0 16px;
  border: 1px solid rgba(91, 76, 240, 0.22);
  border-radius: 999px;
  background: #5b4cf0;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(45, 35, 155, 0.24);
  font-size: 13px;
  font-weight: 800;
}

.message-scroll-bottom:hover {
  background: #493bd5;
  transform: translateY(-1px);
}

.app-shell.is-work-support-mode .message-scroll-bottom,
.app-shell.is-attendance-mode .message-scroll-bottom,
.app-shell.is-control-center-mode .message-scroll-bottom {
  display: none !important;
}

.typing-status-bar {
  grid-area: typing-status;
}

.composer {
  grid-area: composer;
}

.drag-drop-overlay {
  position: absolute;
  inset: 16px;
  z-index: 4;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 2px dashed rgba(91, 76, 240, 0.36);
  background: rgba(246, 244, 255, 0.76);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms ease;
}

.conversation-shell.drag-drop-active .drag-drop-overlay {
  opacity: 1;
  visibility: visible;
}

.drag-drop-card {
  display: grid;
  gap: 6px;
  width: min(360px, calc(100% - 40px));
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.drag-drop-card strong {
  font-size: 18px;
}

.home-dashboard {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.home-todo-section { margin-top:16px; }
.home-todo-copy { color:#77829a; font-size:13px; margin:0 0 12px; }
.home-todo-form { display:grid; gap:8px; grid-template-columns:minmax(0,1fr) 160px auto; }
.home-todo-form input { border:1px solid #d9deea; border-radius:10px; min-height:42px; padding:0 12px; }
.home-todo-list { display:grid; gap:6px; margin-top:12px; }
.home-todo-item { align-items:center; background:#f7f8fc; border-radius:10px; display:grid; gap:8px; grid-template-columns:auto minmax(0,1fr) auto; padding:10px 12px; }
.home-todo-item span { color:#6754f5; font-size:18px; }
.home-todo-item small { color:#818aa0; }
@media (max-width: 720px) { .home-todo-form { grid-template-columns:1fr; } }

.home-dashboard-header,
.home-section-title,
.home-list-item,
.home-dashboard-actions,
.home-list-meta {
  display: flex;
  align-items: center;
}

.home-dashboard-header {
  justify-content: space-between;
  gap: 16px;
}

.home-dashboard-header h3 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.25;
}

.home-dashboard-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-metric,
.home-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.home-metric {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  text-align: left;
}

.home-metric span,
.home-list-copy span,
.home-list-meta,
.home-empty {
  color: var(--muted);
}

.work-support-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 14px;
}

.work-support-sidebar-intro,
.work-support-sidebar-note {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.work-support-sidebar-intro strong {
  font-size: 19px;
}

.work-support-sidebar-intro p,
.work-support-sidebar-note span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.work-support-filter-list {
  display: grid;
  gap: 8px;
}

.work-support-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.work-support-filter strong {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
}

.work-support-filter.is-active {
  border-color: rgba(91, 76, 240, 0.3);
  background: rgba(91, 76, 240, 0.08);
  color: #4d3ee0;
}

.work-support-filter.is-active strong {
  background: #5b4cf0;
  color: #ffffff;
}

.work-support-dashboard {
  display: grid;
  align-content: start;
  gap: 18px;
  width: 100%;
  padding: 24px;
}

.work-support-hero,
.work-support-card-head,
.work-support-card-title,
.work-support-actions-title,
.work-support-card-foot,
.work-support-list-head > div {
  display: flex;
  align-items: center;
}

.work-support-hero {
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #342884 0%, #6758ee 65%, #806eff 100%);
  color: #ffffff;
}

.work-support-hero h3 {
  margin: 4px 0 8px;
  font-size: 25px;
}

.work-support-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.work-support-hero .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.work-support-hero .primary-button {
  flex: 0 0 auto;
  background: #ffffff;
  color: #4d3ee0;
}

.work-support-hero-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 8px;
}

.work-support-date-picker {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.work-support-date-picker input {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #c9c1ff;
  border-radius: 10px;
  background: #f2efff;
  color: #21194f;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  pointer-events: auto;
  -webkit-app-region: no-drag;
}

.work-support-hero [data-work-support-date-clear] {
  border-color: #ffb9c8;
  background: #ffe8ee;
  color: #a91f43;
  font-weight: 800;
}

.work-support-hero [data-work-support-date-clear]:hover {
  border-color: #ff8ba6;
  background: #ffd6e0;
  color: #861632;
}

.work-support-hero-tools .ghost-button {
  border-color: rgba(255, 255, 255, 0.46);
  color: #ffffff;
}

.work-support-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.work-support-metrics button {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.work-support-metrics button:hover {
  border-color: rgba(91, 76, 240, 0.32);
  background: rgba(91, 76, 240, 0.04);
}

.work-support-metrics button.is-active {
  border-color: rgba(91, 76, 240, 0.48);
  background: rgba(91, 76, 240, 0.1);
  box-shadow: 0 10px 24px rgba(91, 76, 240, 0.12);
}

.work-support-metrics span,
.work-support-list-head span {
  color: var(--muted);
  font-size: 13px;
}

.work-support-metrics strong {
  font-size: 27px;
  line-height: 1;
}

.control-center-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.control-center-sidebar-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.control-center-sidebar-metrics > div {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.control-center-sidebar-metrics span,
.control-center-admin-note,
.installation-control-card-head span,
.installation-control-work span,
.installation-control-work small,
.installation-control-card-foot,
.installation-control-updated {
  color: var(--muted);
  font-size: 12px;
}

.control-center-sidebar-metrics strong {
  font-size: 22px;
}

.control-center-admin-note {
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(22, 121, 87, 0.08);
  color: #167957;
  line-height: 1.5;
}

.installation-control-dashboard {
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.location-monitor-section {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(51, 136, 223, 0.2);
  border-radius: 22px;
  background: linear-gradient(145deg, #f7fbff, #eef7ff);
}

.location-monitor-head,
.location-monitor-person,
.location-monitor-latest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.location-monitor-head h3 { margin: 3px 0 6px; font-size: 23px; }
.location-monitor-head p { margin: 0; color: var(--muted); }
.location-monitor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.location-monitor-card { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.location-monitor-person strong, .location-monitor-person span { display: block; }
.location-monitor-person span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.location-monitor-person em { padding: 6px 10px; border-radius: 999px; background: #e8f7f1; color: #167957; font-size: 12px; font-style: normal; font-weight: 700; }
.control-center-location-health { display: grid; gap: 3px; padding: 9px 11px; border-radius: 11px; font-size: 12px; }
.control-center-location-health.is-normal { background: #e8f7f1; color: #167957; }
.control-center-location-health.is-warning { background: #fff0ed; color: #b83b2d; }
.control-center-location-health span { opacity: .82; }
.location-monitor-destination { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #f5f7fb; }
.location-monitor-destination span, .location-monitor-latest, .location-monitor-waiting { color: var(--muted); font-size: 12px; }
.location-map-preview { position: relative; width: 100%; height: 210px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #eef3f8; }
.location-map-preview iframe { width: 100%; height: 100%; border: 0; }
.location-monitor-card > a { justify-self: start; text-decoration: none; }

.installation-control-hero,
.installation-control-card-head,
.installation-control-card-foot,
.installation-control-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.installation-control-hero {
  padding: 23px 25px;
  border-radius: 22px;
  background: linear-gradient(135deg, #123c4a 0%, #176e6a 58%, #22a47f 100%);
  color: #ffffff;
}

.installation-control-hero h3 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.installation-control-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.installation-control-hero .eyebrow {
  color: rgba(255, 255, 255, 0.66);
}

.installation-control-hero .primary-button {
  flex: 0 0 auto;
  background: #ffffff;
  color: #176e6a;
}

.installation-control-hero-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.installation-control-hero-actions .ghost-button {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.installation-control-card-foot {
  flex-wrap: wrap;
}

.installation-control-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
}

.installation-control-summary > div {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
}

.installation-control-summary span {
  color: var(--muted);
  font-size: 12px;
}

.installation-control-summary strong {
  font-size: 25px;
}

.installation-control-summary .is-alert {
  border-color: rgba(240, 82, 61, 0.32);
  background: rgba(240, 82, 61, 0.07);
  color: #b83928;
}

.installation-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.installation-control-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-top: 5px solid #aab1c2;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(21, 55, 70, 0.06);
}

.installation-control-card.status-assigned,
.installation-control-card.status-scheduled {
  border-top-color: #7869ef;
}

.installation-control-card.status-moving {
  border-top-color: #3388df;
}

.installation-control-card.status-arrived,
.installation-control-card.status-working {
  border-top-color: #22a47f;
}

.installation-control-card.status-meal {
  border-top-color: #e4a42d;
}

.installation-control-card.status-held {
  border-top-color: #e07b2d;
}

.installation-control-card.is-overdue {
  border-color: rgba(240, 82, 61, 0.5);
  border-top-color: #f0523d;
  box-shadow: 0 10px 28px rgba(240, 82, 61, 0.12);
}

.installation-control-card-head > div,
.installation-control-work {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.installation-control-card-head > div > strong {
  font-size: 19px;
}

.installation-control-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(34, 164, 127, 0.1);
  color: #167957 !important;
  font-weight: 800;
}

.installation-control-card.is-overdue .installation-control-status {
  background: rgba(240, 82, 61, 0.1);
  color: #b83928 !important;
}

.installation-control-status-wrap {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.installation-control-elapsed {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.installation-control-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 2px 0;
}

.installation-control-progress::before {
  position: absolute;
  top: 14px;
  right: 10%;
  left: 10%;
  height: 2px;
  background: #dde1ea;
  content: "";
}

.installation-control-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}

.installation-control-step-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid #dde1ea;
  border-radius: 50%;
  background: #ffffff;
  color: #9299aa;
  font-size: 11px;
}

.installation-control-step.is-complete .installation-control-step-dot {
  border-color: #22a47f;
  background: #22a47f;
  color: #ffffff;
}

.installation-control-step.is-current {
  color: #176e6a;
}

.installation-control-step.is-current .installation-control-step-dot {
  border-color: #22a47f;
  box-shadow: 0 0 0 4px rgba(34, 164, 127, 0.13);
  color: #167957;
}

.installation-control-location-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #f2f4f8;
  color: #697287;
  font-size: 11px;
}

.installation-control-location-status.status-normal {
  background: #e8f7f1;
  color: #167957;
}

.installation-control-location-status.status-waiting_first {
  background: #fff7df;
  color: #85660b;
}

.installation-control-location-status.status-delayed {
  background: #fff0eb;
  color: #b3432f;
}

.installation-control-assignees { margin-top: 12px; padding: 12px; border: 1px solid #dfe6f2; border-radius: 14px; background: #f8faff; }
.installation-control-assignees.has-exception { border-color: #f4b8a9; background: #fff7f4; }
.installation-control-assignees > strong { display: block; margin-bottom: 8px; font-size: 12px; color: #34405a; }
.installation-control-assignee-list { display: flex; flex-wrap: wrap; gap: 6px; }
.installation-control-assignee { padding: 5px 8px; border-radius: 999px; background: #eef1f7; color: #59637a; font-size: 11px; font-weight: 700; }
.installation-control-assignee.is-primary { background: #e3f6ef; color: #11745c; }
.installation-control-assignee.status-assigned { background: #fff0eb; color: #b44e35; }
.installation-control-assignee.status-departed { background: #fff7d9; color: #85660b; }

.installation-control-alert {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid rgba(240, 82, 61, 0.25);
  border-radius: 12px;
  background: rgba(240, 82, 61, 0.07);
  color: #9e3427;
  font-size: 12px;
}

.installation-control-alert strong {
  font-size: 13px;
}

.installation-control-work {
  min-height: 112px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.installation-control-work > strong {
  font-size: 16px;
}

.installation-control-work small {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.installation-control-time {
  align-items: flex-start;
  margin-top: 7px;
}

.installation-control-time span:last-child {
  text-align: right;
}

.installation-control-idle {
  display: grid;
  min-height: 82px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.installation-control-card-foot {
  min-height: 34px;
}

.installation-control-updated {
  margin: 0;
  text-align: right;
}

.attendance-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.attendance-sidebar-status {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.attendance-sidebar-status span,
.attendance-sidebar-status small {
  color: var(--muted);
  font-size: 12px;
}

.attendance-sidebar-status strong {
  font-size: 20px;
}

.attendance-dashboard {
  display: grid;
  gap: 18px;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.attendance-hero,
.attendance-today-head,
.attendance-history-head,
.attendance-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.attendance-hero {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #31278e, #6656f4);
  color: #ffffff;
}

.attendance-hero h3 {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
}

.attendance-hero p:not(.eyebrow) {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

.attendance-hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.attendance-today-card,
.attendance-history-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.attendance-today-head > div {
  display: grid;
  gap: 4px;
}

.attendance-today-head span,
.attendance-time-grid span,
.attendance-history-head span,
.attendance-history-row span {
  color: var(--muted);
  font-size: 12px;
}

.attendance-today-head strong {
  font-size: 20px;
}

.attendance-status-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 176, 125, 0.13);
  color: #167957 !important;
  font-weight: 800;
}

.attendance-time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.attendance-time-grid > div {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.attendance-time-grid > div.is-primary {
  background: rgba(91, 76, 240, 0.09);
}

.attendance-time-grid strong {
  font-size: 22px;
}

.attendance-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.attendance-action-button,
.attendance-check-out-button {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 800;
}

.attendance-check-out-button {
  background: #27334f;
  color: #ffffff;
}

.attendance-action-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.attendance-error {
  padding: 13px 15px;
  border: 1px solid rgba(236, 74, 94, 0.22);
  border-radius: 13px;
  background: rgba(236, 74, 94, 0.08);
  color: #b52748;
}

.attendance-history-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.attendance-history-row {
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.attendance-history-row > div {
  display: grid;
  gap: 4px;
}

.attendance-history-row > div:not(:first-child) {
  min-width: 74px;
  text-align: right;
}

@media (max-width: 720px) {
  .attendance-dashboard {
    padding: 14px;
  }

  .attendance-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .attendance-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-history-row {
    align-items: flex-start;
  }
}

.work-support-list-head > div {
  gap: 9px;
}

.work-support-card-list {
  display: grid;
  gap: 14px;
}

.work-support-card {
  display: grid;
  gap: 17px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 5px solid #897dff;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(41, 34, 88, 0.06);
}

.work-support-card-active {
  border-left-color: #22b07d;
}

.work-support-card-completed {
  border-left-color: #aab1c2;
}

.work-support-card-head,
.work-support-card-foot {
  justify-content: space-between;
  gap: 14px;
}

.work-support-card-title {
  gap: 13px;
  min-width: 0;
}

.work-support-card-title h4 {
  margin: 3px 0 0;
  font-size: 19px;
}

.work-support-time-chip,
.work-support-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.work-support-time-chip {
  min-width: 62px;
  min-height: 38px;
  padding: 0 11px;
  background: rgba(91, 76, 240, 0.1);
  color: #5143d9;
}

.work-support-status {
  padding: 8px 12px;
  background: var(--surface-muted);
  color: var(--muted);
}

.work-support-status-departed,
.work-support-status-arrived,
.work-support-status-in_progress,
.work-support-status-meal {
  background: rgba(34, 176, 125, 0.13);
  color: #13885e;
}

.work-support-status-on_hold {
  background: rgba(224, 123, 45, 0.14);
  color: #a85516;
}

.work-support-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.work-support-detail-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f8fc;
}

.work-support-detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.work-support-detail-grid strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.installation-call-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(91, 76, 240, 0.1);
  color: #4235cf;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.installation-call-link span {
  overflow-wrap: anywhere;
  color: inherit;
}

.installation-call-link b {
  flex: 0 0 auto;
  padding-left: 8px;
  border-left: 1px solid rgba(66, 53, 207, 0.24);
  font-size: 12px;
}

.installation-call-link:hover {
  background: rgba(91, 76, 240, 0.16);
}

.work-support-detail-wide {
  grid-column: 1 / -1;
}

.work-support-summary {
  margin: 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: #fff9e8;
  color: #6e5620;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.work-support-actions {
  display: grid;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.work-support-actions-title {
  justify-content: space-between;
  gap: 12px;
}

.work-support-actions-title span {
  color: var(--muted);
  font-size: 12px;
}

.work-support-history {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.work-support-history strong {
  color: var(--ink);
}

.work-support-empty {
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.work-support-empty.is-error {
  border-color: rgba(236, 74, 94, 0.3);
  background: rgba(236, 74, 94, 0.06);
  color: var(--danger);
}

.home-metric strong {
  font-size: 30px;
  line-height: 1;
}

.home-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-section {
  min-width: 0;
  overflow: hidden;
}

.home-section-title {
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.home-list {
  display: grid;
}

.home-list-item {
  width: 100%;
  min-height: 72px;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.home-list-item:last-child {
  border-bottom: 0;
}

.home-list-item:hover,
.home-metric:hover {
  background: rgba(91, 76, 240, 0.04);
}

.home-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.home-list-copy strong,
.home-list-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-list-meta {
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.home-notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(236, 74, 94, 0.12);
}

.home-notification-dot.is-read {
  background: #a5adbf;
  box-shadow: none;
}

.home-empty {
  padding: 18px 16px;
  font-size: 14px;
}

.drag-drop-card span {
  color: var(--muted);
  line-height: 1.5;
}

.conversation-header,
.composer {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.conversation-header {
  flex-wrap: wrap;
  align-items: flex-start;
}

.mobile-back-button {
  display: none;
}

.conversation-title-group {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-search {
  width: min(320px, 100%);
  min-width: 220px;
}

.header-search input {
  min-height: 44px;
}

.message-date-search {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.message-date-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.message-search-panel {
  display: grid;
  gap: 12px;
  padding: 14px 22px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 255, 0.92);
}

.pinned-messages-panel {
  display: grid;
  gap: 12px;
  padding: 14px 22px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 246, 255, 0.92);
}

.pinned-messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pinned-messages-header strong {
  color: var(--ink);
  font-size: 14px;
}

.pinned-messages-list {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 2px;
}

.project-history-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(68vh, 720px);
  border-bottom: 1px solid var(--line);
  background: #f8f9ff;
}

.project-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(91, 76, 240, 0.12);
}

.project-history-header > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-history-header strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-history-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.project-history-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.project-history-content {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 16px 22px 22px;
}

.project-history-overview {
  padding: 14px 16px;
  border: 1px solid rgba(91, 76, 240, 0.14);
  border-radius: 14px;
  background: #ffffff;
  color: #44405e;
  font-size: 13px;
  line-height: 1.65;
}

.project-history-section {
  display: grid;
  gap: 9px;
}

.project-history-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.project-history-section h3 span {
  color: var(--accent);
  font-size: 12px;
}

.project-history-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.project-history-item {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.project-history-item p {
  margin: 0;
  color: #353249;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.project-history-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-history-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-history-item button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.project-history-empty {
  display: grid;
  gap: 6px;
  min-height: 120px;
  place-content: center;
  color: var(--muted);
  text-align: center;
}

.project-history-empty strong {
  color: var(--ink);
}

@media (max-width: 700px) {
  .project-history-panel {
    max-height: 72vh;
  }

  .project-history-header {
    align-items: flex-start;
    padding: 14px;
  }

  .project-history-content {
    padding: 14px;
  }

  .project-history-items {
    grid-template-columns: 1fr;
  }
}

.room-attachments-panel {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.room-attachments-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.attachment-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.attachment-filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attachment-filter-chip.is-active {
  border-color: rgba(91, 76, 240, 0.36);
  background: var(--accent-soft);
  color: #4235cf;
}

.room-attachments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.room-attachment-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.room-attachment-card:hover {
  background: rgba(91, 76, 240, 0.04);
}

.room-attachment-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.room-attachment-copy strong,
.room-attachment-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-attachment-copy span {
  color: var(--muted);
  font-size: 12px;
}

.room-attachments-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.pinned-message-card {
  min-width: 240px;
  max-width: 300px;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 12px 24px rgba(25, 35, 60, 0.06);
}

.pinned-message-card:hover {
  background: rgba(91, 76, 240, 0.04);
}

.pinned-message-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pinned-message-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.pinned-message-sender {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.pinned-message-body {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-search-panel-header strong {
  font-size: 14px;
  color: var(--ink);
}

.message-search-results {
  display: grid;
  gap: 10px;
  max-height: 240px;
  overflow: auto;
}

.message-search-result {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  text-align: left;
}

.message-search-result:hover {
  background: rgba(91, 76, 240, 0.04);
}

.message-search-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.message-search-result-body {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-search-empty {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
}

.message-search-mark {
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(91, 76, 240, 0.15);
  color: #4c3fcb;
}

.mention-suggestion-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.96);
}

.mention-suggestion-card {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
}

.mention-suggestion-card:hover,
.mention-suggestion-card.is-active {
  background: rgba(91, 76, 240, 0.08);
}

.mention-suggestion-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.mention-suggestion-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.composer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
  min-height: 0;
}

.message-history-control {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
}

.member-history-access {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.member-history-access-heading {
  display: grid;
  gap: 3px;
}

.member-history-access-heading span,
.member-history-access-row small {
  color: var(--muted);
  font-size: 11px;
}

.member-history-access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-history-access-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-history-access-row button.is-enabled {
  border-color: rgba(91, 76, 240, 0.28);
  background: rgba(91, 76, 240, 0.1);
  color: #4e42d4;
}

.empty-state {
  margin: auto;
  max-width: 420px;
  text-align: center;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  scroll-margin-top: 28px;
}

.message-profile-trigger {
  border: 0;
  background: transparent;
  color: inherit;
}

.message-profile-avatar {
  flex: 0 0 auto;
  padding: 20px 0 0;
}

.message-profile-avatar:hover,
.message-profile-name:hover {
  transform: none;
  opacity: 0.78;
}

.message-profile-name {
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: 800;
}

.message-row.mine {
  justify-content: flex-end;
}

.message-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: min(68%, 420px);
}

.message-row.mine .message-stack {
  align-items: flex-end;
}

.message-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}

.message-bubble {
  display: inline-block;
  width: auto;
  max-width: 100%;
  min-height: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  line-height: 1.45;
  flex: 0 1 auto;
}

.message-menu-button {
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(91, 76, 240, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: #7280a0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.message-menu-button:hover {
  background: #eef2fb;
}

.message-inline-reply-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(91, 76, 240, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #5b4cf0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.message-inline-reply-button:hover {
  background: #eef0ff;
}

.message-row.mine .message-bubble-row {
  justify-content: flex-end;
}

.message-text {
  line-height: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.installation-message-card,
.crm-post-card {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(91, 76, 240, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}

.installation-message-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.installation-message-header > div,
.crm-post-card {
  min-width: 0;
}

.installation-message-header > div {
  display: grid;
  gap: 4px;
}

.installation-card-eyebrow {
  color: #5b4cf0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.installation-detail-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 12px;
  font-size: 12px;
}

.installation-detail-grid span,
.crm-post-card > span,
.installation-history {
  color: var(--muted);
}

.installation-detail-grid strong {
  overflow-wrap: anywhere;
}

.installation-detail-grid .installation-call-link {
  align-self: start;
}

.installation-detail-summary {
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(91, 76, 240, 0.07);
  line-height: 1.5;
  white-space: pre-wrap;
}

.installation-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.installation-action-panel {
  display: grid;
  gap: 8px;
}

.installation-action-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.installation-action-panel small {
  color: var(--muted);
}

.installation-action-button:disabled {
  opacity: 0.42;
}

.installation-history {
  display: grid;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.installation-history span {
  display: block;
}

.installation-history strong {
  margin-right: 6px;
  color: var(--ink);
}

.crm-post-card p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.crm-post-card.urgent {
  border-color: rgba(226, 53, 78, 0.5);
  background: linear-gradient(180deg, #fff 0%, #fff1f3 100%);
  box-shadow: 0 8px 20px rgba(190, 30, 55, 0.1);
}

.crm-priority-badge {
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e2354e;
  color: #fff !important;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.crm-priority-badge.normal {
  background: #eef0f6;
  color: #667085 !important;
}

.message-mention {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
  font-weight: 700;
}

.message-mention-self {
  background: rgba(240, 68, 97, 0.14);
  color: #cc2f50;
}

.message-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.message-edit-window {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.message-read-status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(125, 135, 155, 0.11);
  color: #66738f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.message-read-status::-webkit-details-marker {
  display: none;
}

.message-read-status.is-read {
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
}

.message-read-details {
  align-self: flex-start;
  display: grid;
  gap: 6px;
}

.message-row.mine .message-read-details {
  align-self: flex-end;
  justify-items: end;
}

.message-read-members {
  display: grid;
  gap: 7px;
  width: min(300px, 72vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(31, 41, 64, 0.12);
  color: var(--ink);
  font-size: 12px;
}

.message-read-members > div {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 8px;
}

.message-read-members span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.message-reaction-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.message-row.mine .message-reaction-row {
  justify-content: flex-end;
}

.message-reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(91, 76, 240, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #66738f;
  font-size: 13px;
  font-weight: 700;
}

.message-reaction-chip:hover {
  background: rgba(91, 76, 240, 0.06);
}

.message-reaction-chip.is-active {
  border-color: rgba(91, 76, 240, 0.28);
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
}

.message-reaction-chip-emoji {
  font-size: 15px;
  line-height: 1;
}

.message-reaction-chip-count {
  font-variant-numeric: tabular-nums;
}

.message-row.is-search-target .message-bubble {
  border-color: rgba(91, 76, 240, 0.38);
  box-shadow: 0 0 0 4px rgba(91, 76, 240, 0.12);
}

.message-row.mine .message-meta {
  justify-content: flex-end;
}

.message-visibility-chip {
  border: 1px solid rgba(129, 105, 40, 0.22);
  border-radius: 999px;
  background: #fff7d6;
  color: #765b10;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
}

.message-row.mine .message-bubble {
  background: linear-gradient(135deg, rgba(91, 76, 240, 0.12), rgba(255, 255, 255, 0.96));
  border-color: rgba(91, 76, 240, 0.18);
}

.message-row.system .message-bubble,
.message-row.alert .message-bubble {
  background: var(--surface-soft);
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.attachment-item,
.erp-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.attachment-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.attachment-button:hover {
  border-color: rgba(91, 76, 240, 0.24);
  background: rgba(91, 76, 240, 0.06);
}

.attachment-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
  font-size: 11px;
  font-weight: 900;
}

.attachment-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(34, 176, 125, 0.12);
}

.attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attachment-preview .attachment-kind {
  width: 46px;
  height: 46px;
}

.attachment-kind.is-image,
.attachment-button.is-image .attachment-kind {
  background: rgba(34, 176, 125, 0.14);
  color: #138a63;
}

.attachment-kind.is-pdf,
.attachment-button.is-pdf .attachment-kind {
  background: rgba(240, 68, 97, 0.14);
  color: #cc2f50;
}

.attachment-kind.is-sheet,
.attachment-button.is-sheet .attachment-kind {
  background: rgba(23, 170, 135, 0.14);
  color: #0d8068;
}

.attachment-kind.is-doc,
.attachment-button.is-doc .attachment-kind {
  background: rgba(31, 60, 136, 0.13);
  color: #1f3c88;
}

.attachment-kind.is-archive,
.attachment-button.is-archive .attachment-kind {
  background: rgba(245, 158, 11, 0.16);
  color: #a05c00;
}

.attachment-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.attachment-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-copy span,
.attachment-download-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.attachment-download-label {
  white-space: nowrap;
}

.erp-card {
  margin-top: 10px;
}

.erp-open-button {
  flex-shrink: 0;
  padding: 8px 12px;
}

.reply-preview-card,
.reply-composer-bar {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.reply-preview-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  text-align: left;
}

.reply-preview-card.is-clickable {
  cursor: pointer;
}

.reply-preview-author {
  color: #586684;
  font-size: 12px;
  font-weight: 700;
}

.reply-preview-text {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer textarea {
  min-height: 76px;
  max-height: 180px;
  resize: vertical;
}

.message-visibility-toggle {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.message-visibility-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.message-visibility-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.message-visibility-toggle input {
  accent-color: var(--accent);
}

.message-visibility-help {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #dfe4f2;
  border-radius: 10px;
  background: #f7f8fc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.message-visibility-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e6e8ff;
  color: #4e42d4;
  font-size: 11px;
  font-weight: 900;
}

.message-visibility-help > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
}

.message-visibility-help > div > span {
  white-space: nowrap;
}

.message-visibility-help strong {
  color: var(--ink);
}

.typing-status-bar {
  min-height: 22px;
  padding: 0 18px 10px;
  color: #4e42d4;
  font-size: 13px;
  font-weight: 700;
}

.pending-attachment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.reply-composer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.reply-composer-copy {
  min-width: 0;
  flex: 1;
}

.reply-composer-copy .reply-preview-card {
  margin: 6px 0 0;
}

.reply-composer-label {
  color: #586684;
  font-size: 12px;
  font-weight: 700;
}

.pending-attachment-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.pending-attachment-chip strong,
.attachment-item strong {
  display: block;
}

.pending-attachment-chip span {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.chip-remove-button {
  padding: 8px 12px;
  background: rgba(240, 68, 97, 0.12);
  color: #cc2f50;
}

.composer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.composer-actions {
  align-items: flex-end;
}

.message-bubble-muted,
.message-deleted,
.message-empty {
  color: var(--muted);
}

.message-deleted,
.message-empty {
  font-style: italic;
}

.desktop-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  padding: 24px;
}

.desktop-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 38, 0.34);
  backdrop-filter: blur(8px);
}

.desktop-settings-sheet {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 32px));
  max-height: min(88vh, 920px);
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 28px 60px rgba(16, 24, 40, 0.22);
}

.desktop-settings-header,
.desktop-settings-section-header,
.desktop-settings-actions,
.desktop-settings-footer,
.desktop-settings-update-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.desktop-settings-header h3,
.desktop-settings-section-header h4 {
  margin: 0;
}

.desktop-settings-summary,
.desktop-settings-form,
.desktop-settings-section,
.desktop-settings-update-copy,
.desktop-settings-update-card {
  display: grid;
  gap: 12px;
}

.desktop-settings-summary {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fd 100%);
}

.desktop-settings-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.desktop-settings-summary span,
.desktop-settings-update-copy span,
.desktop-settings-update-time {
  color: var(--muted);
  font-size: 13px;
}

.desktop-settings-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.desktop-settings-update-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.desktop-settings-section-header-wrap {
  flex-wrap: wrap;
}

.desktop-settings-inline-fields,
.push-delivery-list,
.push-delivery-card,
.push-delivery-card-copy,
.readiness-list,
.readiness-card,
.readiness-card-copy {
  display: grid;
  gap: 12px;
}

.desktop-settings-inline-fields {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.desktop-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.desktop-status-idle {
  background: rgba(91, 76, 240, 0.1);
  color: #5b4cf0;
}

.desktop-status-ok {
  background: rgba(34, 176, 125, 0.14);
  color: var(--success);
}

.desktop-status-live {
  background: rgba(91, 76, 240, 0.14);
  color: #4e42d4;
}

.desktop-status-warn {
  background: rgba(255, 176, 32, 0.16);
  color: #9f6900;
}

.desktop-status-error {
  background: rgba(240, 68, 97, 0.14);
  color: #cc2f50;
}

.desktop-settings-update-copy strong,
.desktop-settings-update-copy p {
  margin: 0;
}

.desktop-settings-update-copy strong {
  color: var(--ink);
}

.desktop-settings-update-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.push-delivery-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.push-delivery-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.push-delivery-card-top,
.push-delivery-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.push-delivery-card-copy strong,
.push-delivery-body,
.push-delivery-provider,
.push-delivery-error,
.push-delivery-actions,
.push-delivery-empty {
  margin: 0;
}

.push-delivery-card-copy strong {
  color: var(--ink);
}

.push-delivery-card-copy span,
.push-delivery-meta {
  color: var(--muted);
  font-size: 13px;
}

.push-delivery-meta {
  flex-wrap: wrap;
}

.push-delivery-body {
  color: var(--ink);
  line-height: 1.6;
  word-break: break-word;
}

.push-delivery-provider {
  color: var(--muted);
  font-size: 13px;
}

.push-delivery-error {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240, 68, 97, 0.1);
  color: #b42342;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.push-delivery-actions {
  display: flex;
  justify-content: flex-end;
}

.push-delivery-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.readiness-list {
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.readiness-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.readiness-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.readiness-card-copy strong,
.readiness-card-copy span,
.readiness-body,
.readiness-empty {
  margin: 0;
}

.readiness-card-copy strong {
  color: var(--ink);
}

.readiness-card-copy span {
  color: var(--muted);
  font-size: 13px;
}

.readiness-body {
  color: var(--ink);
  line-height: 1.6;
  word-break: break-word;
}

.cutover-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(91, 76, 240, 0.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.readiness-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.readiness-group {
  display: grid;
  gap: 12px;
}

.readiness-group + .readiness-group {
  margin-top: 14px;
}

.readiness-group-title {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.readiness-group-stack {
  display: grid;
  gap: 12px;
}

.message-action-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.image-viewer-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: min(1040px, 100%);
  max-height: calc(100vh - 36px);
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.34);
}

.image-viewer-header,
.image-viewer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-viewer-header h3 {
  max-width: min(56vw, 620px);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-counter {
  display: inline-flex;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.image-viewer-actions {
  flex-shrink: 0;
}

.image-viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: auto;
  border-radius: 16px;
  background: #111827;
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 58px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
}

.image-viewer-nav:disabled {
  opacity: 0.36;
}

.image-viewer-nav-prev {
  left: 14px;
}

.image-viewer-nav-next {
  right: 14px;
}

.image-viewer-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 160ms ease;
}

.message-action-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 38, 0.38);
  backdrop-filter: blur(8px);
}

.message-action-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 32px));
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 60px rgba(16, 24, 40, 0.22);
}

.message-action-modal.is-installation-detail .message-action-sheet {
  width: min(760px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}

.installation-detail-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(91, 76, 240, 0.1), rgba(128, 110, 255, 0.04));
}

.installation-detail-modal-head > div {
  display: grid;
  gap: 5px;
}

.installation-detail-modal-head > div > strong {
  font-size: 20px;
}

.installation-detail-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.installation-detail-modal-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.installation-detail-modal-grid span,
.installation-detail-modal-memo > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.installation-detail-modal-grid strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.installation-detail-modal-memo,
.installation-detail-modal-history {
  display: grid;
  gap: 9px;
  padding: 15px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.installation-detail-modal-memo p,
.installation-detail-modal-history p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.installation-detail-modal-history > div {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 6px 12px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.installation-detail-modal-history > div p {
  grid-column: 1 / -1;
  color: var(--muted);
}

.installation-detail-modal-empty {
  color: var(--muted);
}

.installation-completion-form {
  display: grid;
  gap: 16px;
}

.installation-completion-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.installation-completion-photo-field {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.installation-completion-photo-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.installation-completion-photo-field em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.installation-completion-photo-field input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
}

.installation-completion-checklist,
.installation-completion-end-mode {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.installation-completion-checklist legend,
.installation-completion-end-mode legend {
  padding: 0 6px;
  font-weight: 800;
}

.installation-completion-checklist label,
.installation-completion-end-mode label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
}

.installation-completion-end-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.installation-completion-end-mode legend {
  grid-column: 1 / -1;
}

.installation-completion-memo textarea {
  resize: vertical;
}

.installation-completion-error {
  margin: 0;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(240, 82, 61, 0.1);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}
.installation-completion-photo-view-grid { display:grid; gap:10px; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:12px; }
.installation-completion-photo-view { background:#f7f8fc; border:1px solid #e0e4ee; border-radius:12px; color:#27314d; overflow:hidden; text-decoration:none; }
.installation-completion-photo-view img { aspect-ratio:1/1; display:block; object-fit:cover; width:100%; }
.installation-completion-photo-view span { display:block; font-size:12px; font-weight:800; padding:7px 9px; }
@media (max-width: 640px) { .installation-completion-photo-view-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }

@media (max-width: 620px) {
  .installation-detail-modal-grid {
    grid-template-columns: 1fr;
  }

  .installation-detail-modal-head {
    flex-direction: column;
  }

  .installation-completion-photo-grid,
  .installation-completion-end-mode {
    grid-template-columns: 1fr;
  }
}

.message-action-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.message-action-sheet-header h3 {
  margin: 0;
}

.message-action-body,
.message-action-list {
  display: grid;
  gap: 12px;
}

.message-action-preview-card,
.message-action-confirm-copy {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.message-action-preview-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.message-action-preview-text {
  margin: 0;
  line-height: 1.55;
  word-break: break-word;
}

.message-action-field {
  gap: 10px;
}

.message-action-field textarea {
  min-height: 144px;
  resize: vertical;
}

.message-work-schedule-form {
  display: grid;
  gap: 14px;
}

.work-schedule-store-picker {
  position: relative;
}

.work-schedule-store-picker > input[type="search"] {
  width: 100%;
  padding-right: 42px;
}

.work-schedule-store-picker > input.has-selection {
  border-color: #22a47f;
  background: rgba(34, 164, 127, 0.05);
}

.work-schedule-store-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(24, 31, 51, 0.2);
}

.work-schedule-store-results.hidden {
  display: none;
}

.work-schedule-store-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.work-schedule-store-option:hover,
.work-schedule-store-option.is-active {
  background: rgba(92, 77, 255, 0.09);
}

.work-schedule-store-option strong {
  font-size: 14px;
}

.work-schedule-store-option span,
.work-schedule-store-help,
.work-schedule-store-empty {
  color: var(--muted);
  font-size: 12px;
}

.work-schedule-store-empty {
  padding: 20px 12px;
  text-align: center;
}

.user-manual-dashboard {
  display: grid;
  gap: 18px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.user-manual-hero,
.user-manual-section,
.user-manual-note {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 22px;
}

.user-manual-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #f4f1ff, #f8fbff);
}

.user-manual-hero h3,
.user-manual-section h4,
.user-manual-hero p {
  margin: 0;
}

.user-manual-hero h3 { font-size: 25px; }
.user-manual-hero p { margin-top: 8px; color: var(--muted); line-height: 1.6; }
.user-manual-index { display: flex; flex-wrap: wrap; gap: 8px; }
.user-manual-index a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.user-manual-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.user-manual-section { scroll-margin-top: 20px; }
.user-manual-section h4 { color: var(--primary); font-size: 17px; }
.user-manual-section ol { margin: 14px 0 0; padding-left: 22px; color: var(--ink); line-height: 1.7; }
.user-manual-section li + li { margin-top: 8px; }
.user-manual-note { display: flex; gap: 12px; background: #fff8e8; border-color: #f1d99f; }
.user-manual-note span { color: var(--muted); }

@media (max-width: 760px) {
  .user-manual-dashboard { padding: 16px; }
  .user-manual-hero { flex-direction: column; }
  .user-manual-sections { grid-template-columns: 1fr; }
}

.message-action-sheet-button {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.message-action-sheet-button.is-danger {
  border-color: rgba(240, 68, 97, 0.2);
  background: rgba(240, 68, 97, 0.08);
  color: #cc2f50;
}

.message-action-confirm-copy {
  display: grid;
  gap: 8px;
}

.message-action-confirm-copy strong,
.message-action-confirm-copy p {
  margin: 0;
}

.message-action-confirm-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.message-reaction-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.message-reaction-option {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.message-reaction-option:hover {
  background: rgba(91, 76, 240, 0.05);
}

.message-reaction-option.is-active {
  border-color: rgba(91, 76, 240, 0.28);
  background: rgba(91, 76, 240, 0.12);
  color: #4e42d4;
}

.message-reaction-option-emoji {
  font-size: 20px;
  line-height: 1;
}

.message-action-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.inspector {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  overflow-y: auto;
  padding-right: 2px;
  background: transparent;
  box-shadow: none;
  border: 0;
  min-height: 0;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.profile-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
}

.panel-fill {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.notification-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
}

.meta-stack {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.meta-row {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 14px;
}

.meta-row-stack {
  align-items: start;
}

.member-presence-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.member-presence-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c4cada;
  box-shadow: 0 0 0 3px rgba(196, 202, 218, 0.22);
}

.presence-dot.is-online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 176, 125, 0.16);
}

.presence-dot.is-offline {
  background: #c4cada;
}

.member-presence-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.notification-list,
.user-result-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.notification-list {
  overflow: auto;
  min-height: 0;
  padding-top: 10px;
}

.notification-filters {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.notification-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.notification-filter {
  flex: 0 0 auto;
  width: auto;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-filter.is-active {
  border-color: rgba(91, 76, 240, 0.3);
  background: var(--accent-soft);
  color: #4235cf;
}

.user-result-list {
  max-height: 360px;
  overflow: auto;
}

.department-browser {
  display: grid;
  gap: 12px;
}

.department-list,
.department-user-list {
  display: grid;
  gap: 8px;
}

.department-list {
  max-height: 150px;
  overflow: auto;
  padding-right: 2px;
}

.department-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  width: 100%;
  padding: 8px 10px 8px calc(10px + var(--dept-depth, 0) * 12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.department-chip.is-active {
  border-color: rgba(91, 76, 240, 0.36);
  background: var(--accent-soft);
  color: #4235cf;
}

.department-user-panel {
  display: grid;
  gap: 10px;
}

.department-user-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
}

.department-user-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-card,
.user-result-card {
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  text-align: left;
}

.notification-card {
  cursor: pointer;
}

.notification-card-top {
  align-items: flex-start;
  flex-wrap: wrap;
}

.notification-body {
  margin-top: 6px;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.user-result-card .avatar-token {
  flex-shrink: 0;
}

.notification-card.is-read {
  opacity: 0.82;
}

.user-result-empty {
  cursor: default;
}

@media (max-width: 1440px) {
  .app-shell {
    grid-template-columns: 96px minmax(300px, 370px) minmax(0, 1fr) minmax(260px, 300px);
  }
}

@media (max-width: 1120px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 86px minmax(270px, 330px) minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .conversation-shell {
    grid-column: 3;
    min-height: auto;
  }

  .inspector {
    grid-column: 2 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .inspector .profile-panel {
    display: none;
  }

  .room-panel {
    min-height: auto;
  }
}

@media (max-width: 860px) {
  body.mobile-room-open {
    overflow: hidden;
  }

  .install-prompt {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }

  .install-prompt-actions {
    width: 100%;
    justify-content: stretch;
  }

  .install-prompt-actions > * {
    flex: 1;
  }

  .web-push-prompt {
    bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .app-shell {
    display: block;
    grid-template-columns: 1fr;
    height: auto;
    min-height: var(--app-viewport-height, 100vh);
    padding:
      calc(12px + env(safe-area-inset-top, 0px))
      calc(12px + env(safe-area-inset-right, 0px))
      calc(12px + env(safe-area-inset-bottom, 0px))
      calc(12px + env(safe-area-inset-left, 0px));
  }

  .app-nav {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 14px;
  }

  .app-nav-top,
  .nav-icon-stack,
  .nav-icon-stack-bottom {
    display: flex;
    align-items: center;
  }

  .app-nav-top {
    justify-content: space-between;
    width: 100%;
  }

  .nav-icon-stack-bottom {
    display: none;
  }

  .nav-icon-stack {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-icon-button {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    gap: 0;
  }

  .nav-label {
    display: none;
  }

  .room-panel,
  .conversation-shell {
    min-height: auto;
  }

  .room-panel,
  .conversation-shell,
  .app-nav,
  .inspector {
    width: 100%;
  }

  .inspector {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.is-mobile-room-open) .conversation-shell {
    display: none;
  }

  .app-shell.is-mobile-room-open .room-panel {
    display: none;
  }

  .app-shell.is-mobile-room-open {
    padding: 0;
  }

  .app-shell.is-mobile-room-open .app-nav {
    display: none;
  }

  .app-shell.is-mobile-room-open .conversation-shell {
    position: fixed;
    top: var(--app-viewport-offset-top, 0px);
    left: 0;
    right: 0;
    bottom: auto;
    z-index: 12;
    display: grid;
    height: var(--app-viewport-height, 100vh);
    min-height: var(--app-viewport-height, 100vh);
    max-height: var(--app-viewport-height, 100vh);
    padding:
      env(safe-area-inset-top, 0px)
      env(safe-area-inset-right, 0px)
      0
      env(safe-area-inset-left, 0px);
    border: 0;
    border-radius: 0;
  }

  .mobile-back-button {
    display: inline-flex;
  }

  .conversation-header {
    padding-top: 16px;
  }

  .home-dashboard {
    padding: 16px;
  }

  .home-dashboard-header,
  .home-dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-dashboard-header h3 {
    font-size: 20px;
  }

  .home-metric-grid,
  .home-section-grid {
    grid-template-columns: 1fr;
  }

  .home-metric {
    min-height: 82px;
  }

  .home-list-item {
    align-items: flex-start;
  }

  .home-list-meta {
    min-width: 64px;
  }

  .image-viewer-modal {
    padding: 10px;
  }

  .image-viewer-sheet {
    max-height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 18px;
  }

  .image-viewer-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-viewer-header h3 {
    max-width: calc(100vw - 44px);
  }

  .image-viewer-actions {
    width: 100%;
  }

  .image-viewer-actions > * {
    flex: 1;
  }

  .image-viewer-nav {
    width: 40px;
    height: 52px;
    font-size: 30px;
  }

  .image-viewer-nav-prev {
    left: 8px;
  }

  .image-viewer-nav-next {
    right: 8px;
  }

  .image-viewer-stage img {
    max-height: calc(100vh - 210px);
  }

  .app-shell.is-mobile-room-open .conversation-header {
    padding-top: 14px;
  }

  .app-shell.is-mobile-room-open .message-list {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 14px;
    padding-bottom: 10px;
  }

  .composer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell.is-mobile-room-open .composer {
    position: relative;
    z-index: 4;
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell.is-mobile-room-open .composer textarea {
    min-height: 44px;
    max-height: 112px;
    resize: none;
    font-size: 16px;
    line-height: 1.4;
  }

  .app-shell.is-mobile-room-open .composer-tools {
    gap: 8px;
  }

  .app-shell.is-mobile-room-open .typing-status-bar {
    min-height: 18px;
    padding: 0 12px 4px;
  }

  .composer-actions,
  .pending-attachment-chip,
  .reply-composer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .app-shell.is-mobile-room-open .composer-actions {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
  }

  .app-shell.is-mobile-room-open .composer-actions .primary-button {
    flex: 0 0 auto;
    min-width: 76px;
    white-space: nowrap;
  }

  .composer-tools {
    align-items: stretch;
  }

  .message-stack {
    max-width: 100%;
  }

  .message-menu-button {
    display: none;
  }

  .message-inline-reply-button {
    min-width: 34px;
    padding: 0 8px;
    font-size: 11px;
  }

  .pinned-messages-list {
    flex-direction: column;
  }

  .room-attachments-toolbar {
    grid-template-columns: 1fr;
  }

  .attachment-filter-list {
    justify-content: flex-start;
  }

  .room-attachments-list {
    grid-template-columns: 1fr;
    max-height: 320px;
  }

  .pinned-message-card {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .message-action-modal {
    padding: 12px;
    align-items: end;
  }

  .desktop-settings-modal {
    padding: 12px;
    align-items: end;
  }

  .desktop-settings-sheet {
    width: min(100%, 760px);
    max-height: min(92vh, 920px);
    border-radius: 24px 24px 18px 18px;
    padding: 18px;
  }

  .desktop-settings-actions,
  .desktop-settings-footer,
  .desktop-settings-update-header {
    flex-direction: column;
    align-items: stretch;
  }

  .message-action-sheet {
    width: min(100%, 520px);
    border-radius: 24px 24px 18px 18px;
    padding: 18px;
  }

  .message-action-footer {
    flex-direction: column-reverse;
  }

  .message-reaction-picker-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .mobile-menu-button {
    display: inline-flex;
  }

  .app-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 48;
    width: 96px;
    min-height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    padding:
      calc(16px + env(safe-area-inset-top, 0px))
      0
      calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 0 24px 24px 0;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-110%);
    transition: transform 180ms ease;
  }

  .app-shell.is-mobile-nav-open .app-nav {
    transform: translateX(0);
  }

  .app-nav-top,
  .nav-icon-stack,
  .nav-icon-stack-bottom {
    display: grid;
    justify-items: center;
    align-items: stretch;
  }

  .app-nav-top {
    width: 100%;
    min-height: max-content;
    justify-content: stretch;
    gap: 18px;
  }

  .nav-icon-stack {
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-icon-stack-bottom {
    display: grid;
  }

  .nav-icon-button {
    width: 66px;
    min-width: 66px;
    min-height: 54px;
    gap: 3px;
  }

  .nav-icon,
  .nav-icon svg {
    visibility: visible;
    opacity: 1;
  }

  .nav-label {
    display: block;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 47;
    display: block;
    border: 0;
    border-radius: 0;
    background: rgba(18, 24, 38, 0.34);
    backdrop-filter: blur(6px);
  }

  .mobile-nav-backdrop.hidden {
    display: none;
  }

  .app-shell.is-mobile-room-open .app-nav {
    display: flex;
  }

  .new-conversation-modal {
    align-items: end;
    padding: 0;
  }

  .new-conversation-sheet {
    width: 100%;
    max-height: min(86vh, var(--app-viewport-height, 100vh));
    padding:
      16px
      calc(14px + env(safe-area-inset-right, 0px))
      calc(16px + env(safe-area-inset-bottom, 0px))
      calc(14px + env(safe-area-inset-left, 0px));
    border-radius: 22px 22px 0 0;
  }

  .room-panel {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .inspector {
    position: fixed;
    top: var(--app-viewport-offset-top, 0px);
    right: 0;
    bottom: 0;
    z-index: 61;
    display: flex;
    width: min(92vw, 380px);
    height: var(--app-viewport-height, 100vh);
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    padding:
      calc(12px + env(safe-area-inset-top, 0px))
      calc(12px + env(safe-area-inset-right, 0px))
      calc(12px + env(safe-area-inset-bottom, 0px))
      12px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 24px 0 0 24px;
    background: #f3f5fa;
    box-shadow: -18px 0 44px rgba(28, 37, 64, 0.2);
    transform: translateX(110%);
    transition: transform 180ms ease;
  }

  .app-shell.is-room-inspector-open .inspector {
    transform: translateX(0);
  }

  .room-inspector-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 2px 8px;
    background: #f3f5fa;
  }

  .room-inspector-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    border: 0;
    border-radius: 0;
    background: rgba(18, 24, 38, 0.36);
    backdrop-filter: blur(4px);
  }

  .room-inspector-backdrop.hidden {
    display: none;
  }

  .inspector > .panel {
    flex: 0 0 auto;
    min-height: auto;
  }
}

/* Electron windows keep their desktop structure even below the web mobile breakpoint. */
body.desktop-room-list-window,
body.desktop-chat-window {
  overflow: hidden;
}

body.desktop-room-list-window .app-shell,
body.desktop-room-list-window .app-shell.is-customer-mode {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  height: 100vh;
  min-height: 100vh;
  padding: 14px;
}

body.desktop-room-list-window .app-nav {
  position: static;
  inset: auto;
  display: flex;
  width: auto;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 18px 0;
  border-radius: 28px;
  transform: none;
}

body.desktop-room-list-window .app-nav-top,
body.desktop-room-list-window .nav-icon-stack,
body.desktop-room-list-window .nav-icon-stack-bottom {
  display: grid;
  align-items: stretch;
  justify-items: center;
}

body.desktop-room-list-window .app-nav-top {
  width: auto;
  justify-content: normal;
  gap: 22px;
}

body.desktop-room-list-window .nav-icon-stack {
  gap: 12px;
  overflow: visible;
  padding: 0;
}

body.desktop-room-list-window .nav-icon-stack-bottom {
  gap: 14px;
}

body.desktop-room-list-window .nav-icon-button {
  width: 66px;
  min-width: 66px;
  min-height: 54px;
}

body.desktop-room-list-window .nav-label {
  display: block;
}

body.desktop-room-list-window .room-panel {
  display: grid;
  width: auto;
  min-height: 0;
  grid-column: auto;
  grid-row: auto;
  grid-template-rows: auto auto minmax(0, 1fr);
}

body.desktop-room-list-window .conversation-shell,
body.desktop-room-list-window .inspector {
  display: none !important;
}

body.desktop-room-list-window.notification-room-open .room-panel {
  display: none !important;
}

body.desktop-room-list-window.notification-room-open .conversation-shell {
  position: relative;
  inset: auto;
  display: grid !important;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  grid-column: auto;
  grid-row: auto;
  border-radius: var(--radius-xl);
}

body.desktop-room-list-window[data-desktop-section="home"] .room-panel,
body.desktop-room-list-window[data-desktop-section="ai"] .room-panel,
body.desktop-room-list-window[data-desktop-section="work_support"] .room-panel,
body.desktop-room-list-window[data-desktop-section="control_center"] .room-panel,
body.desktop-room-list-window[data-desktop-section="attendance"] .room-panel,
body.desktop-room-list-window[data-desktop-section="alerts"] .room-panel {
  display: none !important;
}

body.desktop-room-list-window[data-desktop-section="home"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="ai"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="work_support"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="control_center"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="attendance"] .conversation-shell {
  position: relative;
  inset: auto;
  display: grid !important;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  grid-column: auto;
  grid-row: auto;
  border-radius: var(--radius-xl);
}

@media (max-width: 1180px) {
  .work-support-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-support-card-foot,
  .work-support-actions-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .installation-control-dashboard {
    padding: 14px;
  }

  .installation-control-hero,
  .location-monitor-head,
  .installation-control-card-head,
  .installation-control-card-foot,
  .installation-control-time {
    align-items: flex-start;
    flex-direction: column;
  }

  .installation-control-hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .installation-control-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .installation-control-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .installation-control-time span:last-child {
    text-align: left;
  }

  .installation-control-status-wrap {
    justify-items: start;
  }

  .work-support-dashboard {
    padding: 14px;
  }

  .work-support-hero,
  .work-support-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-support-hero .primary-button {
    width: 100%;
  }

  .work-support-hero-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .work-support-date-picker {
    flex: 1 1 180px;
  }

  .work-support-date-picker input {
    width: 100%;
  }

  .work-support-detail-grid {
    grid-template-columns: 1fr;
  }

  .work-support-detail-wide {
    grid-column: auto;
  }
}

body.desktop-room-list-window[data-desktop-section="alerts"] .inspector {
  position: fixed !important;
  inset: 0 0 var(--company-banner-height, 86px) 62px !important;
  z-index: 40;
  display: grid !important;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  min-height: 0;
  grid-column: unset;
  grid-row: unset;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 36px 18px 18px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none;
}

body.desktop-room-list-window[data-desktop-section="alerts"]
  .app-shell.is-room-inspector-collapsed
  > .inspector {
  display: grid !important;
}

body.desktop-room-list-window[data-desktop-section="alerts"] .room-inspector-header,
body.desktop-room-list-window[data-desktop-section="alerts"] .profile-panel,
body.desktop-room-list-window[data-desktop-section="alerts"] .room-control-panel {
  display: none !important;
}

body.desktop-room-list-window[data-desktop-section="alerts"] .panel-fill {
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.desktop-room-list-window[data-desktop-section="alerts"] .notification-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.desktop-room-list-window .mobile-menu-button,
body.desktop-room-list-window .mobile-nav-backdrop,
body.desktop-room-list-window .mobile-back-button {
  display: none !important;
}

body.desktop-chat-window .app-shell,
body.desktop-chat-window .app-shell.is-customer-mode {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
  gap: 12px;
  height: 100vh;
  min-height: 100vh;
  padding: 12px;
}

body.desktop-chat-window .app-shell.is-room-inspector-collapsed,
body.desktop-chat-window .app-shell.is-customer-mode.is-room-inspector-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

body.desktop-chat-window .app-shell.is-room-inspector-collapsed .inspector {
  display: none !important;
}

body.desktop-chat-window .room-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 38px;
  padding: 4px 148px 4px 2px;
  background: var(--app-bg, #f5f7fb);
}

/* 2026-08-11 compact chat, secure attachments and inspector inbox */
.attachment-security-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.attachment-security-control select {
  min-height: 26px;
  padding: 0 24px 0 7px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.message-image-carousel {
  position: relative;
  width: min(340px, 100%);
  overflow: hidden;
  border-radius: 15px;
  background: #e9edf5;
}

.message-image-carousel-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

.message-image-carousel-track::-webkit-scrollbar { display: none; }

.message-image-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #eef1f7;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  cursor: pointer;
}

.message-image-preview,
.message-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.message-image-preview img { object-fit: cover; }

.message-image-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 24, 38, 0.48);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.message-image-carousel-nav.is-previous { left: 8px; }
.message-image-carousel-nav.is-next { right: 8px; }
.message-image-carousel-nav:disabled { opacity: 0.28; cursor: default; }

.message-image-carousel-counter {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(18, 24, 38, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.attachment-security-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(34, 39, 55, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.attachment-archive-button {
  width: 100%;
  min-height: 34px;
  margin-top: 7px;
  border: 1px solid rgba(91, 76, 240, 0.18);
  border-radius: 10px;
  background: rgba(91, 76, 240, 0.07);
  color: #4e42d4;
  font-size: 12px;
  font-weight: 800;
}

.message-safe-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin: 2px 0;
}

.message-safe-link button {
  max-width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: #2f62c8;
  font: inherit;
  overflow-wrap: anywhere;
  text-align: left;
}

.message-safe-link > span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e5f7ef;
  color: #147654;
  font-size: 10px;
  font-weight: 900;
}

.message-safe-link.is-caution > span { background: #fff2cf; color: #8a5b00; }
.message-safe-link.is-blocked > span { background: #ffe4e8; color: #bb2640; }
.message-safe-link.is-blocked button { color: #bb2640; text-decoration: line-through; }

body.desktop-chat-window .panel-fill {
  padding: 14px;
  border: 1px solid #e5e9f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfcff 0%, #f5f7fb 100%);
}

body.desktop-chat-window .notification-list { gap: 8px; padding: 8px 2px 2px; }
body.desktop-chat-window .notification-card {
  padding: 11px 12px;
  border: 1px solid #e4e8f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(31, 41, 64, 0.05);
  text-align: left;
}
body.desktop-chat-window .notification-card:not(.is-read) {
  border-color: rgba(91, 76, 240, 0.25);
  background: linear-gradient(135deg, #fff 0%, #f5f3ff 100%);
}
body.desktop-chat-window .notification-card .notification-title { font-size: 12px; line-height: 1.35; }
body.desktop-chat-window .notification-card .notification-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
body.desktop-chat-window .notification-card .notification-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.desktop-chat-window .notification-card .notification-body {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.policy-notification-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
}
.policy-notification-modal.hidden { display: none; }
.policy-notification-backdrop { position: absolute; inset: 0; border: 0; background: rgba(25, 30, 45, 0.48); }
.policy-notification-sheet {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(480px, 100%);
  padding: 22px;
  border: 1px solid #e2e6ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(20, 28, 48, 0.24);
}
.policy-notification-preview {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #f3f1ff;
  color: #5f6680;
  font-size: 12px;
}
.policy-notification-preview strong { color: #493bcf; }

@media (max-width: 620px) {
  .attachment-security-control span { display: none; }
  .message-image-slide { min-height: 190px; }
  .message-image-carousel-nav { width: 32px; height: 32px; }
}

body.desktop-chat-window .room-inspector-header strong,
body.desktop-chat-window .room-inspector-header button {
  flex: 0 0 auto;
}

body.desktop-chat-window .room-inspector-header strong {
  color: var(--muted);
  font-size: 12px;
}

body.desktop-chat-window .app-nav,
body.desktop-chat-window .room-panel,
body.desktop-chat-window .mobile-nav-backdrop,
body.desktop-chat-window .mobile-menu-button,
body.desktop-chat-window .mobile-back-button {
  display: none !important;
}

body.desktop-chat-window .conversation-shell,
body.desktop-chat-window .app-shell:not(.is-mobile-room-open) .conversation-shell {
  position: relative;
  inset: auto;
  z-index: auto;
  display: grid !important;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  grid-column: auto;
  grid-row: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-xl);
}

body.desktop-chat-window .inspector {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  display: flex;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  grid-column: auto;
  grid-row: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: none;
}

body.desktop-chat-window .inspector > .panel {
  flex: 0 0 auto;
  min-height: auto;
}

body.desktop-chat-window .inspector > .profile-panel {
  padding-top: 46px;
}

body.desktop-chat-window .ticket-panel,
body.desktop-chat-window .ticket-list,
body.desktop-chat-window .notification-list,
body.desktop-chat-window .notification-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.desktop-chat-window .panel-fill {
  min-height: 260px;
  grid-template-rows: auto minmax(180px, auto);
}

body.desktop-chat-window .notification-panel {
  min-height: 320px;
  grid-template-rows: auto auto minmax(180px, 1fr);
  align-content: start;
}

body.desktop-chat-window .notification-panel .section-title-row {
  align-items: flex-start;
  gap: 10px;
}

body.desktop-chat-window .notification-panel .notification-header-actions {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 6px;
}

body.desktop-chat-window .notification-panel .notification-filters {
  margin-top: 2px;
  padding-bottom: 2px;
}

body.desktop-chat-window .notification-panel .notification-filter {
  min-height: 30px;
  padding: 5px 11px;
}

body.desktop-chat-window .ticket-list {
  min-height: auto;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

body.desktop-chat-window .notification-list {
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

body.desktop-chat-window .ticket-card,
body.desktop-chat-window .ticket-message-card,
body.desktop-chat-window .notification-card {
  overflow: hidden;
  overflow-wrap: anywhere;
}

body.desktop-chat-window .ticket-card-meta,
body.desktop-chat-window .ticket-message-meta,
body.desktop-chat-window .ticket-status-actions,
body.desktop-chat-window .notification-card-top {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  body.desktop-chat-window .app-shell,
  body.desktop-chat-window .app-shell.is-customer-mode {
    grid-template-columns: minmax(0, 1fr);
  }

  body.desktop-chat-window .inspector {
    display: none !important;
  }

  body.desktop-chat-window .app-shell:not(.is-room-inspector-collapsed),
  body.desktop-chat-window .app-shell.is-customer-mode:not(.is-room-inspector-collapsed) {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  }

  body.desktop-chat-window .app-shell:not(.is-room-inspector-collapsed) .inspector {
    display: flex !important;
  }
}

body.desktop-room-list-window .app-nav,
body.desktop-room-list-window .list-header,
body.desktop-room-list-window .home-dashboard-header,
body.desktop-room-list-window .conversation-header,
body.desktop-chat-window .conversation-header {
  -webkit-app-region: no-drag;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

body.desktop-chat-window .room-inspector-header {
  -webkit-user-select: none;
  user-select: none;
}

body.desktop-room-list-window button,
body.desktop-room-list-window input,
body.desktop-room-list-window textarea,
body.desktop-room-list-window select,
body.desktop-room-list-window a,
body.desktop-chat-window button,
body.desktop-chat-window input,
body.desktop-chat-window textarea,
body.desktop-chat-window select,
body.desktop-chat-window a {
  -webkit-app-region: no-drag;
}

body.desktop-room-list-window .list-header,
body.desktop-room-list-window .conversation-header,
body.desktop-chat-window .conversation-header {
  padding-right: 160px;
}

.company-banner {
  display: none;
}

.room-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0 2px;
}

.room-inspector-header strong {
  color: var(--muted);
  font-size: 12px;
}

/* Compact messenger workspace: rail, list view and a persistent company banner. */
body.desktop-room-list-window {
  --company-banner-height: 86px;
  background: #f3f3f3;
}

body.desktop-room-list-window .app-shell,
body.desktop-room-list-window .app-shell.is-customer-mode {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 0;
  height: 100vh;
  min-height: 100vh;
  padding: 0 0 var(--company-banner-height);
  background: #ffffff;
}

body.desktop-room-list-window .app-nav {
  z-index: 50;
  padding: 34px 0 14px;
  border: 0;
  border-right: 1px solid #dedede;
  border-radius: 0;
  background: #ededed;
  box-shadow: none;
  color: #222222;
}

body.desktop-room-list-window .app-nav-top {
  gap: 18px;
}

body.desktop-room-list-window .profile-dock {
  padding: 0;
}

body.desktop-room-list-window .profile-dock-label {
  display: none;
}

body.desktop-room-list-window .avatar-lg {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

body.desktop-room-list-window .nav-icon-stack,
body.desktop-room-list-window .nav-icon-stack-bottom {
  gap: 2px;
}

body.desktop-room-list-window .nav-icon-button {
  width: 61px;
  min-width: 61px;
  min-height: 54px;
  gap: 2px;
  border-radius: 0;
  color: #8a8a8a;
}

body.desktop-room-list-window .nav-icon-button:hover {
  background: #dedede;
  color: #111111;
  box-shadow: none;
}

body.desktop-room-list-window .nav-icon-button.is-active {
  width: 48px;
  min-width: 48px;
  justify-self: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #5b4cf0, #735dff);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(91, 76, 240, 0.3);
}

body.desktop-room-list-window .nav-icon-button.is-active::after {
  display: none;
}

body.desktop-room-list-window .nav-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
}

body.desktop-room-list-window .nav-icon svg {
  width: 23px;
  height: 23px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.desktop-room-list-window .nav-more-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

body.desktop-room-list-window .nav-more-icon i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

body.desktop-room-list-window .nav-label {
  max-width: 56px;
  color: currentColor;
  font-size: 9px;
  font-weight: 700;
}

body.desktop-room-list-window .nav-badge {
  top: 3px;
  right: 4px;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  background: #ff4b25;
  font-size: 10px;
}

body.desktop-room-list-window .room-panel,
body.desktop-room-list-window[data-desktop-section="home"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="ai"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="alerts"] .inspector {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

body.desktop-room-list-window .list-header {
  gap: 12px;
  padding: 42px 18px 12px;
  background: #ffffff;
}

body.desktop-room-list-window .list-header .eyebrow {
  display: none;
}

body.desktop-room-list-window .list-title-group h2 {
  color: #111111;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

body.desktop-room-list-window .list-title-group .status-chip {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  color: transparent;
  font-size: 0;
}

body.desktop-room-list-window #headerSettingsButton {
  display: none !important;
}

body.desktop-room-list-window .list-icon-button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: #222222;
  font-size: 22px;
}

body.desktop-room-list-window .primary-list-button {
  border: 1px solid #dddddd;
  background: #ffffff;
}

body.desktop-room-list-window .search-box input {
  min-height: 38px;
  border-color: transparent;
  border-radius: 7px;
  background: #f4f4f4;
}

body.desktop-room-list-window .list-summary-row {
  min-height: 24px;
}

body.desktop-room-list-window #refreshRoomsButton {
  border: 0;
  background: transparent;
  color: #8a8a8a;
}

body.desktop-room-list-window .room-card {
  flex: 0 0 auto;
  height: auto;
  min-height: 70px;
  align-items: start;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 0;
}

body.desktop-room-list-window .room-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
}

body.desktop-room-list-window .room-card-top {
  align-items: flex-start;
}

body.desktop-room-list-window .room-name-row {
  flex: 1 1 auto;
  overflow: hidden;
}

body.desktop-room-list-window .room-name {
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.desktop-room-list-window .room-time,
body.desktop-room-list-window .unread-badge {
  flex: 0 0 auto;
}

body.desktop-room-list-window .room-meta-inline {
  flex-wrap: wrap;
}

body.desktop-room-list-window .room-card:hover,
body.desktop-room-list-window .room-card.active {
  background: #f0f0f0;
}

body.desktop-room-list-window .room-avatar-stack {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

body.desktop-room-list-window .room-main {
  gap: 5px;
}

body.desktop-room-list-window .room-name {
  color: #111111;
  font-size: 14px;
  font-weight: 800;
}

body.desktop-room-list-window .company-banner {
  position: fixed;
  left: 62px;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: var(--company-banner-height);
  padding: 12px 22px;
  border-top: 1px solid #d8d8d8;
  background: linear-gradient(90deg, #f6f8ff 0%, #ffffff 52%, #f3f0ff 100%);
}

body.desktop-room-list-window .company-banner img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

body.desktop-room-list-window .company-banner-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body.desktop-room-list-window .company-banner-copy strong {
  overflow: hidden;
  color: #171717;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.desktop-room-list-window .company-banner-copy span {
  overflow: hidden;
  color: #747474;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.desktop-room-list-window .company-banner-mark {
  color: #5b4cf0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-modal {
  position: fixed;
  inset: 0 0 var(--company-banner-height) 62px;
  z-index: 40;
  display: block;
  padding: 0;
  background: #ffffff;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-backdrop,
body.desktop-room-list-window.organization-directory-open #newConversationCloseButton {
  display: none;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-sheet {
  width: 100%;
  height: 100%;
  max-height: none;
  gap: 10px;
  padding: 42px 18px 18px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-sheet-header {
  min-height: 36px;
  padding-right: 142px;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-sheet-header .eyebrow {
  display: none;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-sheet-header h3 {
  font-size: 23px;
}

body.desktop-room-list-window.organization-directory-open .new-conversation-panel {
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid #eeeeee;
  border-radius: 0;
  background: #ffffff;
}

body.desktop-room-list-window.organization-directory-open .department-list {
  max-height: 150px;
}

body.desktop-room-list-window.organization-directory-open .department-user-list,
body.desktop-room-list-window.organization-directory-open .user-result-list {
  max-height: none;
}

body.desktop-room-list-window[data-desktop-section="home"] .conversation-header,
body.desktop-room-list-window[data-desktop-section="ai"] .conversation-header {
  padding-top: 42px;
}

/* Full-page tools must use the complete Electron main-window width. */
body.desktop-room-list-window[data-desktop-section="work_support"] .app-shell.is-work-support-mode,
body.desktop-room-list-window[data-desktop-section="control_center"] .app-shell.is-work-support-mode,
body.desktop-room-list-window[data-desktop-section="attendance"] .app-shell.is-work-support-mode,
body.desktop-room-list-window[data-desktop-section="home"] .app-shell,
body.desktop-room-list-window[data-desktop-section="ai"] .app-shell {
  width: 100vw;
  max-width: none;
  grid-template-columns: 62px minmax(0, 1fr) !important;
}

body.desktop-room-list-window[data-desktop-section="work_support"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="control_center"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="attendance"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="home"] .conversation-shell,
body.desktop-room-list-window[data-desktop-section="ai"] .conversation-shell {
  grid-column: 2 / -1 !important;
  width: 100% !important;
  max-width: none !important;
}

body.desktop-room-list-window[data-desktop-section="work_support"] .work-support-dashboard {
  width: 100%;
  max-width: none;
}

body.desktop-room-list-window[data-desktop-section="control_center"] .installation-control-dashboard {
  width: 100%;
  max-width: none;
}

body.desktop-room-list-window[data-desktop-section="work_support"] .conversation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title actions"
    "subtitle actions";
  align-items: center;
  gap: 4px 18px;
  min-height: 132px;
  padding: 38px 160px 20px 24px;
}

body.desktop-room-list-window[data-desktop-section="work_support"] .conversation-title-group {
  grid-area: title;
}

body.desktop-room-list-window[data-desktop-section="work_support"] .conversation-subtitle {
  grid-area: subtitle;
  margin: 0;
}

body.desktop-room-list-window[data-desktop-section="work_support"] .header-actions {
  grid-area: actions;
  align-self: center;
  margin: 0;
}

@media (max-width: 620px) {
  body.desktop-room-list-window[data-desktop-section="work_support"] .conversation-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-right: 128px;
  }
}

.desktop-settings-modal {
  z-index: 70;
}

.employee-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.employee-profile-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(20, 24, 34, 0.48);
  backdrop-filter: blur(2px);
}

.employee-profile-card {
  position: relative;
  z-index: 1;
  width: min(350px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden auto;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 20, 32, 0.3);
}

.employee-profile-hero {
  position: relative;
  display: grid;
  place-items: center;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(145deg, #dfe8f2, #b9d4e5);
}

.employee-profile-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.employee-profile-fallback .avatar-lg {
  width: 104px;
  height: 104px;
  font-size: 30px;
  box-shadow: 0 16px 34px rgba(28, 37, 64, 0.18);
}

.employee-profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(33, 39, 52, 0.34);
  color: #ffffff;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.employee-profile-identity {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  gap: 4px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.employee-profile-identity strong {
  font-size: 22px;
}

.employee-profile-identity span {
  font-size: 13px;
  font-weight: 700;
}

.employee-profile-hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(13, 20, 34, 0.68));
  pointer-events: none;
}

.employee-profile-details {
  padding: 14px 30px 18px;
}

.employee-profile-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid #eceef2;
  color: #343946;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.employee-profile-row > div {
  display: grid;
  gap: 3px;
}

.employee-profile-row > div span {
  color: var(--muted);
}

.employee-profile-organization {
  min-height: 62px;
}

.employee-profile-icon {
  color: #6f7480;
  font-size: 11px;
  font-weight: 800;
}

.employee-profile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.employee-profile-action {
  min-height: 50px;
  border: 1px solid #dfe2e8;
  border-radius: 8px;
  background: #ffffff;
  color: #343946;
  font-size: 13px;
}

.employee-profile-action:disabled {
  background: #f7f8fa;
  color: #a1a6b0;
}

.employee-profile-loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  font-size: 14px;
}

.employee-profile-refreshing {
  padding-top: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 520px) {
  .employee-profile-modal {
    padding: 10px;
  }

  .employee-profile-card {
    max-height: calc(var(--app-viewport-height, 100vh) - 20px);
  }

  .employee-profile-hero {
    height: min(48vh, 320px);
  }
}

.security-recipient-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 420px);
  overflow: auto;
  padding: 4px;
}

.security-recipient-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e4e7f0;
  border-radius: 14px;
  background: #f8f9fd;
  cursor: pointer;
}

.security-recipient-item:has(input:checked) {
  border-color: #6958f5;
  background: #f0edff;
}

.security-recipient-item input { width: 18px; height: 18px; accent-color: #5b4cf3; }
.security-recipient-item span { display: grid; gap: 3px; min-width: 0; }
.security-recipient-item strong { color: #202638; font-size: 14px; }
.security-recipient-item small { color: #7c8499; font-size: 12px; }

/* Mobile chat: compact Kakao-style header, bubbles and composer (iOS + Android). */
.mobile-room-menu-button { display: none; }

/* Desktop and mobile use the same Kakao-style room menu and composer. */
.conversation-header .mobile-room-menu-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.mobile-room-menu-icon,
.mobile-room-menu-icon::before,
.mobile-room-menu-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.mobile-room-menu-icon { position: relative; }
.mobile-room-menu-icon::before,
.mobile-room-menu-icon::after { content: ""; position: absolute; left: 0; }
.mobile-room-menu-icon::before { top: -7px; }
.mobile-room-menu-icon::after { top: 7px; }
.conversation-shell.is-mobile-room-menu-open .header-actions {
  display: grid;
  position: absolute;
  top: 66px;
  right: 18px;
  z-index: 40;
  width: min(340px, calc(100vw - 36px));
  padding: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(31,41,64,.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(31,41,64,.2);
}
.conversation-shell:not(.is-mobile-room-menu-open) .header-actions { display: none; }
.conversation-shell.is-mobile-room-menu-open .header-search { grid-column: 1 / -1; width: 100%; min-width: 0; }
.conversation-shell.is-mobile-room-menu-open .message-date-search {
  display: grid !important;
  grid-column: 1 / -1;
}
.composer { position: relative; }
.composer-plus-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 27px;
  font-weight: 300;
}
.composer-quick-menu {
  position: absolute;
  left: 20px;
  bottom: 76px;
  z-index: 45;
  display: grid;
  min-width: 180px;
  padding: 8px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(31,41,64,.2);
}
.composer-quick-menu.hidden { display: none; }
.composer-quick-menu button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.composer-quick-menu button:hover { background: #f3f4f8; }

@media (max-width: 860px) {
  .conversation-header .mobile-room-menu-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .app-shell.is-mobile-room-open .conversation-header {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 8px;
    min-height: 64px;
    padding: 8px 12px;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--line);
  }

  .app-shell.is-mobile-room-open .mobile-back-button {
    display: inline-flex;
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0;
  }
  .app-shell.is-mobile-room-open .mobile-back-button::before {
    content: "‹";
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
  }

  .app-shell.is-mobile-room-open .conversation-title-group {
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-items: center;
    gap: 0;
    min-width: 0;
  }
  .app-shell.is-mobile-room-open .conversation-title-group .eyebrow { display: none; }
  .app-shell.is-mobile-room-open .conversation-title-group h2 {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -.02em;
  }
  .app-shell.is-mobile-room-open .conversation-subtitle {
    grid-column: 2;
    grid-row: 2;
    justify-self: center;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
  }

  .app-shell.is-mobile-room-open .mobile-room-menu-button {
    display: inline-flex !important;
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1f2937;
  }
  .app-shell.is-mobile-room-open .mobile-room-menu-icon,
  .app-shell.is-mobile-room-open .mobile-room-menu-icon::before,
  .app-shell.is-mobile-room-open .mobile-room-menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }
  .app-shell.is-mobile-room-open .mobile-room-menu-icon {
    position: relative;
  }
  .app-shell.is-mobile-room-open .mobile-room-menu-icon::before,
  .app-shell.is-mobile-room-open .mobile-room-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .app-shell.is-mobile-room-open .mobile-room-menu-icon::before { top: -7px; }
  .app-shell.is-mobile-room-open .mobile-room-menu-icon::after { top: 7px; }

  .app-shell.is-mobile-room-open .header-actions {
    position: absolute;
    top: calc(100% + 6px);
    right: 10px;
    z-index: 20;
    display: none;
    width: min(330px, calc(100vw - 20px));
    max-height: min(72vh, 520px);
    padding: 12px;
    overflow-y: auto;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    border: 1px solid rgba(31,41,64,.1);
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 48px rgba(31,41,64,.2);
    backdrop-filter: blur(18px);
  }
  .app-shell.is-mobile-room-open .conversation-shell.is-mobile-room-menu-open .header-actions { display: grid; }
  .app-shell.is-mobile-room-open .header-search,
  .app-shell.is-mobile-room-open .message-date-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .app-shell.is-mobile-room-open .header-actions > button { width: 100%; min-height: 42px; }
  .app-shell.is-mobile-room-open .message-date-search { grid-template-columns: auto minmax(0,1fr); }

  .app-shell.is-mobile-room-open .message-list {
    gap: 10px;
    padding: 12px 10px 8px;
  }
  .app-shell.is-mobile-room-open .message-row { gap: 6px; }
  .app-shell.is-mobile-room-open .message-stack { max-width: min(78%,420px); gap: 4px; }
  .app-shell.is-mobile-room-open .message-profile-avatar { padding-top: 16px; }
  .app-shell.is-mobile-room-open .message-bubble {
    padding: 8px 11px;
    border-radius: 15px;
    line-height: 1.38;
  }
  .app-shell.is-mobile-room-open .message-meta { gap: 5px; font-size: 11px; }
  .app-shell.is-mobile-room-open .message-read-status {
    min-height: 19px;
    padding: 0 6px;
    font-size: 10px;
  }
  .app-shell.is-mobile-room-open .message-inline-reply-button {
    min-width: 28px;
    min-height: 28px;
    padding: 0 7px;
    font-size: 10px;
  }

  .app-shell.is-mobile-room-open .composer {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 42px;
    align-items: end;
    gap: 7px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom,0px));
    background: rgba(255,255,255,.98);
  }
  .app-shell.is-mobile-room-open .composer textarea {
    grid-column: 2;
    grid-row: 3;
    min-height: 40px;
    max-height: 104px;
    padding: 9px 14px;
    resize: none;
    border: 1px solid #e1e4eb;
    border-radius: 20px;
    background: #f6f7f9;
    font-size: 16px;
    line-height: 1.32;
  }
  .app-shell.is-mobile-room-open .pending-attachment-list,
  .app-shell.is-mobile-room-open .reply-composer-bar,
  .app-shell.is-mobile-room-open .message-visibility-toggle,
  .app-shell.is-mobile-room-open .mention-suggestion-list { grid-column: 1 / -1; }
  .app-shell.is-mobile-room-open .pending-attachment-list { grid-row: 1; margin-bottom: 2px; }
  .app-shell.is-mobile-room-open .reply-composer-bar,
  .app-shell.is-mobile-room-open .message-visibility-toggle { grid-row: 2; }
  .app-shell.is-mobile-room-open .composer-actions { display: contents; }
  .app-shell.is-mobile-room-open .composer-tools {
    display: flex;
    grid-column: 1;
    grid-row: 3;
    align-items: center;
    gap: 0;
  }
  .app-shell.is-mobile-room-open #attachFileButton {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f0f1f5;
    font-size: 0;
  }
  .app-shell.is-mobile-room-open #attachFileButton::before {
    content: "+";
    color: #4d5669;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
  }
  .app-shell.is-mobile-room-open #cameraCaptureButton,
  .app-shell.is-mobile-room-open .composer-hint { display: none !important; }
  .app-shell.is-mobile-room-open .attachment-security-control {
    display: none;
    position: absolute;
    left: 10px;
    bottom: calc(58px + env(safe-area-inset-bottom,0px));
    z-index: 6;
    min-height: 40px;
    box-shadow: 0 10px 28px rgba(31,41,64,.14);
  }
  .app-shell.is-mobile-room-open .composer:has(.pending-attachment-list:not(.hidden)) .attachment-security-control {
    display: inline-flex;
  }
  .app-shell.is-mobile-room-open .composer-actions .primary-button {
    grid-column: 3;
    grid-row: 3;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }
  .app-shell.is-mobile-room-open .composer-actions .primary-button::before {
    content: "➤";
    font-size: 17px;
    line-height: 1;
  }
}
