:root {
  --designer-page: #f0f4f8;
  --designer-surface: rgba(255, 255, 255, .9);
  --designer-ink: #0f172a;
  --designer-muted: #64748b;
  --designer-blue: #2b59ff;
  --designer-blue-strong: #1d4ed8;
  --designer-line: rgba(226, 232, 240, .88);
  --designer-shadow: 0 4px 16px rgba(30, 58, 138, .06);
  --designer-shadow-raised: 0 12px 34px rgba(30, 58, 138, .11);
}

html,
body {
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  background: #e5e7eb;
  letter-spacing: 0;
}

body::before {
  display: none;
}

.h5-recovery-panel {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(248, 250, 252, .96);
}

.h5-recovery-panel.hidden {
  display: none;
}

.h5-recovery-content {
  width: min(320px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  color: #172033;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .14);
  text-align: center;
}

.h5-recovery-content strong {
  font-size: 17px;
  font-weight: 600;
}

.h5-recovery-content p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.h5-recovery-content button {
  min-width: 120px;
  min-height: 42px;
  margin-top: 2px;
  border-radius: 8px;
}

.h5-recovery-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #dbeafe;
  border-top-color: var(--designer-blue);
  border-radius: 50%;
  animation: h5-recovery-spin .8s linear infinite;
}

@keyframes h5-recovery-spin {
  to { transform: rotate(360deg); }
}

.shell {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  height: auto;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: visible;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, .72), transparent 44%),
    linear-gradient(315deg, rgba(224, 242, 254, .62), transparent 45%),
    var(--designer-page);
  box-shadow: 0 0 42px rgba(15, 23, 42, .14);
}

#appPanel {
  padding: 0 20px calc(100px + env(safe-area-inset-bottom));
}

body.messages-view-active {
  overflow: hidden;
}

#messagesView.active {
  position: fixed;
  z-index: 40;
  top: 76px;
  bottom: max(80px, calc(68px + env(safe-area-inset-bottom)));
  left: 50%;
  width: min(430px, 100vw);
  padding: 0 20px;
  overflow: hidden !important;
  transform: translateX(-50%);
}

#messagesView .chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#messagesView .chat-head,
#messagesView .chat-context,
#messagesView .composer {
  flex: 0 0 auto;
}

#messagesView .messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#messagesView .composer {
  position: relative;
  bottom: auto;
  z-index: 3;
}

#messagesView .chat-queue {
  margin: 0 2px 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

#messagesView .chat-queue.hidden,
#messagesView .chat-queue-list.hidden {
  display: none;
}

#messagesView .chat-queue-summary {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

#messagesView .chat-queue-summary strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#messagesView .chat-queue-summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #94a3b8;
  stroke-width: 2;
  transition: transform .18s ease;
}

#messagesView .chat-queue-summary[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

#messagesView .chat-queue-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
  animation: chatQueuePulse 1.5s ease-in-out infinite;
}

@keyframes chatQueuePulse {
  50% { opacity: .5; transform: scale(.82); }
}

#messagesView .chat-queue-list {
  max-height: min(238px, 30vh);
  padding: 4px 8px 8px;
  overflow-y: auto;
  border-top: 1px solid #f1f5f9;
}

#messagesView .chat-queue-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 2px;
}

#messagesView .chat-queue-row + .chat-queue-row {
  border-top: 1px solid #f1f5f9;
}

#messagesView .chat-queue-index {
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}

#messagesView .chat-queue-row.is-processing .chat-queue-index {
  color: #2563eb;
}

#messagesView .chat-queue-copy {
  min-width: 0;
}

#messagesView .chat-queue-copy strong,
#messagesView .chat-queue-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#messagesView .chat-queue-copy strong {
  color: #334155;
  font-size: 11px;
  font-weight: 500;
}

#messagesView .chat-queue-copy small {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 9px;
}

#messagesView .chat-queue-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

#messagesView .chat-queue-action {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  box-shadow: none;
}

#messagesView .chat-queue-action:hover {
  background: #f1f5f9;
}

#messagesView .chat-queue-action.danger {
  color: #dc2626;
}

#messagesView .chat-queue-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#messagesView .chat-queue-edit {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  padding: 2px 0;
}

#messagesView .chat-queue-edit textarea {
  min-height: 58px;
  max-height: 120px;
  padding: 8px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #1e293b;
  background: #fff;
  font-size: 12px;
}

#messagesView .chat-queue-edit button {
  align-self: end;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  box-shadow: none;
  font-size: 11px;
}

#messagesView .composer-steer-btn {
  height: 30px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  color: #2563eb;
  background: #eff6ff;
  box-shadow: none;
  font-size: 11px;
  font-weight: 500;
}

#messagesView .composer-steer-btn.hidden {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  margin: 0;
  padding: 18px 20px 12px;
  border: 0;
  border-radius: 0;
  background: rgba(240, 244, 248, .9);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.topbar.office-page {
  display: none;
}

.topbar.subpage {
  min-height: 76px;
  padding: 26px 20px 10px;
}

.topbar.subpage .logo,
.topbar.subpage .subtitle {
  display: none;
}

.topbar.subpage .brand {
  min-width: 0;
  flex: 1;
}

.topbar.subpage .brand-title h1 {
  font-size: 20px;
  font-weight: 800;
}

.topbar.subpage .top-back {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 50%;
  color: #475569;
  background: rgba(226, 232, 240, .72);
  box-shadow: none;
  font-size: 25px;
}

.view.active {
  animation: none;
}

/* Home */
#officeView .office-dashboard {
  display: grid;
  gap: 24px;
  padding: 24px 0 12px;
}

#officeView .office-secretary-hero-wrap {
  position: relative;
  width: 100%;
  min-height: 190px;
}

#officeView .office-secretary-hero {
  position: relative;
  min-height: 190px;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  text-align: left;
  background: #1e3a8a;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .22);
}

#officeView .office-secretary-hero::before,
#officeView .office-secretary-hero::after {
  display: none;
}

#officeView .office-secretary-hero > .designer-home-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  max-height: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: fill;
  filter: none;
}

.designer-home-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(37, 99, 235, .28), rgba(23, 37, 84, .94));
}

#officeView .office-hero-copy {
  position: relative;
  z-index: 2;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 24px 20px 18px;
}

#officeView .office-hero-copy > .designer-home-eyebrow {
  order: 1;
  margin-bottom: 7px;
  color: #dbeafe;
  font-size: 11px;
  font-weight: 600;
}

#officeView .office-hero-copy > strong {
  order: 2;
  max-width: 250px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.16;
}

#officeView .office-hero-chips {
  order: 3;
  display: flex;
  gap: 8px;
  width: calc(100% - 40px);
  margin-top: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}

#officeView .office-hero-chips::-webkit-scrollbar {
  display: none;
}

#officeView .office-hero-chips em {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(9px);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

#officeView .office-hero-chips b {
  color: inherit;
}

.designer-home-gallery {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.designer-home-gallery:disabled {
  cursor: wait;
  opacity: .65;
}

.designer-home-gallery:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.designer-home-gallery svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#officeView .office-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 18px 8px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

#officeView .office-shortcuts button {
  min-width: 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
}

#officeView .office-shortcut-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #2563eb;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
}

#officeView .office-shortcuts button:nth-child(2) .office-shortcut-icon {
  color: #d97706;
  background: linear-gradient(145deg, #fffbeb, #ffedd5);
}

#officeView .office-shortcuts button:nth-child(3) .office-shortcut-icon {
  color: #f43f5e;
  background: linear-gradient(145deg, #fff1f2, #fce7f3);
}

#officeView .office-shortcuts button:nth-child(4) .office-shortcut-icon {
  color: #059669;
  background: linear-gradient(145deg, #ecfdf5, #ccfbf1);
}

#officeView .office-shortcuts button:nth-child(5) .office-shortcut-icon {
  color: #7c3aed;
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
}

#officeView .office-shortcut-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#officeView .office-shortcuts strong {
  max-width: 62px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}

#officeView .office-section {
  display: grid;
  gap: 14px;
  margin: 0;
}

#officeView .office-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

#officeView .office-section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

#officeView .office-section-head h2::before {
  content: "";
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

#officeView .office-section-head h2 span {
  padding: 2px 8px;
  border-radius: 8px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
}

#officeView .office-section-head button {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .2);
  font-size: 13px;
}

#officeView .office-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#officeView .office-section-actions button {
  padding: 0 12px;
  white-space: nowrap;
}

#officeView .office-section-actions .office-ai-secretary-btn {
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, .2);
  background: #eff6ff;
  box-shadow: none;
}

@media (max-width: 390px) {
  #officeView .office-section-head {
    align-items: flex-start;
  }

  #officeView .office-section-actions {
    gap: 5px;
  }

  #officeView .office-section-actions button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }
}

#officeView .office-employee-grid {
  display: flex;
  gap: 16px;
  margin: 0 -20px;
  padding: 0 20px 4px !important;
  overflow-x: auto !important;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#officeView .office-employee-section .office-employee-grid {
  margin-left: 0;
  margin-right: -20px;
  padding-left: 0 !important;
  padding-right: 20px !important;
}

#officeView .office-today-section .office-section-head h2 {
  font-weight: 500;
}

#officeView .office-employee-grid::-webkit-scrollbar {
  display: none;
}

#officeView .office-employee-card {
  flex: 0 0 120px;
  width: 120px;
  min-height: 166px;
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--designer-shadow);
  scroll-snap-align: start;
  touch-action: pan-x pan-y;
}

#officeView .office-employee-card > img,
#officeView .office-custom-employee-avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
}

#officeView .office-employee-info {
  display: grid;
  justify-items: center;
  gap: 4px;
}

#officeView .office-employee-info strong {
  color: #0f172a;
  font-size: 14px;
}

#officeView .office-employee-info em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

#officeView .office-employee-info em::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

#officeView .office-employee-card.active .office-employee-info em {
  color: #2563eb;
}

#officeView .marketing-creation-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  color: #0f172a;
  text-align: left;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

#officeView .marketing-creation-card::before {
  display: none;
}

#officeView .marketing-creation-card > .designer-marketing-media {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1400 / 422;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  transform: none !important;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

.designer-marketing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#officeView .designer-marketing-media > i {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #2563eb;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.designer-marketing-media > i b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

#officeView .marketing-creation-card > .designer-marketing-copy {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  text-align: left;
  transform: none !important;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

#officeView .marketing-creation-card > .designer-marketing-copy::before {
  display: none;
}

#officeView .marketing-creation-card .designer-marketing-copy > span {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  display: grid;
  grid-column: 1;
  justify-self: stretch;
  justify-items: start;
  align-items: start;
  gap: 3px;
  transform: none !important;
  border-radius: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
}

#officeView .designer-marketing-copy strong,
#officeView .designer-marketing-copy em {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
}

#officeView .designer-marketing-copy strong {
  color: #0f172a;
  font-size: 15px;
}

#officeView .designer-marketing-copy em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.designer-marketing-copy > b {
  grid-column: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 24px;
  font-weight: 400;
}

#officeView .office-recent-list {
  display: grid;
  gap: 12px;
}

#officeView .office-recent-item,
#officeView .office-recent-empty {
  padding: 15px 16px;
  border: 1px solid #f8fafc;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 138, .04);
}

.designer-bottom-nav {
  position: fixed;
  z-index: 88;
  left: 50%;
  bottom: 0;
  width: min(430px, 100%);
  min-height: 80px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  padding: 9px 14px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(226, 232, 240, .72);
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 -12px 30px rgba(30, 58, 138, .08);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.designer-bottom-nav button {
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px 2px 0;
  border-radius: 14px;
  color: #94a3b8;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.designer-bottom-nav button:not(:disabled):active {
  transform: none;
  opacity: .72;
}

.designer-bottom-nav button.active {
  color: #2563eb;
}

.designer-bottom-nav button > svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.designer-bottom-nav .designer-bottom-create {
  justify-content: flex-end;
  color: #94a3b8;
}

.designer-bottom-create i {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-top: -24px;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .32);
  font-style: normal;
}

.designer-bottom-create i svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.designer-bottom-create.sheet-open i {
  transform: rotate(45deg);
}

.global-chat-fab {
  position: fixed;
  z-index: 89;
  right: max(18px, calc((100vw - 430px) / 2 + 18px));
  bottom: max(96px, calc(82px + env(safe-area-inset-bottom)));
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .28), 0 6px 16px rgba(14, 165, 233, .2);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.global-chat-fab::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: inherit;
  pointer-events: none;
}

.global-chat-fab svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.global-chat-fab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #22c55e;
}

.global-chat-fab:not(.is-dragging):active {
  transform: scale(.96);
}

.global-chat-fab.is-dragging {
  cursor: grabbing;
  transform: none;
  transition: none;
}

#workflowActionPlatformField[hidden] {
  display: none;
}

body.messages-view-active .global-chat-fab {
  bottom: max(218px, calc(204px + env(safe-area-inset-bottom)));
}

.creation-quick-modal {
  z-index: 260;
  place-items: end center;
  padding: 0 12px calc(68px + max(12px, env(safe-area-inset-bottom)));
}

.creation-quick-sheet {
  position: relative;
  z-index: 1;
  width: min(406px, calc(100vw - 24px));
  padding: 10px 12px 12px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 20px;
  color: #172033;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 52px rgba(15, 23, 42, .2);
  backdrop-filter: blur(20px);
}

