/* Arc Recruiting Mockup — Workspace styling */

:root {
  --arc-canvas: #f4f5f8;
  --arc-surface: #ffffff;
  --arc-text: #101828;
  --arc-text-secondary: #344054;
  --arc-text-muted: #667085;
  --arc-border: #eaecf0;
  --arc-border-strong: #d0d5dd;
  --arc-brand: #7010c4;
  --arc-brand-hover: #5b0ca0;
  --arc-brand-tint: #f5eefb;
  --arc-brand-subtle: #faf7fd;
  --arc-success: #067647;
  --arc-success-bg: #ecfdf3;
  --arc-warning: #b54708;
  --arc-warning-bg: #fffaeb;
  --arc-danger: #b42318;
  --arc-danger-bg: #fef3f2;
  --arc-info: #175cd3;
  --arc-info-bg: #eff8ff;
  --arc-radius: 10px;
  --arc-radius-sm: 6px;
  --arc-radius-lg: 14px;
  --arc-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --arc-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
  --arc-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nav-width: 220px;
  --header-h: 64px;
  --mobile-nav-h: 62px;
}

[hidden] {
  display: none !important;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--arc-text);
  background: var(--arc-canvas);
}

.arc-text-muted {
  color: var(--arc-text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* App shell — native responsive (no device mockup) */
.arc-app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--arc-canvas);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 769px) {
  .arc-app {
    max-width: 100%;
  }
}

/* Header */
.app-header {
  height: var(--header-h);
  padding: 0 20px;
  background: var(--arc-surface);
  border-bottom: 1px solid var(--arc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-header__subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--arc-text-muted);
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header__user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--arc-text-secondary);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--arc-brand), #9b4de0);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shell layout */
.app-shell {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.app-nav {
  width: var(--nav-width);
  flex-shrink: 0;
  background: var(--arc-surface);
  border-right: 1px solid var(--arc-border);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--arc-radius-sm);
  background: transparent;
  color: var(--arc-text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.nav-tab:hover {
  background: var(--arc-brand-subtle);
  color: var(--arc-brand);
}

.nav-tab--active {
  background: var(--arc-brand-tint);
  color: var(--arc-brand);
}

.nav-tab .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  background: var(--arc-danger);
  color: #fff;
  padding: 2px 7px;
  border-radius: 99px;
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px;
}

.panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.panel--visible {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-header {
  margin-bottom: 16px;
}

.panel-header--compact {
  margin-bottom: 12px;
}

.panel-header--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-desc {
  margin: 0;
  font-size: 13px;
  color: var(--arc-text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--arc-success-bg);
  color: var(--arc-success);
}

.status-pill--live .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--arc-success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--arc-radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--arc-brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--arc-brand-hover);
}

.btn--secondary {
  background: var(--arc-surface);
  border-color: var(--arc-border-strong);
  color: var(--arc-text);
}

.btn--secondary:hover {
  background: var(--arc-brand-subtle);
  border-color: var(--arc-brand);
  color: var(--arc-brand);
}

.btn--ghost {
  background: transparent;
  color: var(--arc-text-secondary);
  border-color: var(--arc-border);
}

.btn--ghost:hover {
  background: var(--arc-surface);
  border-color: var(--arc-border-strong);
}

.btn--sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn--icon {
  padding: 8px;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

/* Assistant / Chat */
.assistant-layout {
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  box-shadow: var(--arc-shadow-sm);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  min-height: 420px;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 92%;
}

.chat-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg__avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.chat-msg--agent .chat-msg__avatar {
  background: var(--arc-brand-tint);
  color: var(--arc-brand);
}

.chat-msg--user .chat-msg__avatar {
  background: var(--arc-text);
  color: #fff;
}

.chat-msg__bubble {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-msg--agent .chat-msg__bubble {
  background: var(--arc-brand-subtle);
  border: 1px solid var(--arc-border);
  border-top-left-radius: 4px;
}

.chat-msg--user .chat-msg__bubble {
  background: var(--arc-brand);
  color: #fff;
  border-top-right-radius: 4px;
}

.chat-msg__time {
  font-size: 11px;
  color: var(--arc-text-muted);
  margin-top: 4px;
}

.chat-msg--user .chat-msg__time {
  text-align: right;
  color: rgba(255, 255, 255, 0.75);
}

.action-card {
  margin-top: 10px;
  padding: 12px;
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  box-shadow: var(--arc-shadow-sm);
}

.action-card__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--arc-brand);
  margin: 0 0 4px;
}

