@import url("/brand/fonts.css");
:root {
  --ink: #172a31;
  --muted: #64777f;
  --red: #cf0000;
  --navy: #174169;
  --line: #dce4e7;
  --bg: #f4f7f8;
  --green: #137d65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Changa, Tahoma, sans-serif;
  font-size: 16px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 9px 17px;
  font-weight: 600;
}
button:hover {
  border-color: var(--navy);
  background: #edf3f7;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: var(--navy);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #84b4db;
  outline-offset: 2px;
}
.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.primary:hover {
  background: #aa0010;
  border-color: #aa0010;
}
.dark {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.danger {
  color: #aa2031;
  background: #fff1f2;
}
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #10242c;
  color: #fff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img {
  height: 65px;
  width: 65px;
  object-fit: contain;
  background: white;
  border-radius: 12px;
}
.brand b {
  font-family: Sora, sans-serif;
  font-size: 19px;
}
.brand small {
  display: block;
  color: #bdcbd1;
  font-size: 13px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav button {
  border: 0;
  text-align: right;
  color: #bdccd2;
  background: transparent;
  padding: 12px 16px;
}
.sidebar nav button.active {
  color: white;
  background: #24434e;
  border-inline-start: 3px solid #ed3939;
}
.nav-icon {
  display: inline-block;
  width: 28px;
  color: #8fa7b2;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #30464f;
  padding-top: 20px;
  font-size: 13px;
  color: #9fb4bd;
}
.sidebar-foot strong {
  color: white;
  display: block;
}
.main {
  min-width: 0;
}
.topbar {
  padding: 18px 38px;
  background: white;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.topbar span {
  font-size: 14px;
  color: var(--muted);
}
.role {
  display: flex;
  align-items: center;
  gap: 10px;
}
.role select {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.content {
  padding: 30px 38px;
  max-width: 1500px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
h1 {
  font-size: 29px;
  line-height: 1.5;
  margin: 0;
  font-weight: 600;
}
h2 {
  font-size: 20px;
  margin: 0 0 16px;
  font-weight: 600;
}
h3 {
  font-size: 17px;
  margin: 0 0 10px;
}
p {
  margin: 4px 0 12px;
}
.sub,
.muted {
  color: var(--muted);
  font-size: 14px;
}
.pill {
  display: inline-block;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  background: #e9eff4;
  color: var(--navy);
  white-space: nowrap;
}
.pill.good {
  background: #e1f2ed;
  color: var(--green);
}
.pill.warn {
  background: #fff1d5;
  color: #916014;
}
.pill.bad {
  background: #ffe4e6;
  color: #ad2336;
}
.banner {
  border: 1px solid #e5d7b4;
  background: #fff9ec;
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero {
  background: #174169;
  color: white;
  border-radius: 15px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.hero p {
  color: #d8e5ef;
}
.hero .muted {
  color: #c8d9e7;
}
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hero small {
  display: block;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  position: relative;
}
.stat strong {
  display: block;
  font-family: Sora, sans-serif;
  font-size: 32px;
  margin: 5px 0 0;
  font-weight: 500;
}
.stat span {
  font-size: 14px;
  color: var(--muted);
}
.stat i {
  position: absolute;
  inset-inline-end: 20px;
  top: 20px;
  color: #9aaeb7;
  font-style: normal;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-header h2 {
  margin: 0;
}
.flow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.flow span {
  padding: 7px 14px;
  border-radius: 7px;
  background: #f0f4f6;
  font-size: 14px;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty .empty-icon {
  font-size: 35px;
  color: #8ea6b2;
  margin-bottom: 10px;
}
.empty h3 {
  color: var(--ink);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: right;
}
th {
  background: #f5f8f9;
  color: var(--muted);
  font-weight: 500;
  padding: 12px;
  white-space: nowrap;
}
td {
  border-bottom: 1px solid #edf1f3;
  padding: 14px 12px;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 600;
}
td small {
  display: block;
  color: var(--muted);
}
.latin {
  font-family: Sora, Changa, sans-serif;
  font-size: 13px;
  direction: ltr;
  unicode-bidi: embed;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.actions button,
.actions a {
  font-size: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.form-grid.two {
  grid-template-columns: repeat(2, 1fr);
}
label {
  display: block;
  font-size: 14px;
  color: #4b636f;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cad7dd;
  background: white;
  border-radius: 8px;
  color: var(--ink);
  margin-top: 6px;
  min-height: 45px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--navy);
}
.full {
  grid-column: 1/-1;
}
#parts {
  display: grid;
  gap: 20px;
}
.part-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, .4fr);
  gap: 14px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--navy);
  border-radius: 10px;
  background: #f7f9fb;
}
.part-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.part-heading h3 { margin: 0; }
.part-heading button { color: #943438; padding: 4px 10px; }
.form-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 25px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.chips button {
  font-size: 13px;
  padding: 6px 12px;
}
.chips .active {
  background: var(--navy);
  color: white;
}
.detail-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.kv {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
.kv div {
  font-size: 14px;
}
.kv span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.inline-check {
  display: flex;
  gap: 10px;
  align-items: center;
}
.offer-form {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr;
  gap: 10px;
  align-items: end;
}
.note {
  border-inline-start: 3px solid var(--navy);
  padding: 10px 14px;
  background: #f0f5f8;
  font-size: 14px;
}
.list-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.list-item:last-child {
  border-bottom: 0;
}
.clock {
  font-family: Sora, Changa, sans-serif;
  font-size: 14px;
}
.timeline {
  border-inline-start: 2px solid #dde6eb;
  padding-inline-start: 18px;
}
.timeline > div {
  margin: 0 0 18px;
  font-size: 14px;
}
.timeline small {
  display: block;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 500px;
  background: #163d33;
  color: white;
  padding: 15px 22px;
  border-radius: 10px;
  box-shadow: 0 8px 30px #0002;
  z-index: 99;
  display: none;
}
#toast.error {
  background: #8c2030;
}
.selected-row {
  background: #f3faf7;
}
.message {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}
.message h3 {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.message .actions {
  margin-top: 12px;
}
.phone {
  direction: ltr;
  display: inline-block;
}
.tagline {
  letter-spacing: 1px;
  font-family: Sora, sans-serif;
  font-size: 11px;
  color: #93aab6;
}
.progress-fields {
  display: flex;
  gap: 8px;
  align-items: end;
}
.progress-fields input {
  width: 75px;
}
.schedule {
  padding: 12px 0;
}
.schedule b {
  display: block;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 200px 1fr;
  }
  .content {
    padding: 24px;
  }
  .topbar {
    padding: 16px 24px;
  }
  .sidebar {
    padding: 25px 14px;
  }
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .offer-form {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    gap: 12px;
  }
  .brand img {
    width: 42px;
    height: 42px;
  }
  .brand small,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 126px), 1fr));
    gap: 3px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }
  .nav-icon {
    display: none;
  }
  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .content {
    padding: 18px 14px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  h1 {
    font-size: 24px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head > .actions {
    max-width: 150px;
  }
  .card {
    padding: 17px;
  }
  .form-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }
  .part-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .hero {
    padding: 22px;
  }
  .hero h2 {
    font-size: 21px;
  }
  .message {
    grid-template-columns: 1fr;
  }
  .offer-form {
    grid-template-columns: 1fr 1fr;
  }
  .flow span {
    font-size: 12px;
  }
  .topbar > span {
    display: none;
  }
}

.supplier-offer {
  border: 1px solid #dbe2e4;
  border-radius: 12px;
  padding: 18px;
  margin: 18px 0;
}
.offer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.offer-options fieldset {
  min-width: 0;
  border: 1px solid #dbe2e4;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.offer-options legend {
  font-weight: 700;
  padding: 0 8px;
}
.offer-options input:disabled {
  background: #f1f4f6;
}
@media (max-width: 700px) {
  .offer-options {
    grid-template-columns: 1fr;
  }
}