.creation-quick-handle {
  width: 34px;
  height: 4px;
  display: block;
  margin: 0 auto 6px;
  border-radius: 999px;
  background: #d8e0eb;
}

.creation-quick-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.creation-quick-head strong {
  font-size: 15px;
  font-weight: 600 !important;
}

.creation-quick-close {
  width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: #64748b;
  background: #f1f5f9;
  box-shadow: none;
  font-size: 19px;
  line-height: 1;
}

.creation-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.creation-quick-grid .marketing-entry-card {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e5ebf3;
  border-radius: 14px;
  color: #25324a;
  background: #f8fafc;
  box-shadow: none;
  text-align: left;
}

.creation-quick-grid .marketing-entry-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #2563eb;
  background: #eaf1ff;
}

.creation-quick-grid .marketing-entry-card.video .marketing-entry-icon {
  color: #0f8f6f;
  background: #e7f8f2;
}

.creation-quick-grid .marketing-entry-card.design .marketing-entry-icon {
  color: #b85c20;
  background: #fff1e8;
}

.creation-quick-grid .marketing-entry-card.copy .marketing-entry-icon {
  color: #087f9c;
  background: #e6f8fc;
}

.creation-quick-grid .marketing-entry-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.creation-quick-grid .marketing-entry-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.creation-quick-grid .marketing-entry-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.creation-quick-grid .marketing-entry-copy small {
  overflow: hidden;
  color: #8290a5;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creation-quick-grid .marketing-entry-card > b {
  display: none;
}

.creation-quick-empty {
  grid-column: 1 / -1;
  padding: 18px;
  color: #8290a5;
  text-align: center;
  font-size: 12px;
}

/* Shared subpages */
.asset-library-shell,
.content-record-shell,
.lead-center-shell,
.tutorial-shell,
.personal-settings-page,
.workflow-shell,
.department-shell,
.ability-shell {
  min-height: calc(100dvh - 92px);
  margin: 0;
  padding: 4px 0 36px;
  background: transparent;
}

.content-record-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 80px);
}

.content-record-shell .asset-library-pager {
  margin-top: auto;
  padding-top: 24px;
}

.asset-library-head {
  display: block;
}

.asset-library-head > button,
.personal-list-page-head button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .2);
}

#assetLibraryView .asset-library-head > #assetLibraryAddBtn {
  position: fixed;
  z-index: 60;
  top: 28px;
  right: max(20px, calc((100vw - 430px) / 2 + 20px));
  min-height: 34px;
}

.asset-library-tabs,
.content-record-tabs,
.lead-domain-tabs,
.lead-platform-tabs,
.personal-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -20px;
  padding: 4px 20px 10px;
  overflow-x: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.content-record-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(74px, 1.7fr) minmax(0, 1fr);
  gap: 6px;
  overflow: visible;
}

.asset-library-tabs::-webkit-scrollbar,
.content-record-tabs::-webkit-scrollbar,
.lead-domain-tabs::-webkit-scrollbar,
.lead-platform-tabs::-webkit-scrollbar,
.personal-tabs::-webkit-scrollbar {
  display: none;
}

.asset-library-tabs button,
.content-record-tabs button,
.lead-domain-tabs button,
.lead-platform-tabs button,
.personal-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 999px;
  color: #475569;
  background: rgba(255, 255, 255, .68);
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.content-record-tabs button {
  width: 100%;
  min-width: 0;
  padding-inline: 4px;
  font-size: 11px;
}

.asset-library-tabs button.active,
.content-record-tabs button.active,
.lead-domain-tabs button.active,
.lead-platform-tabs button.active,
.personal-tabs button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}

.asset-library-grid.designer-media-grid,
.asset-library-shell:not(.content-record-shell) .asset-library-grid.designer-media-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.content-record-shell .asset-library-grid.designer-media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.asset-library-grid.designer-avatar-grid,
.asset-library-grid.designer-voice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.asset-library-card.designer-media-card {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--designer-shadow);
}

.designer-media-meta > span {
  display: none;
}

.content-record-shell .asset-library-card.designer-media-card {
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
}

.content-record-shell .designer-media-thumb,
.content-record-shell .designer-media-thumb > .asset-library-thumb {
  border-radius: 12px;
}

.content-record-shell .designer-media-meta strong {
  font-size: 11px;
}

.content-record-shell .designer-media-meta em {
  font-size: 9px;
}

.content-record-shell .asset-library-grid.designer-document-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.content-document-card {
  width: 100%;
  min-height: 136px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .72);
  border-radius: 20px;
  color: #0f172a;
  text-align: left;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--designer-shadow);
}

.content-document-cover {
  position: relative;
  flex: 0 0 84px;
  height: 112px;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #dbeafe;
}

.content-document-card.ppt .content-document-cover {
  flex-basis: 120px;
  height: 90px;
  align-self: center;
}

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

.content-document-image-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
}

.content-document-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #eff6ff;
}

.content-document-cover-empty.wechat_article {
  color: #059669;
  background: #ecfdf5;
}

.content-document-cover-empty.ppt {
  color: #dc2626;
  background: #fef2f2;
}

.content-document-cover-empty b {
  font-size: 15px;
  font-weight: 500;
}

.content-record-cover {
  max-height: 260px;
  object-fit: cover;
}

.content-record-file-mark {
  min-height: 150px;
  color: #fff;
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.content-record-summary {
  padding: 12px 14px;
  border-left: 3px solid #ff4057;
  border-radius: 0 12px 12px 0;
  color: #475569;
  background: #fff1f2;
  font-size: 13px;
  line-height: 1.7;
}

.content-record-article-body {
  padding: 16px;
  overflow-wrap: anywhere;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  color: #1e293b;
  background: #fff;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.content-record-article-text {
  white-space: pre-wrap;
}

.content-record-inline-image {
  margin: 14px 0;
}

.content-record-inline-image img,
.content-record-image-gallery img {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  background: #f8fafc;
}

.content-record-image-gallery {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.content-document-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 1px 0;
}

.content-document-state {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.content-document-state em,
.content-document-tags i {
  padding: 3px 8px;
  border-radius: 6px;
  color: #059669;
  background: #ecfdf5;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.content-document-state em.failed {
  color: #e11d48;
  background: #fff1f2;
}

.content-document-state time {
  color: #94a3b8;
  font-size: 10px;
}

.content-document-main > strong {
  display: -webkit-box;
  overflow: hidden;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-document-snippet {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-document-image-strip {
  width: 100%;
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.content-document-image-strip img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: block;
  border-radius: 7px;
  object-fit: cover;
  background: #f1f5f9;
}

.content-document-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-document-tags i {
  color: #2563eb;
  background: #eff6ff;
}

.content-document-main > small {
  margin-top: auto;
  color: #94a3b8;
  font-size: 11px;
}

.designer-media-thumb {
  border-radius: 16px;
}

.asset-library-card.designer-avatar-card,
.asset-library-card.designer-voice-card {
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--designer-shadow);
}

.hifly-library-card {
  position: relative;
  display: grid;
  align-content: start;
}

.hifly-card-preview {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 7px;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  box-shadow: none;
}

.hifly-card-delete {
  min-height: 28px;
  margin-top: 7px;
  padding: 0 8px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  color: #dc2626;
  background: #fff7f7;
  box-shadow: none;
  font-size: 10px;
  font-weight: 400;
}

.asset-library-pager {
  padding: 4px 2px 0;
}

.asset-library-pager button {
  min-height: 36px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  box-shadow: none;
}

/* Lead center */
.lead-center-shell {
  display: grid;
  gap: 15px;
}

#leadCenterView {
  width: auto;
  max-width: none;
  min-height: calc(100dvh - 76px);
  margin: 0 -20px;
  padding: 4px 20px 36px;
  background:
    radial-gradient(circle at 92% 3%, rgba(59, 130, 246, .14), transparent 30%),
    radial-gradient(circle at 15% 42%, rgba(45, 212, 191, .11), transparent 34%),
    linear-gradient(180deg, #eaf3ff 0%, #eefbfa 58%, #f5f8fb 100%);
}

.lead-center-title {
  margin: 0 4px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.lead-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.lead-stats div {
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--designer-shadow);
}

.lead-stats strong {
  color: #2563eb;
  font-size: 20px;
}

.lead-stats span {
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.lead-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 0;
  align-items: start;
}

.lead-domain-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.lead-domain-tabs button,
.lead-domain-tabs button.active {
  min-height: 54px;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .84);
  color: #475569;
  background: rgba(255, 255, 255, .62);
  box-shadow: none;
}

.lead-domain-tabs button.active {
  color: #2563eb;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

.lead-card,
.lead-empty-box {
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--designer-shadow);
}

/* Tutorials */
.tutorial-shell {
  display: block;
}

.designer-tutorial-list {
  display: grid;
  gap: 16px;
}

.designer-tutorial-card {
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 24px;
  color: #0f172a;
  text-align: left;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--designer-shadow);
}

.designer-tutorial-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #e2e8f0;
}

.designer-tutorial-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.designer-tutorial-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .28);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  font-size: 17px;
  font-style: normal;
}

.designer-tutorial-cover > em {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.designer-tutorial-copy {
  display: grid;
  gap: 8px;
  padding: 0 6px 4px;
}

.designer-tutorial-copy > strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
}

.designer-tutorial-copy > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.designer-tutorial-copy small {
  color: #94a3b8;
  font-size: 11px;
}

.designer-tutorial-copy b {
  padding: 3px 8px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 11px;
}

.designer-tutorial-copy b.indigo { color: #4f46e5; background: #eef2ff; border-color: #e0e7ff; }
.designer-tutorial-copy b.green { color: #059669; background: #ecfdf5; border-color: #d1fae5; }
.designer-tutorial-copy b.amber { color: #d97706; background: #fffbeb; border-color: #fef3c7; }

.tutorial-preview-video {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: #0f172a;
}

.tutorial-preview-poster {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #e2e8f0;
}

.tutorial-preview-poster img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tutorial-preview-poster > span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
}

.tutorial-preview-poster svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.tutorial-preview-note {
  padding: 14px 4px 2px;
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

/* IP positioning */
.personal-settings-page {
  position: relative;
  display: block;
  overflow: visible;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.personal-settings-page .personal-panel.active {
  display: block;
  margin-top: 12px;
}

.personal-settings-page > .section-title {
  position: fixed;
  z-index: 60;
  top: 26px;
  right: max(20px, calc((100vw - 430px) / 2 + 20px));
  width: auto;
  margin: 0;
}

.personal-settings-page > .section-title > h2 {
  display: none;
}

.personal-settings-page > .section-title .section-actions {
  display: flex;
  gap: 8px;
}

.personal-settings-page > .section-title button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(226, 232, 240, .78);
  border-radius: 999px;
  color: #475569;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 4px 12px rgba(30, 58, 138, .05);
}

.personal-settings-page > .section-title .icon-help {
  width: 32px;
  padding: 0;
}

.personal-settings-page .personal-block,
.personal-survey-wizard,
.personal-template-card,
.personal-status,
.personal-list-page-head {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 24px;
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--designer-shadow);
  backdrop-filter: blur(14px);
}

.personal-grid,
.personal-form-grid {
  grid-template-columns: 1fr;
}

.personal-row,
.personal-source-card,
.personal-source-profile,
.personal-generated-doc,
.personal-upload-zone {
  border-radius: 20px;
  border-color: var(--designer-line);
  background: rgba(248, 250, 252, .72);
}

.personal-survey-wizard {
  display: block;
  padding: 15px 16px 12px;
  background: rgba(255, 255, 255, .9);
}

.personal-survey-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 2px 0 13px;
  border-bottom: 1px solid #edf1f7;
}

.personal-survey-heading-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #2f6fed;
  background: #edf3ff;
  font-size: 14px;
  font-weight: 500;
}

.personal-survey-heading strong {
  display: block;
  color: #17233d;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.personal-survey-heading p {
  margin: 3px 0 0;
  color: #8792a6;
  font-size: 12px;
  line-height: 1.4;
}

.personal-survey-heading > span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #2f8f70;
  background: #eaf8f1;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.personal-survey-list {
  display: block;
}

.personal-survey-item {
  padding: 13px 0 14px;
  border-bottom: 1px solid #edf1f7;
}

.personal-survey-item:last-child {
  border-bottom: 0;
}

.personal-survey-question {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.personal-survey-question > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2f6fed;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.personal-survey-question strong,
.personal-survey-question small {
  display: block;
  letter-spacing: 0;
}

.personal-survey-question strong {
  color: #17233d;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.personal-survey-question small {
  margin-top: 2px;
  color: #8a94a6;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.personal-survey-answer {
  margin-top: 9px;
}

.personal-survey-answer input,
.personal-survey-answer select,
.personal-survey-answer textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  outline: 0;
  color: #17233d;
  background: #f6f8fc;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.personal-survey-answer input,
.personal-survey-answer select {
  min-height: 44px;
  padding: 0 12px;
}

.personal-survey-answer textarea {
  min-height: 78px;
  padding: 11px 12px;
  resize: vertical;
}

.personal-survey-answer input:focus,
.personal-survey-answer select:focus,
.personal-survey-answer textarea:focus {
  border-color: rgba(47, 111, 237, .48);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .08);
}