.action-card__meta {
  font-size: 12px;
  color: var(--arc-text-muted);
  margin: 0 0 10px;
}

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

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  border-top: 1px solid var(--arc-border);
  padding-top: 12px;
}

.chip {
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--arc-border-strong);
  background: var(--arc-surface);
  font-size: 12px;
  color: var(--arc-text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--arc-brand);
  color: var(--arc-brand);
  background: var(--arc-brand-tint);
}

.chat-composer {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--arc-border);
}

.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--arc-border-strong);
  border-radius: var(--arc-radius-sm);
  font-family: inherit;
  font-size: 14px;
}

.chat-input:focus {
  outline: 2px solid var(--arc-brand);
  outline-offset: 0;
  border-color: var(--arc-brand);
}

/* Inbox */
.inbox-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: 480px;
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  box-shadow: var(--arc-shadow-sm);
  overflow: hidden;
}

.inbox-list {
  border-right: 1px solid var(--arc-border);
  overflow-y: auto;
  max-height: 560px;
}

.inbox-conv {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--arc-border);
  background: var(--arc-surface);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.inbox-conv:hover,
.inbox-conv--active {
  background: var(--arc-brand-subtle);
}

.inbox-conv__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.inbox-conv__name {
  font-weight: 600;
  font-size: 13px;
}

.inbox-conv__time {
  font-size: 11px;
  color: var(--arc-text-muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.inbox-conv--unread .inbox-conv__name {
  font-weight: 700;
}

.inbox-conv--unread {
  border-left: 3px solid var(--arc-brand);
  padding-left: 13px;
}

.inbox-conv__preview {
  font-size: 12px;
  color: var(--arc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-conv__tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 4px;
}

.tag--sms {
  background: var(--arc-info-bg);
  color: var(--arc-info);
}

.tag--email {
  background: var(--arc-brand-tint);
  color: var(--arc-brand);
}

.tag--attention {
  background: var(--arc-warning-bg);
  color: var(--arc-warning);
}

.inbox-thread {
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.inbox-thread__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--arc-text-muted);
  gap: 8px;
}

.inbox-thread__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--arc-border);
  font-weight: 600;
}

.inbox-thread__header-text {
  flex: 1;
  min-width: 0;
}

.inbox-thread__meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--arc-text-muted);
  margin-top: 4px;
}

.inbox-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  background: var(--arc-surface);
  color: var(--arc-text);
  cursor: pointer;
  flex-shrink: 0;
}

.inbox-thread__loading,
.inbox-empty-hint {
  text-align: center;
  color: var(--arc-text-muted);
  font-size: 13px;
  padding: 24px 16px;
}

.inbox-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--arc-canvas);
}

.msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  position: relative;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.msg-bubble--in {
  align-self: flex-start;
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-bottom-left-radius: 4px;
}

.msg-bubble--out {
  align-self: flex-end;
  background: var(--arc-brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-bubble__time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
}

.inbox-compose {
  padding: 12px 16px;
  border-top: 1px solid var(--arc-border);
  background: var(--arc-surface);
}

.inbox-compose__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.inbox-compose textarea {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--arc-border-strong);
  border-radius: var(--arc-radius-sm);
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 8px;
}

.inbox-compose__row {
  display: flex;
  justify-content: flex-end;
}

/* Candidates */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  overflow: hidden;
  background: var(--arc-surface);
}

.segmented__btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--arc-text-muted);
  cursor: pointer;
}

