:root {
  color-scheme: light;
  --experton-sidebar-width: 148px;
  --experton-sidebar-bg: #0a2d52;
  --experton-sidebar-bg-2: #0d3f69;
  --experton-sidebar-fg: #ecf7ff;
  --experton-sidebar-muted: #a8c7dc;
  --experton-sidebar-accent: #53e0c1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f8;
  color: #172033;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--experton-sidebar-width) minmax(0, 1fr);
  background: #fff;
}

.brand-panel {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: var(--experton-sidebar-width);
  min-width: var(--experton-sidebar-width);
  max-width: var(--experton-sidebar-width);
  min-height: 100vh;
  height: 100vh;
  padding: 18px 14px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--experton-sidebar-fg);
  background:
    radial-gradient(circle at 16px 14px, rgba(83,224,193,.18), transparent 70px),
    linear-gradient(180deg, var(--experton-sidebar-bg), var(--experton-sidebar-bg-2));
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 10px 0 30px rgba(3,19,37,.1);
  scrollbar-width: none;
}

.brand-panel::-webkit-scrollbar { display: none; }

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #0e9f82, #155eef);
  font-size: 18px;
  font-weight: 900;
}

.eyebrow, .section-label {
  margin: 0 0 16px;
  color: #75a0ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 { margin: 0; font-size: clamp(48px, 6vw, 82px); line-height: .95; letter-spacing: -.05em; }
.brand-panel .eyebrow { margin-bottom: 10px; color: #fff; font-size: 15px; line-height: 1.15; letter-spacing: .02em; }
.brand-panel h1 { color: #fff; font-size: 21px; line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; }
.lead { max-width: 100%; margin: 12px 0 0; color: var(--experton-sidebar-muted); font-size: 10.5px; line-height: 1.4; }
.service-status { display: flex; align-items: flex-start; gap: 7px; margin-top: 14px; color: #d9fff5; font-size: 10px; line-height: 1.3; font-weight: 800; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
.brand-panel .status-dot { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 3px; }
.status-dot.pending { background: #f3ad32; box-shadow: 0 0 0 5px rgba(243,173,50,.16); }
.status-dot.ready { background: #38d6a9; box-shadow: 0 0 0 5px rgba(56,214,169,.16); }
.status-dot.failed { background: #ff6f87; box-shadow: 0 0 0 5px rgba(255,111,135,.16); }

.workspace { display: grid; min-width: 0; place-items: center; min-height: 100vh; padding: clamp(24px, 4vw, 64px); background: #f7f9fc; }
.view { width: min(1040px, 100%); min-width: 0; }
.auth-view { max-width: 480px; }
.loading-view { text-align: center; color: #70798a; }
.spinner { width: 38px; height: 38px; margin: 0 auto; border: 3px solid #dfe5ef; border-top-color: #3566ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
h2 { margin: 0; font-size: clamp(36px, 5vw, 54px); letter-spacing: -.04em; }
h3 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.muted { margin: 14px 0 28px; color: #6b7586; line-height: 1.55; }

.form-stack { display: grid; gap: 20px; margin-top: 30px; }
.invite-legal {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid #cfd7e8;
  border-radius: 14px;
  background: #f7f9fd;
}
.invite-legal[hidden] { display: none; }
.invite-legal legend { padding: 0 6px; font-weight: 700; }
.legal-checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
}
.legal-checkbox input { margin-top: 3px; }
.legal-links { margin: -4px 0 4px 30px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 180px; gap: 16px; margin-top: 24px; }
.form-grid button { grid-column: 1 / -1; width: fit-content; }
label { display: grid; gap: 8px; color: #343d4d; font-size: 14px; font-weight: 700; }
label small, .invite-result small { color: #818a99; font-weight: 400; }
input, select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  color: #172033;
  border: 1px solid #d9e0eb;
  border-radius: 12px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; padding-top: 14px; padding-bottom: 14px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #3566ff; box-shadow: 0 0 0 4px rgba(53,102,255,.1); }
button {
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #3566ff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-secondary { color: #354052; border: 1px solid #d9e0eb; background: #fff; }
.button-secondary.compact { min-height: 42px; padding: 0 16px; font-size: 14px; }
.form-message { margin: 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.form-message.error { color: #a92c43; background: #fff0f3; }
.form-message.success { color: #167657; background: #ebfaf4; }
.text-button { min-height: 38px; margin-top: 16px; padding: 0; color: #3566ff; background: transparent; font-weight: 700; }
.text-button:hover { transform: none; text-decoration: underline; }

.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.dashboard-actions .workspace-select { min-width: 220px; max-width: 320px; }
.welcome-card { display: flex; gap: 15px; margin-top: 34px; padding: 20px; border: 1px solid #dff0ea; border-radius: 16px; background: #f1fbf7; }
.welcome-card p { margin: 5px 0 0; color: #63736d; }
.welcome-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 50%; color: #fff; background: #1fbc8e; font-weight: 900; }
.admin-panel { min-width: 0; margin-top: 28px; padding: 28px; border: 1px solid #e0e6ef; border-radius: 20px; background: #fff; box-shadow: 0 14px 40px rgba(23,32,51,.06); }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.role-badge { padding: 7px 10px; border-radius: 999px; color: #234ac0; background: #eaf0ff; font-size: 12px; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin-top: 28px; }
.metrics div { padding: 18px; border-radius: 14px; background: #f5f7fb; }
.metrics strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.metrics span { color: #747e8f; font-size: 13px; }
.admin-section { margin-top: 34px; padding-top: 28px; border-top: 1px solid #e8ecf2; }
.admin-section h4 { margin: 0; font-size: 19px; }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.admin-section-heading p { margin: 7px 0 0; }
.compact-filter { min-width: 190px; font-size: 12px; }
.compact-filter select { margin-top: 6px; padding: 10px 12px; }
.leads-list { display: grid; gap: 12px; margin-top: 18px; }
.lead-card { padding: 18px; border: 1px solid #e0e6ef; border-radius: 14px; background: #fbfcfe; }
.lead-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.lead-card-title { min-width: 0; }
.lead-card-title strong, .lead-card-title small { display: block; }
.lead-card-title small { margin-top: 4px; color: #747e8f; }
.lead-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin-top: 16px; }
.lead-card-grid div { min-width: 0; }
.lead-card-grid span, .lead-task-label { display: block; color: #747e8f; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lead-card-grid strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; }
.lead-task { margin: 14px 0 0; color: #394457; line-height: 1.55; white-space: pre-wrap; }
.lead-controls { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(180px, .9fr) minmax(220px, 1.6fr) minmax(190px, 1fr); gap: 10px; margin-top: 16px; }
.lead-controls label { font-size: 12px; }
.lead-controls select, .lead-controls input { margin-top: 5px; padding: 10px 12px; }
.lead-actions { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.lead-conversion { margin-top: 12px; padding: 12px; border-radius: 10px; background: #e8f8f2; color: #126b51; font-size: 13px; }
.lead-unresolved { margin-top: 12px; padding: 10px 12px; border: 1px solid #f1d49a; border-radius: 10px; background: #fff8e8; color: #805510; font-size: 13px; font-weight: 700; }
.lead-delivery-summary { margin: 16px 0 0; padding: 12px 14px; border: 1px solid #f3c5ca; border-radius: 10px; background: #fff1f2; color: #9f2938; font-size: 13px; }
.lead-delivery-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e6ebf2; }
.lead-delivery-section h5 { margin: 0 0 10px; font-size: 14px; }
.lead-delivery-list { display: grid; gap: 8px; }
.lead-delivery-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #e4e9f1; border-radius: 10px; background: #fff; }
.lead-delivery-row.failed { border-color: #f1c3c8; background: #fff8f8; }
.lead-delivery-description { min-width: 0; }
.lead-delivery-description strong, .lead-delivery-description small, .lead-delivery-state small { display: block; }
.lead-delivery-description small, .lead-delivery-state small { margin-top: 3px; color: #747e8f; font-size: 11px; }
.lead-delivery-description .lead-delivery-error { color: #a12a39; }
.lead-delivery-state { display: grid; justify-items: end; gap: 5px; text-align: right; }
.lead-event-log { margin-top: 12px; }
.lead-event-log summary { cursor: pointer; color: #526077; font-size: 13px; font-weight: 700; }
.lead-event-list { display: grid; gap: 6px; margin-top: 9px; padding-left: 10px; border-left: 2px solid #dfe6f2; }
.lead-event-row { display: flex; justify-content: space-between; gap: 12px; color: #526077; font-size: 12px; }
.lead-event-row time { color: #858fa0; white-space: nowrap; }
.lead-secondary-empty { margin: 4px 0; color: #858fa0; font-size: 12px; }
.invite-result { margin-top: 20px; padding: 16px; border-radius: 12px; background: #f5f7fb; }
.invite-result p { margin: 0 0 12px; color: #535d6f; font-size: 14px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 10px; }
.copy-row input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 8px; color: #7b8494; border-bottom: 1px solid #e5eaf1; text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
td { padding: 14px 8px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: #7b8494; }
.table-select { width: auto; min-height: 34px; padding: 0 28px 0 9px; border-radius: 8px; font-size: 12px; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.good { color: #127154; background: #e5f8f1; }
.badge.bad { color: #a92c43; background: #ffedf1; }
.badge.neutral { color: #596476; background: #edf1f6; }
.badge.pending { color: #73520c; background: #fff3d6; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 150px; }
.mini-button { min-height: 32px; padding: 0 9px; border-radius: 8px; font-size: 11px; }
.mini-button.secondary { color: #465166; border: 1px solid #dce2eb; background: #fff; }
.empty-state { margin: 16px 0 0; color: #818a99; }
.audit-list { display: grid; margin-top: 14px; }
.audit-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.audit-item strong, .audit-item small { display: block; }
.audit-item small { margin-top: 3px; color: #7b8494; }
.audit-item time { flex: 0 0 auto; color: #7b8494; font-size: 12px; }

.workspace-panel { position: relative; min-width: 0; }
.workspace-select { width: auto; min-width: 190px; min-height: 42px; padding-top: 0; padding-bottom: 0; }
.inline-loading { margin-top: 24px; color: #747e8f; }
.empty-card { margin-top: 24px; padding: 22px; border: 1px dashed #cbd4e2; border-radius: 14px; background: #f8faff; }
.empty-card p { margin: 7px 0 0; color: #747e8f; }
.workspace-summary { display: flex; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 22px; border-radius: 16px; background: linear-gradient(135deg, #eef3ff, #f4fbf8); }
.workspace-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.workspace-title-row h4 { margin: 0; font-size: 22px; }
.compact-copy { margin: 8px 0 0; }
.workspace-counters { display: flex; align-items: center; gap: 18px; color: #687386; font-size: 13px; white-space: nowrap; }
.workspace-counters strong { color: #172033; font-size: 20px; }
.subscription-summary { margin-top: 18px; padding: 20px; border: 1px solid #dfe6f2; border-radius: 16px; background: #fbfcff; }
.subscription-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.subscription-heading .section-label { margin-bottom: 9px; }
.subscription-context { max-width: 340px; margin: 0; color: #687386; font-size: 13px; line-height: 1.5; text-align: right; }
.subscription-usage-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; margin-top: 18px; }
.entitlement-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e6ebf2; }
.entitlement-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.entitlement-heading h5 { margin: 0; font-size: 16px; }
.entitlement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-top: 14px; }
.entitlement-card { display: grid; gap: 5px; min-width: 0; padding: 12px 13px; border: 1px solid #e4e9f1; border-radius: 12px; background: #fff; }
.entitlement-card span, .entitlement-card small { color: #748094; font-size: 11px; }
.entitlement-card strong { overflow-wrap: anywhere; font-size: 14px; }
.entitlement-card.warning { border-color: #f0cf83; background: #fffaf0; }
.entitlement-card.exhausted { border-color: #e8abb4; background: #fff4f5; }
.entitlement-access-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 10px; margin-top: 10px; }
.entitlement-access-grid > div { display: grid; gap: 5px; padding: 12px 14px; border-radius: 12px; background: #f3f6fb; }
.entitlement-access-grid span { color: #748094; font-size: 11px; }
.entitlement-access-grid strong { overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.quota-card { padding: 13px; border-radius: 12px; background: #fff; }
.quota-card > span { display: block; color: #747e8f; font-size: 11px; }
.quota-card strong { display: block; margin-top: 5px; font-size: 14px; }
.quota-track { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #e8edf5; }
.quota-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #3566ff; transition: width .25s; }
.quota-track span.warning { background: #f3ad32; }
.quota-track span.exhausted { background: #d9465f; }
.subscription-admin-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e6ebf2; }
.subscription-admin-form button { min-height: 50px; }
#subscription-message, #subscription-error { margin-top: 12px; }
.subscription-warnings { display: grid; gap: 8px; margin-top: 14px; }
.subscription-warning { padding: 11px 13px; border: 1px solid #f3d38b; border-radius: 12px; background: #fff8e5; color: #76520c; font-size: 13px; line-height: 1.45; }
.subscription-warning.urgent { border-color: #efb45b; background: #fff1d6; color: #704006; }
.subscription-warning.exhausted { border-color: #e6a4ac; background: #fff0f2; color: #9c2636; }
.subscription-billing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.subscription-billing-grid > div { display: grid; gap: 5px; min-width: 0; padding: 12px 14px; border-radius: 12px; background: #f3f6fb; }
.subscription-billing-grid span { color: #748094; font-size: 12px; }
.subscription-billing-grid strong { overflow-wrap: anywhere; font-size: 14px; }
.subscription-admin-form { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.subscription-cancel-label { min-height: 50px; align-content: center; }
.subscription-save-button { align-self: end; }
.payments-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e6ebf2; }
.payments-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.payments-heading h4 { margin: 0; font-size: 18px; }
.payments-heading button { flex: 0 0 auto; min-height: 46px; }
.payment-readiness { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.payment-readiness li { color: #687386; font-size: 13px; }
.payment-readiness li::before { content: "○"; display: inline-block; width: 20px; color: #9aa4b5; }
.payment-readiness li.ready { color: #16785b; }
.payment-readiness li.ready::before { content: "✓"; color: #16a376; font-weight: 800; }
.payments-history { display: grid; margin-top: 14px; }
.payment-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf0f4; }
.payment-details { min-width: 0; }
.payment-details strong, .payment-details small { display: block; }
.payment-details small { margin-top: 4px; color: #7b8494; }
.payment-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.payment-continue { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 12px; text-decoration: none; }
#payments-message, #payments-error { margin-top: 12px; }
.workspace-member-form { display: grid; grid-template-columns: minmax(220px, 1fr) 250px auto; gap: 14px; align-items: end; margin-top: 20px; }
.workspace-member-form button { min-height: 50px; }
.workspace-members-table { margin-top: 18px; }
.workspace-members-table td:first-child strong, .workspace-members-table td:first-child small { display: block; }
.workspace-members-table td:first-child small { margin-top: 4px; color: #7b8494; }
.subsection-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.section-help { margin: 7px 0 0; color: #7b8494; font-size: 13px; line-height: 1.5; }
.expert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 14px; margin-top: 18px; }
.expert-card { display: grid; gap: 12px; min-height: 150px; padding: 18px; border: 1px solid #dfe5ef; border-radius: 14px; color: #172033; background: #fff; text-align: left; }
.expert-card:hover { border-color: #9eb7ff; box-shadow: 0 8px 24px rgba(23,32,51,.08); }
.expert-card.selected { border-color: #3566ff; box-shadow: 0 0 0 3px rgba(53,102,255,.1); }
.expert-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.expert-card h5 { margin: 0; font-size: 17px; }
.expert-card p { margin: 0; color: #70798a; font-size: 13px; font-weight: 500; line-height: 1.45; }
.expert-card small { color: #7b8494; font-weight: 500; }
.expert-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.expert-form .wide-field, .expert-form > button { grid-column: 1 / -1; }
.expert-form > button { width: fit-content; }
.model-form { grid-template-columns: 1fr 220px; }
.expert-usage { margin-top: 24px; padding: 20px; border: 1px solid #e1e7f0; border-radius: 15px; background: #f8faff; }
.expert-usage h5 { margin: 0; font-size: 16px; }
.usage-metrics { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 10px; margin-top: 16px; }
.usage-metrics div { padding: 14px; border-radius: 12px; background: #fff; }
.usage-metrics strong { display: block; font-size: 21px; letter-spacing: -.03em; }
.usage-metrics span { color: #747e8f; font-size: 11px; }
.usage-warning { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; color: #8b5a10; background: #fff5dc; font-size: 13px; line-height: 1.45; }
.usage-models { display: grid; gap: 8px; margin-top: 14px; }
.usage-model-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border-radius: 10px; background: #fff; font-size: 12px; }
.usage-model-row strong { overflow-wrap: anywhere; }
.usage-model-row span { color: #747e8f; text-align: right; }
.eval-lab { margin-top: 28px; padding-top: 28px; border-top: 1px solid #e8ecf2; }
.eval-lab h5 { margin: 0; font-size: 17px; }
.eval-model-summary { margin: 16px 0 0; padding: 12px 14px; border-radius: 11px; color: #536178; background: #f3f6fb; font-size: 13px; line-height: 1.5; }
.eval-cases { display: grid; gap: 16px; margin-top: 18px; }
.eval-case { padding: 18px; border: 1px solid #dfe5ef; border-radius: 15px; background: #fbfcfe; }
.eval-case-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.eval-case-head h6 { margin: 0; font-size: 16px; }
.eval-case-number { display: block; margin-bottom: 5px; color: #7ca4ff; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.eval-case-copy { margin: 14px 0 0; padding: 13px 14px; border-radius: 11px; color: #33405a; background: #fff; line-height: 1.55; white-space: pre-wrap; }
.eval-criteria { margin: 10px 0 0; color: #687386; font-size: 13px; line-height: 1.5; }
.eval-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.eval-result { min-width: 0; padding: 14px; border: 1px solid #e0e6ef; border-radius: 12px; background: #fff; }
.eval-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.eval-result h6 { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.eval-result-meta { display: block; margin-top: 7px; color: #7b8494; font-size: 11px; overflow-wrap: anywhere; }
.eval-response { max-height: 330px; margin-top: 12px; padding-top: 12px; overflow-y: auto; border-top: 1px solid #edf0f4; color: #33405a; font-size: 13px; line-height: 1.55; }
.eval-response > :first-child { margin-top: 0; }
.eval-response > :last-child { margin-bottom: 0; }
.eval-run-button { width: 100%; margin-top: 12px; }
.eval-review { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px solid #e7ebf2; }
.eval-review textarea { min-height: 74px; }
.eval-review button { min-height: 44px; }
.eval-review > p, .eval-review > small { grid-column: 1 / -1; }
.prompt-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr); gap: 28px; margin-top: 28px; padding-top: 28px; border-top: 1px solid #e8ecf2; }
.prompt-form { display: grid; gap: 16px; }
.prompt-form button { width: fit-content; }
.prompt-layout h5 { margin: 0 0 12px; font-size: 15px; }
.prompt-versions { display: grid; gap: 10px; }
.prompt-version { padding: 13px; border: 1px solid #e0e6ef; border-radius: 12px; background: #f9fafc; }
.prompt-version-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prompt-version p { margin: 8px 0 0; color: #70798a; font-size: 12px; line-height: 1.45; }
.prompt-version button { width: 100%; min-height: 34px; margin-top: 10px; padding: 0 10px; border-radius: 8px; font-size: 11px; }
.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; }
.chat-controls { display: flex; flex: 1 1 420px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; align-items: center; gap: 10px; }
.chat-controls select { flex: 1 1 240px; width: auto; min-width: 0; max-width: 320px; min-height: 42px; padding-top: 0; padding-bottom: 0; }
.chat-scenario-panel { display: grid; gap: 12px; margin-top: 22px; padding: 18px 20px; border: 1px solid #dce5f4; border-radius: 18px; background: linear-gradient(135deg, #f5f8ff 0%, #f2fbf9 100%); }
.chat-scenario-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.chat-scenario-heading h5 { margin: 4px 0 0; }
.chat-scenario-heading label { min-width: min(100%, 360px); color: #5d687b; font-size: 13px; font-weight: 700; }
.chat-scenario-heading select { margin-top: 6px; }
.chat-scenario-inputs { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-scenario-inputs span { padding: 6px 10px; border: 1px solid #d5dfef; border-radius: 999px; color: #4f5b70; background: #fff; font-size: 12px; }
.chat-scenario-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chat-scenario-actions small { color: #6e7889; }
.chat-messages { display: grid; gap: 14px; max-height: 580px; margin-top: 22px; padding: 20px; overflow-y: auto; border: 1px solid #e3e8f0; border-radius: 16px; background: #f8faff; }
.chat-messages:empty { display: none; }
.chat-message { max-width: min(82%, 780px); padding: 14px 16px; border-radius: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.chat-message.user { justify-self: end; color: #fff; background: #3566ff; border-bottom-right-radius: 5px; }
.chat-message.assistant { justify-self: start; color: #263247; background: #fff; border: 1px solid #dfe5ef; border-bottom-left-radius: 5px; }
.chat-message-meta { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 800; opacity: .72; }
.chat-message-body > :first-child { margin-top: 0; }
.chat-message-body > :last-child { margin-bottom: 0; }
.chat-message-body p, .chat-message-body ul, .chat-message-body ol, .chat-message-body blockquote { margin: 8px 0; }
.chat-message-body pre { max-width: 100%; margin: 10px 0; padding: 12px; overflow-x: auto; border-radius: 10px; color: #e8efff; background: #172139; }
.chat-message-body code { padding: 2px 5px; border-radius: 5px; font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: #edf1f7; }
.chat-message-body pre code { padding: 0; background: transparent; }
.chat-message-body a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-message-body blockquote { padding-left: 12px; border-left: 3px solid #a8b7d4; color: #5e6b80; }
.chat-message.user .chat-message-body { white-space: pre-wrap; }
.chat-message-usage { display: block; margin-top: 9px; font-size: 11px; opacity: .62; }
.chat-message-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.chat-message-actions button { min-height: 36px; }
.chat-message-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.chat-message-images img { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.7); }
.chat-empty { margin-top: 22px; padding: 34px 20px; border: 1px dashed #cbd4e2; border-radius: 16px; text-align: center; background: #f8faff; }
.chat-empty p { margin: 7px 0 0; color: #747e8f; }
.chat-status { margin: 14px 0 0; color: #5e6b80; font-size: 13px; }
.chat-form { display: grid; gap: 12px; margin-top: 16px; }
.chat-result-panel { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr); gap: 22px; margin-top: 16px; padding: 18px; border: 1px solid rgba(68, 98, 255, .2); border-radius: 16px; background: linear-gradient(135deg, rgba(68, 98, 255, .055), rgba(112, 242, 221, .08)); }
.chat-result-panel[hidden] { display: none; }
.chat-result-panel h5 { margin: 4px 0 0; }
.chat-result-panel .section-help { margin-bottom: 0; }
.chat-result-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chat-result-form label { display: grid; gap: 6px; color: #5d687b; font-size: 13px; font-weight: 700; }
.chat-result-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.chat-form textarea { min-height: 110px; }
.chat-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chat-form-footer small { color: #7b8494; }
.chat-form-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-submit-actions { display: flex; align-items: center; gap: 10px; }
.attachment-button { cursor: pointer; }
.chat-attachment-previews { display: flex; gap: 10px; flex-wrap: wrap; }
.chat-attachment-preview { position: relative; width: 92px; padding: 6px; border: 1px solid #dbe2ed; border-radius: 11px; background: #fff; }
.chat-attachment-preview img { display: block; width: 78px; height: 64px; object-fit: cover; border-radius: 7px; }
.chat-attachment-preview button { position: absolute; top: -7px; right: -7px; width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 50%; font-size: 15px; }
.chat-attachment-preview small { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

body.is-authenticated { --experton-sidebar-width: 246px; }
.is-authenticated .brand-panel { padding: 22px 16px; }
.is-authenticated .brand-panel h1 { font-size: 24px; }
.is-authenticated .lead { font-size: 12px; }
.is-authenticated .service-status { margin-top: 16px; font-size: 11px; }
.is-authenticated .workspace { place-items: start center; padding: 28px clamp(20px, 3vw, 48px) 72px; }
.is-authenticated .view { width: min(1320px, 100%); }
.is-authenticated .dashboard-header { position: sticky; top: 0; z-index: 8; margin: -28px calc(clamp(20px, 3vw, 48px) * -1) 0; padding: 22px clamp(20px, 3vw, 48px) 18px; border-bottom: 1px solid #e7ebf1; background: rgba(247,249,252,.94); backdrop-filter: blur(16px); }
.is-authenticated .dashboard-header h2 { font-size: clamp(28px, 3vw, 42px); }

.app-navigation { display: grid; gap: 4px; margin-top: 24px; }
.nav-group-label { margin: 18px 10px 7px; color: #81a8c5; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.nav-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 8px 10px; border-radius: 10px; color: #cbe0ef; background: transparent; font-size: 13px; font-weight: 700; text-align: left; }
.nav-item span { display: grid; place-items: center; color: #79a9c9; font-size: 15px; }
.nav-item small { padding: 3px 6px; border-radius: 999px; color: #89abc1; background: rgba(255,255,255,.07); font-size: 9px; font-weight: 800; }
.nav-item.has-unread { border-color: rgba(200,255,82,.45); background: rgba(200,255,82,.08); }
.nav-item .nav-unread-badge { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; padding: 2px 6px; color: #090a0f; background: #c8ff52; font-size: 10px; line-height: 1; box-shadow: 0 0 0 3px rgba(200,255,82,.12); }
.nav-item .nav-unread-badge[hidden] { display: none; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); transform: none; }
.nav-item.active { color: #fff; background: linear-gradient(135deg, rgba(53,102,255,.72), rgba(19,157,133,.55)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.nav-item.active span { color: #fff; }
.nav-item:disabled { cursor: default; opacity: .58; }
.nav-item:disabled:hover { color: #cbe0ef; background: transparent; }

.product-panel { margin-top: 24px; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.overview-metrics article { min-width: 0; padding: 18px; border: 1px solid #e3e8f0; border-radius: 16px; background: linear-gradient(145deg, #fff, #f7f9fd); }
.overview-metrics span, .overview-metrics small { display: block; color: #748094; font-size: 12px; }
.overview-metrics strong { display: block; margin: 5px 0 3px; font-size: 31px; letter-spacing: -.04em; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 18px; margin-top: 18px; }
.overview-block { min-width: 0; padding: 20px; border: 1px solid #e3e8f0; border-radius: 16px; background: #fbfcfe; }
.overview-block h4 { margin: 0; font-size: 18px; }
.overview-block .section-label { margin-bottom: 7px; }
.text-button.inline { min-height: 32px; margin: 0; font-size: 12px; }
.action-list, .compact-project-list { display: grid; gap: 10px; margin-top: 16px; }
.action-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1px #e6ebf2; }
.action-item strong, .action-item p { display: block; }
.action-item p { margin: 5px 0 0; color: #6f7a8d; font-size: 12px; line-height: 1.45; }
.action-item button { flex: 0 0 auto; }
.compact-project { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 58px; padding: 12px 14px; color: #172033; border: 1px solid #e5e9f0; background: #fff; text-align: left; }
.compact-project:hover { border-color: #b9c9ee; transform: none; }
.compact-project strong, .compact-project small { display: block; }
.compact-project small { margin-top: 4px; color: #7c8799; font-weight: 500; }
.roadmap-note { margin-top: 18px; padding: 18px 20px; border: 1px solid #cfe7df; border-radius: 16px; background: linear-gradient(135deg, #f1fbf7, #f5f8ff); }
.roadmap-note p { margin: 6px 0 0; color: #63736d; font-size: 13px; line-height: 1.5; }

.project-form { display: grid; gap: 16px; margin-top: 22px; padding: 22px; border: 1px solid #dfe6f2; border-radius: 16px; background: #f8faff; }
.project-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.project-form-heading h4 { margin: 0; font-size: 20px; }
.project-form-heading .section-label { margin-bottom: 7px; }
.project-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.project-form > button[type="submit"] { width: fit-content; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.project-card { display: grid; gap: 14px; min-height: 190px; padding: 20px; color: #172033; border: 1px solid #dfe5ef; background: #fff; text-align: left; }
.project-card:hover { border-color: #9eb7ff; box-shadow: 0 10px 28px rgba(23,32,51,.08); transform: translateY(-1px); }
.project-card.selected { border-color: #3566ff; box-shadow: 0 0 0 3px rgba(53,102,255,.1); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-card h4 { margin: 4px 0 0; font-size: 18px; }
.project-code { color: #75a0ff; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.project-card > p { margin: 0; overflow: hidden; color: #687386; font-size: 13px; font-weight: 500; line-height: 1.5; }
.project-card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-self: end; color: #7a8597; font-size: 11px; font-weight: 600; }
.project-detail { margin-top: 24px; padding: 24px; border: 1px solid #dbe3ef; border-radius: 18px; background: #fff; box-shadow: 0 12px 34px rgba(23,32,51,.06); scroll-margin-top: 100px; }
.project-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-detail-head .section-label { margin-bottom: 7px; }
.project-detail-head h4 { margin: 0; font-size: 25px; }
.project-detail-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.project-detail-grid > div { min-width: 0; padding: 14px; border-radius: 12px; background: #f6f8fc; }
.project-detail-grid span { display: block; margin-bottom: 7px; color: #7a8597; font-size: 11px; font-weight: 700; }
.project-detail-grid p, .project-detail-grid strong { margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.project-status-form { display: grid; grid-template-columns: minmax(200px, 300px) auto; align-items: end; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e8ecf2; }
.project-status-form .form-message { grid-column: 1 / -1; }
.project-tasks-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e8ecf2; }
.project-tasks-section h5 { margin: 0; font-size: 18px; }
.task-workflow-guide { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; padding: 12px 14px; border: 1px solid #dbe6fb; border-radius: 12px; color: #30415f; background: #f5f8ff; font-size: 12px; font-weight: 700; }
.task-workflow-guide span { padding: 5px 9px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #dce5f5; }
.task-workflow-guide b { color: #75a0ff; }
.task-workflow-guide small { flex-basis: 100%; color: #718097; font-weight: 500; }
.project-task-form { display: grid; gap: 14px; margin-top: 16px; padding: 18px; border: 1px solid #dfe6f2; border-radius: 14px; background: #f8faff; }
.project-task-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.project-task-form > button[type="submit"] { width: fit-content; }
.project-tasks { display: grid; gap: 14px; margin-top: 16px; }
.compact-empty { padding: 22px; }
.compact-empty p { margin-bottom: 0; }
.project-task-card { min-width: 0; padding: 18px; border: 1px solid #dfe5ef; border-left: 4px solid #b7c1d0; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(23,32,51,.045); }
.project-task-card.status-in_progress { border-left-color: #f3ad3d; }
.project-task-card.status-in_review { border-left-color: #6d8eff; }
.project-task-card.status-revision { border-left-color: #d95a6f; }
.project-task-card.status-accepted { border-left-color: #21b98b; }
.project-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.project-task-head h6 { margin: 0; overflow-wrap: anywhere; font-size: 17px; }
.task-badges { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.project-task-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 12px; color: #718097; font-size: 11px; font-weight: 600; }
.task-detail-block { margin-top: 13px; padding: 12px 14px; border-radius: 11px; background: #f7f9fc; }
.task-detail-block.criteria { background: #f6f8ff; }
.task-detail-block.result { background: #f1faf7; }
.task-detail-block.review { background: #fff7f4; }
.task-detail-block small { display: block; margin-bottom: 5px; color: #758197; font-weight: 800; }
.task-detail-block p { margin: 0; color: #26344d; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.task-management { margin-top: 14px; border-top: 1px solid #edf0f5; }
.task-management summary { width: fit-content; padding-top: 13px; color: #3566ff; cursor: pointer; font-size: 12px; font-weight: 800; }
.task-management-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: 10px; margin-top: 12px; }
.task-actions { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf0f5; }
.task-actions > button { width: fit-content; }
.task-transition-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.task-transition-form.review { grid-template-columns: 1fr; }
.task-transition-form textarea { min-height: 84px; }
.task-review-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.task-comments { margin-top: 15px; padding-top: 14px; border-top: 1px solid #edf0f5; }
.task-comments-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.task-comment-list { display: grid; gap: 8px; margin-top: 10px; }
.task-comment { padding: 10px 12px; border-radius: 10px; background: #f7f9fc; }
.task-comment.submission { background: #f1f7ff; }
.task-comment.review { background: #f1faf7; }
.task-comment small { display: block; color: #758197; font-size: 10px; font-weight: 700; }
.task-comment p { margin: 5px 0 0; color: #27354c; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.task-comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 10px; }
.task-comment-form textarea { min-height: 68px; }
.project-members-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e8ecf2; }
.project-members-section h5 { margin: 0; font-size: 18px; }
.project-role-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.project-role-guide article { padding: 12px 14px; border: 1px solid #e4e9f1; border-radius: 12px; background: #f7f9fc; }
.project-role-guide strong, .project-role-guide span { display: block; }
.project-role-guide strong { color: #1b2740; font-size: 14px; }
.project-role-guide span { margin-top: 5px; color: #687386; font-size: 12px; line-height: 1.45; }
.project-member-form { display: grid; grid-template-columns: minmax(220px, 1fr) 240px auto; gap: 12px; align-items: end; margin-top: 18px; }
.project-members { display: grid; gap: 8px; margin-top: 16px; }
.project-member-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 14px; border: 1px solid #e4e9f1; border-radius: 12px; background: #fbfcfe; }
.project-member-row strong, .project-member-row small { display: block; }
.project-member-row small { margin-top: 4px; color: #7b8494; }
.project-member-controls { display: flex; align-items: center; gap: 8px; }
.project-member-controls select { min-width: 190px; }
#experts-section, #subscription-summary, #workspace-members-section { scroll-margin-top: 105px; }

.order-heading-actions { align-items: end; }
.order-heading-actions label { min-width: min(340px, 72vw); }
.order-workflow-guide { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 14px 16px; border: 1px solid #dbe6fb; border-radius: 13px; color: #30415f; background: linear-gradient(135deg, #f5f8ff, #f3fbf8); font-size: 12px; font-weight: 800; }
.order-workflow-guide span { padding: 6px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #dce5f5; }
.order-workflow-guide b { color: #75a0ff; }
.order-workflow-guide small { flex-basis: 100%; color: #718097; font-weight: 500; line-height: 1.5; }
.order-form { scroll-margin-top: 105px; }
.order-assignment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.order-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.order-card { display: grid; gap: 13px; min-height: 166px; padding: 19px; color: #172033; border: 1px solid #dfe5ef; background: #fff; text-align: left; }
.order-card:hover { border-color: #9eb7ff; box-shadow: 0 10px 28px rgba(23,32,51,.08); transform: translateY(-1px); }
.order-card.selected { border-color: #3566ff; box-shadow: 0 0 0 3px rgba(53,102,255,.1); }
.order-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.order-card h4 { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 18px; }
.order-card > p { margin: 0; color: #687386; font-size: 13px; font-weight: 500; }
.order-card-meta { display: flex; align-self: end; flex-wrap: wrap; gap: 8px 14px; color: #7a8597; font-size: 11px; font-weight: 700; }
.order-detail { scroll-margin-top: 105px; }
.order-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.order-metrics > div { min-width: 0; padding: 14px; border-radius: 12px; background: #f6f8fc; }
.order-metrics span { display: block; margin-bottom: 7px; color: #7a8597; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.order-metrics strong { display: block; overflow-wrap: anywhere; color: #26344d; font-size: 12px; line-height: 1.45; }
.order-copy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.order-copy-grid article { min-width: 0; padding: 15px; border: 1px solid #e5eaf2; border-radius: 12px; background: #fbfcfe; }
.order-copy-grid small { color: #758197; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.order-copy-grid p { margin: 7px 0 0; color: #26344d; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.order-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e8ecf2; }
.order-transition-note { display: block; margin-top: 14px; color: #526079; font-size: 12px; font-weight: 800; }
.order-transition-note textarea { width: 100%; margin-top: 7px; }
.order-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e8ecf2; }
.order-section h5 { margin: 0; font-size: 18px; }
.order-material-form { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; align-items: end; gap: 12px; margin-top: 16px; padding: 16px; border: 1px solid #dfe6f2; border-radius: 13px; background: #f8faff; }
.order-materials, .order-issues { display: grid; gap: 10px; margin-top: 16px; }
.order-material-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 15px; border: 1px solid #e3e8f0; border-radius: 12px; background: #fbfcfe; }
.order-material-identity { min-width: 0; }
.order-material-identity strong, .order-material-identity small { display: block; overflow-wrap: anywhere; }
.order-material-identity small { margin-top: 5px; color: #748094; font-size: 10px; line-height: 1.5; }
.order-material-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.order-material-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.order-issue-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; margin-top: 16px; padding: 17px; border: 1px solid #dfe6f2; border-radius: 13px; background: #f8faff; }
.order-issue-form .wide-field, .order-issue-form > button { grid-column: 1 / -1; }
.order-issue-form > button { width: fit-content; }
.order-issue { padding: 15px; border: 1px solid #e3e8f0; border-left: 4px solid #aeb9c9; border-radius: 12px; background: #fff; }
.order-issue.severity-blocking { border-left-color: #d95a6f; }
.order-issue.severity-warning { border-left-color: #f3ad3d; }
.order-issue.severity-info { border-left-color: #6d8eff; }
.order-issue.resolved { border-left-color: #21b98b; background: #f8fcfa; }
.order-issue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.order-issue p { margin: 10px 0 0; color: #334158; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.order-issue > small { display: block; margin-top: 10px; color: #7b8494; font-size: 10px; }
.order-issue-resolution { padding: 10px 12px; border-radius: 9px; background: #eef8f4; }
.order-issue-resolve { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5eaf2; }
.order-issue-resolve label { color: #334158; font-size: 12px; font-weight: 700; }
.order-issue-resolve textarea { width: 100%; min-height: 68px; resize: vertical; }
.order-issue-resolve button { width: fit-content; }
.order-issue-resolve .form-message { margin: 0; }

.materials-filters { display: grid; grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(150px, 1fr)) auto; align-items: end; gap: 12px; margin-top: 22px; padding: 16px; border: 1px solid #dfe6f2; border-radius: 14px; background: #f8faff; }
.materials-filters button { min-height: 46px; }
.materials-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.materials-summary article { padding: 15px 17px; border-radius: 13px; background: #f5f7fb; }
.materials-summary span, .materials-summary strong { display: block; }
.materials-summary span { color: #758197; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.materials-summary strong { margin-top: 7px; color: #1b2740; font-size: 23px; }
.materials-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.material-card { display: grid; gap: 12px; min-height: 170px; padding: 18px; color: #172033; border: 1px solid #dfe5ef; background: #fff; text-align: left; }
.material-card:hover { border-color: #9eb7ff; box-shadow: 0 10px 28px rgba(23,32,51,.08); transform: translateY(-1px); }
.material-card.selected { border-color: #3566ff; box-shadow: 0 0 0 3px rgba(53,102,255,.1); }
.material-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }
.material-card-head > div { min-width: 0; flex: 1 1 160px; }
.material-card-head .badge, .material-detail .project-detail-head > .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.material-card h4 { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 17px; }
.material-card > p { margin: 0; color: #687386; font-size: 12px; line-height: 1.5; }
.material-card-meta { display: flex; align-self: end; flex-wrap: wrap; gap: 8px 14px; color: #718097; font-size: 10px; font-weight: 800; }
.material-card-meta .expired { color: #bb3d52; }
.material-card-meta .expiring { color: #b47510; }
.material-detail { scroll-margin-top: 105px; }
.material-detail .project-detail-head { flex-wrap: wrap; }
.material-detail .project-detail-head > div { min-width: 0; flex: 1 1 240px; overflow-wrap: anywhere; }
.material-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.material-detail-metrics > div { min-width: 0; padding: 14px; border-radius: 12px; background: #f6f8fc; }
.material-detail-metrics span { display: block; color: #7a8597; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.material-detail-metrics strong { display: block; margin-top: 7px; overflow-wrap: anywhere; color: #26344d; font-size: 12px; }
.material-detail-actions { display: flex; gap: 10px; margin-top: 15px; }
.material-detail-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.material-metadata-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: end; gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid #e8ecf2; }
.material-metadata-form .subsection-heading { grid-column: 1 / -1; }
.project-ai-consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; }
#project-ai-confirm { width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; padding: 0; }
.material-metadata-form h5, .material-versions-section h5 { margin: 0; font-size: 18px; }
.material-versions-section { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e8ecf2; }
.material-versions { display: grid; gap: 9px; margin-top: 15px; }
.material-version { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid #e3e8f0; border-radius: 12px; background: #fbfcfe; }
.material-version.current { border-color: #a9c0ff; background: #f5f8ff; }
.material-version strong, .material-version small { display: block; overflow-wrap: anywhere; }
.material-version small { margin-top: 5px; color: #748094; font-size: 10px; line-height: 1.5; }
.organization-template-form { display: grid; grid-template-columns: 1fr 1.4fr auto; align-items: end; gap: 12px; margin-top: 18px; }
.organization-template-list { display: grid; gap: 10px; margin-top: 18px; }
.organization-template-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid #e0e6ef; border-radius: 14px; background: #fbfcfe; }
.organization-template-card.archived { opacity: .72; }
.organization-template-card strong, .organization-template-card p { display: block; margin: 0; }
.organization-template-card p { margin-top: 5px; color: #707c8f; font-size: 12px; }
.organization-template-meta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 820px) {
  :root { --experton-sidebar-width: min(82vw, 300px); }
  .shell { grid-template-columns: 1fr; }
  .brand-panel {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 12px;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: auto;
    height: auto;
    padding: 14px 18px 16px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 30px rgba(3,19,37,.12);
  }
  .brand-mark { grid-row: 1 / 3; margin: 0; }
  .brand-panel .eyebrow { align-self: end; margin: 0 0 3px; font-size: 13px; }
  .brand-panel h1 { grid-column: 2; font-size: 18px; }
  .lead { grid-column: 1 / -1; margin-top: 10px; font-size: 11px; }
  .service-status { grid-column: 1 / -1; margin-top: 8px; }
  .workspace { min-height: calc(100vh - 150px); padding: 34px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .dashboard-header { flex-direction: column; }
  .dashboard-actions { width: 100%; justify-content: stretch; }
  .dashboard-actions .workspace-select { flex: 1; min-width: 0; max-width: none; }
  .copy-row { grid-template-columns: 1fr; }
  .admin-panel { padding: 20px; }
  .panel-heading { flex-direction: column; }
  .metrics { grid-template-columns: 1fr; }
  .admin-section-heading, .lead-card-header { align-items: stretch; flex-direction: column; }
  .compact-filter { min-width: 0; }
  .lead-card-grid { grid-template-columns: 1fr 1fr; }
  .lead-controls { grid-template-columns: 1fr; }
  .lead-actions { justify-content: stretch; }
  .lead-actions button { flex: 1; }
  .lead-delivery-row, .lead-event-row { align-items: stretch; flex-direction: column; }
  .lead-delivery-state { justify-items: start; text-align: left; }
  .row-actions { min-width: 130px; }
  .workspace-summary, .subsection-heading { flex-direction: column; }
  .subscription-heading { flex-direction: column; }
  .subscription-context { text-align: left; }
  .subscription-usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-billing-grid, .entitlement-access-grid { grid-template-columns: 1fr; }
  .subscription-admin-form { grid-template-columns: 1fr; }
  .payments-heading, .payment-row { align-items: stretch; flex-direction: column; }
  .payment-actions { flex-wrap: wrap; }
  .workspace-counters { flex-wrap: wrap; white-space: normal; }
  .expert-form, .model-form, .prompt-layout, .eval-results, .eval-review, .workspace-member-form, .organization-template-form { grid-template-columns: 1fr; }
  .organization-template-card { align-items: stretch; flex-direction: column; }
  .usage-metrics { grid-template-columns: repeat(2, 1fr); }
  .expert-form .wide-field, .expert-form > button { grid-column: auto; }
  .heading-actions { flex-wrap: wrap; }
  .chat-controls { width: 100%; flex-wrap: wrap; }
  .chat-controls select { width: 100%; }
  .chat-scenario-heading, .chat-scenario-actions { align-items: stretch; flex-direction: column; }
  .chat-result-panel, .chat-result-form { grid-template-columns: 1fr; }
  .chat-result-actions { grid-column: 1; }
  .chat-scenario-heading label { width: 100%; min-width: 0; }
  .chat-message { max-width: 94%; }
  .chat-form-footer { align-items: flex-start; flex-direction: column; }
  .chat-submit-actions { width: 100%; }
  .chat-submit-actions button { flex: 1; }
  body.is-authenticated { --experton-sidebar-width: 100%; }
  .is-authenticated .brand-panel { position: relative; display: flex; padding: 14px 16px 10px; }
  .is-authenticated .brand-mark, .is-authenticated .brand-panel .lead { display: none; }
  .is-authenticated .brand-panel .eyebrow { margin: 0; }
  .is-authenticated .brand-panel h1 { font-size: 18px; }
  .is-authenticated .service-status { margin-top: 8px; }
  .app-navigation { display: flex; width: 100%; margin-top: 12px; padding-bottom: 4px; overflow-x: auto; }
  .app-navigation { scrollbar-width: none; scroll-snap-type: x proximity; }
  .app-navigation::-webkit-scrollbar { display: none; }
  .app-navigation .nav-item { scroll-snap-align: start; }
  .nav-group-label, .nav-item.upcoming { display: none; }
  .nav-item { display: flex; flex: 0 0 auto; width: auto; min-height: 40px; white-space: nowrap; }
  .nav-item small { display: none; }
  .nav-item .nav-unread-badge:not([hidden]) { display: inline-flex; }
  .is-authenticated .workspace { min-height: calc(100vh - 150px); padding: 20px 14px 54px; }
  .is-authenticated .dashboard-header { position: relative; margin: -20px -14px 0; padding: 18px 14px; }
  .overview-metrics, .overview-grid, .project-grid, .project-form-grid, .project-detail-grid, .project-status-form, .project-member-form, .project-role-guide, .project-task-form-grid, .task-management-form, .task-transition-form, .task-comment-form, .order-grid, .order-assignment-grid, .order-metrics, .order-copy-grid, .order-material-form, .order-issue-form, .materials-filters, .materials-grid, .materials-summary, .material-detail-metrics, .material-metadata-form { grid-template-columns: 1fr; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-item, .project-member-row, .order-material-row, .material-version { align-items: stretch; flex-direction: column; }
  .order-heading-actions, .order-material-actions { width: 100%; flex-wrap: wrap; }
  .order-heading-actions label { width: 100%; min-width: 0; }
  .order-issue-form .wide-field, .order-issue-form > button { grid-column: auto; }
  .material-metadata-form .subsection-heading { grid-column: auto; }
  .order-material-actions > * { flex: 1; }
  .project-member-controls { flex-wrap: wrap; }
  .project-member-controls select { min-width: 0; }
  .project-task-head { flex-direction: column; }
  .task-badges { justify-content: flex-start; }
  .task-review-buttons { justify-content: stretch; }
  .task-review-buttons button { flex: 1; }
  .project-status-form .form-message { grid-column: auto; }
}
:root .material-extracted-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 28rem;
  overflow-y: auto;
  min-width: 0;
  max-width: 100%;
  padding: 1rem;
  border: 1px solid var(--border, #ddd);
  border-radius: 0.75rem;
  font: inherit;
  line-height: 1.6;
}
.material-text-section { min-width: 0; }
#material-text-provenance { overflow-wrap: anywhere; }