.personal-survey-answer input::placeholder,
.personal-survey-answer textarea::placeholder {
  color: #a1a9b8;
}

.personal-survey-answer .asset-picker-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personal-survey-answer .asset-picker-row button {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 400;
}

.personal-survey-placeholder {
  margin: 6px 2px 0;
  color: #98a1b2;
  font-size: 11px;
  line-height: 1.4;
}

.personal-survey-actions {
  position: sticky;
  z-index: 6;
  bottom: calc(80px + max(10px, env(safe-area-inset-bottom)));
  display: block;
  margin: 8px -4px 0;
  padding: 7px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--designer-shadow-raised);
  backdrop-filter: blur(16px);
}

.personal-survey-actions #personalSaveProfileBtn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
}

.personal-settings-page .inline-form.three {
  grid-template-columns: 1fr;
  gap: 12px;
}

.personal-settings-page .inline-form.three input,
.personal-settings-page .inline-form.three select {
  min-height: 50px;
  border-radius: 22px;
  background: #fff;
}

.personal-settings-page .inline-form.three > button {
  width: 100%;
  min-height: 50px;
  border-radius: 22px;
}

/* Employee workflow */
.workflow-shell {
  padding-bottom: 112px;
}

.workflow-head,
.workflow-day-board,
.workflow-editor-card,
.workflow-template-drawer {
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--designer-shadow);
  backdrop-filter: blur(14px);
}

.workflow-head {
  padding: 12px;
}

.workflow-calendar-days {
  display: flex;
  gap: 8px;
  padding: 10px 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.workflow-calendar-days::-webkit-scrollbar {
  display: none;
}

.workflow-calendar-day {
  flex: 0 0 52px;
  min-height: 64px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(30, 58, 138, .05);
}

.workflow-calendar-day.active {
  color: #fff;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 9px 20px rgba(37, 99, 235, .22);
}

.designer-workflow-group > summary {
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--designer-shadow);
}

.designer-workflow-group-content {
  margin-top: 9px;
}

.workflow-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, .9fr);
  left: max(16px, calc((100vw - 430px) / 2 + 16px));
  right: max(16px, calc((100vw - 430px) / 2 + 16px));
  bottom: calc(80px + max(16px, env(safe-area-inset-bottom)));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 32px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(30, 58, 138, .14);
  backdrop-filter: blur(18px);
}

.toast {
  bottom: calc(92px + env(safe-area-inset-bottom));
}

.workflow-actions button {
  min-width: 0;
  min-height: 46px;
  padding-inline: 8px;
  border-radius: 24px;
  font-size: 13px;
  white-space: nowrap;
}

/* AI marketing */
#departmentView .department-shell.marketing-entry-mode {
  padding-top: 0;
}

#departmentView .department-shell.marketing-entry-mode .department-day-board {
  display: none !important;
}

.department-skill-grid:has(.designer-ability-card) {
  grid-template-columns: 1fr !important;
  gap: 16px;
}

.department-skill-card.designer-ability-card {
  padding: 10px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--designer-shadow);
}

.designer-ability-art {
  position: relative;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  color: #60a5fa;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(circle at -4% -8%, rgba(147, 51, 234, .38), transparent 42%),
    radial-gradient(circle at 104% 108%, rgba(37, 99, 235, .38), transparent 46%),
    linear-gradient(145deg, #111827, #0f172a);
  background-size: 20px 20px, 20px 20px, auto, auto, auto;
}

.designer-ability-art::before,
.designer-ability-art::after {
  display: none;
}

.designer-ability-card.blue .designer-ability-art {
  color: #22d3ee;
  background:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px),
    radial-gradient(circle at 104% -6%, rgba(8, 145, 178, .36), transparent 48%),
    radial-gradient(circle at -4% 108%, rgba(29, 78, 216, .34), transparent 44%),
    linear-gradient(145deg, #111827, #0f172a);
  background-size: 15px 15px, 15px 15px, auto, auto, auto;
}

.designer-ability-card:nth-child(3) .designer-ability-art {
  color: #818cf8;
  background:
    radial-gradient(circle at 50% 52%, rgba(99, 102, 241, .32), transparent 42%),
    linear-gradient(145deg, #1e1b4b, #0f172a);
}

.designer-ability-card.emerald .designer-ability-art {
  color: #34d399;
  background:
    radial-gradient(circle at 82% -8%, rgba(5, 150, 105, .28), transparent 42%),
    radial-gradient(circle at 0 100%, rgba(15, 118, 110, .36), transparent 48%),
    linear-gradient(145deg, #111827, #0f172a);
}

.designer-ability-card.rose .designer-ability-art {
  color: #fb7185;
  background:
    radial-gradient(circle at -5% 55%, rgba(225, 29, 72, .28), transparent 46%),
    radial-gradient(circle at 80% 108%, rgba(234, 88, 12, .22), transparent 40%),
    linear-gradient(145deg, #111827, #0f172a);
}

.designer-ability-card.cyan .designer-ability-art,
.designer-ability-card.disabled .designer-ability-art {
  color: #94a3b8;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .025) 50%, rgba(255, 255, 255, .025) 75%, transparent 75%),
    linear-gradient(145deg, #1f2937, #0f172a);
  background-size: 40px 40px, auto;
}

.designer-ability-art > em {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  color: #dbeafe;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
}

.designer-ability-art > span {
  color: inherit;
}

.designer-ability-art svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.designer-ability-meta {
  padding: 14px 12px 7px;
}

/* Shared dialogs */
.employee-modal-backdrop,
.task-success-backdrop {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(5px);
}

.employee-popover,
.work-dispatch-popover,
.workflow-node-popover,
.workflow-param-popover,
.workflow-missing-popover,
.asset-action-popover,
.personal-template-popover,
.personal-memory-popover,
.task-success-panel {
  width: min(360px, calc(100vw - 34px));
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 74px rgba(15, 23, 42, .24);
  backdrop-filter: blur(18px);
}

@media (max-width: 380px) {
  #messagesView.active {
    padding-left: 14px;
    padding-right: 14px;
  }

  #appPanel {
    padding-left: 14px;
    padding-right: 14px;
  }

  #leadCenterView {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar,
  .topbar.subpage {
    padding-left: 14px;
    padding-right: 14px;
  }

  #officeView .office-dashboard {
    gap: 20px;
  }

  #officeView .office-employee-grid,
  .asset-library-tabs,
  .content-record-tabs,
  .lead-domain-tabs,
  .lead-platform-tabs,
  .personal-tabs {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  #officeView .office-employee-section .office-employee-grid {
    margin-left: 0;
    margin-right: -14px;
    padding-left: 0 !important;
    padding-right: 14px !important;
  }

  #officeView .office-shortcut-icon {
    width: 44px;
    height: 44px;
  }

  .lead-stats {
    gap: 6px;
  }

  .lead-stats span {
    font-size: 9px;
  }

  .designer-bottom-nav {
    padding-left: 8px;
    padding-right: 8px;
  }

  .content-record-shell .asset-library-grid.designer-media-grid {
    gap: 7px;
  }
}

/* Content-library actions keep preview and downstream commands independent. */
.content-action-card {
  position: relative;
  overflow: visible !important;
}

.content-action-card.task-menu-open,
.content-action-host.task-menu-open {
  z-index: 120;
}

.content-card-preview,
.content-document-preview {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font: inherit;
}

.content-card-preview {
  display: grid;
  gap: 0;
}

.content-card-preview:active,
.content-document-preview:active {
  transform: none;
}

.content-card-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 4px 2px;
}

.content-card-footer > em {
  min-width: 0;
  overflow: hidden;
  color: #94a3b8;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
}

.content-document-preview {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding-right: 58px;
}

.content-document-action {
  position: absolute;
  right: 12px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.content-action-menu {
  position: relative;
  flex: 0 0 auto;
}

.content-action-menu > summary {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 11px;
  font-weight: 400;
}

.content-action-menu .task-action-list {
  top: calc(100% + 6px);
  right: 0;
  min-width: 128px;
  z-index: 140;
}

.content-action-menu .task-action-list button {
  min-height: 34px;
  font-weight: 400;
}

.content-record-shell .designer-media-grid .content-action-card:nth-child(3n + 1) .task-action-list,
.asset-library-shell:not(.content-record-shell) .designer-media-grid .content-action-card:nth-child(2n + 1) .task-action-list {
  right: auto;
  left: 0;
}

.content-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 30px;
}

.run-media-actions .content-action-menu {
  justify-self: end;
}

.run-media-actions .content-action-menu > summary {
  min-width: 72px;
  min-height: 36px;
}

.run-media-item.content-action-host,
.copy-item.content-action-host,
.moment-item.content-action-host,
.task-detail-section.content-action-host {
  position: relative;
  overflow: visible;
}

#runPageBody .content-action-menu[open] {
  width: min(100%, 160px);
}

#runPageBody .content-action-menu .task-action-list {
  position: static;
  width: 100%;
  margin-top: 6px;
}

/* Typography: keep everyday UI copy light and reserve emphasis for true page titles. */
body * {
  font-weight: 400 !important;
}

#pageTitle,
#loginPanel > h2,
.section-title > h2,
.subpage-title > strong,
.employee-popover-title > strong,
.task-success-panel > h3,
.detail-modal-head h3,
.mobile-media-preview-panel > strong {
  font-weight: 600 !important;
}

/* Keep workflow action menus above following cards and groups. */
.designer-workflow-group,
.designer-workflow-group-content,
.workflow-node-card.designer-workflow-node {
  overflow: visible;
}

.designer-workflow-group.task-menu-open {
  position: relative;
  z-index: 160;
}

.workflow-node-card.designer-workflow-node.task-menu-open {
  z-index: 180;
}

.workflow-node-card.task-menu-open .task-action-list {
  z-index: 240;
}

/* The today feed is intentionally regular-weight for fast mobile scanning. */
#officeView .office-today-section,
#officeView .office-today-section * {
  font-weight: 400 !important;
}

/* Digital-human editing template picker in IP persona templates. */
.personal-digital-human-field {
  display: grid;
  gap: 10px;
}

.personal-digital-human-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-digital-human-field-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.personal-digital-human-field-head small,
.personal-digital-human-selected small,
.personal-digital-human-empty small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.45;
}

.personal-digital-human-field-head button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  color: #2563eb;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
}