.segmented__btn--active {
  background: var(--arc-brand);
  color: #fff;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--arc-border-strong);
  border-radius: var(--arc-radius-sm);
  font-family: inherit;
  font-size: 13px;
  background: var(--arc-surface);
  min-width: 140px;
}

.candidate-table-wrap {
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  overflow: hidden;
  box-shadow: var(--arc-shadow-sm);
}

.candidate-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 0.8fr;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--arc-border);
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
}

.candidate-row:hover {
  background: var(--arc-brand-subtle);
}

.candidate-row__name {
  font-weight: 600;
}

.stage-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--arc-brand-tint);
  color: var(--arc-brand);
}

.kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col {
  flex: 0 0 220px;
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  padding: 10px;
  max-height: 520px;
  overflow-y: auto;
}

.kanban-col__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--arc-text-muted);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--arc-border);
}

.kanban-card {
  padding: 10px;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--arc-canvas);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kanban-card:hover {
  border-color: var(--arc-brand);
  box-shadow: var(--arc-shadow-sm);
}

.kanban-card__office {
  font-size: 11px;
  color: var(--arc-text-muted);
}

/* Calendar */
.cal-date-label {
  font-weight: 600;
  font-size: 14px;
  min-width: 160px;
  text-align: center;
}

.calendar-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--arc-text-secondary);
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-swatch--inperson {
  background: var(--arc-brand);
}

.legend-swatch--virtual {
  background: var(--arc-info);
}

.calendar-grid {
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  padding: 16px;
  box-shadow: var(--arc-shadow-sm);
}

.cal-day-slot {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--arc-border);
  min-height: 52px;
}

.cal-time {
  font-size: 12px;
  color: var(--arc-text-muted);
  font-variant-numeric: tabular-nums;
}

.cal-event {
  padding: 10px 12px;
  border-radius: var(--arc-radius-sm);
  border-left: 4px solid var(--arc-brand);
  background: var(--arc-brand-subtle);
  font-size: 13px;
}

.cal-event--virtual {
  border-left-color: var(--arc-info);
  background: var(--arc-info-bg);
}

.cal-event__title {
  font-weight: 600;
  margin-bottom: 2px;
}

.cal-event__meta {
  font-size: 12px;
  color: var(--arc-text-muted);
}

.attendance {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.attendance--confirmed {
  background: var(--arc-success-bg);
  color: var(--arc-success);
}

.attendance--pending {
  background: var(--arc-warning-bg);
  color: var(--arc-warning);
}

.attendance--showed {
  background: var(--arc-brand-tint);
  color: var(--arc-brand);
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.cal-week-day {
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  padding: 10px;
  min-height: 120px;
  background: var(--arc-canvas);
}

.cal-week-day__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--arc-text-muted);
  margin-bottom: 8px;
}

/* Metrics — Recruiting Center Integration */
.panel--metrics {
  margin: -20px;
  padding: 0;
  height: calc(100vh - var(--header-h));
  min-height: calc(100vh - var(--header-h));
  display: none;
  overflow: hidden;
}

.panel--metrics.panel--visible {
  display: flex;
  flex-direction: column;
}

.metrics-frame-container {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  overflow: hidden;
  background: var(--arc-bg);
}

.metrics-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  flex: 1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  padding: 16px 18px;
  box-shadow: var(--arc-shadow-sm);
}

.kpi-card__label {
  font-size: 12px;
  color: var(--arc-text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.kpi-card__value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--arc-brand);
  font-variant-numeric: tabular-nums;
}

.metrics-columns {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.card {
  background: var(--arc-surface);
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius);
  padding: 18px;
  box-shadow: var(--arc-shadow-sm);
}

.card-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
}

.funnel-step {
  margin-bottom: 14px;
}

.funnel-step__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.funnel-step__bar {
  height: 10px;
  background: var(--arc-border);
  border-radius: 99px;
  overflow: hidden;
}

.funnel-step__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--arc-brand), #9b4de0);
  border-radius: 99px;
  transition: width 0.6s ease;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--arc-border);
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--arc-text-muted);
  font-weight: 600;
}

