:root {
  font-family: Inter, "Segoe UI", sans-serif;
  color: #17253a;
  background: #f4f6f9;
  font-synthesis: none;
  --nav: #101e35;
  --primary: #285ee8;
  --border: #e0e5ee;
  --muted: #66758a;
  --surface: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  font-weight: 800;
  font-size: 25px;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: #dbe6f9;
  display: flex;
  flex-direction: column;
  padding: 30px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
  padding: 0 12px;
}
.workspace-name {
  margin: 30px 12px 20px;
  padding: 15px 0;
  border-top: 1px solid #2a384d;
  border-bottom: 1px solid #2a384d;
  font-size: 14px;
  line-height: 1.6;
}
.workspace-name small {
  display: block;
  color: #98acc9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.navigation {
  display: grid;
  gap: 5px;
}
.navigation a {
  padding: 13px 14px;
  border-radius: 9px;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #acbed8;
}
.navigation a:hover {
  background: #1b2c46;
  color: white;
}
.navigation a.active {
  background: #243c62;
  color: white;
}
.nav-icon {
  width: 22px;
  text-align: center;
  font-size: 16px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 28px 12px 0;
  color: #9aafcb;
  font-size: 12px;
  line-height: 1.7;
}
.main {
  min-width: 0;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: 82px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar small {
  font-size: 12px;
  color: var(--muted);
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-name {
  font-size: 13px;
  font-weight: 600;
}
.account-name small {
  display: block;
  font-weight: 400;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9efff;
  color: #2850a1;
  font-weight: 700;
  font-size: 12px;
}
.content {
  padding: 32px 38px 48px;
  max-width: 1560px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin: 0 0 8px;
  font-weight: 720;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  padding: 10px 16px;
  border-radius: 8px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.button.secondary {
  background: white;
  color: #334764;
  border-color: #d3dce9;
}
.button.ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding: 8px;
}
.button.danger {
  background: #fff4f3;
  color: #b43630;
  border-color: #f2cfcb;
}
.button.small {
  padding: 6px 10px;
  min-height: 32px;
  font-size: 12px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-heading {
  padding: 19px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.panel-heading h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0;
}
.panel-body {
  padding: 22px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 25px;
}
.metric {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  display: block;
  font-size: 28px;
  letter-spacing: -1px;
  margin: 14px 0 6px;
  font-weight: 700;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric.featured {
  border-top: 3px solid var(--primary);
}
.filters {
  display: flex;
  gap: 12px;
  padding: 17px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  align-items: end;
  flex-wrap: wrap;
}
.filters label {
  min-width: 130px;
  flex: 1;
}
.filters .wide {
  flex: 2;
  min-width: 210px;
}
label {
  display: grid;
  gap: 7px;
  color: #35465e;
  font-size: 12px;
  font-weight: 600;
}
input,
select,
textarea {
  border: 1px solid #ccd6e5;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: #17253a;
  min-width: 0;
  width: 100%;
  font-size: 14px;
  min-height: 42px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #285ee815;
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
input[type="checkbox"] {
  min-height: auto;
  width: 16px;
  height: 16px;
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 550;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 14px 22px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 17px 22px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.row-link {
  font-weight: 650;
  color: #25496e;
  text-decoration: none;
}
.row-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 650;
  background: #eef1f6;
  color: #51627b;
}
.badge.IN_PROGRESS,
.badge.ISSUED,
.badge.APPROVED {
  background: #e9f0ff;
  color: #2d5ba5;
}
.badge.CHECKED_IN,
.badge.PENDING,
.badge.DRAFT {
  background: #fff3dd;
  color: #936716;
}
.badge.COMPLETED,
.badge.active {
  background: #e6f4ec;
  color: #2b7854;
}
.badge.inactive,
.badge.REJECTED {
  background: #fcece9;
  color: #a84b3b;
}
.empty {
  text-align: center;
  padding: 55px 22px;
  color: var(--muted);
  font-size: 14px;
  white-space: normal;
}
.empty strong {
  display: block;
  margin-bottom: 8px;
  color: #35465e;
  font-size: 16px;
}
.pagination {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
  background: #fff;
}
.tabs button {
  background: none;
  border: 0;
  padding: 17px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.tabs button.selected {
  color: var(--primary);
  border-color: var(--primary);
}
.error {
  padding: 12px 15px;
  border: 1px solid #f0cbc6;
  background: #fff2f0;
  color: #a43d32;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}
.notice {
  padding: 12px 15px;
  background: #eef3fd;
  color: #486386;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.form-section h3 {
  margin: 0 0 16px;
  font-size: 15px;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 22px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.facts dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.total strong {
  font-size: 24px;
  letter-spacing: -0.5px;
}
.note {
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}
.note:first-child {
  padding-top: 0;
}
.note p {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 14px;
  margin: 8px 0;
}
.note small {
  color: var(--muted);
  font-size: 11px;
}
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.evidence-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.evidence-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 5px;
  background: #eff2f7;
}
.evidence-card p {
  font-size: 12px;
  line-height: 1.5;
}
.photo-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  background: #f1f4f8;
}
.line-picker {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 10px;
  margin: 14px 0;
}
.line-rows input {
  max-width: 150px;
  min-height: 36px;
  padding: 7px;
}
.line-rows td {
  padding: 10px 12px;
}
.line-rows .name-cell {
  white-space: normal;
  min-width: 160px;
}
.line-total {
  font-size: 20px;
  text-align: right;
  font-weight: 650;
  padding: 15px;
}
.signature {
  width: 100%;
  height: 220px;
  touch-action: none;
  border: 1px dashed #9baec7;
  border-radius: 8px;
  background: #fff;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fff;
}
.login-aside {
  background: #101e35;
  color: #e7eef9;
  padding: 62px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-aside h1 {
  font-size: 46px;
  font-weight: 650;
  letter-spacing: -1.8px;
  line-height: 1.15;
  max-width: 520px;
}
.login-aside p {
  color: #a6b8d3;
  font-size: 16px;
  line-height: 1.8;
  max-width: 410px;
}
.login-aside .login-footnote {
  font-size: 12px;
}
.login-main {
  padding: 45px;
  display: grid;
  place-content: center;
}
.login-card {
  width: min(370px, 100%);
}
.login-card h2 {
  font-size: 28px;
  margin: 0 0 10px;
  letter-spacing: -0.7px;
}
.login-card > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.login-card label {
  margin: 20px 0;
}
.login-card .button {
  width: 100%;
  margin-top: 10px;
}
.login-card small {
  display: block;
  margin-top: 23px;
  color: var(--muted);
  line-height: 1.6;
}
dialog {
  border: 0;
  border-radius: 14px;
  width: min(780px, calc(100vw - 28px));
  padding: 0;
  color: inherit;
  max-height: 92vh;
  box-shadow: 0 24px 100px #0004;
}
dialog::backdrop {
  background: #0a142b80;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.4px;
}
.modal-form {
  padding: 24px 26px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 400px;
  background: #172a43;
  color: #fff;
  padding: 14px 20px;
  border-radius: 9px;
  box-shadow: 0 5px 30px #0002;
  display: none;
  z-index: 20;
  font-size: 13px;
}
.loading {
  padding: 55px;
  text-align: center;
  color: var(--muted);
}
.print-document {
  background: white;
  max-width: 850px;
  margin: 30px auto;
  padding: 30px;
}
.print-document h1 {
  font-size: 24px;
}
.print-document img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}
.print-document .print-logo {
  width: 110px;
  float: right;
}
.print-document .signature-image {
  max-height: 130px;
}
.print-document table {
  white-space: normal;
}
.print-document .note {
  break-inside: avoid;
}
@media (max-width: 1100px) {
  .content {
    padding: 28px 23px;
  }
  .topbar {
    padding: 0 23px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 25px 12px;
  }
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }
  .brand {
    font-size: 21px;
  }
  .sidebar .workspace-name,
  .sidebar-footer {
    display: none;
  }
  .navigation {
    display: flex;
    overflow-x: auto;
    margin-top: 15px;
  }
  .navigation a {
    flex-shrink: 0;
    padding: 10px;
  }
  .nav-icon {
    display: none;
  }
  .topbar {
    height: 70px;
    padding: 0 18px;
  }
  .account-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .content {
    padding: 24px 16px;
  }
  .page-heading {
    flex-direction: column;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric strong {
    font-size: 23px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .facts {
    gap: 17px;
  }
  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .line-picker {
    grid-template-columns: 1fr;
  }
  .login-page {
    display: block;
  }
  .login-aside {
    padding: 25px;
  }
  .login-aside h1,
  .login-aside p {
    display: none;
  }
  .login-main {
    padding: 45px 24px;
  }
  .login-card {
    width: 100%;
  }
  .filters label {
    min-width: 120px;
  }
  .modal-form {
    padding: 20px;
  }
  .modal-header {
    padding: 20px;
  }
}
@media print {
  body {
    background: #fff;
  }
  .print-document {
    margin: 0;
    padding: 0;
    max-width: none;
  }
  .print-document a {
    color: #000;
    text-decoration: none;
  }
  .panel,
  .metric {
    box-shadow: none;
  }
  thead {
    display: table-header-group;
  }
  tr,
  .evidence-card {
    break-inside: avoid;
  }
  .no-print {
    display: none !important;
  }
}