.personal-digital-human-empty,
.personal-digital-human-selected {
  min-height: 66px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.personal-digital-human-empty {
  display: grid;
  align-content: center;
  gap: 3px;
  color: #64748b;
}

.personal-digital-human-selected {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.personal-digital-human-selected > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.personal-digital-human-selected strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.personal-digital-human-selected-cover {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: #2563eb;
  background: #eaf2ff;
}

/* Custom employee workflows use a compact, chronological timeline. */
.workflow-timeline.workflow-time-list {
  position: relative;
  display: grid;
  gap: 6px;
}

.workflow-timeline-entry {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: visible;
}

.workflow-timeline-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 29px;
  top: 39px;
  bottom: -7px;
  border-left: 1px solid #dbe4f0;
}

.workflow-timeline-entry.task-menu-open {
  z-index: 180;
}

.workflow-node-card.workflow-time-node {
  position: relative;
  z-index: 1;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 6px;
  min-width: 0;
  min-height: 46px;
  padding: 6px 7px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(30, 58, 138, .045);
}

.workflow-time-node .workflow-node-time {
  height: 30px;
  border-radius: 9px;
  background: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.workflow-time-node .workflow-node-time.action {
  color: #2563eb;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

.workflow-time-node .workflow-node-main {
  cursor: pointer;
}

.workflow-time-node .workflow-node-main strong {
  font-size: 13px;
  font-weight: 600;
}

.workflow-time-node .workflow-node-main span {
  display: none;
}

.workflow-time-node.is-placeholder .workflow-node-main span {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 400;
}

.workflow-time-node .workflow-status-pill,
.workflow-time-node .workflow-node-action-menu summary,
.workflow-child-toggle {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 9px;
  font-size: 11px;
}

.workflow-time-node .workflow-node-action-menu summary,
.workflow-child-toggle {
  color: #2563eb;
  border: 0;
  background: #eff6ff;
}

.workflow-child-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.workflow-child-toggle::after,
.custom-employee-child-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.workflow-child-toggle[aria-expanded="true"]::after,
.custom-employee-child-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.workflow-child-list {
  position: relative;
  display: grid;
  gap: 4px;
  margin-left: 20px;
  padding-left: 12px;
  border-left: 1px solid #dbeafe;
}

.workflow-child-list.hidden {
  display: none !important;
}

.workflow-child-list .workflow-action-card {
  margin-left: 0;
  background: rgba(248, 250, 252, .96);
  box-shadow: none;
}

/* Lift the full branch while an action menu is open so later timeline rows cannot cover it. */
.workflow-timeline-entry.task-menu-open,
.workflow-timeline-entry:has(.task-action-menu[open]) {
  z-index: 400 !important;
}

.workflow-timeline-entry > .workflow-node-card.task-menu-open,
.workflow-timeline-entry > .workflow-node-card:has(.task-action-menu[open]),
.workflow-timeline-entry > .workflow-child-list.task-menu-open,
.workflow-timeline-entry:has(> .workflow-child-list .task-action-menu[open]) > .workflow-child-list {
  position: relative;
  z-index: 420 !important;
  overflow: visible;
}

.workflow-child-list .workflow-node-card.task-menu-open,
.workflow-child-list .workflow-node-card:has(.task-action-menu[open]) {
  z-index: 440 !important;
  overflow: visible;
}

.workflow-node-card.task-menu-open .task-action-list,
.workflow-node-card:has(.task-action-menu[open]) .task-action-list {
  z-index: 460 !important;
}

.custom-employee-node-list {
  position: relative;
  display: grid;
  gap: 5px;
}

.custom-employee-timeline-entry {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.custom-employee-timeline-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 38px;
  bottom: -6px;
  border-left: 1px solid #dbe4f0;
}

.custom-employee-node {
  position: relative;
  z-index: 1;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 6px 7px;
  border-radius: 13px;
  background: rgba(248, 250, 252, .96);
  box-shadow: none;
}

.custom-employee-node > time {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.custom-employee-node-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.custom-employee-node-copy strong,
.custom-employee-node-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-employee-node-copy strong {
  color: #102036;
  font-size: 13px;
  font-weight: 600;
}

.custom-employee-node-copy small {
  color: #7b879b;
  font-size: 10px;
  font-weight: 400;
}

.custom-employee-node-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom-employee-node-actions button,
.custom-employee-node-actions em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.custom-employee-node-actions em {
  color: #94620b;
  background: #fff8e6;
}

.custom-employee-child-toggle {
  color: #2563eb;
  border-color: #dbeafe;
  background: #eff6ff;
}

.custom-employee-child-toggle span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.custom-employee-child-list {
  display: grid;
  gap: 4px;
  margin-left: 20px;
  padding-left: 12px;
  border-left: 1px solid #dbeafe;
}

.custom-employee-child-list.hidden {
  display: none !important;
}

.custom-employee-child-node {
  background: rgba(255, 255, 255, .92);
}

@media (max-width: 380px) {
  .workflow-node-card.workflow-time-node {
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    gap: 4px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .workflow-time-node .workflow-status-pill,
  .workflow-time-node .workflow-node-action-menu summary,
  .workflow-child-toggle {
    padding-left: 6px;
    padding-right: 6px;
  }

  .custom-employee-node {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 5px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .custom-employee-node-actions button,
  .custom-employee-node-actions em {
    padding-left: 6px;
    padding-right: 6px;
  }
}

.personal-digital-human-selected-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.personal-digital-human-selected > button {
  min-height: 30px;
  padding: 0 10px;
  color: #64748b;
  background: #fff;
}

.work-segmented {
  min-height: 46px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f4f6f9;
}

.work-segmented label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.work-segmented input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.work-segmented span {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 10px;
  color: #687386;
  background: transparent;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.work-segmented input:checked + span {
  color: #172033;
  background: #fff;
  box-shadow: 0 2px 9px rgba(15, 23, 42, .09);
}

.work-segmented input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 1px;
}

.work-hifly-duration-field {
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 14px;
  background: #f8fafc;
}

.work-duration-input {
  width: min(190px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dfe5ed;
  border-radius: 12px;
  background: #fff;
}

.work-duration-input input {
  width: 100%;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.work-duration-input span {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: #657187;
  border-left: 1px solid #e5eaf1;
  background: #f8fafc;
  font-size: 12px;
}

.work-hifly-duration-field > small {
  color: #8793a6;
  font-size: 11px;
  line-height: 1.45;
}

.work-hifly-template-field {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 14px;
  background: #f8fafc;
}

.work-hifly-template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-hifly-template-head > label {
  margin: 0 !important;
}

.work-hifly-template-head > button {
  min-height: 34px;
  padding: 0 12px;
  color: #2563eb;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
}

.work-hifly-template-empty,
.work-hifly-template-selected {
  background: #fff;
}

.work-hifly-template-selected > button {
  min-height: 32px;
  color: #2563eb;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

.personal-digital-human-picker-modal {
  z-index: 190;
}

.personal-digital-human-preview-modal {
  z-index: 220;
}

.asset-picker-library-modal {
  z-index: 230;
}

.asset-picker-library-dialog.employee-popover {
  width: min(720px, calc(100vw - 24px)) !important;
  height: min(86dvh, 720px);
  max-height: min(86dvh, 720px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 18px;
  color: #0f172a;
}

.asset-picker-library-dialog::after {
  display: none;
}

.asset-picker-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 36px;
}

.asset-picker-library-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.asset-picker-library-head strong {
  font-size: 18px;
  font-weight: 500;
}

.asset-picker-library-head span,
.asset-picker-library-head em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.asset-picker-library-head em.error {
  color: #b42318;
}

.asset-picker-library-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #f1f5f9;
}

.asset-picker-library-tabs button {
  min-height: 38px;
  color: #64748b;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.asset-picker-library-tabs button.active {
  color: #1d4ed8;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.asset-picker-library-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.asset-picker-library-search input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  color: #0f172a;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  outline: 0;
  background: #f8fafc;
}

.asset-picker-library-search button {
  min-height: 42px;
}

.asset-picker-library-grid {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 3px 10px 2px;
  scrollbar-width: none;
}

.asset-picker-library-grid::-webkit-scrollbar {
  display: none;
}

.asset-picker-library-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  color: #0f172a;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .05);
}

.asset-picker-library-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .14);
}

.asset-picker-library-card.skeleton {
  min-height: 150px;
  border: 0;
  background: linear-gradient(100deg, #f1f5f9 20%, #f8fafc 36%, #f1f5f9 52%) 0 0 / 220% 100%;
  animation: personal-template-loading 1.2s linear infinite;
}

.asset-picker-library-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #64748b;
  background: #eef2f7;
}

.asset-picker-library-cover img,
.asset-picker-library-cover video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-picker-library-cover i {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  color: #1d4ed8;
  border-radius: 6px;
  background: rgba(255, 255, 255, .9);
  font-size: 10px;
  font-style: normal;
}

.asset-picker-library-play {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  border-radius: 50%;
  background: rgba(15, 23, 42, .62);
}

.asset-picker-library-empty-media {
  max-width: 100%;
  padding: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.asset-picker-library-copy {
  display: grid;
  gap: 3px;
  padding: 9px;
}

.asset-picker-library-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-picker-library-copy small {
  color: #94a3b8;
  font-size: 10px;
}

.asset-picker-library-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 13px;
}

.asset-picker-library-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 8px;
}

.asset-picker-library-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .asset-picker-library-dialog.employee-popover {
    height: min(88dvh, 700px);
    max-height: min(88dvh, 700px);
    padding: 16px;
  }

  .asset-picker-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.personal-digital-human-picker.employee-popover {
  width: min(760px, calc(100vw - 24px)) !important;
  height: min(90dvh, 780px);
  max-height: min(90dvh, 780px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: 18px;
  color: #0f172a;
}

.personal-digital-human-picker::after,
.personal-digital-human-preview::after {
  display: none;
}

.personal-digital-human-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 36px;
}

.personal-digital-human-picker-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.personal-digital-human-picker-head strong {
  color: #0f172a;
  font-size: 18px;
}

.personal-digital-human-picker-head span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.personal-digital-human-picker-head em {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: #2563eb;
  border-radius: 999px;
  background: #eff6ff;
  font-size: 11px;
  font-style: normal;
}

.personal-digital-human-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.personal-digital-human-search input {
  min-width: 0;
  min-height: 42px;
  padding: 0 13px;
  color: #0f172a;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  outline: 0;
  background: #f8fafc;
}

.personal-digital-human-search input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.personal-digital-human-search button {
  min-height: 42px;
  color: #2563eb;
  background: #eff6ff;
}

.personal-digital-human-picker-status {
  min-height: 0;
  color: #64748b;
  font-size: 12px;
}

.personal-digital-human-picker-status:empty {
  display: none;
}

.personal-digital-human-picker-status.error {
  color: #b42318;
}

.personal-digital-human-template-grid {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 3px 10px 2px;
  scrollbar-width: none;
}

.personal-digital-human-template-grid::-webkit-scrollbar {
  display: none;
}

.personal-digital-human-template-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(30, 58, 138, .05);
}

.personal-digital-human-template-card.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .14), 0 8px 20px rgba(30, 58, 138, .1);
}

.personal-digital-human-template-card:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .22);
  outline-offset: 2px;
}

.personal-digital-human-template-card.skeleton {
  min-height: 250px;
  border: 0;
  background: linear-gradient(100deg, #f1f5f9 20%, #f8fafc 36%, #f1f5f9 52%) 0 0 / 220% 100%;
  animation: personal-template-loading 1.2s linear infinite;
}

@keyframes personal-template-loading {
  to { background-position: -220% 0; }
}

.personal-digital-human-template-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #2563eb;
  background: #edf4ff;
  font-size: 20px;
}

.personal-digital-human-template-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.personal-digital-human-template-cover i {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  color: #2563eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  font-size: 10px;
  font-style: normal;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .1);
}

.personal-digital-human-template-card.selected .personal-digital-human-template-cover i {
  color: #fff;
  background: #2563eb;
}

.personal-digital-human-template-copy {
  display: grid;
  gap: 7px;
  padding: 9px;
}

.personal-digital-human-template-copy strong {
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.personal-digital-human-template-copy button,
.personal-digital-human-template-copy small {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #2563eb;
  border-radius: 9px;
  background: #eff6ff;
  font-size: 11px;
}

.personal-digital-human-template-copy small {
  color: #94a3b8;
  background: #f8fafc;
}

.personal-digital-human-picker-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.personal-digital-human-picker-actions .danger-text {
  margin-right: auto;
  color: #b42318;
  background: #fff1f2;
}

.personal-digital-human-preview.employee-popover {
  width: min(520px, calc(100vw - 28px)) !important;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 18px;
  color: #0f172a;
}

.personal-digital-human-preview > strong {
  padding-right: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-digital-human-preview video {
  width: 100%;
  max-height: 72dvh;
  display: block;
  border-radius: 16px;
  background: #0f172a;
}

@media (max-width: 619px) {
  .personal-digital-human-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .personal-digital-human-picker.employee-popover {
    height: min(92dvh, 760px);
    max-height: min(92dvh, 760px);
    padding: 15px;
  }

  .personal-digital-human-picker-head em {
    display: none;
  }

  .personal-digital-human-picker-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .personal-digital-human-picker-actions .danger-text {
    grid-column: 1 / -1;
    margin: 0;
  }
}

/* Homepage typography stays regular across titles, cards, labels, and statuses. */
#officeView,
#officeView * {
  font-weight: 400 !important;
}

/* Keep the homepage image picker square even when global button rules change. */
#officeView .designer-home-gallery {
  inline-size: 32px !important;
  block-size: 32px !important;
  min-inline-size: 32px !important;
  min-block-size: 32px !important;
  max-inline-size: 32px !important;
  max-block-size: 32px !important;
  aspect-ratio: 1 / 1;
  flex: 0 0 32px;
  box-sizing: border-box;
  padding: 0 !important;
  line-height: 1;
  border-radius: 50% !important;
  transform: none;
}

#officeView .designer-home-gallery svg {
  inline-size: 17px !important;
  block-size: 17px !important;
  min-inline-size: 17px;
  min-block-size: 17px;
}

.personal-keyword-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.personal-keyword-form > button {
  min-width: 76px;
}

/* Asset previews preserve the source aspect ratio and never widen the dialog. */
#assetPreviewDialog {
  padding: 14px;
}

#assetPreviewDialog .asset-preview-panel {
  width: min(620px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(90dvh, 820px);
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

#assetPreviewDialog .detail-modal-head,
#assetPreviewDialog .detail-modal-head > div,
#assetPreviewDialog .asset-preview-body {
  min-width: 0;
  max-width: 100%;
}

#assetPreviewDialog .detail-modal-head > div {
  flex: 1 1 auto;
}

#assetPreviewDialog .detail-modal-head > button {
  flex: 0 0 auto;
}

#assetPreviewTitle {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  font-size: clamp(18px, 5vw, 24px);
  letter-spacing: 0;
}

#assetPreviewDialog img.asset-preview-large,
#assetPreviewDialog video.asset-preview-large,
#assetPreviewDialog .content-record-cover {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 68dvh;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
}

#assetPreviewDialog video.asset-preview-large {
  width: 100%;
  min-height: 0;
  background: #0f172a;
}

#assetPreviewDialog .asset-preview-meta strong {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

/* Boss cockpit: light executive dashboard based on the supplied design. */
#secretaryView {
  background: #f0f4f8;
}

#secretaryView .secretary-shell {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 14px 12px 34px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #0f172a;
  background:
    radial-gradient(ellipse 75% 38% at 12% 16%, rgba(59, 130, 246, .09), transparent 62%),
    radial-gradient(ellipse 65% 34% at 88% 42%, rgba(34, 197, 94, .05), transparent 66%),
    linear-gradient(180deg, #eff6ff 0, #f0f4f8 340px, #f6f8fb 100%);
  box-shadow: none;
}

#secretaryView .secretary-command {
  position: relative;
  min-height: 174px;
  display: block;
  padding: 22px 18px;
  overflow: hidden;
  border: 1px solid rgba(30, 64, 175, .22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 20%, rgba(125, 211, 252, .38), transparent 35%),
    radial-gradient(circle at 16% 110%, rgba(37, 99, 235, .58), transparent 44%),
    linear-gradient(140deg, #1e40af, #1d4ed8 56%, #172554);
  box-shadow: 0 12px 30px rgba(30, 64, 175, .2);
}

