:root {
  --navy: #0d1b2b;
  --navy-2: #14263a;
  --ink: #172033;
  --text: #344054;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #dfe6ee;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #f1f5f9;
  --blue: #1267e8;
  --blue-soft: #edf5ff;
  --green: #00b884;
  --green-dark: #009d71;
  --green-soft: #eafbf5;
  --amber: #d97706;
  --amber-soft: #fff7e8;
  --red: #dc2626;
  --red-soft: #fff0f0;
  --purple: #7c3aed;
  --purple-soft: #f4efff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
  --radius: 12px;
  --radius-sm: 8px;
  --header: 70px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--surface-2);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

svg {
  display: block;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header);
  display: grid;
  grid-template-columns: 245px 1fr 170px;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  user-select: none;
  cursor: pointer;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 36px;
}

.brand-mark span {
  position: absolute;
  top: 2px;
  width: 13px;
  height: 32px;
  border-radius: 5px;
  background: var(--green);
  transform: skew(-14deg);
}

.brand-mark span:first-child {
  left: 4px;
}

.brand-mark span:last-child {
  left: 21px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  color: var(--navy);
  font-size: 20px;
  letter-spacing: .14em;
  font-weight: 800;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .01em;
}

.topnav {
  justify-self: center;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-item {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
  transition: .16s ease;
}

.nav-item:hover {
  background: #f3f6f9;
  color: var(--navy);
}

.nav-item.active {
  background: #edf9f5;
  color: #008d67;
}

.nav-item svg,
.icon-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-badge {
  min-width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 20px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-action {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--muted);
}

.icon-action:hover {
  color: var(--green-dark);
  border-color: #a9dfce;
  background: var(--green-soft);
}

.profile-button {
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.workspace {
  width: min(1540px, calc(100% - 64px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.page-heading {
  min-height: 74px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.page-heading h1,
.flow-title h1 {
  margin: 4px 0 4px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.page-heading p,
.flow-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  color: #7b8798;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .11em;
}

.heading-actions {
  display: flex;
  gap: 9px;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 13px;
  transition: .15s ease;
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.button.primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.button.secondary {
  background: white;
  border-color: var(--line-strong);
  color: #475467;
}

.button.secondary:hover {
  border-color: #9baabd;
  background: #fbfcfd;
}

.button.large {
  min-height: 44px;
  padding: 0 22px;
}

.loading-state {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #dce3ea;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.operational-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.operational-metric {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  background: white;
  text-align: left;
}

.operational-metric:last-child {
  border-right: 0;
}

.operational-metric:hover {
  background: #fbfcfd;
}

.operational-metric > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.operational-metric strong {
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -.025em;
}

.operational-metric small {
  color: var(--muted);
  font-size: 11px;
}

.metric-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.metric-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-icon.green {
  color: #008d67;
  background: var(--green-soft);
}

.metric-icon.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-icon.red {
  color: var(--red);
  background: var(--red-soft);
}

.metric-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.operation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
}

.operation-panel,
.attention-panel {
  min-height: 390px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-heading {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.02em;
}

.text-button {
  border: 0;
  background: transparent;
  color: #008d67;
  font-size: 12px;
  font-weight: 750;
}

.activity-list,
.attention-list {
  padding: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: 155px minmax(180px, 1fr) 150px 155px 120px 25px;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 20px;
  border-bottom: 1px solid #edf1f5;
  cursor: pointer;
}

.activity-row:hover {
  background: #fafcfd;
}

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

.activity-row strong {
  color: var(--ink);
  font-size: 12px;
}

.activity-row small {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 10px;
}

.attention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #edf1f5;
}

.attention-item:last-child {
  border-bottom: 0;
}

.attention-item > b {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
}

.attention-item strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.attention-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.empty-state {
  min-height: 250px;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.search-field {
  width: min(520px, 50%);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
}

.search-field svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--soft);
  stroke-width: 1.8;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.toolbar > select {
  height: 42px;
  min-width: 190px;
  padding: 0 35px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: white;
  color: #475467;
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.unit-card {
  min-height: 165px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  cursor: pointer;
  transition: .15s ease;
}

.unit-card:hover {
  border-color: #b9c7d5;
  transform: translateY(-1px);
}

.unit-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.unit-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.unit-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.unit-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 23px;
  padding-top: 14px;
  border-top: 1px solid #edf1f5;
}

.unit-card-meta small {
  display: block;
  color: var(--soft);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.unit-card-meta strong {
  display: block;
  margin-top: 4px;
  color: #475467;
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 20px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 750;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.active,
.status-pill.completed {
  background: var(--green-soft);
  color: #008d67;
}

.status-pill.maintenance,
.status-pill.waiting {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.out,
.status-pill.cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.flow-shell,
.maintenance-flow {
  width: min(1640px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.flow-top {
  margin-bottom: 18px;
}

.flow-top.compact {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: start;
}

.back-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #52657b;
  font-size: 12px;
  font-weight: 650;
}

.back-button:hover {
  color: var(--green-dark);
}

.flow-title {
  margin-top: 14px;
}

.flow-top.compact .flow-title {
  margin-top: 0;
}

.flow-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}

.flow-index {
  position: sticky;
  top: calc(var(--header) + 18px);
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 12px 0 0 12px;
}

.flow-index-item {
  position: relative;
  width: 100%;
  min-height: 57px;
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 7px;
  border: 0;
  background: transparent;
  text-align: left;
}

.flow-index-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 35px;
  left: 20px;
  width: 1px;
  height: 31px;
  background: #d9e1e9;
}

.flow-index-item > b {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid #cdd8e4;
  border-radius: 50%;
  background: white;
  color: #8795a8;
  font-size: 10px;
}

.flow-index-item span {
  display: flex;
  flex-direction: column;
  padding-top: 1px;
}

.flow-index-item strong {
  color: #3d4b5e;
  font-size: 11px;
  line-height: 1.25;
}

.flow-index-item small {
  margin-top: 3px;
  color: #9aa6b5;
  font-size: 9px;
}

.flow-index-item.active > b {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.flow-index-item.active strong {
  color: var(--blue);
}

.flow-content {
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
  border-radius: 0 12px 12px 0;
}

.flow-section {
  scroll-margin-top: calc(var(--header) + 18px);
  margin-bottom: 12px;
  padding: 0 14px 15px;
  border: 1px solid #dbe4ed;
  border-radius: 9px;
  background: white;
}

.flow-section:last-child {
  margin-bottom: 0;
}

.section-heading {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 -14px 14px;
  padding: 11px 14px;
  border-bottom: 1px solid #e5ebf1;
}

.section-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-number {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -.015em;
}

.section-heading p {
  margin: 3px 0 0;
  color: #8592a3;
  font-size: 9px;
}

.section-status {
  color: #8492a5;
  font-size: 9px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field > span {
  color: #425166;
  font-size: 10px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #ccd8e5;
  border-radius: 6px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 11px;
  transition: .15s ease;
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4afbd;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #7cb2f5;
  box-shadow: 0 0 0 3px rgba(18, 103, 232, .08);
}

.field input:disabled {
  background: #f2f5f8;
  color: #78879a;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #e66868;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .06);
}

.media-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.subheading,
.inner-panel h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 11px;
}

.subheading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
}

.subheading-row .subheading {
  margin: 0;
}

.small-button {
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid #c9d6e3;
  border-radius: 6px;
  background: white;
  color: var(--blue);
  font-size: 9px;
  font-weight: 750;
}

.small-button:hover {
  background: var(--blue-soft);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.photo-slot {
  position: relative;
  height: 105px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px dashed #aebfd2;
  border-radius: 7px;
  background: #fbfdff;
  color: #718198;
  cursor: pointer;
}

.photo-slot:hover {
  border-color: var(--blue);
  background: #f7fbff;
}

.photo-slot input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-slot > b {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 15px;
}

.photo-slot > strong {
  position: relative;
  z-index: 2;
  font-size: 9px;
  font-weight: 650;
}

.photo-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-position: center;
  background-size: cover;
}

.photo-slot.has-image > b,
.photo-slot.has-image > strong {
  opacity: 0;
}

.photo-slot.has-image::after {
  content: "Cambiar";
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(13, 27, 43, .82);
  color: white;
  font-size: 8px;
}

.document-drafts {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.document-draft {
  display: grid;
  grid-template-columns: 1.1fr .9fr 130px 135px 28px;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e1e7ee;
  border-radius: 7px;
  background: #fbfcfe;
}

.document-draft input,
.document-draft select {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #ccd8e5;
  border-radius: 5px;
  outline: 0;
  background: white;
  color: #475467;
  font-size: 9px;
}

.document-draft .remove-row {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #98a2b3;
}

.document-draft .remove-row:hover {
  background: var(--red-soft);
  color: var(--red);
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inner-panel {
  padding: 13px;
  border: 1px solid #e0e7ee;
  border-radius: 7px;
  background: #fbfcfe;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.equipment-grid label {
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid #e1e7ee;
  border-radius: 6px;
  background: white;
  color: #526174;
  font-size: 10px;
  cursor: pointer;
}

.equipment-grid input {
  accent-color: var(--blue);
}

.confirm-section {
  background: #fbfdff;
}

.confirmation-summary {
  min-height: 80px;
  padding: 13px;
  border: 1px solid #dce5ee;
  border-radius: 7px;
  background: white;
  color: #65758a;
  font-size: 11px;
  line-height: 1.6;
}

.flow-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.maintenance-board {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, .7fr);
  align-items: start;
  gap: 12px;
}

.maintenance-main,
.maintenance-side {
  min-width: 0;
}

.maintenance-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.maintenance-main .flow-section {
  margin: 0;
}

.maintenance-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-panel {
  padding: 13px;
  border: 1px solid #dbe4ed;
  border-radius: 9px;
  background: white;
}

.side-panel-heading {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: -13px -13px 13px;
  padding: 9px 13px;
  border-bottom: 1px solid #e5ebf1;
}

.side-panel-heading h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
}

.photo-placeholder {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px dashed #b8c6d6;
  border-radius: 7px;
  background: #fbfdff;
  color: #7d8ba0;
  text-align: center;
}

.photo-placeholder > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 18px;
}

.photo-placeholder strong {
  margin-top: 5px;
  color: #4c5c70;
  font-size: 10px;
}

.photo-placeholder small {
  font-size: 8px;
}

.sticky-status {
  position: sticky;
  top: calc(var(--header) + 15px);
}

.status-flow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 8px 0 21px;
}

.status-flow span {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #9aa5b4;
  text-align: center;
  font-size: 8px;
}

.status-flow span b {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid #d3dce6;
  border-radius: 50%;
  background: white;
  color: #8794a6;
  font-size: 9px;
}

.status-flow span.current {
  color: var(--blue);
  font-weight: 750;
}

.status-flow span.current b {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.status-flow i {
  flex: 1;
  height: 1px;
  margin-top: 12px;
  background: #dce3eb;
}

.status-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #e7ecf1;
}

.status-preview > div {
  padding: 14px 8px 4px;
}

.status-preview > div + div {
  border-left: 1px solid #e7ecf1;
}

.status-preview small {
  display: block;
  color: #8995a5;
  font-size: 8px;
}

.status-preview strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
}

.empty-inline {
  min-height: 55px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px dashed #cdd8e4;
  border-radius: 7px;
  background: #fbfcfe;
  color: #8794a5;
  font-size: 10px;
}

.maintenance-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 12px 0;
}

.maintenance-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.maintenance-card {
  display: grid;
  grid-template-columns: 175px minmax(190px, 1fr) 130px 150px 135px 130px 24px;
  align-items: center;
  gap: 15px;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  cursor: pointer;
}

.maintenance-card:hover {
  border-color: #b9c7d5;
}

.maintenance-card strong {
  color: var(--ink);
  font-size: 11px;
}

.maintenance-card small {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 9px;
}

.order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.order-header h1 {
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 26px;
}

.order-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.order-actions {
  display: flex;
  gap: 7px;
}

.order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 380px;
  align-items: start;
  gap: 12px;
}

.order-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.order-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 38px;
  margin: -14px -14px 13px;
  padding: 9px 14px;
  border-bottom: 1px solid #e7ecf1;
}

.order-panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.order-data {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.order-data small {
  display: block;
  color: #8996a7;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.order-data strong {
  display: block;
  margin-top: 4px;
  color: #39485b;
  font-size: 11px;
}

.expense-list {
  width: 100%;
  border-collapse: collapse;
}

.expense-list th,
.expense-list td {
  padding: 9px 7px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  font-size: 9px;
}

.expense-list th {
  color: #8a96a7;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.expense-list td {
  color: #4a596d;
}

.expense-list td:last-child,
.expense-list th:last-child {
  text-align: right;
}

.expense-total {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 12px 7px 2px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.maintenance-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.maintenance-photo {
  position: relative;
  aspect-ratio: 1.35;
  overflow: hidden;
  border-radius: 6px;
  background: #edf1f5;
}

.maintenance-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-maintenance-photo {
  aspect-ratio: 1.35;
  display: grid;
  place-items: center;
  border: 1px dashed #afbed0;
  border-radius: 6px;
  background: #fbfdff;
  color: var(--blue);
  font-size: 20px;
  cursor: pointer;
}

.document-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-alert {
  display: grid;
  grid-template-columns: 55px minmax(200px, 1fr) 220px 180px 130px;
  align-items: center;
  gap: 15px;
  min-height: 66px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.document-alert > b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
}

.document-alert strong {
  color: var(--ink);
  font-size: 11px;
}

.document-alert small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.cost-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.cost-metric {
  min-height: 100px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.cost-metric small {
  color: #8491a2;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.cost-metric strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 22px;
}

.cost-order-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cost-order {
  display: grid;
  grid-template-columns: 180px minmax(200px, 1fr) 170px 150px;
  align-items: center;
  min-height: 59px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.cost-order strong {
  color: var(--ink);
  font-size: 11px;
}

.cost-order small {
  color: var(--muted);
  font-size: 9px;
}

.unit-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.unit-detail-header h1 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 28px;
}

.unit-detail-header p {
  margin: 0;
  color: var(--muted);
}

.unit-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .7fr);
  gap: 12px;
}

.detail-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.detail-panel h2 {
  margin: 0 0 13px;
  color: var(--ink);
  font-size: 13px;
}

.detail-data {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.detail-data small {
  display: block;
  color: #8b97a7;
  font-size: 8px;
  text-transform: uppercase;
}

.detail-data strong {
  display: block;
  margin-top: 4px;
  color: #405064;
  font-size: 11px;
}

.toast-container {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 280px;
  max-width: 430px;
  padding: 12px 14px;
  border: 1px solid #d9e3eb;
  border-radius: 8px;
  background: white;
  box-shadow: 0 15px 35px rgba(16, 24, 40, .14);
  color: #475467;
  font-size: 11px;
  animation: toastIn .18s ease-out;
}

.toast.success {
  border-left: 4px solid var(--green);
}

.toast.error {
  border-left: 4px solid var(--red);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 27, 43, .48);
  backdrop-filter: blur(2px);
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  border-radius: 11px;
  background: white;
  box-shadow: 0 25px 70px rgba(13, 27, 43, .25);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: -18px -18px 17px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 18px;
}

.modal-close {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 6px;
  background: #f3f5f7;
  color: #667085;
  font-size: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1350px) {
  .topbar {
    grid-template-columns: 205px 1fr 110px;
    padding: 0 20px;
  }

  .nav-item {
    padding: 0 9px;
  }

  .nav-item span {
    display: none;
  }

  .unit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid.cols-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid.cols-4 .span-2 {
    grid-column: span 2;
  }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .document-draft {
    grid-template-columns: 1fr 1fr 110px 28px;
  }

  .document-draft input[type="file"] {
    grid-column: span 3;
  }
}

#view-units #unitsGrid:has(.empty-state) {
  min-height: calc(100vh - 330px);
  display: block;
}

#view-units #unitsGrid > .empty-state {
  width: 100%;
  min-height: calc(100vh - 330px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: 200px;
  object-fit: contain;
}
