:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #172736;
  background: #f6f7f9;
  --mtech-navy: #172736;
  --mtech-orange: #b94f00;
  --mtech-ink: #243746;
  --mtech-muted: #667783;
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  display: flex;
  min-height: 100vh;
}
aside {
  width: 234px;
  background: var(--mtech-navy);
  color: #edf8f6;
  padding: 35px 22px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: 1.5px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.8px;
  margin-top: 6px;
  color: #aac3c0;
}
.monogram {
  border: 1px solid #5a807c;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 24px;
  color: #b9ded3;
}
.workspace-label,
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #718b88;
}
.workspace-label {
  margin: 53px 12px 17px;
  color: #93aaa7;
}
nav {
  display: grid;
  gap: 7px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  padding: 12px 17px;
  font-weight: 600;
  background: var(--mtech-orange);
  color: white;
  transition: background 0.15s;
}
button:hover {
  background: #8f3e00;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
nav button {
  background: transparent;
  color: #b7cac7;
  text-align: left;
  font-size: 13px;
  padding: 14px;
}
nav button:hover,
nav .active {
  background: #2b3e4d;
  color: white;
}
.aside-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #c3d5d2;
  padding: 25px 7px 0;
}
.aside-bottom p {
  font-size: 10px;
  color: #839e99;
  margin-left: 15px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #72bb9b;
  margin-right: 7px;
}
main {
  margin-left: 234px;
  padding: 40px 44px 20px;
  width: calc(100% - 234px);
  max-width: 1800px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
  margin: 9px 0 0;
}
h2 {
  font-size: 19px;
  letter-spacing: -0.35px;
  margin: 10px 0 18px;
}
p {
  line-height: 1.65;
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pill {
  color: #8b470d;
  background: #fff0e2;
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1px;
}
.secondary {
  background: white;
  color: #536b69;
  border: 1px solid #dce4e2;
  padding: 9px 13px;
}
.secondary:hover {
  background: #fff5ec;
}
.card {
  background: white;
  border: 1px solid #e0e7e4;
  border-radius: 12px;
  padding: 25px;
}
.login {
  max-width: 560px;
  margin: 65px auto 95px;
  padding: 38px;
}
.login h2 {
  font-size: 27px;
  line-height: 1.2;
}
.login p {
  color: #73817f;
}
.login form {
  margin: 28px 0 20px;
}
.login button {
  width: 100%;
  margin-top: 14px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4e6664;
}
input,
select,
textarea {
  display: block;
  border: 1px solid #d7e1dd;
  background: #fff;
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  color: #223d38;
  width: 100%;
  margin: 8px 0 17px;
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #9a4300;
}
small,
.muted {
  color: #7b8c89;
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 25px 0;
}
.stats > div {
  background: white;
  border: 1px solid #e0e7e4;
  border-radius: 9px;
  padding: 20px 23px;
}
.stats span {
  font-size: 12px;
  color: #617775;
}
.stats strong {
  display: block;
  font-size: 31px;
  margin: 13px 0 8px;
  font-weight: 650;
}
.stats small {
  font-size: 10px;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 22px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-wrap {
  overflow-x: auto;
  min-height: 230px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  color: #7e8c8b;
  padding: 13px 10px;
  background: #f7f9f8;
}
td {
  padding: 15px 10px;
  border-bottom: 1px solid #edf1ef;
  max-width: 240px;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
td button {
  padding: 5px 7px;
  font-size: 11px;
  background: #eaf2ef;
  color: #266451;
}
.empty {
  padding: 50px 20px;
  text-align: center;
  color: #83928e;
  line-height: 1.8;
}
.state {
  background: #edf4ef;
  color: #42675d;
  border-radius: 6px;
  padding: 11px;
  margin: 18px 0;
  font-size: 11px;
  line-height: 1.7;
}
.messages {
  max-height: 390px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.bubble {
  padding: 12px 15px;
  border-radius: 10px;
  max-width: 95%;
  background: #f1f4f3;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.inbound {
  background: #e8f2ed;
  align-self: flex-end;
}
.bubble small {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}
.chip {
  background: #f3f6f4;
  color: #5a776c;
  border: 1px solid #dce7df;
  padding: 6px 9px;
  margin: 0 4px 14px 0;
  font-size: 10px;
}
.chip:hover {
  background: #e4eee7;
}
.footnote {
  display: block;
  line-height: 1.6;
  margin-top: 21px;
  font-size: 10px;
}
.quote-builder {
  margin-top: 22px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.quote-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 85px;
  gap: 14px;
  align-items: center;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
#notice {
  color: #a04431;
  margin: 0;
  min-height: 20px;
}
#quote-result {
  white-space: pre-wrap;
  line-height: 1.7;
  color: #245748;
  margin: 16px 0;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #94a19d;
  font-size: 10px;
  margin-top: 35px;
}
button:focus-visible {
  outline: 2px solid #9a4300;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  main {
    padding: 28px 24px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stats > div {
    padding: 15px;
  }
}
@media (max-width: 760px) {
  body {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    padding: 20px;
  }
  .workspace-label,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 18px;
    gap: 5px;
  }
  nav button {
    white-space: nowrap;
    padding: 9px;
  }
  .brand {
    font-size: 15px;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 23px 16px;
  }
  h1 {
    font-size: 24px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .card {
    padding: 20px;
  }
  .login {
    margin: 30px auto;
  }
  footer {
    display: block;
    line-height: 1.8;
  }
  footer span {
    display: block;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .quote-line {
    grid-template-columns: minmax(0, 1fr) 75px;
  }
  .quote-line button {
    grid-column: 1/-1;
    margin-bottom: 15px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions button {
    font-size: 11px;
    padding: 8px;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.content-grid {
  align-items: start;
}
.content-grid:has(#detail[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}
#queue-summary,
#queue-retry {
  margin-bottom: 22px;
}
.queue-counts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.queue-counts > div {
  border: 1px solid #e0e7e4;
  border-radius: 8px;
  padding: 15px;
}
.queue-counts strong {
  display: block;
  font-size: 26px;
  margin-bottom: 8px;
}
.queue-counts span {
  font-size: 11px;
  color: #617775;
}
#queue-filter {
  max-width: 280px;
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .queue-counts {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .queue-counts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.phase3-panel {
  margin-top: 22px;
}
.phase3-panel pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.phase3-panel li p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}
.check-label input {
  width: auto;
  margin: 0;
}
#lead-reviews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-actions {
  flex-wrap: wrap;
}
.review-summary {
  margin-bottom: 18px;
}
.review-summary-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.review-summary-item {
  border: 1px solid #e0e7e4;
  border-radius: 8px;
  padding: 13px 15px;
  background: #fffaf5;
}
.review-summary-item span {
  display: block;
  color: var(--mtech-muted);
  font-size: 12px;
}
.review-summary-item strong {
  display: block;
  color: var(--mtech-ink);
  font-size: 23px;
  margin-top: 5px;
}
.review-boundary {
  margin-bottom: 0;
}
@media (max-width: 760px) {
  .review-summary-items {
    grid-template-columns: 1fr;
  }
}

.priority-workspace {
  margin: 25px 0 30px;
}
.priority-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.priority-heading h2 {
  font-size: 30px;
  margin: 8px 0 6px;
  letter-spacing: -0.8px;
}
.priority-badge {
  white-space: nowrap;
  color: #245748;
  background: #e5ede5;
}
.priority-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.priority-tile {
  background: #fff;
  border: 1px solid #e0e7e4;
  border-radius: 10px;
  padding: 17px 20px;
  border-top: 3px solid #9aa9b3;
}
.priority-tile.urgent {
  border-top-color: #d65b45;
}
.priority-tile.high {
  border-top-color: var(--mtech-orange);
}
.priority-tile span {
  display: block;
  color: var(--mtech-muted);
  font-size: 12px;
}
.priority-tile strong {
  display: block;
  color: var(--mtech-ink);
  font-size: 28px;
  margin-top: 8px;
}
.priority-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: start;
}
.priority-list h3,
.priority-boundary h3 {
  margin: 7px 0 3px;
  font-size: 19px;
}
.priority-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #e7eceb;
  padding: 17px 0;
}
.priority-item:first-child {
  border-top: 0;
}
.priority-item h4 {
  margin: 5px 0 2px;
  font-size: 15px;
  color: var(--mtech-ink);
}
.priority-item p {
  margin: 0 0 4px;
}
.priority-item small {
  color: #7b8c89;
}
.priority-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #657782;
}
.priority-label.urgent {
  color: #b23b2f;
}
.priority-label.high {
  color: #b45d16;
}
.priority-boundary {
  background: #fffaf5;
  border-color: #f2dcc8;
}
.priority-boundary dl {
  margin: 18px 0 0;
}
.priority-boundary dl div {
  border-top: 1px solid #f0dfd0;
  padding: 12px 0;
}
.priority-boundary dt {
  font-weight: 700;
  color: var(--mtech-ink);
  font-size: 12px;
}
.priority-boundary dd {
  margin: 5px 0 0;
  color: var(--mtech-muted);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .priority-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .priority-heading {
    display: block;
  }
  .priority-heading .priority-badge {
    display: inline-block;
    margin-top: 10px;
  }
  .priority-heading h2 {
    font-size: 25px;
  }
  .priority-summary {
    grid-template-columns: 1fr;
  }
  .priority-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .priority-item button {
    width: 100%;
  }
}