#secretaryView .secretary-command::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent, #000 62%);
}

#secretaryView .secretary-command-copy {
  position: relative;
  z-index: 2;
  width: 64%;
  padding-top: 10px;
}

#secretaryView .secretary-kicker {
  color: #bfdbfe;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

#secretaryView .secretary-command h2 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: 0;
}

#secretaryView .secretary-subtitle {
  color: rgba(219, 234, 254, .88);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

#secretaryView .secretary-avatar-stage {
  position: absolute;
  right: -3px;
  bottom: -10px;
  width: 148px;
  height: 184px;
  z-index: 1;
}

#secretaryView .secretary-orbit {
  display: none;
}

#secretaryView .secretary-cockpit-img {
  position: absolute;
  left: auto;
  right: 0;
  top: auto;
  bottom: 0;
  width: auto;
  max-width: none;
  height: 194px;
  transform: none;
  object-fit: contain;
  object-position: bottom right;
  animation: none;
  filter: drop-shadow(0 14px 18px rgba(3, 13, 42, .32));
}

#secretaryView .secretary-metrics,
#secretaryView .secretary-focus,
#secretaryView .secretary-department-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

#secretaryView .secretary-metric,
#secretaryView .secretary-focus-card,
#secretaryView .secretary-dept-card,
#secretaryView .secretary-trend-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 5px 18px rgba(30, 58, 138, .065);
  backdrop-filter: blur(14px);
}

#secretaryView .secretary-metric {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 15px;
  border-radius: 18px;
}

#secretaryView .secretary-metric span,
#secretaryView .secretary-focus-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
}

#secretaryView .secretary-metric strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#secretaryView .secretary-metric.green strong { color: #10b981; }
#secretaryView .secretary-metric.blue strong { color: #2563eb; }
#secretaryView .secretary-metric.orange strong { color: #f59e0b; }
#secretaryView .secretary-metric.cyan strong { color: #0891b2; }
#secretaryView .secretary-metric.red strong { color: #f43f5e; }

#secretaryView .secretary-focus-card {
  min-height: 92px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 15px;
  overflow: hidden;
  border-radius: 18px;
}

#secretaryView .secretary-focus-card.primary {
  grid-column: 1 / -1;
  background: linear-gradient(110deg, #eff6ff, rgba(255, 255, 255, .94));
  border-color: #dbeafe;
}

#secretaryView .secretary-focus-card.danger {
  border-color: #fecdd3;
  background: rgba(255, 241, 242, .92);
}

#secretaryView .secretary-focus-card strong {
  color: #1e293b;
  font-size: 21px;
  line-height: 1.15;
}

#secretaryView .secretary-focus-card strong.up { color: #059669; }
#secretaryView .secretary-focus-card strong.down { color: #e11d48; }
#secretaryView .secretary-focus-card strong.flat { color: #2563eb; }

#secretaryView .secretary-focus-card em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

#secretaryView .secretary-section-title {
  display: flex;
  align-items: center;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 3px 2px 0;
}

#secretaryView .secretary-section-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#secretaryView .secretary-section-title strong::before {
  width: 4px;
  height: 19px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  box-shadow: none;
}

#secretaryView .secretary-map {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  background:
    linear-gradient(rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .035) 1px, transparent 1px),
    rgba(255, 255, 255, .86);
  background-size: 20px 20px;
  box-shadow: 0 5px 18px rgba(30, 58, 138, .065);
}

#secretaryView .secretary-map::before,
#secretaryView .secretary-map::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: none;
}

#secretaryView .secretary-map::before {
  width: 216px;
  height: 216px;
  inset: auto;
  border: 1px dashed rgba(59, 130, 246, .2);
}

#secretaryView .secretary-map::after {
  width: 138px;
  height: 138px;
  border: 1px solid rgba(59, 130, 246, .18);
  background: rgba(239, 246, 255, .34);
}

#secretaryView .secretary-map-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 4px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 9px 26px rgba(37, 99, 235, .28);
}

#secretaryView .secretary-map-core strong,
#secretaryView .secretary-map-core .secretary-core-img + strong {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

#secretaryView .secretary-map-core span {
  color: #dbeafe;
  font-size: 9px;
  font-weight: 650;
}

#secretaryView .secretary-core-img {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  margin-bottom: 2px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  filter: none;
}

#secretaryView .secretary-core-ring {
  display: none;
}

#secretaryView .secretary-map-node {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  z-index: 4;
  min-width: 66px;
  min-height: 58px;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #64748b;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  animation: none;
}

#secretaryView .secretary-map-node span {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

#secretaryView .secretary-map-node strong {
  min-width: 50px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 9px;
  color: #1e293b;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 12px rgba(30, 58, 138, .09);
  font-size: 16px;
}

#secretaryView .secretary-map-node.active strong { color: #059669; }
#secretaryView .secretary-map-node.alert strong { color: #e11d48; }

#secretaryView .secretary-trend-panel {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: end;
  padding: 17px;
  border-radius: 20px;
}

#secretaryView .secretary-trend-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: start;
}

#secretaryView .secretary-trend-copy strong {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

#secretaryView .secretary-trend-copy em {
  padding: 3px 7px;
  color: #94a3b8;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 10px;
  font-style: normal;
}

#secretaryView .secretary-trend-copy span {
  grid-column: 1 / -1;
  color: #1e293b;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

#secretaryView .secretary-trend-copy span.up { color: #059669; }
#secretaryView .secretary-trend-copy span.down { color: #e11d48; }
#secretaryView .secretary-trend-copy span.flat { color: #1e293b; }

#secretaryView .secretary-sparkline,
#secretaryView .secretary-dept-sparkline {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 48px;
  padding-bottom: 2px;
  border-bottom: 2px solid #e2e8f0;
}

#secretaryView .secretary-sparkline i,
#secretaryView .secretary-dept-sparkline i {
  flex: 1 1 0;
  min-width: 5px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  box-shadow: none;
  animation: secretary-bar-in .55s ease both;
  animation-delay: var(--bar-delay, 0s);
}

#secretaryView .secretary-dept-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border-radius: 18px;
  color: #1e293b;
  text-align: left;
}

#secretaryView .secretary-dept-card.active { border-color: #bbf7d0; }
#secretaryView .secretary-dept-card.alert { border-color: #fecdd3; background: rgba(255, 247, 248, .94); }

#secretaryView .secretary-dept-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

#secretaryView .secretary-dept-head > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  border-radius: 50%;
  background: #eff6ff;
  font-size: 11px;
  font-weight: 800;
}

#secretaryView .secretary-dept-head strong {
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

#secretaryView .secretary-dept-head em {
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

#secretaryView .secretary-dept-head em.up { color: #059669; }
#secretaryView .secretary-dept-head em.down { color: #e11d48; }
#secretaryView .secretary-dept-head em.flat { color: #94a3b8; }

#secretaryView .secretary-dept-radar {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f5f9;
}

#secretaryView .secretary-dept-radar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
  box-shadow: none;
  animation: secretary-scan .8s ease both;
}

#secretaryView .secretary-dept-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

#secretaryView .secretary-dept-data b {
  display: grid;
  gap: 2px;
  padding: 0;
  color: #1e293b;
  background: transparent;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#secretaryView .secretary-dept-data em {
  color: #94a3b8;
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

#secretaryView .secretary-dept-sparkline {
  min-height: 26px;
  gap: 4px;
  border-bottom-width: 1px;
}

#secretaryView .secretary-dept-sparkline i {
  background: linear-gradient(180deg, #93c5fd, #3b82f6);
}

#secretaryView .secretary-dept-foot {
  display: grid;
  gap: 3px;
  padding: 8px;
  color: #64748b;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 500;
}

#secretaryView .secretary-dept-foot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 380px) {
  #secretaryView .secretary-shell {
    padding-inline: 9px;
  }

  #secretaryView .secretary-command {
    min-height: 166px;
    padding-inline: 15px;
  }

  #secretaryView .secretary-avatar-stage {
    right: -12px;
  }

  #secretaryView .secretary-department-grid {
    gap: 8px;
  }

  #secretaryView .secretary-dept-card {
    padding: 10px;
  }

  #assetPreviewDialog .asset-preview-panel {
    padding: 18px;
  }
}

/* AI marketing V1.1 package restoration */
#officeView .marketing-creation-section {
  display: grid;
  gap: 12px;
}

#officeView .marketing-creation-section .office-section-head {
  margin-bottom: 0;
}

#officeView .marketing-creation-subtitle {
  margin: -5px 0 2px 18px;
  color: #7b8799;
  font-size: 11px;
  line-height: 1.4;
}

#officeView .home-marketing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#officeView .home-marketing-card {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .72);
  border-radius: 22px;
  color: #172033;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px rgba(30, 58, 138, .08);
  text-align: left;
}

#officeView .home-marketing-card.digital-human,
#officeView .home-marketing-card.copy {
  grid-column: 1 / -1;
  min-height: 86px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

#officeView .home-marketing-card.digital-human {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, #244bd4, #2d74ef);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

#officeView .home-marketing-card > span:not(.home-marketing-icon) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#officeView .home-marketing-card strong,
#officeView .home-marketing-card small {
  display: block;
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
}

#officeView .home-marketing-card strong {
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
}

#officeView .home-marketing-card small {
  color: #8994a6;
  font-size: 10px;
  line-height: 1.45;
  white-space: normal;
}

#officeView .home-marketing-card.digital-human small {
  color: rgba(255, 255, 255, .82);
}

#officeView .home-marketing-card > b {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

#officeView .home-marketing-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #286df0;
  background: #edf4ff;
}

#officeView .home-marketing-card.video .home-marketing-icon {
  color: #396fe7;
  background: #eaf1ff;
}

#officeView .home-marketing-card.design .home-marketing-icon {
  color: #5068e8;
  background: #eef0ff;
}

#officeView .home-marketing-card.copy .home-marketing-icon {
  color: #12a9cc;
  background: #e9faff;
}

#officeView .home-marketing-card.digital-human .home-marketing-icon {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

#officeView .home-marketing-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#departmentView .department-skill-grid.marketing-creation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px;
}

#departmentView .marketing-entry-card {
  min-width: 0;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .76);
  border-radius: 22px;
  color: #172033;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 26px rgba(30, 58, 138, .08);
  text-align: left;
}

#departmentView .marketing-entry-card.digital-human,
#departmentView .marketing-entry-card.copy {
  grid-column: 1 / -1;
  min-height: 88px;
  flex-direction: row;
  align-items: center;
}

#departmentView .marketing-entry-card.digital-human {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, #244bd4, #2d74ef);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .24);
}

#departmentView .marketing-entry-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #286df0;
  background: #edf4ff;
}

#departmentView .marketing-entry-card.copy .marketing-entry-icon {
  color: #12a9cc;
  background: #e9faff;
}

#departmentView .marketing-entry-card.digital-human .marketing-entry-icon {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}

#departmentView .marketing-entry-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

#departmentView .marketing-entry-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#departmentView .marketing-entry-copy strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#departmentView .marketing-entry-copy small {
  color: #8994a6;
  font-size: 10px;
  line-height: 1.45;
}

/* Designer refresh: home marketing, employee workflow, work history and profile. */
#officeView .marketing-creation-section {
  position: relative;
  gap: 12px;
  padding: 24px 20px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(246, 249, 255, .3), rgba(231, 239, 250, .4)),
    url("/h5-static/designer-ai-marketing-bg.png") center / cover no-repeat;
  box-shadow: 0 14px 34px rgba(30, 58, 138, .12);
}

#officeView .marketing-creation-section .office-section-head,
#officeView .marketing-creation-subtitle,
#officeView .home-marketing-grid {
  position: relative;
  z-index: 1;
}

#officeView .marketing-creation-section .office-section-head {
  padding: 0;
}

#officeView .marketing-creation-section .office-section-head h2 {
  font-size: 20px;
  font-weight: 800;
}

#officeView .marketing-creation-subtitle {
  margin: -4px 0 8px 18px;
  color: #334155;
  font-size: 11px;
}

#officeView .home-marketing-grid {
  gap: 10px;
}

#officeView .home-marketing-card {
  min-height: 126px;
  padding: 16px;
  border-color: rgba(255, 255, 255, .88);
  border-radius: 20px;
  background: rgba(248, 251, 255, .92);
  box-shadow: 0 8px 22px rgba(43, 76, 130, .1);
  backdrop-filter: blur(10px);
}

#officeView .home-marketing-card.digital-human,
#officeView .home-marketing-card.copy {
  min-height: 88px;
}

#officeView .home-marketing-card.digital-human {
  border: 2px solid rgba(255, 255, 255, .76);
  background: linear-gradient(112deg, #2253de, #286ce8);
}

#officeView .home-marketing-card.copy {
  background: rgba(244, 249, 255, .94);
}

#workflowView .workflow-shell {
  display: grid;
  gap: 14px;
  padding-top: 0;
  padding-bottom: 28px;
}

#workflowView .workflow-control-card,
#workflowView .workflow-day-board,
#workflowView .workflow-editor-card {
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(30, 58, 138, .07);
  backdrop-filter: blur(14px);
}

