:root {
  --centuria-blue: #0875c1;
  --centuria-blue-dark: #075b94;
  --ink: #1e2933;
  --muted: #64717d;
  --line: #d9e0e6;
  --soft: #f4f7f9;
  --panel: #ffffff;
  --good: #218739;
  --warn: #bd7b00;
  --bad: #b3261e;
  --shadow: 0 5px 20px rgba(25, 45, 60, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

a { color: var(--centuria-blue-dark); }

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: #111820;
  color: white;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand img {
  width: 275px;
  max-width: 45vw;
  height: auto;
}

.app-name {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: .2px;
}

.app-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #aeb9c3;
}

.userbox {
  text-align: right;
  font-size: 13px;
}

.user-name { font-weight: 650; }
.user-email { color: #aeb9c3; margin: 2px 0 4px; }
.userbox a { color: #c7e6fb; text-decoration: none; }

.page {
  width: min(1500px, calc(100% - 36px));
  margin: 28px auto 42px;
}

.dashboard-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

p { line-height: 1.5; }
.muted { color: var(--muted); }

.grid.two {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
}

.card {
  margin-bottom: 20px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa5ae;
}
.dot.ok { background: var(--good); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

.contract-tools {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--centuria-blue-dark);
  cursor: pointer;
}

.contract-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
}

.check-row.compact { margin: 14px 0; }
.check-row input { margin-top: 3px; }
.check-row span { display: flex; flex-direction: column; gap: 2px; }
.check-row small { color: var(--muted); }

.form-row {
  margin: 14px 0;
}

.form-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.form-row small {
  color: var(--muted);
  font-weight: 400;
}

input[type="text"],
input[type="search"],
select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #bfc9d2;
  border-radius: 8px;
  background: white;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
}

.button.primary {
  background: var(--centuria-blue);
  color: white;
}
.button.primary:hover { background: var(--centuria-blue-dark); }

.button.secondary {
  color: #24313b;
  background: white;
  border-color: #bfc9d2;
}

.button.subtle {
  color: var(--centuria-blue-dark);
  background: #eef7fd;
  border-color: #c9e3f5;
}

.button.large {
  min-height: 48px;
  padding: 12px 22px;
}
.button.full { width: 100%; }

.action-form { margin: 10px 0; }

.download-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.host-note {
  margin-top: 22px;
  padding: 14px;
  border-left: 4px solid var(--centuria-blue);
  background: #f2f8fc;
  border-radius: 6px;
}

.host-note p {
  margin: 5px 0 0;
  color: #43515c;
  font-size: 13px;
}

code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #e8edf1;
  font-family: Consolas, monospace;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.live-card pre {
  height: 330px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  background: #101820;
  color: #d9e7f0;
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge.neutral { background: #e8edf1; }
.badge.running { background: #e4f2ff; color: #075b94; }

.search { width: min(360px, 100%); }

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  font-size: 13px;
}

th, td {
  padding: 10px 11px;
  text-align: left;
  border-bottom: 1px solid #e7ebee;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #eef3f6;
  color: #34434e;
  font-weight: 700;
  z-index: 1;
}

tbody tr:hover { background: #f8fbfd; }

.fit {
  display: inline-flex;
  min-width: 30px;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 6px;
  font-weight: 800;
}
.fit-a { background: #dff3e4; color: #17652a; }
.fit-b { background: #e4f1fb; color: #155a8b; }
.fit-c { background: #fff2cf; color: #8a5a00; }
.fit-d { background: #fde6e4; color: #98261f; }

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fafbfc;
  border-radius: 8px;
}

.editor {
  width: 100%;
  min-height: 360px;
  padding: 13px;
  border: 1px solid #bfc9d2;
  border-radius: 8px;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}
.editor.tall { min-height: 560px; }

.login-card {
  width: min(620px, 100%);
  margin: 70px auto;
  padding: 38px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.login-logo {
  width: min(440px, 90%);
  margin-bottom: 25px;
}

.login-card p {
  color: var(--muted);
  margin: 10px auto 24px;
}

.fine-print {
  font-size: 12px;
}

footer {
  padding: 20px;
  color: #71808c;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .contract-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 14px 18px;
  }

  .brand img {
    width: 210px;
  }

  .app-name,
  .app-subtitle {
    display: none;
  }

  .dashboard-head {
    flex-direction: column;
  }
}


.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 0 4px;
  font-size: 14px;
}

.breadcrumbs a {
  text-decoration: none;
  font-weight: 600;
}

.crumb-sep {
  color: #89959f;
}

.top-actions {
  margin-top: 0;
  flex-wrap: wrap;
}

.top-actions form {
  margin: 0;
}

.file-card {
  padding: 0;
  overflow: hidden;
}

.file-list {
  display: flex;
  flex-direction: column;
}

.file-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(260px, 1fr) 190px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #e7ebee;
  color: inherit;
  text-decoration: none;
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row:hover {
  background: #f5f9fc;
}

.folder-row {
  grid-template-columns: 42px minmax(260px, 1fr) 190px;
}

.file-icon {
  font-size: 24px;
  text-align: center;
}

.file-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-main strong {
  overflow-wrap: anywhere;
}

.file-main small {
  color: var(--muted);
  margin-top: 3px;
}

.file-modified {
  color: var(--muted);
  font-size: 12px;
}

.file-download {
  min-width: 92px;
}

@media (max-width: 780px) {
  .file-row,
  .folder-row {
    grid-template-columns: 36px 1fr;
  }

  .file-modified {
    display: none;
  }

  .file-download {
    grid-column: 2;
    justify-self: start;
  }
}


.workflow-divider {
  height: 1px;
  background: #e7ebee;
  margin: 22px 0;
}


button:disabled,
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.manual-upload-card {
  border: 1px solid #dfe6ea;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 18px;
  background: #fbfcfd;
}

.manual-upload-card ol {
  margin: 10px 0 14px 22px;
  padding: 0;
}

.manual-upload-card li {
  margin: 6px 0;
}


.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.button-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-left: 6px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

.button.tiny {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.feedback-cell {
  min-width: 92px;
}

.opportunity-actions {
  min-width: 155px;
}

.opportunity-actions,
.opportunity-actions form {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
}

.fit-score-select {
  width: 68px;
  min-width: 68px;
  padding: 6px 8px;
  border-width: 2px;
  font-weight: 800;
}

.opportunity-lookup-form {
  margin: 18px 0;
}

.opportunity-lookup-form > label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.opportunity-lookup-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.opportunity-lookup-row input {
  width: min(420px, 100%);
}

.opportunity-lookup-result {
  border: 1px solid #dfe6ea;
  border-radius: 12px;
  padding: 18px;
  background: #fbfcfd;
}

.opportunity-lookup-result h3 {
  margin: 8px 0 12px;
}

.ai-evaluation {
  max-height: 560px;
  overflow: auto;
  padding: 16px;
  border: 1px solid #dfe6ea;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.lookup-actions {
  margin-top: 16px;
}

.lookup-not-found {
  margin-top: 14px;
}

.notice {
  margin: 0 0 18px;
  padding: 13px 15px;
  border: 1px solid #b8d9c5;
  border-radius: 10px;
}

.notice.success {
  color: #155d34;
  background: #eef9f2;
}

.feedback-summary-grid,
.feedback-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.feedback-summary-grid > div,
.feedback-meta-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-summary-grid small,
.feedback-meta-grid small,
.feedback-comment small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feedback-form > label,
.approval-form > label,
.reject-form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.feedback-grid {
  margin-bottom: 16px;
}

.learning-scope {
  border: 1px solid #dfe6ea;
  border-radius: 10px;
  padding: 14px;
  margin: 0 0 16px;
}

.learning-scope legend {
  font-weight: 700;
  padding: 0 6px;
}

.radio-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 4px;
}

.radio-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.radio-row small {
  color: var(--muted);
}

.phrase-field.hidden,
.review-phrase-field.hidden,
.hidden {
  display: none !important;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.feedback-review-card {
  border-left: 4px solid #c8d0d6;
}

.feedback-review-card.status-approved {
  border-left-color: #3f7c51;
}

.feedback-review-card.status-pending {
  border-left-color: #c58b23;
}

.feedback-review-card.status-rejected {
  border-left-color: #a64b4b;
}

.feedback-review-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.feedback-title-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.feedback-review-head h2 {
  margin: 7px 0 4px;
}

.feedback-score-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.score-arrow {
  color: var(--muted);
}

.feedback-comment,
.learning-approved-box,
.learning-rejected-box,
.feedback-admin-review {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
}

.feedback-comment {
  background: #f6f8fa;
}

.feedback-comment p,
.learning-approved-box p,
.learning-rejected-box p {
  margin-bottom: 0;
}

.learning-approved-box {
  background: #f2f8f4;
  border: 1px solid #d5e8db;
}

.learning-rejected-box {
  background: #fbf4f4;
  border: 1px solid #ead7d7;
}

.feedback-admin-review {
  border: 1px solid #dfe6ea;
  background: #fbfcfd;
}

.reject-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e3e8eb;
}

.button.danger {
  background: #8f3636;
  color: white;
}

.badge.pending {
  background: #fff4d8;
}

.badge.approved {
  background: #e5f3e8;
}

.badge.rejected {
  background: #f6e4e4;
}

.learning-explainer {
  background: #f8fafb;
}

@media (max-width: 900px) {
  .feedback-summary-grid,
  .feedback-meta-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .feedback-review-head {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .feedback-summary-grid,
  .feedback-meta-grid {
    grid-template-columns: 1fr;
  }
}


.step-kicker {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.next-workflow-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d8e1e7;
  border-radius: 10px;
  background: #f8fbfd;
}

.next-workflow-card h3 {
  margin: 0 0 5px;
}

.next-workflow-card p {
  margin: 0;
}

.step-four-dashboard {
  border-width: 2px;
}

.step-four-dashboard form {
  margin: 0;
  flex: 0 0 auto;
}

.upload-summary-strip {
  margin-bottom: 18px;
}

.upload-instructions ol {
  margin: 8px 0 0 22px;
}

.upload-instructions li {
  margin: 8px 0;
}

.upload-contract-card {
  padding-bottom: 0;
  overflow: hidden;
}

.upload-contract-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}

.upload-contract-head h2 {
  margin: 0 0 4px;
}

.upload-contract-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.upload-table-wrap {
  margin-left: -18px;
  margin-right: -18px;
}

.upload-table {
  width: 100%;
}

.upload-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.upload-status.ready {
  background: #e5f3e8;
}

.upload-status.linked {
  background: #e4f1f7;
}

.upload-status.cui {
  background: #fff1d6;
}

.upload-status.warning {
  background: #f6e4e4;
}

.final-sharepoint-step {
  border: 2px solid #cfdde6;
  background: #f8fbfd;
}

.final-sharepoint-step h2 {
  margin-top: 0;
}

.button.large {
  min-height: 46px;
  padding: 11px 18px;
  font-size: 15px;
}

.step-four-note {
  margin-top: 12px;
  margin-bottom: 0;
}

@media (max-width: 850px) {
  .next-workflow-card,
  .upload-contract-head {
    flex-direction: column;
  }

  .upload-contract-actions {
    justify-content: flex-start;
  }
}




.upload-contract-actions form {
  margin: 0;
}
