/* Console Styles */
.console-container {
  padding-block: 40px 80px;
}
.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 32px;
}
.console-title {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.console-subtitle {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
}
.console-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}
.console-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.console-card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.console-card-val {
  font-size: 2rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1;
}
.console-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.console-tab {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
}
.console-tab.active, .console-tab:hover {
  background: var(--soft);
  color: var(--ink);
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-available, .badge-succeeded, .badge-completed, .badge-approved {
  background: #d9f0e1;
  color: #175231;
}
.badge-pending, .badge-awaiting_approval, .badge-awaiting_human_input, .badge-cancelling {
  background: #fef0cd;
  color: #7d5a03;
}
.badge-failed, .badge-rejected, .badge-offline, .badge-cancelled {
  background: #fde8e8;
  color: #9b1c1c;
}
.badge-triggered, .badge-assessed, .badge-planned, .badge-authorised, .badge-executing, .badge-verifying {
  background: var(--soft);
  color: var(--ink);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}
.code-box {
  background: var(--soft);
  padding: 12px 16px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow-x: auto;
  margin-block: 8px;
  word-break: break-all;
}
.detail-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 24px;
  margin-block: 20px;
  font-size: 14px;
}
.detail-label {
  font-weight: 600;
  color: var(--muted);
}
.detail-val {
  color: var(--ink);
}
.action-box {
  margin-top: 32px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
.form-textarea {
  min-height: 80px;
  resize: vertical;
}
.button-danger {
  background: #c81e1e !important;
  color: #fff !important;
}
.button-danger:hover {
  background: #9b1c1c !important;
}
.button-outline {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
}
.button-outline:hover {
  background: var(--soft) !important;
}
.flash {
  padding: 12px 20px;
  border-radius: 8px;
  margin-block: 16px 0;
  font-size: 14px;
  font-weight: 500;
}
.flash-notice {
  background: #d9f0e1;
  color: #175231;
  border: 1px solid #b2e2c2;
}
.flash-alert {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
}

/* C1 preview: one conversation column with a compact daily overview. */
.preview-banner {
  margin-top: 20px;
  padding: 12px 20px;
  border: 1px solid #e7d9af;
  border-radius: 12px;
  background: #fff9e8;
  color: #73541b;
  font-size: 13px;
  line-height: 1.6;
}
.preview-banner a { color: inherit; }
.my-work-layout { padding-block: 28px 48px; }
.my-work-layout .console-header { margin-bottom: 20px; }
.my-work-layout .console-title { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.my-work-layout .console-subtitle { margin-bottom: 0; }
.my-work-layout .console-tabs { margin-bottom: 20px; gap: 4px; }
.persona-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.persona-switch-label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.persona-chip { text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: var(--white); }
.persona-chip.active { background: var(--green); color: white; border-color: var(--green); }
.persona-chip:hover { border-color: var(--green); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.work-conversation, .chat-msg, .chat-card, .my-work-today { min-width: 0; }
.chat-window { display: flex; flex-direction: column; gap: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 24px; max-height: clamp(260px, calc(100dvh - 520px), 620px); overflow-y: auto; overflow-wrap: anywhere; scrollbar-gutter: stable; }
.chat-msg { width: 100%; }
.chat-msg-user { align-self: flex-end; width: auto; max-width: 90%; }
.chat-msg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.chat-msg-author { font-weight: 650; }
.chat-msg-user .chat-msg-meta { justify-content: flex-end; }
.chat-msg-body { font-size: 14px; line-height: 1.65; }
.chat-msg-user .chat-msg-body { padding: 10px 14px; border-radius: 12px; background: var(--soft); }
.chat-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fafbf8; font-size: 13px; line-height: 1.65; }
.card-badge, .synthetic-label { display: inline-block; font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; border-radius: 5px; padding: 2px 6px; color: var(--muted); background: var(--soft); }
.card-badge { margin-bottom: 8px; }
.card-badge-simulated { color: #73541b; background: #fff0c8; }
.chat-card-title { font-size: 14px; font-weight: 650; margin-bottom: 6px; }
.chat-card-coverage { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.chat-card-points, .chat-card-warnings { margin: 10px 0 0; padding-left: 18px; }
.chat-card-points li, .chat-card-warnings li { margin-bottom: 6px; }
.chat-card-warnings { color: #80551c; }
.evidence-citation { font-size: 11px; margin-bottom: 8px; overflow-wrap: anywhere; }
.card-fields { display: grid; grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 6px 14px; margin: 12px 0; }
.card-fields dt { font-weight: 600; color: var(--muted); }
.card-fields dd { margin: 0; overflow-wrap: anywhere; }
.card-action-form { margin-top: 12px; }
.composer-wrap { padding: 16px; background: var(--white); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; }
.composer { display: flex; align-items: center; gap: 10px; border: 1px solid #aab5a5; border-radius: 12px; padding: 8px; }
.composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.composer input[type="text"] { flex: 1; width: 100%; min-width: 0; border: 0; background: transparent; padding: 8px; font: inherit; font-size: 14px; color: var(--ink); }
.composer input[type="text"]:focus { outline: none; }
.composer input[type="submit"] { flex: 0 0 auto; }
.chat-hints { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chat-hints-label { width: 100%; font-size: 11px; color: var(--muted); }
.chat-hint-form { max-width: 100%; }
.chat-hint-chip { max-width: 100%; white-space: normal; text-align: left; font: inherit; font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); cursor: pointer; }
.chat-hint-chip:hover { background: var(--soft); border-color: #aab5a5; }
.my-work-layout input:focus-visible, .my-work-layout button:focus-visible { outline: 3px solid #315de1; outline-offset: 3px; }
.my-work-layout .button { white-space: normal; height: auto; font-family: inherit; }
.my-work-today { display: grid; gap: 16px; }
.my-work-today .console-card { padding: 18px; border-radius: 12px; }
.my-work-today .console-card-title { font-size: 11px; line-height: 1.6; margin-bottom: 14px; }
.my-work-today .synthetic-label { display: table; margin-top: 6px; }
.today-list { list-style: none; padding: 0; margin: 0; }
.today-list li { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; padding-block: 10px; border-bottom: 1px solid var(--line); }
.today-list li:first-child { padding-top: 0; }
.today-list li:last-child { border-bottom: 0; }
.today-list .badge { white-space: normal; margin-top: 6px; font-size: 9px; }
.my-work-today .small-note { margin-top: 12px; font-size: 11px; }
.badge-preview { background: #eef2ff; color: #3730a3; }
.badge-expired, .badge-stale { background: #fff0c8; color: #73541b; }
.badge-open, .badge-ok { background: #d9f0e1; color: #175231; }
.detail-val { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .my-work-today { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .preview-banner { margin-top: 12px; padding: 10px 12px; font-size: 12px; }
  .my-work-layout { padding-block: 20px 32px; }
  .console-tabs { gap: 0; flex-wrap: wrap; }
  .console-tab { padding: 8px 10px; font-size: 12px; }
  .chat-window { padding: 16px; max-height: clamp(240px, calc(100dvh - 460px), 480px); }
  .chat-card { padding: 12px; }
  .composer-wrap { padding: 12px; }
  .composer { gap: 4px; }
  .composer .button { padding: 10px 14px; }
  .chat-msg-meta .synthetic-label { font-size: 8px; }
  .my-work-today { grid-template-columns: minmax(0, 1fr); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .detail-val { margin-bottom: 12px; }
}

/* AP-00 capability ledger statuses */
.badge-implemented { background: #d9f0e1; color: #175231; }
.badge-fixture { background: #eef2ff; color: #3730a3; }
.badge-pending { background: #fff0c8; color: #73541b; }
.badge-disabled { background: #f4e0e0; color: #7c2d2d; }

/* AP-02 application shell: separate console layout (no marketing chrome) */
.console-app { background: #f7f5f0; }
.console-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100dvh; }
.console-sidebar {
  border-right: 1px solid #e5e0d5; padding: 20px 16px; display: flex;
  flex-direction: column; gap: 14px; background: #fbfaf7;
}
.console-sidebar-brand { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand-light { color: #8a8375; font-weight: 400; }
.console-workspace { margin: 0; font-size: 11px; color: #6b6455; display: flex; flex-direction: column; gap: 2px; }
.console-nav { display: flex; flex-direction: column; gap: 2px; }
.console-nav-link {
  padding: 8px 10px; border-radius: 8px; text-decoration: none; color: #3d3a33;
  font-size: 13.5px; font-weight: 500;
}
.console-nav-link:hover { background: #efece4; }
.console-nav-link.active { background: #e7e2d6; color: #211f1a; }
.console-sidebar-meta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.console-conn-state { margin: 0; color: #6b6455; }
.console-account summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.console-account-body { padding: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.console-main { padding: 24px 28px 48px; min-width: 0; }

/* AP-02 home attention strip */
.attention-strip { margin-bottom: 18px; }
.attention-card { border-left: 4px solid #c8a227; }
.attention-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.attention-item { padding: 8px 0; border-bottom: 1px solid #efece4; display: flex; flex-direction: column; gap: 3px; }
.attention-item:last-child { border-bottom: none; }
.attention-item .badge { margin-right: 6px; }
.attention-detail { color: #55503f; font-size: 12.5px; }
.attention-deadline { font-size: 11.5px; color: #73541b; }
.completed-evidence { font-size: 11px; color: #6b6455; word-break: break-all; }

/* AP-02 inbox filters */
.inbox-filters { display: flex; gap: 6px; margin-bottom: 14px; }
.inbox-filter {
  padding: 6px 12px; border: 1px solid #e5e0d5; border-radius: 999px;
  text-decoration: none; color: #3d3a33; font-size: 12.5px; background: #fbfaf7;
}
.inbox-filter.active { background: #211f1a; color: #fbfaf7; border-color: #211f1a; }

@media (max-width: 860px) {
  .console-shell { grid-template-columns: minmax(0, 1fr); }
  .console-sidebar {
    border-right: none; border-bottom: 1px solid #e5e0d5; padding: 12px 16px;
    flex-direction: column; gap: 8px;
  }
  .console-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .console-nav-link { padding: 6px 9px; font-size: 12.5px; }
  .console-main { padding: 16px 14px 40px; }
}

/* AP-02 onboarding wizard */
.onboarding-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.onboarding-rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.onboarding-rail li { padding: 7px 10px; border-radius: 8px; font-size: 13px; color: #6b6455; }
.onboarding-rail li.done { color: #175231; }
.onboarding-rail li.current { background: #e7e2d6; color: #211f1a; font-weight: 600; }
.onboarding-rail a { color: #175231; text-decoration: none; }
.onboarding-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.onboarding-form .field { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 420px; }
.onboarding-form label { font-size: 12.5px; font-weight: 600; color: #55503f; }
.template-option { border: 1px solid #efece4; border-radius: 8px; padding: 10px; }
.journey-choices { display: flex; gap: 10px; flex-wrap: wrap; }
.onboarding-done p { margin: 8px 0; }
.card-fields dt { font-weight: 600; font-size: 12px; color: #55503f; margin-top: 8px; }
.card-fields dd { margin: 2px 0 0; }

@media (max-width: 860px) {
  .onboarding-grid { grid-template-columns: minmax(0, 1fr); }
  .onboarding-rail ol { flex-direction: row; flex-wrap: wrap; }
}