#workflowView .workflow-control-card {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 12px;
}

#workflowView .workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#workflowView .workflow-device-box {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#workflowView .workflow-device-box label {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

#workflowView .workflow-device-box select {
  min-width: 0;
  min-height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: #475569;
  background-color: #fff;
  font-size: 12px;
}

#workflowView #workflowActiveText {
  grid-column: 1 / -1;
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 8px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workflowView .workflow-operation-menu {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
}

#workflowView .workflow-operation-menu > summary {
  min-width: 72px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
  border: 1px solid #dbe4f0;
  border-radius: 11px;
  color: #334155;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
  user-select: none;
}

#workflowView .workflow-operation-menu > summary::-webkit-details-marker {
  display: none;
}

#workflowView .workflow-operation-menu > summary::after {
  content: "⌄";
  color: #64748b;
  font-size: 14px;
  line-height: 1;
}

#workflowView .workflow-operation-menu[open] > summary {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

#workflowView .workflow-operation-menu[open] > summary::after {
  transform: rotate(180deg);
}

#workflowView .workflow-operation-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 220;
  width: 176px;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

#workflowView .workflow-operation-list button {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 11px;
  color: #334155;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  text-align: left;
}

#workflowView .workflow-operation-list button:active {
  background: #f1f5f9;
}

#workflowView .workflow-operation-list #workflowActivateBtn {
  color: #fff;
  background: #2563eb;
}

#workflowView .workflow-operation-list .danger-text {
  color: #dc2626;
}

#workflowView .workflow-operation-list .danger-text:active {
  background: #fef2f2;
}

#workflowView .workflow-actions {
  position: static !important;
  inset: auto !important;
  z-index: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, .72fr);
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#workflowView .workflow-actions button {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 12px;
  white-space: nowrap;
}

#workflowView .workflow-actions #workflowActivateBtn {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .22);
}

#workflowView .workflow-head-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#workflowView .workflow-head-actions button {
  min-height: 36px;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
}

#workflowView .workflow-head-actions #workflowOpenAddNodeBtn::before {
  content: "+";
  margin-right: 6px;
  color: #2563eb;
  font-size: 16px;
}

#workflowView .workflow-head-actions #workflowTemplateListBtn::before {
  content: "≡";
  margin-right: 6px;
  color: #2563eb;
  font-size: 15px;
}

#workflowView .workflow-day-board {
  padding: 14px 12px 16px;
}

#workflowView .workflow-calendar-month {
  display: block;
  margin: 0 0 14px 2px;
  color: #1e293b;
  font-size: 15px;
  font-weight: 700;
}

#workflowView .workflow-calendar-weekdays,
#workflowView .workflow-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px 4px;
}

#workflowView .workflow-calendar-weekdays {
  margin-bottom: 7px;
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}

#workflowView .workflow-calendar-days {
  padding: 0;
  overflow: visible;
}

#workflowView .workflow-calendar-day,
#workflowView .workflow-calendar-blank {
  width: 100%;
  min-width: 0;
  min-height: 34px;
}

#workflowView .workflow-calendar-day {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #334155;
  background: transparent;
  box-shadow: none;
  aspect-ratio: 1;
}

#workflowView .workflow-calendar-day strong {
  font-size: 11px;
  font-weight: 500;
}

#workflowView .workflow-calendar-day.today:not(.active) {
  color: #2563eb;
  background: #eff6ff;
}

#workflowView .workflow-calendar-day.active {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .24);
}

#workflowView .workflow-editor-card {
  padding: 13px;
}

#workflowView .workflow-template-name label {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

#workflowView .workflow-template-name input {
  min-height: 42px;
  border-color: #e8edf4;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
}

#workListView .work-shell {
  display: grid;
  gap: 18px;
  padding: 2px 0 92px;
}

#workListView .work-filter-bar {
  gap: 13px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 26px;
  background:
    radial-gradient(circle at 110% -20%, rgba(191, 219, 254, .34), transparent 42%),
    rgba(255, 255, 255, .94);
  box-shadow: 0 10px 28px rgba(30, 58, 138, .07);
}

#workListView .work-filter-bar strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
}

#workListView .work-filter-bar span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

#workListView .work-scope-chips {
  gap: 7px;
  padding: 0;
}

#workListView .work-scope-chips button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  color: #64748b;
  background: #eff4fb;
  font-size: 12px;
  font-weight: 600;
}

#workListView .work-scope-chips button.active {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .2);
}

#workListView .work-timeline {
  gap: 0;
  padding: 2px 0 0;
}

#workListView .work-node {
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 22px;
}

#workListView .work-time {
  gap: 5px;
  padding-top: 15px;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
}

#workListView .work-time strong {
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
}

#workListView .work-time span {
  max-width: 64px;
  font-size: 9px;
}

#workListView .work-time::after {
  right: -15px;
  top: 16px;
  width: 10px;
  height: 10px;
  background: #2563eb;
  box-shadow: 0 0 0 4px #f0f4f8;
}

#workListView .work-time::before {
  right: -11px;
  top: 26px;
  bottom: -1px;
  width: 1px;
  background: #d9e4f3;
}

#workListView .work-node:last-child .work-time::before {
  display: none;
}

#workListView .work-card {
  gap: 9px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-left-width: 1px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(30, 58, 138, .065);
}

#workListView .work-card.current,
#workListView .work-card.future,
#workListView .work-card.scheduled,
#workListView .work-card.done,
#workListView .work-card.failed {
  border-left-width: 1px;
}

#workListView .work-card-title {
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

#workListView .work-badge {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

#workListView .work-meta {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow-wrap: anywhere;
}

#workListView .work-list-load-state {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
}

#workListView .work-list-load-state.loading {
  color: #2563eb;
}

#workListView .work-list-load-state.failed {
  color: #e97316;
}

#profileView .profile-grid {
  display: grid;
  gap: 14px;
  padding: 2px 0 92px;
}

#profileView .profile-head {
  min-height: 92px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #2f6cf2, #3746ef);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .2);
}

#profileView .profile-credit-summary {
  min-width: 76px;
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  justify-content: end;
  column-gap: 4px;
  color: #fff;
  text-align: right;
}

#profileView .profile-credit-summary > span {
  align-self: center;
  color: #bfdbfe;
  font-size: 15px;
}

#profileView .profile-credit-summary > span svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

#profileView .profile-credit-summary > strong {
  max-width: 108px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 500;
  text-overflow: ellipsis;
}

#profileView .profile-credit-summary > small {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 9px;
}

@media (max-width: 360px) {
  #profileView .profile-head {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 15px;
  }

  #profileView .profile-head .profile-avatar {
    width: 46px;
    height: 46px;
  }

  #profileView .profile-credit-summary {
    min-width: 62px;
  }
}

#profileView .profile-avatar {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, .08);
  font-size: 20px;
  font-weight: 600;
}

#profileView .profile-identity {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

#profileView .profile-device-picker {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

#profileView .profile-device-picker > span {
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  white-space: nowrap;
}

#profileView .profile-device-picker .device-select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 28px 0 9px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  color: #fff;
  background-color: rgba(255, 255, 255, .14);
  font-size: 11px;
  font-weight: 600;
}

#profileView .profile-device-picker .device-select option {
  color: #102036;
  background: #fff;
}

#profileView .profile-head h2 {
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profileView .profile-head .hint {
  color: rgba(255, 255, 255, .84);
  font-size: 10px;
}

#profileView .profile-head .hint::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: #34d399;
  vertical-align: 1px;
}

#profileView .settings {
  display: grid;
  gap: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 28px rgba(30, 58, 138, .06);
}

#profileView .setting-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#profileView .setting-row + .setting-row,
#profileView .profile-entry + .profile-entry {
  border-top: 1px solid #f1f5f9;
}

#profileView .profile-setting-icon,
#profileView .profile-entry-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #64748b;
  background: #f1f5f9;
}

#profileView .profile-setting-icon svg,
#profileView .profile-entry-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#profileView .setting-row strong,
#profileView .profile-entry strong {
  color: #1e293b;
  font-size: 13px;
  font-weight: 500;
}

#profileView .setting-row .hint,
#profileView .profile-entry small {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
}

#profileView .setting-row button,
#profileView .profile-entry > b {
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  background: #fff;
  box-shadow: none;
  font-size: 10px;
  font-weight: 500;
}

#profileView .setting-row .profile-preference-switch {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #cbd5e1;
  transition: background-color .18s ease;
}

#profileView .profile-preference-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
  transition: transform .18s ease;
}

#profileView .profile-preference-switch.is-on {
  background: #2563eb;
}

#profileView .profile-preference-switch.is-on span {
  transform: translateX(18px);
}

#profileView .profile-preference-switch:disabled {
  opacity: .55;
}

#profileView .speech-voice-controls {
  max-width: 154px;
  display: flex;
  align-items: center;
  gap: 5px;
}

#profileView .profile-language-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#profileView .profile-language-controls select {
  width: 116px;
  height: 32px;
  padding: 0 24px 0 9px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #475569;
  background: #fff;
  font-size: 11px;
}

#profileView .speech-voice-controls select {
  min-width: 0;
  width: 116px;
  height: 32px;
  padding: 0 24px 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #475569;
  background: #fff;
  font-size: 10px;
  text-overflow: ellipsis;
}

#profileView .setting-row .speech-voice-controls button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
}

#profileView .speech-voice-controls button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

#profileView .profile-account-actions > .danger {
  min-height: 44px;
  margin: 4px 6px 0;
  border-top: 1px solid #f1f5f9;
  border-radius: 0;
  color: #f43f5e;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

#profileView .profile-entry {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#profileView .profile-entry > span:not(.profile-entry-icon) {
  min-width: 0;
}

#profileView .profile-entry > b {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  color: #2563eb;
  border: 0;
  background: #eff6ff;
  font-style: normal;
}

#profileView .agent-profile-entry {
  opacity: 1;
}

#profileView .profile-entry-icon.tone-blue { color: #2563eb; background: #eff6ff; }
#profileView .profile-entry-icon.tone-purple { color: #8b5cf6; background: #f5f3ff; }
#profileView .profile-entry-icon.tone-orange { color: #f59e0b; background: #fffbeb; }
#profileView .profile-entry-icon.tone-green { color: #10b981; background: #ecfdf5; }
#profileView .profile-entry-icon.tone-slate { color: #94a3b8; background: #f1f5f9; }

@media (max-width: 380px) {
  #officeView .marketing-creation-section {
    padding: 20px 14px 16px;
  }

  #workflowView .workflow-device-box {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #workflowView #workflowActiveText {
    grid-column: 1 / -1;
    max-width: 100%;
    justify-self: start;
  }

  #workListView .work-node {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
  }

  #workListView .work-card {
    padding: 14px;
  }

  #profileView .setting-row,
  #profileView .profile-entry {
    padding-inline: 10px;
  }
}

#departmentView .marketing-entry-card.digital-human small {
  color: rgba(255, 255, 255, .82);
}

#departmentView .marketing-entry-card > b {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

#abilityView .ability-shell.marketing-category-mode,
#abilityView .ability-shell.marketing-tool-mode {
  padding-top: 2px;
}

#abilityView .ability-shell.marketing-category-mode > .department-hero,
#abilityView .ability-shell.marketing-category-mode > .department-breadcrumb,
#abilityView .ability-shell.marketing-category-mode > .ability-workbench,
#abilityView .ability-shell.marketing-tool-mode > .department-hero,
#abilityView .ability-shell.marketing-tool-mode > .department-breadcrumb,
#abilityView .ability-shell.marketing-tool-mode > .ability-child-grid {
  display: none !important;
}

#abilityView .ability-shell.marketing-category-mode > .ability-child-grid {
  grid-template-columns: 1fr !important;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
}

#abilityView .marketing-category-mode .department-skill-card.designer-ability-card {
  min-height: 0;
  height: fit-content;
  align-self: start;
  padding: 8px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 58, 138, .09);
}

#abilityView .designer-ability-art.has-cover {
  height: auto;
  aspect-ratio: 1400 / 682;
  background: #eaf0f8;
}

#abilityView .designer-ability-art.has-cover::before,
#abilityView .designer-ability-art.has-cover::after {
  display: none;
}

#abilityView .designer-ability-art.has-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

#abilityView .marketing-category-mode .designer-ability-meta {
  min-height: 48px;
  padding: 10px 8px 2px;
}

#abilityView .marketing-category-mode .designer-ability-meta h3 {
  font-size: 15px;
}

#abilityView .marketing-category-mode .designer-ability-meta > strong {
  padding: 4px 10px;
  font-size: 11px;
}

#abilityView .ability-shell.marketing-tool-mode > .ability-workbench {
  display: grid;
  gap: 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(30, 58, 138, .09);
}

#abilityView .marketing-tool-mode .ability-workbench-head {
  flex-direction: row;
  align-items: center;
}

#abilityView .marketing-tool-mode .ability-workbench-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  line-height: 1.35;
}

#abilityView .marketing-tool-mode .ability-workbench-badge {
  min-height: 28px;
  color: #159370;
  background: #eafbf5;
  font-size: 11px;
}

#abilityView .marketing-tool-mode .ability-workbench-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
}