.data-table tbody tr:hover {
  background: var(--arc-brand-subtle);
}

.table-wrap {
  overflow-x: auto;
}

/* Slide-over */
.slideover-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.slideover {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--arc-surface);
  box-shadow: var(--arc-shadow-lg);
  z-index: 201;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.28s ease;
}

.slideover[hidden],
.slideover-backdrop[hidden] {
  display: none !important;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.slideover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--arc-border);
}

.slideover__title {
  margin: 0;
  font-size: 18px;
}

.slideover__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--arc-text-muted);
  margin: 0 0 10px;
}

.detail-grid {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.detail-row {
  display: flex;
  gap: 8px;
}

.detail-row dt {
  font-weight: 600;
  min-width: 100px;
  color: var(--arc-text-secondary);
}

.detail-row dd {
  margin: 0;
  color: var(--arc-text);
}

.qa-item {
  padding: 10px 12px;
  background: var(--arc-canvas);
  border-radius: var(--arc-radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
}

.qa-item strong {
  display: block;
  font-size: 12px;
  color: var(--arc-text-muted);
  margin-bottom: 4px;
}

/* Toast */
.toast-host {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  background: var(--arc-text);
  color: #fff;
  border-radius: var(--arc-radius-sm);
  font-size: 13px;
  box-shadow: var(--arc-shadow-lg);
  animation: fadeIn 0.2s ease;
}

.icon--lg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

.panel--assistant .panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel--assistant .panel-header .status-pill {
  margin: 0;
}


/* Slide-over actions */
.slideover__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--arc-border);
}

.slideover__actions .btn {
  width: 100%;
  justify-content: center;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.history-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--arc-border);
  color: var(--arc-text-secondary);
}

/* --- Recruiter User Picker --- */
.user-select-wrap {
  display: flex;
  align-items: center;
}
.user-select {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--arc-radius-sm);
  border: 1px solid var(--arc-border);
  background: var(--arc-surface);
  color: var(--arc-text);
  outline: none;
  cursor: pointer;
  max-width: 170px;
}
.user-select:focus {
  border-color: var(--arc-brand);
}

/* --- Recruiter Pill Banner in Assistant Tab --- */
.recruiter-pill-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--arc-brand-tint);
  border: 1px solid rgba(112, 16, 196, 0.15);
  border-radius: var(--arc-radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
}
.recruiter-pill-banner__left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--arc-text);
  flex-wrap: wrap;
}
.banner-divider {
  color: var(--arc-border-strong);
}
.status-dot--success {
  background: var(--arc-success);
}

/* --- Setup Modal Dialog --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  z-index: 300;
  animation: fadeIn 0.15s ease;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92vw);
  max-height: 88vh;
  background: var(--arc-surface);
  border-radius: var(--arc-radius-lg);
  box-shadow: var(--arc-shadow-lg);
  z-index: 301;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal[hidden],
.modal-backdrop[hidden] {
  display: none !important;
}
@keyframes modalScale {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--arc-border);
}
.modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--arc-text);
}
.modal__desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--arc-text-muted);
}
.modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--arc-border);
  background: var(--arc-canvas);
}

/* --- Setup Form Elements --- */
.setup-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.setup-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--arc-text);
}
.setup-hint {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: var(--arc-text-muted);
}
.radio-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  background: var(--arc-surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.radio-card:hover {
  border-color: var(--arc-border-strong);
  background: var(--arc-brand-subtle);
}
.radio-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--arc-brand);
}
.radio-card__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.radio-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--arc-text);
}
.radio-card__desc {
  font-size: 12px;
  color: var(--arc-text-muted);
}
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.check-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--arc-surface);
}
.check-box:hover {
  background: var(--arc-brand-subtle);
}
.check-box input[type="checkbox"] {
  accent-color: var(--arc-brand);
}
.setup-subfields {
  margin-top: 8px;
  padding: 12px;
  background: var(--arc-canvas);
  border-radius: var(--arc-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--arc-text-secondary);
}
.form-input {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid var(--arc-border);
  border-radius: var(--arc-radius-sm);
  background: var(--arc-surface);
  color: var(--arc-text);
  outline: none;
}
.form-input:focus {
  border-color: var(--arc-brand);
}
.btn--xs {
  padding: 4px 8px;
  font-size: 11px;
}