#abilityView .marketing-tool-mode .ability-workbench-fields .field > label {
  margin-bottom: 7px;
  color: #5d697b;
  font-size: 12px;
  font-weight: 600;
}

#abilityView .marketing-tool-mode .ability-workbench-fields input,
#abilityView .marketing-tool-mode .ability-workbench-fields select,
#abilityView .marketing-tool-mode .ability-workbench-fields textarea,
#abilityView .marketing-tool-mode .asset-picker-actions > button,
#abilityView .marketing-tool-mode .asset-picker-row button {
  min-height: 48px;
  border-color: #e4e9f1;
  border-radius: 14px;
  color: #263247;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
}

#abilityView .marketing-tool-mode .ability-workbench-fields textarea {
  min-height: 112px;
}

#abilityView .marketing-tool-mode .ability-workbench-fields .task-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  width: 100%;
}

#abilityView .marketing-tool-mode .ability-workbench-fields .task-checkbox {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 42px !important;
  padding: 8px 10px;
  gap: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #334155 !important;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .035);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

#abilityView .marketing-tool-mode .ability-workbench-fields .task-checkbox input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  background: initial;
  box-shadow: none;
  accent-color: #286df0;
  appearance: auto;
  -webkit-appearance: checkbox;
}

#abilityView .marketing-tool-mode .ability-workbench-fields .task-checkbox span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-advanced-settings {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
  margin: 2px 0 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.ability-workbench-fields > .task-advanced-settings,
.work-dispatch-fields > .task-advanced-settings,
.workflow-param-dynamic > .task-advanced-settings,
.task-param-fields > .task-advanced-settings {
  grid-column: 1 / -1;
  width: 100%;
}

.task-advanced-settings > summary {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  gap: 10px;
  color: #334155;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.task-advanced-settings > summary::-webkit-details-marker {
  display: none;
}

.task-advanced-settings > summary::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.task-advanced-settings[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.task-advanced-settings > summary span {
  font-size: 13px;
  font-weight: 650;
}

.task-advanced-settings > summary small {
  min-width: 0;
  overflow: hidden;
  color: #8491a5;
  font-size: 11px;
  font-weight: 400;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
  gap: 14px 10px;
  border-top: 1px solid #e7ebf0;
  background: #fff;
}

.task-advanced-grid > .field {
  min-width: 0;
  margin: 0;
}

.task-advanced-grid > .field.full {
  grid-column: 1 / -1;
}

.local-persona-status {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.field.local-persona-locked {
  opacity: .72;
}

.field.local-persona-locked :is(input, select, textarea, button) {
  cursor: not-allowed;
}

.ip-template-select-row {
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
}

.ip-template-select-row select {
  min-width: 0;
}

.ip-template-select-row button {
  min-width: 92px;
}

.ip-daily-task-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-checkbox.ip-daily-task-option,
.task-checkbox.ip-daily-sync-option {
  min-width: 0;
  min-height: 42px;
  gap: 9px;
  color: #334155;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.task-checkbox.ip-daily-task-option {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .035);
}

.task-checkbox.ip-daily-sync-option {
  width: fit-content;
  padding: 0 2px;
}

.task-checkbox.ip-daily-task-option input[type="checkbox"],
.task-checkbox.ip-daily-sync-option input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  box-shadow: none;
  accent-color: #286df0;
  appearance: auto;
  -webkit-appearance: checkbox;
}

.task-checkbox.ip-daily-task-option span,
.task-checkbox.ip-daily-sync-option span {
  min-width: 0;
  white-space: nowrap;
}

#abilityView .marketing-tool-mode .ability-workbench-actions button {
  width: auto !important;
  min-width: 132px;
  min-height: 48px;
  margin-left: auto;
  border-radius: 22px;
  background: #286df0;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

#abilityWorkbench[data-workbench-key="publish_center"] {
  gap: 14px !important;
  padding: 16px !important;
  border-radius: 16px !important;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-head {
  min-width: 0;
  gap: 10px;
  align-items: center;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-head > div {
  min-width: 0;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-head h3 {
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 500;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-badge {
  flex: 0 0 auto;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields {
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields .field,
#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields .field.full {
  grid-column: 1;
  min-width: 0;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields input,
#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields select,
#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields textarea,
#abilityWorkbench[data-workbench-key="publish_center"] .asset-picker-row button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 12px;
  box-shadow: none;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-fields textarea {
  min-height: 96px;
}

#abilityWorkbench[data-workbench-key="publish_center"] .asset-picker-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#abilityWorkbench[data-workbench-key="publish_center"] .asset-picker-preview {
  margin-top: 8px;
}

#abilityWorkbench[data-workbench-key="publish_center"] .task-checkbox {
  display: flex;
  width: 100%;
  min-height: 44px !important;
  padding: 10px 12px;
  gap: 10px;
  border: 1px solid #e4e9f1;
  border-radius: 12px;
  color: #46516a !important;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

#abilityWorkbench[data-workbench-key="publish_center"] .task-checkbox input[type="checkbox"] {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  box-shadow: none;
  accent-color: #286df0;
  appearance: auto;
  -webkit-appearance: checkbox;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-schedule-panel {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #edf0f5;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-schedule-head span {
  display: none;
}

#abilityWorkbench[data-workbench-key="publish_center"] .ability-workbench-actions button {
  width: 100% !important;
  min-height: 46px;
  margin: 0;
  border-radius: 12px;
}

.workflow-plan-day-popover {
  max-width: 420px;
}

#workflowPlanDayModal {
  top: var(--workflow-plan-viewport-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 320;
  box-sizing: border-box;
  height: var(--workflow-plan-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
  padding: max(10px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom));
}

#workflowPlanDayModal.keyboard-open {
  place-items: start center;
}

#workflowPlanDayModal .workflow-plan-day-popover {
  max-height: calc(var(--workflow-plan-viewport-height, 100dvh) - 20px);
  overscroll-behavior: contain;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-padding-block: 18px 72px;
}

.workflow-plan-day-popover form,
.workflow-plan-day-popover .field {
  display: grid;
  gap: 10px;
}

.workflow-plan-day-popover input {
  min-height: 48px;
  font-size: 18px;
  font-weight: 400;
}

.workflow-plan-day-popover small {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
}

#workflowPlanDayModal .workflow-plan-day-popover .work-dispatch-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 2px -4px -4px;
  padding: 12px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .98) 30%);
}

#workflowView .workflow-template-drawer {
  z-index: 300;
  isolation: isolate;
}

main.shell:has(#contentRecordsView.active) #pageTitle,
#contentRecordsView .content-record-tabs button,
#contentRecordsView .designer-media-meta strong,
#assetPreviewDialog .asset-preview-text,
#assetPreviewDialog .content-record-summary,
#assetPreviewDialog .content-record-article-body {
  font-weight: 400 !important;
}

@media (max-width: 380px) {
  #officeView .home-marketing-grid,
  #departmentView .department-skill-grid.marketing-creation-grid {
    gap: 10px;
  }

  #officeView .home-marketing-card,
  #departmentView .marketing-entry-card {
    padding: 14px;
  }

  #abilityView .ability-shell.marketing-tool-mode > .ability-workbench {
    padding: 18px;
  }

  .ip-daily-task-options {
    grid-template-columns: 1fr;
  }
}

/* Sales activation prerequisites use a dedicated sheet instead of employee-card styling. */
#workflowMissingModal {
  overflow: hidden;
}

#workflowMissingModal .workflow-missing-popover {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  max-width: 100%;
  max-height: min(76dvh, 620px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  color: #172033;
  border: 1px solid #e5e9f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .2);
  backdrop-filter: none;
}

#workflowMissingModal .workflow-missing-popover::after {
  display: none;
}

#workflowMissingModal .employee-popover-close {
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  color: #6f7887;
  border-radius: 50%;
  background: #f2f4f7;
  font-size: 19px;
  line-height: 1;
}

#workflowMissingModal .workflow-missing-head {
  gap: 12px;
  padding-right: 42px;
}

#workflowMissingModal .workflow-missing-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #c45b27;
  border: 1px solid #f4d8c8;
  border-radius: 14px;
  background: #fff5ee;
  font-size: 20px;
  font-weight: 500 !important;
}

#workflowMissingModal .employee-popover-title {
  gap: 5px;
}

#workflowMissingModal .employee-popover-title strong {
  overflow: visible;
  color: #172033;
  font-size: 18px;
  font-weight: 500 !important;
  line-height: 1.35;
  white-space: normal;
}

#workflowMissingModal .employee-popover-title span {
  color: #7b8493;
  font-size: 12px;
  line-height: 1.5;
}

#workflowMissingModal .workflow-missing-body {
  min-height: 0;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

#workflowMissingModal .workflow-missing-list {
  box-sizing: border-box;
  width: 100%;
  max-height: min(44dvh, 360px);
  margin: 0;
  padding: 0 2px 0 0;
  display: grid;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#workflowMissingModal .workflow-missing-list li {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e6eaf0;
  border-radius: 12px;
  background: #f8f9fb;
}

#workflowMissingModal .workflow-missing-list li::before {
  width: 26px;
  height: 26px;
  color: #315efb;
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 500 !important;
}

#workflowMissingModal .workflow-missing-list span {
  min-width: 0;
  color: #252d3a;
  font-size: 14px;
  font-weight: 400 !important;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#workflowMissingModal .workflow-missing-list button {
  min-width: 76px;
  min-height: 34px;
  padding: 0 12px;
  color: #315efb;
  border: 1px solid #d9e1ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400 !important;
  white-space: nowrap;
}

#workflowMissingModal .workflow-missing-actions {
  margin: 0;
  padding-top: 2px;
  display: block;
}

#workflowMissingModal .workflow-missing-actions button {
  width: 100%;
  min-height: 44px;
  color: #566171;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  font-weight: 400 !important;
}

@media (max-width: 640px) {
  #workflowMissingModal {
    place-items: end center;
    padding: 12px 0 0;
  }

  #workflowMissingModal .workflow-missing-popover {
    width: 100%;
    max-width: 100%;
    max-height: min(82dvh, 680px);
    padding: 20px 18px max(18px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 360px) {
  #workflowMissingModal .workflow-missing-list li {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  #workflowMissingModal .workflow-missing-list button {
    grid-column: 2;
    justify-self: start;
  }
}

/* Hikong (OEM 0400) homepage: align with the Douyin lead-generation palette. */
html[data-brand="hikong"] #officeView .office-dashboard {
  margin-right: -20px;
  margin-left: -20px;
  padding-right: 20px;
  padding-left: 20px;
  background:
    linear-gradient(180deg, #eaf7fb 0%, #f7fbfd 44%, #edf6fb 100%);
}

html[data-brand="hikong"] #officeView .office-secretary-hero {
  background: linear-gradient(135deg, #0b1a3a 0%, #1a3fa3 56%, #13b7d8 100%);
  box-shadow: 0 16px 36px rgba(11, 26, 58, .24);
}

html[data-brand="hikong"] #officeView .designer-home-hero-shade {
  background: linear-gradient(135deg, rgba(11, 26, 58, .62) 0%, rgba(26, 63, 163, .48) 56%, rgba(19, 183, 216, .28) 100%);
}

html[data-brand="hikong"] #officeView .office-hero-copy > .designer-home-eyebrow {
  color: #c8f4fb;
}

html[data-brand="hikong"] #officeView .office-hero-chips em,
html[data-brand="hikong"] #officeView .designer-home-gallery {
  border-color: rgba(190, 243, 252, .38);
  background: rgba(7, 35, 76, .34);
}

html[data-brand="hikong"] #officeView .office-shortcuts {
  border: 1px solid rgba(19, 183, 216, .12);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(11, 26, 58, .08);
}

html[data-brand="hikong"] #officeView .office-shortcut-icon {
  color: #1a3fa3;
  background: linear-gradient(145deg, #edf2ff, #dfe9ff);
}

html[data-brand="hikong"] #officeView .office-shortcuts button:nth-child(2) .office-shortcut-icon {
  color: #087f9d;
  background: linear-gradient(145deg, #eafcff, #d7f5fa);
}

html[data-brand="hikong"] #officeView .office-shortcuts button:nth-child(3) .office-shortcut-icon {
  color: #0b1a3a;
  background: linear-gradient(145deg, #f1f5f9, #e4ebf3);
}

html[data-brand="hikong"] #officeView .office-shortcuts button:nth-child(4) .office-shortcut-icon {
  color: #2167bd;
  background: linear-gradient(145deg, #eef7ff, #dcecff);
}

html[data-brand="hikong"] #officeView .office-shortcuts button:nth-child(5) .office-shortcut-icon {
  color: #0a8ca8;
  background: linear-gradient(145deg, #e8fbfd, #d8f2f7);
}

html[data-brand="hikong"] #officeView .office-section-head h2 {
  color: #0b1a3a;
}

html[data-brand="hikong"] #officeView .office-section-head h2::before {
  background: linear-gradient(180deg, #13b7d8, #1a3fa3);
}

html[data-brand="hikong"] #officeView .office-section-head h2 span {
  color: #1a3fa3;
  background: #e7f5fb;
}

html[data-brand="hikong"] #officeView .office-section-head button {
  background: linear-gradient(135deg, #1a3fa3, #138dbb);
  box-shadow: 0 8px 20px rgba(26, 63, 163, .2);
}

html[data-brand="hikong"] #officeView .office-employee-card,
html[data-brand="hikong"] #officeView .office-recent-item,
html[data-brand="hikong"] #officeView .office-recent-empty {
  border: 1px solid rgba(19, 183, 216, .1);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 22px rgba(11, 26, 58, .07);
}

html[data-brand="hikong"] #officeView .office-employee-card.active .office-employee-info em {
  color: #0a9fbe;
}

html[data-brand="hikong"] #officeView .marketing-creation-section {
  border-color: rgba(255, 255, 255, .38);
  background:
    linear-gradient(135deg, rgba(11, 26, 58, .97) 0%, rgba(26, 63, 163, .91) 54%, rgba(19, 183, 216, .84) 100%),
    url("/h5-static/designer-ai-marketing-bg.png") center / cover no-repeat;
  box-shadow: 0 18px 38px rgba(11, 26, 58, .22);
}

html[data-brand="hikong"] #officeView .marketing-creation-section .office-section-head h2,
html[data-brand="hikong"] #officeView .marketing-creation-subtitle {
  color: #fff;
}

html[data-brand="hikong"] #officeView .marketing-creation-section .office-section-head h2::before {
  background: linear-gradient(180deg, #7be6f5, #13b7d8);
}

html[data-brand="hikong"] #officeView .home-marketing-card {
  border-color: rgba(255, 255, 255, .74);
  background: rgba(249, 253, 255, .94);
  box-shadow: 0 9px 24px rgba(6, 26, 66, .16);
}

html[data-brand="hikong"] #officeView .home-marketing-card.digital-human {
  border-color: rgba(190, 243, 252, .44);
  background: linear-gradient(112deg, #17378d, #1686b7 72%, #13b7d8);
}

html[data-brand="hikong"] #officeView .home-marketing-card.copy {
  background: rgba(242, 251, 254, .96);
}

html[data-brand="hikong"] #officeView .home-marketing-icon,
html[data-brand="hikong"] #officeView .home-marketing-card.video .home-marketing-icon,
html[data-brand="hikong"] #officeView .home-marketing-card.design .home-marketing-icon,
html[data-brand="hikong"] #officeView .home-marketing-card.copy .home-marketing-icon {
  color: #138dbb;
  background: #e6f7fb;
}

html[data-brand="hikong"] #officeView .home-marketing-card.digital-human .home-marketing-icon {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

/* Upload dialogs share one stable layout across every H5 entry point. */
.upload-dialog {
  overflow: hidden;
}

.upload-dialog .work-dispatch-popover {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 28px));
  max-width: 100%;
  max-height: min(88dvh, 720px);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  color: #172033;
  border: 1px solid #e4e9f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .22);
  backdrop-filter: none;
}

.upload-dialog .work-dispatch-popover::after {
  display: none;
}

.upload-dialog .employee-popover-head {
  flex: 0 0 auto;
  min-width: 0;
  gap: 11px;
  padding: 17px 56px 14px 18px;
  border-bottom: 1px solid #edf1f6;
}

.upload-dialog .employee-mini-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
  font-size: 14px;
  font-weight: 500;
}

.upload-dialog .employee-popover-title strong {
  display: block;
  color: #172033;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.upload-dialog .employee-popover-title span {
  color: #7b8493;
  font-size: 12px;
  line-height: 1.5;
}

.upload-dialog .employee-popover-close {
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #697386;
  border-radius: 50%;
  background: #f2f4f7;
  box-shadow: none;
  font-size: 19px;
  line-height: 1;
}

.upload-dialog > .work-dispatch-popover > .work-dispatch-form {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
}

.upload-dialog .work-dispatch-fields,
#personalUploadModal .personal-upload-zone {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  padding: 16px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.upload-dialog .work-dispatch-fields::-webkit-scrollbar,
#personalUploadModal .personal-upload-zone::-webkit-scrollbar {
  width: 4px;
}

.upload-dialog .work-dispatch-fields::-webkit-scrollbar-thumb,
#personalUploadModal .personal-upload-zone::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.upload-dialog .field,
.upload-dialog .personal-field,
.upload-dialog input,
.upload-dialog select,
.upload-dialog textarea {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.upload-dialog input[type="file"] {
  width: 100%;
  min-height: 48px;
  padding: 5px;
  overflow: hidden;
  color: #64748b;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 36px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-dialog input[type="file"]::file-selector-button {
  height: 36px;
  margin: 0 10px 0 0;
  padding: 0 13px;
  color: #2563eb;
  border: 0;
  border-radius: 8px;
  background: #eaf2ff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.upload-dialog .asset-upload-status {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 400;
}

.upload-dialog .work-dispatch-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  flex-wrap: nowrap;
  border-top: 1px solid #edf1f6;
  background: #fff;
}

.upload-dialog .work-dispatch-actions button {
  min-width: 92px;
  min-height: 42px;
  border-radius: 10px;
  font-weight: 400;
}

.upload-dialog .work-dispatch-actions button:not(.ghost) {
  color: #fff;
  border: 1px solid #2f6fed;
  background: #2f6fed;
  box-shadow: 0 8px 18px rgba(47, 111, 237, .2);
}

.upload-dialog .work-dispatch-actions .ghost {
  color: #596579;
  border: 1px solid #dfe5ed;
  background: #fff;
  box-shadow: none;
}

@media (max-width: 560px) {
  .task-advanced-settings > summary {
    grid-template-columns: minmax(0, 1fr) 10px;
  }

  .task-advanced-settings > summary small {
    display: none;
  }

  .task-advanced-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .task-advanced-grid > .field.full {
    grid-column: auto;
  }

  .upload-dialog {
    place-items: end center;
    padding: 0;
  }

  .upload-dialog .work-dispatch-popover {
    width: 100%;
    max-height: min(90dvh, 720px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
  }

  .upload-dialog .work-dispatch-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .upload-dialog .work-dispatch-fields .field.full {
    grid-column: auto;
  }

  .upload-dialog .work-dispatch-actions button {
    flex: 1 1 0;
    min-width: 0;
  }
}

.global-action-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100vw;
  padding: 16px;
  overflow: hidden;
}

.global-action-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 31, 43, 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.global-action-loading-panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  width: min(320px, calc(100vw - 32px));
  max-width: 100%;
  min-height: 82px;
  padding: 17px 18px;
  color: #172033;
  border: 1px solid rgba(214, 220, 230, 0.96);
  border-radius: 8px;
  outline: none;
  background: #fff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.2);
}

.global-action-loading-spinner {
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  border: 3px solid #dce5f2;
  border-top-color: #246bfd;
  border-radius: 50%;
  animation: global-action-loading-spin 0.8s linear infinite;
}

.global-action-loading-panel strong {
  display: block;
  margin: 0 0 5px;
  color: #172033;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.global-action-loading-panel p {
  margin: 0;
  color: #748094;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body.h5-action-blocked {
  overflow: hidden;
}

@keyframes global-action-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .global-action-loading-spinner { animation-duration: 1.6s; }
}

/* All business popovers use the same light surface, including memory generation. */
.employee-modal .work-dispatch-popover {
  overflow-x: hidden;
  color: #172033;
}

.employee-modal .work-dispatch-popover::after {
  display: none;
}

.employee-modal .work-dispatch-popover .employee-popover-title strong {
  color: #172033;
}

.employee-modal .work-dispatch-popover .employee-popover-title span {
  color: #7b8493;
}

.employee-modal .work-dispatch-popover .employee-popover-close {
  color: #697386;
  background: #f2f4f7;
  box-shadow: none;
}

.employee-modal .work-dispatch-popover input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 5px;
  overflow: hidden;
  color: #64748b;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 36px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-modal .work-dispatch-popover input[type="file"]::file-selector-button {
  height: 36px;
  margin: 0 10px 0 0;
  padding: 0 13px;
  color: #2563eb;
  border: 0;
  border-radius: 8px;
  background: #eaf2ff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* Final width guard for Android WebView file controls and every upload dialog. */
.upload-dialog {
  width: 100%;
  min-width: 0;
  max-width: 100vw;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  overflow-x: hidden;
}

.upload-dialog > .work-dispatch-popover,
.upload-dialog > .employee-popover,
.upload-dialog .work-dispatch-form,
.upload-dialog .personal-upload-zone,
.upload-dialog .personal-field,
.upload-dialog .work-dispatch-fields,
.upload-dialog .work-dispatch-actions,
.upload-dialog label,
.upload-dialog input,
.upload-dialog select,
.upload-dialog textarea,
.upload-dialog small {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.upload-dialog > .work-dispatch-popover,
.upload-dialog > .employee-popover {
  flex: 0 1 520px;
  overflow-x: hidden;
}

.upload-dialog .asset-field-hint,
.upload-dialog .asset-upload-status,
.upload-dialog .personal-file-chip span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 560px) {
  .upload-dialog > .work-dispatch-popover,
  .upload-dialog > .employee-popover {
    width: 100%;
    max-width: 100%;
  }
}

.capture-input-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.capture-input-row > input[type="file"] {
  min-width: 0;
}

.capture-launch-btn,
.camera-switch-btn,
.camera-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #2563eb;
  border: 1px solid #cfe0ff;
  background: #f4f8ff;
  box-shadow: none;
  font-weight: 500;
}

.capture-launch-btn {
  min-width: 82px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 12px;
}

.capture-launch-btn svg,
.camera-switch-btn svg,
.camera-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-capture-modal {
  z-index: 220;
  box-sizing: border-box;
  padding: 14px;
}

.camera-capture-sheet {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100dvh - 28px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  color: #172033;
  border: 1px solid #e3e9f2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.camera-permission-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 16px 0;
}

.camera-permission-actions.hidden {
  display: none;
}

.camera-permission-actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

.camera-capture-head,
.camera-capture-toolbar,
.camera-capture-actions {
  display: flex;
  align-items: center;
}

.camera-capture-head {
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid #edf1f6;
}

.camera-capture-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.camera-capture-head strong {
  font-size: 17px;
  font-weight: 600;
}

.camera-capture-head span {
  color: #7b8493;
  font-size: 12px;
}

.camera-icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  color: #64748b;
  border-color: transparent;
  border-radius: 50%;
  background: #f1f5f9;
}

.camera-capture-toolbar {
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
}

.camera-mode-switch {
  min-width: 152px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border-radius: 9px;
  background: #f1f5f9;
}

.camera-mode-switch.hidden {
  display: none;
}

.camera-mode-switch button {
  min-height: 34px;
  padding: 0 13px;
  color: #64748b;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
}

.camera-mode-switch button.active {
  color: #1d4ed8;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.camera-switch-btn {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 9px;
}

.camera-stage {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: #111827;
}

.camera-stage > video,
.camera-stage > img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #111827;
}

.camera-stage > video.is-front-camera {
  transform: scaleX(-1);
}

.camera-teleprompter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  max-height: 34%;
  overflow: auto;
  padding: 10px 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: rgba(15, 23, 42, .78);
  backdrop-filter: blur(8px);
}

.camera-teleprompter p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
}

.camera-recording-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #fff;
  border-radius: 7px;
  background: rgba(15, 23, 42, .72);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.camera-recording-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: camera-record-pulse 1s ease-in-out infinite;
}

@keyframes camera-record-pulse {
  50% { opacity: .35; }
}

.camera-capture-status {
  min-height: 20px;
  margin: 0;
  padding: 9px 16px 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.camera-capture-actions {
  min-height: 76px;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px max(12px, env(safe-area-inset-bottom));
}

.camera-capture-actions > button:not(.camera-shutter) {
  min-width: 94px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 500;
}

.camera-capture-actions .ghost {
  color: #596579;
  border: 1px solid #dfe5ed;
  background: #fff;
  box-shadow: none;
}

.camera-shutter {
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #2563eb, 0 7px 18px rgba(37, 99, 235, .2);
}

.camera-shutter span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2563eb;
}

.camera-shutter.recording span {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #ef4444;
}

@media (max-width: 560px) {
  .capture-launch-btn {
    min-width: 76px;
    padding: 0 10px;
  }

  .camera-capture-modal {
    place-items: end center;
    padding: 0;
  }

  .camera-capture-sheet {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .camera-stage,
  .camera-stage > video,
  .camera-stage > img {
    min-height: 0;
  }
}

.voice-fill-shell {
  position: relative;
  width: 100%;
  min-width: 0;
}

.voice-fill-shell > textarea,
.voice-fill-shell > input {
  width: 100%;
  min-width: 0;
  padding-right: 48px !important;
}

.voice-fill-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #2563eb;
  border: 1px solid #d5e3ff;
  border-radius: 50%;
  background: #f3f7ff;
  box-shadow: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.voice-fill-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-fill-btn.is-recording {
  color: #fff;
  border-color: #2563eb;
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, .12);
}

.voice-fill-btn.is-cancelling {
  color: #fff;
  border-color: #dc3545;
  background: #dc3545;
  box-shadow: 0 0 0 6px rgba(220, 53, 69, .12);
}

.voice-fill-feedback {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  max-width: min(260px, calc(100vw - 48px));
  padding: 8px 11px;
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #dce6f8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
  font-size: 12px;
  pointer-events: none;
}

.voice-fill-shell.is-voice-cancelling .voice-fill-feedback {
  color: #c92b3a;
  border-color: #f2c8cd;
}