/* --- Mobile native layout (<= 768px) --- */
@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    inset: 0;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
  }

  /* PREVENT iOS AUTO-ZOOM ON INPUT FOCUS (Requires min 16px font-size) */
  input,
  select,
  textarea,
  .chat-input,
  .form-input,
  .form-select,
  .user-select,
  .filter-select,
  .search-input {
    font-size: 16px !important;
    line-height: normal;
  }

  .arc-app {
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: var(--arc-bg);
  }

  .app-header {
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    height: auto;
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
    column-gap: 8px;
    border-bottom: 1px solid var(--arc-border);
    background: var(--arc-surface);
    flex-shrink: 0;
    position: relative;
  }

  .app-header__brand {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .app-header__subtitle {
    display: none;
  }

  .app-header__actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .app-header__user {
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .app-header__user-name {
    display: none;
  }

  .user-select-wrap {
    flex: 1;
    min-width: 0;
  }

  .user-select {
    width: 100%;
    max-width: 100%;
    font-size: 16px !important;
    height: 38px;
    border-radius: var(--arc-radius-sm);
    padding: 0 10px;
  }

  #open-setup-btn {
    height: 38px;
    padding: 0 10px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  #open-setup-btn span {
    display: inline !important;
    font-size: 13px;
  }

  .app-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    width: 100%;
  }

  .app-main {
    order: 1;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
  }

  .panel {
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    display: none;
    overflow: hidden;
  }

  .panel.panel--visible {
    display: flex;
    flex-direction: column;
  }

  /* Assistant Tab on Mobile */
  .panel--assistant {
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: none;
    flex-direction: column;
    padding: 0;
  }

  .panel--assistant.panel--visible {
    display: flex;
  }

  .panel--assistant .panel-header {
    display: none;
  }

  .recruiter-pill-banner {
    margin: 8px 12px 6px;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .assistant-layout {
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: none;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: hidden;
  }

  .chat {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .chat-msg {
    max-width: 90%;
  }

  .chat-chips {
    flex-shrink: 0;
    padding: 6px 12px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--arc-border);
    background: var(--arc-surface);
  }

  .chat-chip {
    font-size: 12px;
    padding: 5px 10px;
    flex-shrink: 0;
  }

  .chat-composer {
    flex-shrink: 0;
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--arc-surface);
    border-top: 1px solid var(--arc-border);
  }

  .chat-input {
    font-size: 16px !important;
    height: 42px;
    border-radius: 21px;
    padding: 0 16px;
    background: var(--arc-canvas);
    border: 1px solid var(--arc-border);
    flex: 1;
  }

  .chat-composer .btn {
    height: 42px;
    width: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 21px;
    flex-shrink: 0;
  }

  /* Candidates Tab on Mobile */
  .panel--candidates {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    flex: 1;
    min-height: 0;
  }

  .candidate-table-wrap > .candidate-row:first-child {
    display: none !important;
  }

  .candidate-row {
    display: flex !important;
    flex-direction: column;
    padding: 12px 14px;
    background: var(--arc-surface);
    border: 1px solid var(--arc-border);
    border-radius: var(--arc-radius);
    margin-bottom: 8px;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .candidate-row__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--arc-text);
  }

  /* Inbox Tab on Mobile */
  .panel--inbox {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    margin: 0;
    flex: 1;
    min-height: 0;
  }

  .inbox-layout {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: none;
    border-radius: 0;
    flex: 1;
    min-height: 0;
    background: transparent;
  }

  .inbox-layout:not(.inbox-layout--thread-open) .inbox-list {
    display: block !important;
    flex: 1;
    height: 100%;
    max-height: none;
    overflow-y: auto;
    border-right: none;
  }

  .inbox-layout:not(.inbox-layout--thread-open) .inbox-thread {
    display: none !important;
  }

  .inbox-layout.inbox-layout--thread-open .inbox-list {
    display: none !important;
  }

  .inbox-layout.inbox-layout--thread-open .inbox-thread {
    display: flex !important;
    flex: 1;
    height: 100%;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .inbox-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px;
  }

  .inbox-compose {
    flex-shrink: 0;
    padding: 10px 12px;
    background: var(--arc-surface);
    border-top: 1px solid var(--arc-border);
  }

  .inbox-compose__quick {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    margin-bottom: 8px;
    scrollbar-width: none;
  }

  .inbox-compose__quick::-webkit-scrollbar {
    display: none;
  }

  .inbox-compose__quick button {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .inbox-compose textarea {
    font-size: 16px !important;
  }

  .inbox-back-btn {
    display: inline-flex;
  }

  /* Calendar Tab on Mobile */
  .panel--calendar {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
    flex: 1;
    min-height: 0;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Metrics Tab on Mobile */
  .panel--metrics {
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  .metrics-frame-container {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
  }

  .metrics-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
  }

  /* App Nav pinned at bottom */
  .app-nav {
    order: 2;
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--arc-border);
    padding: 4px 6px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
    justify-content: space-around;
    height: auto;
    min-height: 52px;
    flex-shrink: 0;
    background: var(--arc-surface);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
    z-index: 100;
  }

  .nav-tab {
    flex-direction: column;
    gap: 3px;
    padding: 6px 2px;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    justify-content: center;
    border-radius: 8px;
    border-left: none;
    min-height: 44px;
  }

  .nav-tab--active {
    background: var(--arc-canvas);
    color: var(--arc-brand);
    border-left: none;
  }

  .nav-tab span:not(.nav-badge) {
    max-width: 64px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-badge {
    position: absolute;
    top: 4px;
    right: 14px;
    font-size: 9px;
    padding: 1px 5px;
  }

  .slideover {
    width: 100%;
    max-width: 100vw;
    height: min(92dvh, 100%);
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    transform: none;
    border-radius: var(--arc-radius-lg) var(--arc-radius-lg) 0 0;
    animation: sheetUp 0.28s ease;
  }

  .modal {
    width: 100%;
    max-width: 100vw;
    top: 8vh;
    left: 0;
    transform: none;
    border-radius: var(--arc-radius-lg);
    max-height: 92dvh;
  }

  @keyframes sheetUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .toast-host {
    left: 16px;
    right: 16px;
    bottom: calc(var(--mobile-nav-h) + 12px + env(safe-area-inset-bottom));
  }
}

/* Arc Recruiting Systems official mark */
.arc-logo-mark {
  width: 96px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.arc-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.arc-logo-mark--header {
  width: 42px;
  height: 36px;
}

.arc-logo-mark--auth {
  width: 140px;
  height: 96px;
  margin: 0 auto 16px auto;
  padding: 12px 8px;
}

@media (max-width: 640px) {
  .arc-logo-mark--header {
    width: 38px;
    height: 32px;
  }
}
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  padding: 32px 28px;
  text-align: center;
}
.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px;
}
.auth-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-form .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}
.auth-form .form-select,
.auth-form .form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9375rem;
  box-sizing: border-box;
  background: #fff;
}
.auth-form .form-select:focus,
.auth-form .form-input:focus {
  outline: none;
  border-color: #7010c4;
  box-shadow: 0 0 0 3px rgba(112, 16, 196, 0.15);
}
.btn--full {
  width: 100%;
  padding: 12px;
  font-weight: 600;
  justify-content: center;
}
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.8125rem;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}
.auth-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.auth-sso-section {
  margin-bottom: 4px;
}

.auth-sso-btn {
  background: #7010C4;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  padding: 14px 20px;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(112, 16, 196, 0.35);
}

.auth-sso-btn:hover {
  background: #5b0c9e;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(112, 16, 196, 0.45);
}

.auth-sso-btn:active {
  transform: scale(0.98);
}
