:root {
  --blue: #079bd3;
  --blue-strong: #007eac;
  --blue-soft: #e8f8fd;
  --navy: #173448;
  --navy-2: #214b62;
  --ink: #182d3c;
  --muted: #718392;
  --muted-2: #9aabb7;
  --line: #dce7ee;
  --line-strong: #c9d9e3;
  --bg: #f4f8fb;
  --panel: #ffffff;
  --green: #109c6c;
  --green-soft: #e5f7f0;
  --orange: #e69331;
  --orange-soft: #fff3df;
  --red: #de5262;
  --red-soft: #fdecef;
  --violet: #6d6ad6;
  --violet-soft: #efefff;
  --shadow: 0 10px 28px rgba(30, 67, 91, 0.08);
  --shadow-lg: 0 24px 70px rgba(18, 55, 78, 0.22);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-width: 246px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% -10%, rgba(7, 155, 211, 0.08), transparent 28rem),
    var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  color: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(7, 155, 211, 0.22);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 16px 18px;
  background:
    radial-gradient(circle at 15% 8%, rgba(18, 181, 235, 0.2), transparent 13rem),
    linear-gradient(180deg, #15384c 0%, #102a3b 100%);
  color: #fff;
  overflow-y: auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 10px;
}

.brand-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 44px;
  color: #fff;
  background: linear-gradient(145deg, #27c3ee, #078fc6);
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px 14px 20px 20px;
  box-shadow: 0 8px 20px rgba(0, 153, 207, 0.28);
  clip-path: polygon(50% 0, 94% 17%, 88% 70%, 50% 100%, 12% 70%, 6% 17%);
}

.brand-symbol::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 10px 10px 15px 15px;
}

.brand-letter {
  position: relative;
  z-index: 1;
  margin-top: -1px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -2px;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.brand-subtitle {
  margin-top: 4px;
  color: rgba(235, 247, 252, 0.66);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.sidebar-role-card {
  margin: 26px 6px 18px;
  padding: 13px 14px;
  border: 1px solid rgba(115, 205, 234, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-role-label {
  color: rgba(229, 246, 252, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-role-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 700;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #66e4b2;
  box-shadow: 0 0 0 4px rgba(102, 228, 178, 0.1);
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-section-label {
  margin: 18px 13px 7px;
  color: rgba(221, 240, 248, 0.42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-radius: 11px;
  color: rgba(235, 247, 252, 0.74);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(11, 158, 211, 0.95), rgba(11, 158, 211, 0.76));
  box-shadow: 0 8px 18px rgba(0, 116, 157, 0.25);
}

.nav-item:active {
  transform: scale(0.985);
}

.nav-item span {
  font-size: 13px;
  font-weight: 650;
}

.nav-item-badge {
  min-width: 22px;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.nav-item.active .nav-item-badge {
  color: var(--blue-strong);
  background: #fff;
}

.nav-future {
  opacity: 0.52;
}

.sidebar-foot {
  margin-top: auto;
  padding: 20px 8px 2px;
}

.prototype-note {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(232, 245, 250, 0.68);
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  line-height: 1.65;
}

.prototype-note strong {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
}

.main-area {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(213, 227, 236, 0.85);
  background: rgba(250, 252, 253, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.mobile-brand .brand-symbol {
  width: 29px;
  height: 32px;
  border-radius: 9px 9px 13px 13px;
  font-size: 14px;
}

.mobile-brand .brand-letter {
  font-size: 15px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 750;
}

.breadcrumb-separator {
  color: var(--muted-2);
}

.role-switch {
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.role-switch--server {
  border-color: #cce4ee;
  background: #f8fdff;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.role-option.active {
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--blue-strong);
  border-color: #b9ddeb;
  background: #f9fdff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 4px;
}

.user-chip-button {
  padding: 4px 7px 4px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}

.user-chip-button:hover {
  border-color: var(--line);
  background: #f8fbfc;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #0ca7df, #0c789f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 850;
}

.avatar.small {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 10px;
}

.avatar.alt {
  background: linear-gradient(145deg, #7681da, #5651a7);
}

.avatar.warm {
  background: linear-gradient(145deg, #ec9d43, #c27423);
}

.avatar.green {
  background: linear-gradient(145deg, #36b68b, #177858);
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  margin-left: -7px;
  border: 2px solid #fff;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.avatar-more {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: -7px;
  border: 2px solid #fff;
  border-radius: 9px;
  color: var(--muted);
  background: #edf3f6;
  font-size: 9px;
  font-weight: 800;
}

.user-copy {
  display: grid;
  gap: 2px;
}

.user-name {
  font-size: 12px;
  font-weight: 750;
}

.user-role {
  color: var(--muted);
  font-size: 10px;
}

.content {
  width: min(100%, 1580px);
  margin: 0 auto;
  padding: 32px 34px 56px;
}

.page {
  animation: page-in 260ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--blue-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.page-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.page-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn-primary {
  color: #fff;
  border-color: var(--blue-strong);
  background: linear-gradient(145deg, #0aa8df, #007fae);
  box-shadow: 0 7px 16px rgba(0, 129, 174, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 9px 22px rgba(0, 129, 174, 0.28);
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fff;
}

.btn-secondary:hover {
  color: var(--blue-strong);
  border-color: #acd8e9;
}

.btn-success {
  color: #fff;
  border-color: #0c8c61;
  background: linear-gradient(145deg, #18ac7b, #0a855c);
}

.btn-danger {
  color: var(--red);
  border-color: #f2c5cc;
  background: #fff8f9;
}

.btn-ghost {
  padding-inline: 10px;
  color: var(--blue-strong);
  border-color: transparent;
  background: transparent;
}

.btn-sm {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.notice-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid #c4e7f3;
  border-radius: 12px;
  color: #2b6278;
  background: linear-gradient(90deg, #eefaff, #f8fdff);
  font-size: 11px;
  line-height: 1.55;
}

.notice-banner .notice-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--blue-strong);
  background: #dff6fd;
}

.notice-banner strong {
  color: #17495d;
}

.return-notice {
  margin-top: 14px;
  border-color: #efc8ce;
  color: #86303d;
  background: #fff7f8;
}

.return-notice .notice-icon {
  color: #b42335;
  background: #fde7eb;
}

.return-notice strong {
  color: #9f2636;
}

.return-time {
  color: #9d7077;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  position: relative;
  min-height: 134px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 7px 20px rgba(43, 82, 105, 0.04);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -27px;
  bottom: -42px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--metric-glow, rgba(7, 155, 211, 0.08));
}

.metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: var(--metric-color, var(--blue-strong));
  background: var(--metric-bg, var(--blue-soft));
}

.metric-value {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: var(--navy);
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric-value .unit {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.metric-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.trend-up {
  color: var(--green);
  font-weight: 800;
}

.trend-warn {
  color: var(--orange);
  font-weight: 800;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.content-grid--main {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.82fr);
}

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

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

.attendance-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid #cde7f0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 12%, rgba(7, 155, 211, 0.1), transparent 12rem),
    linear-gradient(120deg, #f4fcfe, #ffffff);
}

.attendance-clock-label {
  color: var(--blue-strong);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.attendance-clock-value {
  margin-top: 5px;
  color: var(--navy);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1;
}

.attendance-clock-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

.btn-clock {
  min-width: 132px;
  min-height: 48px;
  border-radius: 13px;
}

.attendance-photo-action {
  cursor: pointer;
  user-select: none;
}

.attendance-photo-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 142px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  background: #f4f7f9;
  font-size: 10px;
  font-weight: 750;
}

.attendance-times {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.attendance-time-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfdfe;
}

.attendance-time-card span {
  color: var(--muted);
  font-size: 8px;
}

.attendance-time-card strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.attendance-payline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.attendance-payline > div {
  display: grid;
  gap: 7px;
  padding: 13px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.attendance-payline > div:last-child {
  border-right: 0;
  background: var(--green-soft);
}

.attendance-payline span {
  color: var(--muted);
  font-size: 8px;
}

.attendance-payline strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.attendance-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.attendance-proof {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attendance-proof img,
.attendance-proof-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.attendance-proof-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--muted);
  background: #f4f8fa;
  font-size: 9px;
}

.attendance-proof figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.attendance-clockout-confirm {
  display: grid;
  gap: 14px;
}

.attendance-confirm-heading {
  display: grid;
  gap: 5px;
}

.attendance-confirm-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.attendance-confirm-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.attendance-confirm-notice {
  margin: 0;
}

.attendance-confirm-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.attendance-confirm-summary > div {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fbfc;
}

.attendance-confirm-summary span {
  color: var(--muted);
  font-size: 8px;
}

.attendance-confirm-summary strong {
  color: var(--navy);
  font-size: 15px;
}

.attendance-confirm-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attendance-confirm-photo img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #eef4f7;
}

.attendance-confirm-photo figcaption {
  padding: 8px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

@media (max-width: 640px) {
  .attendance-confirm-summary {
    grid-template-columns: 1fr;
  }
}

.stack {
  display: grid;
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px 15px;
  border-bottom: 1px solid #edf2f5;
}

.panel-title {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.panel-body {
  padding: 20px;
}

.panel-body.flush {
  padding: 0;
}

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

.section-title {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  color: var(--blue-strong);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th {
  padding: 11px 13px;
  color: var(--muted);
  background: #f8fbfc;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 13px;
  border-bottom: 1px solid #edf2f5;
  color: #314757;
  font-size: 11px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 130ms ease;
}

.data-table tbody tr:hover {
  background: #f9fcfd;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .clickable-row {
  cursor: pointer;
}

.task-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.product-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(8, 155, 212, 0.14), rgba(23, 52, 72, 0.06)),
    #eef6fa;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--blue-strong);
}

.cell-main {
  max-width: 255px;
  overflow: hidden;
  color: var(--navy);
  font-weight: 750;
  text-overflow: ellipsis;
}

.cell-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mono {
  color: var(--navy-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

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

.status-in_progress {
  color: #087eaf;
  background: #e7f7fd;
}

.status-submitted,
.status-recall_requested {
  color: #b97314;
  background: var(--orange-soft);
}

.status-completed {
  color: #087d57;
  background: var(--green-soft);
}

.status-returned {
  color: var(--red);
  background: var(--red-soft);
}

.status-ready {
  color: #6461c5;
  background: var(--violet-soft);
}

.status-active {
  color: #087d57;
  background: var(--green-soft);
}

.status-inactive {
  color: #778692;
  background: #eef2f4;
}

.status-pass {
  color: #087d57;
  background: var(--green-soft);
}

.status-fail {
  color: var(--red);
  background: var(--red-soft);
}

.status-pending {
  color: #778692;
  background: #eef2f4;
}

.amount {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.row-action:hover {
  color: var(--blue-strong);
  border-color: #b7dce9;
}

.mini-progress {
  min-width: 110px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f0f4;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #27bee5);
}

.avatar-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.avatar-name .name-list {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px;
  border: 1px solid #e8eff3;
  border-radius: 12px;
  background: #fbfdfe;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 130ms ease,
    transform 130ms ease;
}

.action-item:hover {
  border-color: #bde0ec;
  transform: translateY(-1px);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--action-color, var(--blue-strong));
  background: var(--action-bg, var(--blue-soft));
}

.action-copy {
  min-width: 0;
  flex: 1;
}

.action-title {
  color: var(--navy);
  font-size: 11px;
  font-weight: 750;
}

.action-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 150px;
  padding: 13px 4px 0;
}

.bar-group {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 24px;
}

.bar-track {
  position: relative;
  width: min(100%, 24px);
  height: 108px;
  overflow: hidden;
  border-radius: 7px 7px 3px 3px;
  background: #f0f5f7;
}

.bar-fill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 7px;
  border-radius: inherit;
  background: linear-gradient(180deg, #1bc1e9, #078dbd);
}

.bar-group:nth-child(4) .bar-fill {
  background: linear-gradient(180deg, #79d5e9, #34acd0);
}

.bar-group:nth-child(6) .bar-fill {
  background: linear-gradient(180deg, #f2bd71, #df8a2f);
}

.bar-label {
  color: var(--muted);
  font-size: 8px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-group,
.tab-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip,
.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.filter-chip.active,
.tab-button.active {
  color: var(--blue-strong);
  border-color: #b2dce9;
  background: var(--blue-soft);
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border-radius: 999px;
  color: inherit;
  background: rgba(0, 0, 0, 0.05);
  font-size: 8px;
}

.search-box {
  position: relative;
  min-width: 230px;
  flex: 1;
  max-width: 340px;
}

.search-box .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  position: relative;
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}

.tab-button.active {
  color: var(--blue-strong);
  background: transparent;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.back-link:hover {
  color: var(--blue-strong);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 23px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(238, 250, 254, 0.95), rgba(255, 255, 255, 0.98) 68%),
    #fff;
  box-shadow: var(--shadow);
}

.detail-hero::after {
  content: "";
  position: absolute;
  top: -95px;
  right: -60px;
  width: 250px;
  height: 250px;
  border: 34px solid rgba(7, 155, 211, 0.06);
  border-radius: 50%;
}

.aql-decision-card {
  position: relative;
  z-index: 2;
  margin-top: 15px;
  border: 2px solid #e3c36e;
  border-radius: 14px;
  overflow: hidden;
  background: #fffaf0;
}

.aql-decision-card.pass {
  border-color: #8bd3b9;
  background: #f0fbf6;
}

.aql-decision-card.fail {
  border-color: #e58b98;
  background: #fff1f3;
  box-shadow: 0 8px 24px rgba(180, 35, 53, 0.1);
}

.aql-decision-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.aql-decision-card summary::-webkit-details-marker {
  display: none;
}

.aql-decision-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #966619;
  background: #ffebbe;
}

.aql-decision-card.pass .aql-decision-icon {
  color: #087d57;
  background: #ddf6ec;
}

.aql-decision-card.fail .aql-decision-icon {
  color: #b42335;
  background: #fde0e5;
}

.aql-decision-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.aql-decision-title {
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
}

.aql-decision-status {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #8a5a0e;
  background: #ffe7ae;
  font-size: 9px;
}

.aql-decision-card.pass .aql-decision-status {
  color: #087d57;
  background: #d7f3e8;
}

.aql-decision-card.fail .aql-decision-status {
  color: #a91f31;
  background: #fbd5dc;
}

.aql-decision-meta {
  color: #536a78;
  font-size: 9px;
}

.aql-decision-message {
  color: #6f4d14;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

.aql-decision-card.pass .aql-decision-message {
  color: #17694e;
}

.aql-decision-card.fail .aql-decision-message {
  color: #9c2332;
}

.aql-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  color: var(--blue-strong);
  font-size: 9px;
  font-weight: 800;
}

.aql-detail-toggle .icon {
  transition: transform 140ms ease;
}

.aql-decision-card[open] .aql-detail-toggle .icon {
  transform: rotate(90deg);
}

.aql-decision-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(33, 75, 98, 0.12);
}

.aql-rejected {
  background: #fff1f3;
}

.detail-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.task-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-code {
  color: var(--blue-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.detail-title {
  margin: 9px 0 0;
  color: var(--navy);
  font-size: clamp(20px, 3vw, 29px);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.detail-subline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
  flex-wrap: wrap;
}

.detail-subline span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 20px;
}

.meta-card {
  padding: 12px 13px;
  border: 1px solid rgba(214, 230, 238, 0.88);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
}

.meta-label {
  color: var(--muted);
  font-size: 9px;
}

.meta-value {
  margin-top: 5px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.co-edit-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d5edf5;
  border-radius: 11px;
  color: #32647a;
  background: #f2fbfe;
  font-size: 10px;
}

.co-edit-strip strong {
  color: var(--blue-strong);
}

.task-supplement-content {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #314b5b;
  background: #f8fbfc;
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.supplement-create-field > label {
  color: #4d6473;
  font-size: 9px;
  font-weight: 750;
}

.supplement-attachment-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.supplement-attachment-toolbar span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.supplement-attachment-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.supplement-attachment-empty {
  padding: 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  background: #fbfdfe;
  font-size: 8px;
}

.supplement-attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.supplement-attachment-preview {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.supplement-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supplement-file-icon {
  display: grid;
  place-items: center;
}

.supplement-attachment-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.supplement-attachment-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplement-attachment-copy span {
  color: var(--muted);
  font-size: 8px;
}

.supplement-attachment-item .icon-button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.supplement-task-attachments {
  margin-top: 16px;
}

.supplement-task-attachments h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 11px;
}

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

.quality-check-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfe;
}

.quality-check-item > strong {
  color: var(--navy);
  font-size: 9px;
}

.quality-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quality-option {
  min-height: 26px;
  padding: 4px 5px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
}

.quality-option.active.pass {
  color: #087d57;
  background: #ddf6ec;
}

.quality-option.active.fail {
  color: #b42335;
  background: #fde8ec;
}

.quality-option.active.na {
  color: #60717d;
  background: #e9eff3;
}

.quality-readonly {
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.quality-readonly.pass {
  color: #087d57;
  background: #ddf6ec;
}

.quality-readonly.fail {
  color: #b42335;
  background: #fde8ec;
}

.quality-readonly.na {
  color: #60717d;
  background: #e9eff3;
}

.quality-readonly.pending {
  color: #9b691d;
  background: #fff3df;
}

.checklist {
  display: grid;
  gap: 12px;
}

.check-conclusion-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: end;
}

.check-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.check-card:hover {
  border-color: #c3dce6;
  box-shadow: 0 8px 20px rgba(31, 76, 101, 0.05);
}

.check-card.is-locked {
  border-color: #eac982;
  background: #fffdf7;
}

.check-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 15px 11px;
}

.check-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--blue-strong);
  background: var(--blue-soft);
  font-size: 10px;
  font-weight: 850;
}

.check-title-wrap {
  min-width: 0;
  flex: 1;
}

.check-title {
  color: var(--navy);
  font-size: 12px;
  font-weight: 780;
}

.check-hint {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.check-owner {
  margin-left: auto;
}

.lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #a06913;
  background: #fff2d6;
  font-size: 8px;
  font-weight: 750;
}

.check-body {
  padding: 0 15px 15px 56px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafb;
}

.segment-button {
  min-height: 28px;
  padding: 6px 11px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.segment-button.active.pass {
  color: #087d57;
  background: #ddf6ec;
}

.segment-button.active.fail {
  color: var(--red);
  background: #fde8ec;
}

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

.check-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}

.compact-textarea {
  min-height: 58px !important;
  resize: vertical;
}

.photo-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.photo-thumb {
  position: relative;
  width: 72px;
  height: 58px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f3f7f9;
}

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

.photo-thumb .photo-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 3px 4px;
  color: #fff;
  background: linear-gradient(transparent, rgba(15, 37, 50, 0.75));
  font-size: 7px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px dashed #b9d7e3;
  border-radius: 8px;
  color: var(--blue-strong);
  background: #f7fcfe;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.upload-button:hover {
  border-color: var(--blue);
  background: #effafe;
}

.locked-overlay {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px dashed #e8c276;
  border-radius: 9px;
  color: #9b6819;
  background: #fffbf2;
  font-size: 9px;
  line-height: 1.5;
}

.defect-card .check-body {
  padding-left: 56px;
}

.defect-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid #dbe8ee;
  border-radius: 10px;
  background: #f7fbfd;
}

.defect-summary-main {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #526b79;
  font-size: 9px;
}

.defect-summary-main strong {
  color: var(--navy);
  font-size: 17px;
}

.defect-summary-severities {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.defect-summary-severities span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #526b79;
  background: #fff;
  font-size: 8px;
}

.defect-summary-severities strong {
  color: var(--navy);
}

.defect-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.defect-toolbar > div {
  display: grid;
  gap: 2px;
}

.defect-toolbar strong {
  color: var(--navy);
  font-size: 10px;
}

.defect-toolbar span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.defect-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.defect-legacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #ead49f;
  border-radius: 9px;
  color: #7b581b;
  background: #fffbf1;
}

.defect-legacy > svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.defect-legacy > div {
  display: grid;
  gap: 3px;
}

.defect-legacy strong {
  font-size: 9px;
}

.defect-legacy span {
  font-size: 8px;
  line-height: 1.5;
}

.defect-row {
  padding: 12px;
  border: 1px solid #dbe5eb;
  border-radius: 12px;
  background: #fbfdfe;
}

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

.defect-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.defect-row-title span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.defect-row-title strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.defect-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.defect-row-actions .icon-button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.icon-button.danger {
  color: #b53e4b;
}

.icon-button.danger:hover {
  color: #a52b39;
  border-color: #f0bcc4;
  background: #fff5f6;
}

.defect-severity {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.defect-severity--critical {
  color: #9f1f32;
  background: #fee3e8;
}

.defect-severity--major {
  color: #9b5d13;
  background: #fff0d8;
}

.defect-severity--minor {
  color: #326b8e;
  background: #e8f5fb;
}

.defect-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 92px 110px;
  gap: 9px;
}

.defect-field > span {
  color: #4d6473;
  font-size: 8px;
  font-weight: 750;
}

.defect-field--notes {
  grid-column: 1 / -1;
}

.defect-field .compact-textarea {
  min-height: 62px !important;
}

.defect-evidence {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #dbe5eb;
}

.defect-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #4d6473;
  font-size: 8px;
  font-weight: 750;
}

.defect-evidence-head small {
  color: var(--muted);
  font-size: 8px;
}

.defect-photo-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.defect-photo {
  position: relative;
  width: 94px;
  flex: 0 0 auto;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #edf4f7;
}

.defect-photo img {
  display: block;
  width: 100%;
  height: 68px;
  object-fit: cover;
}

.defect-photo figcaption {
  padding: 4px;
  color: var(--muted);
  background: #fff;
  font-size: 7px;
  text-align: center;
}

.defect-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(33, 51, 62, 0.76);
  cursor: pointer;
}

.defect-photo-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  width: 94px;
  min-height: 91px;
  flex: 0 0 auto;
  border: 1px dashed #b9d7e3;
  border-radius: 9px;
  color: var(--blue-strong);
  background: #f7fcfe;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.defect-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 7px;
  text-align: right;
}

.defect-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px dashed #cbdde6;
  border-radius: 11px;
  background: #fbfdfe;
}

.defect-empty-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.defect-empty > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.defect-empty strong {
  color: var(--navy);
  font-size: 10px;
}

.defect-empty span {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.check-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.check-summary-table th,
.check-summary-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf2f5;
  font-size: 10px;
  text-align: left;
}

.check-summary-table th {
  color: var(--muted);
  background: #f8fbfc;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.check-summary-table td {
  color: #385061;
}

.check-summary-table tr:last-child td {
  border-bottom: 0;
}

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

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef5f8;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-caption {
  padding: 8px 9px;
  color: var(--muted);
  background: #fff;
  font-size: 9px;
}

.sticky-action-bar {
  position: sticky;
  bottom: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 36px rgba(26, 63, 83, 0.14);
  backdrop-filter: blur(14px);
}

.sticky-action-copy {
  min-width: 0;
}

.sticky-action-title {
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.sticky-action-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.status-orange {
  color: #9b5d13;
  background: #fff0d8;
}

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

.exception-library-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 248, 237, 0.9), rgba(255, 255, 255, 0.94) 44%),
    #fff;
}

.exception-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.exception-library-head > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.exception-library-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.4;
}

.exception-library-description {
  min-height: 48px;
  margin: 0;
  padding: 11px 12px;
  border-left: 3px solid var(--orange);
  border-radius: 0 9px 9px 0;
  color: #4c5668;
  background: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.exception-library-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 8px;
}

.exception-library-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.exception-library-photos,
.exception-readonly-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.exception-library-photos figure,
.exception-readonly-photos figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #eef5f8;
}

.exception-library-photos img,
.exception-readonly-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.exception-library-photos figcaption,
.exception-readonly-photos figcaption {
  padding: 5px;
  color: var(--muted);
  background: #fff;
  font-size: 7px;
  text-align: center;
}

.exception-library-no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 80px;
  border: 1px dashed #d6e1e7;
  border-radius: 9px;
  color: var(--muted);
  background: #fbfdfe;
  font-size: 9px;
}

.exception-card-actions {
  display: flex;
  justify-content: flex-end;
}

.exception-feedback-panel .panel-body {
  display: grid;
  gap: 13px;
}

.exception-guidance {
  margin: 0;
}

.exception-list,
.exception-readonly-list {
  display: grid;
  gap: 12px;
}

.exception-row {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid #e6d7bd;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255, 251, 243, 0.94), rgba(255, 255, 255, 0.96) 52%),
    #fff;
}

.exception-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.exception-row-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.exception-row-title span {
  color: #a36a19;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.exception-row-title strong {
  color: var(--navy);
  font-size: 11px;
}

.exception-row .textarea {
  min-height: 96px;
}

.exception-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.exception-save-row span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.exception-readonly-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.exception-readonly-copy {
  display: grid;
  align-content: start;
  gap: 7px;
}

.exception-readonly-copy > span {
  color: var(--orange);
  font-size: 8px;
  font-weight: 800;
}

.exception-readonly-copy > strong {
  color: var(--navy);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.exception-readonly-copy > small {
  color: var(--muted);
  font-size: 8px;
}

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

  .exception-readonly-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .exception-library-card,
  .exception-row {
    padding: 12px;
  }

  .exception-library-photos,
  .exception-readonly-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exception-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .exception-save-row .btn {
    width: 100%;
  }
}

.sticky-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.task-date-range-field {
  padding: 13px;
  border: 1px solid #d8e7ee;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(239, 250, 254, 0.86), rgba(255, 255, 255, 0.96)),
    #fff;
}

.task-date-range-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.task-date-range-separator {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 38px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.task-date-range-summary {
  margin: 0;
  color: #4d7182;
}

.task-date-range-summary.is-invalid {
  color: #b42335;
  font-weight: 750;
}

@media (max-width: 640px) {
  .task-date-range-inputs {
    grid-template-columns: 1fr;
  }

  .task-date-range-separator {
    display: none;
  }
}

.inspection-auto-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 9px;
}

.inspection-auto-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #f8fbfc;
  font-size: 9px;
}

.inspection-auto-summary strong {
  color: var(--navy);
  font-size: 13px;
}

.aql-create-settings {
  padding: 12px;
  border: 1px solid #d8e7ee;
  border-radius: 11px;
  background: #f8fbfc;
}

.aql-create-settings[hidden] {
  display: none !important;
}

.aql-config-title {
  color: var(--navy) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #4d6473;
  font-size: 9px;
  font-weight: 750;
}

.field label .required {
  margin-left: 3px;
  color: var(--red);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
  transition:
    border-color 130ms ease,
    box-shadow 130ms ease;
}

.textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.55;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #82cce3;
  box-shadow: 0 0 0 3px rgba(7, 155, 211, 0.09);
  outline: 0;
}

.input::placeholder,
.textarea::placeholder {
  color: #a8b6c0;
}

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

.assignment-group-title {
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #405866;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
}

.check-option:has(input:checked) {
  color: var(--blue-strong);
  border-color: #a9d9e8;
  background: #f2fbfe;
}

.check-option input {
  accent-color: var(--blue);
}

.form-note {
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--muted);
  background: #f5f9fb;
  font-size: 9px;
  line-height: 1.55;
}

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

.ledger-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.ledger-card:hover {
  transform: translateY(-2px);
  border-color: #b8dce8;
  box-shadow: 0 12px 26px rgba(34, 81, 104, 0.08);
}

.ledger-card.active {
  border-color: #76cbe4;
  box-shadow: 0 0 0 2px rgba(7, 155, 211, 0.08);
}

.ledger-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -68px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(7, 155, 211, 0.055);
}

.ledger-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ledger-name {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.ledger-id {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.ledger-total {
  position: relative;
  z-index: 1;
  margin-top: 17px;
  color: var(--navy);
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.ledger-total small {
  margin-right: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.ledger-breakdown {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
}

.ledger-breakdown strong {
  color: #476171;
  font-weight: 750;
}

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

.finance-summary-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfe;
}

.finance-summary-label {
  color: var(--muted);
  font-size: 9px;
}

.finance-summary-value {
  margin-top: 7px;
  color: var(--navy);
  font-size: 19px;
  font-weight: 830;
  letter-spacing: -0.03em;
}

.finance-summary-value small {
  margin-right: 3px;
  color: var(--muted);
  font-size: 9px;
}

.expense-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.7fr);
  gap: 18px;
}

.expense-list {
  display: grid;
  gap: 10px;
}

.expense-row {
  display: grid;
  grid-template-columns: 95px 1.1fr 105px 92px 92px 1.35fr auto auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.expense-row .field {
  gap: 4px;
}

.expense-row .field label {
  font-size: 8px;
}

.expense-row .input,
.expense-row .select {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 9px;
}

.expense-row .upload-button {
  min-height: 34px;
  justify-content: center;
  white-space: nowrap;
}

.expense-upload-actions {
  display: grid;
  gap: 4px;
}

.expense-upload-actions .upload-button {
  min-height: 30px;
  padding: 5px 7px;
}

.invoice-file {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: var(--green);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-attachments-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.expense-attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #4d6473;
  font-size: 8px;
  font-weight: 800;
}

.expense-attachments-head small {
  color: var(--muted);
  font-size: 8px;
}

.expense-attachments-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.expense-attachment-card {
  display: grid;
  grid-template-columns: 54px minmax(110px, 1fr) auto 28px;
  align-items: center;
  gap: 8px;
  width: min(360px, 88vw);
  flex: 0 0 auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfe;
}

.expense-attachment-preview {
  display: grid;
  place-items: center;
  width: 54px;
  height: 44px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.expense-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expense-attachment-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.expense-attachment-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-attachment-name {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-attachment-name:hover {
  color: var(--blue-strong);
  text-decoration: underline;
}

.expense-attachment-copy span {
  color: var(--muted);
  font-size: 7px;
}

.expense-attachment-card .btn {
  padding: 5px 7px;
  font-size: 8px;
}

.expense-attachment-card .icon-button {
  width: 28px;
  height: 28px;
}

.expense-attachment-empty {
  width: 100%;
  padding: 10px;
  border: 1px dashed #d5e2e8;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfe;
  font-size: 8px;
  text-align: center;
}

.invoice-link-list {
  display: grid;
  gap: 4px;
  max-width: 240px;
}

.invoice-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--blue-strong);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-link:hover {
  text-decoration: underline;
}

.attachment-preview-body {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 12px;
  border-radius: 12px;
  background: #eef4f7;
}

.attachment-preview-image {
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 9px;
  object-fit: contain;
  box-shadow: 0 12px 30px rgba(22, 57, 78, 0.16);
}

.attachment-preview-frame {
  width: 100%;
  height: 70vh;
  border: 0;
  border-radius: 9px;
  background: #fff;
}

.attachment-preview-unavailable {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.attachment-preview-unavailable strong {
  color: var(--navy);
  font-size: 12px;
}

.attachment-preview-unavailable span {
  max-width: 460px;
  font-size: 9px;
  line-height: 1.6;
}

.expense-delete {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #f0d1d5;
  border-radius: 8px;
  color: var(--red);
  background: #fff9fa;
  cursor: pointer;
}

.expense-note-cell {
  display: grid;
  gap: 4px;
  align-self: stretch;
}

.expense-note-cell .input {
  height: 34px;
}

.expense-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.bill-paper {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.bill-paper::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--blue), #5fd4ee);
}

.bill-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px dashed var(--line-strong);
}

.bill-title {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.bill-date {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.bill-number {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.bill-lines {
  display: grid;
  gap: 10px;
  padding: 14px 0;
}

.bill-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: #435d6d;
  font-size: 9px;
}

.bill-line-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.bill-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.bill-total-label {
  color: var(--muted);
  font-size: 9px;
}

.bill-total-value {
  color: var(--navy);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.inspector-list {
  display: grid;
  gap: 10px;
}

.inspector-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.inspector-copy {
  min-width: 0;
  flex: 1;
}

.inspector-name {
  color: var(--navy);
  font-size: 11px;
  font-weight: 780;
}

.inspector-detail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.inspector-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--blue-strong);
  font-weight: 750;
  text-decoration: none;
}

.inspector-phone-link:hover {
  text-decoration: underline;
}

.inspector-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.inspector-stat {
  text-align: right;
}

.inspector-stat-value {
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.inspector-stat-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.template-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.template-preview {
  position: relative;
  overflow: hidden;
  min-height: 185px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30, 67, 91, 0.08);
}

.template-preview-head {
  height: 34px;
  border-bottom: 2px solid #079bd3;
  background:
    linear-gradient(90deg, #fff 0 25%, #f5fbfd 25% 78%, #eef9fc 78%),
    #fff;
}

.template-preview-body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.template-preview-bar {
  height: 7px;
  border-radius: 2px;
  background: #e7eff4;
}

.template-preview-bar.blue {
  width: 80%;
  background: #08a1d9;
}

.template-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 3px;
}

.template-preview-tile {
  height: 44px;
  border: 1px solid #e1e9ee;
  border-radius: 2px;
  background: #f3f7f9;
}

.template-section-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.template-section-tags span {
  padding: 5px 7px;
  border: 1px solid #dce8ee;
  border-radius: 999px;
  color: #587182;
  background: #f7fbfc;
  font-size: 8px;
  font-weight: 700;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 30px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.empty-title {
  margin-top: 14px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.empty-copy {
  max-width: 320px;
  margin: 6px auto 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.task-cards {
  display: grid;
  gap: 13px;
}

.task-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: #bbdce8;
  box-shadow: 0 12px 26px rgba(34, 81, 104, 0.08);
}

.task-card.is-featured {
  border-color: #9ed8e9;
  background:
    linear-gradient(100deg, rgba(239, 251, 255, 0.95), #fff 60%),
    #fff;
  box-shadow: 0 10px 28px rgba(23, 110, 146, 0.09);
}

.task-card-photo {
  width: 116px;
  height: 83px;
  overflow: hidden;
  border-radius: 11px;
  background: #edf5f8;
}

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

.task-card-title {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  flex-wrap: wrap;
}

.task-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-card-collab {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.task-card-people {
  color: var(--muted);
  font-size: 8px;
}

.task-card-progress {
  width: 180px;
}

.task-card-progress .progress-meta {
  margin-bottom: 7px;
}

.hero-task {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  gap: 20px;
  overflow: hidden;
  padding: 23px;
  border: 1px solid #b8dfeb;
  border-radius: 20px;
  background:
    linear-gradient(115deg, #effbfe 0%, #ffffff 58%, #f7fcfe 100%);
  box-shadow: 0 12px 30px rgba(24, 98, 128, 0.08);
}

.hero-task::after {
  content: "";
  position: absolute;
  top: -100px;
  right: 31%;
  width: 220px;
  height: 220px;
  border: 33px solid rgba(7, 155, 211, 0.055);
  border-radius: 50%;
}

.hero-task-copy {
  position: relative;
  z-index: 1;
}

.hero-task-title {
  margin: 8px 0 0;
  color: var(--navy);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.hero-task-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 9px;
  flex-wrap: wrap;
}

.hero-task-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-task-side {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  align-content: center;
}

.collab-card {
  padding: 13px;
  border: 1px solid rgba(197, 225, 235, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.collab-label {
  color: var(--muted);
  font-size: 8px;
}

.collab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.collab-name {
  color: var(--navy);
  font-size: 10px;
  font-weight: 750;
}

.collab-status {
  margin-left: auto;
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
}

.avatar-panel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-panel .avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
}

.avatar-panel-name {
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
}

.avatar-panel-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mobile-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 35, 49, 0.55);
  backdrop-filter: blur(4px);
  animation: fade-in 150ms ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  width: min(100%, 580px);
  max-height: min(88vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 19px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modal-in 180ms ease both;
}

.modal.modal-lg {
  width: min(100%, 840px);
}

.modal.modal-xl {
  width: min(100%, 1040px);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  font-weight: 850;
}

.modal-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.modal-close {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.modal-body {
  max-height: calc(88vh - 150px);
  padding: 19px 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #fbfdfe;
}

.report-preview {
  padding: 24px;
  background: #dfe6eb;
}

.report-sheet {
  position: relative;
  min-height: 620px;
  padding: 30px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 42, 58, 0.18);
}

.report-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  min-height: 64px;
  border: 1px solid #233f51;
}

.report-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-right: 1px solid #233f51;
  color: #086b93;
  font-size: 16px;
  font-weight: 900;
}

.report-logo-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  color: #fff;
  background: #099bc9;
  clip-path: polygon(50% 0, 94% 17%, 88% 70%, 50% 100%, 12% 70%, 6% 17%);
  font-size: 11px;
}

.report-heading {
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 1px solid #233f51;
  color: #162c3b;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.report-result {
  display: grid;
  grid-template-rows: auto 1fr;
  font-size: 8px;
  text-align: center;
}

.report-result-label {
  padding: 4px;
  border-bottom: 1px solid #233f51;
  font-weight: 800;
}

.report-result-value {
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 17px;
  font-weight: 850;
}

.report-title {
  margin: 13px 0;
  color: #162c3b;
  font-size: 17px;
  font-weight: 850;
  text-align: center;
}

.report-blue-bar {
  padding: 8px 10px;
  color: #fff;
  background: #08a2dc;
  font-size: 10px;
  font-weight: 800;
}

.report-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #7892a1;
  border-top: 0;
}

.report-cell {
  min-height: 39px;
  padding: 7px;
  border-right: 1px solid #b5c7d1;
  border-bottom: 1px solid #b5c7d1;
  color: #344d5d;
  font-size: 7px;
  line-height: 1.5;
}

.report-cell:nth-child(4n) {
  border-right: 0;
}

.report-cell strong {
  color: #152e3e;
}

.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.report-photo {
  overflow: hidden;
  border: 1px solid #7993a2;
}

.report-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.report-photo-caption {
  padding: 5px;
  color: #425c6b;
  font-size: 7px;
  text-align: center;
}

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  background: #173b4e;
  box-shadow: 0 15px 34px rgba(15, 46, 63, 0.24);
  animation: toast-in 220ms ease both;
  pointer-events: auto;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.success {
  background: #147a59;
}

.toast.warning {
  background: #9b691d;
}

.toast.error {
  background: #a73847;
}

.toast-copy {
  min-width: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 10px;
  line-height: 1.55;
}

.toast-title {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.data-table--compact th {
  padding: 9px 11px;
}

.data-table--compact td {
  padding: 10px 11px;
}

.hidden {
  display: none !important;
}

.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 8px;
  font-weight: 750;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2da87c;
  box-shadow: 0 0 0 3px rgba(45, 168, 124, 0.12);
}

.sync-indicator[data-sync-state="saving"] .sync-dot,
.sync-indicator[data-sync-state="connecting"] .sync-dot {
  background: #d49a2e;
  box-shadow: 0 0 0 3px rgba(212, 154, 46, 0.12);
}

.sync-indicator[data-sync-state="offline"] .sync-dot {
  background: #d34b5c;
  box-shadow: 0 0 0 3px rgba(211, 75, 92, 0.12);
}

.sync-indicator[data-sync-state="remote"] .sync-dot {
  background: #2d83bb;
  box-shadow: 0 0 0 3px rgba(45, 131, 187, 0.12);
}

.logout-button {
  width: 34px;
  height: 34px;
}

.logout-button:hover {
  color: #ad3545;
  border-color: #efbdc4;
  background: #fff6f7;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(380px, 0.8fr) minmax(480px, 1.2fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 20%, rgba(22, 147, 188, 0.16), transparent 36%),
    #eef4f7;
}

.login-card {
  display: flex;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 52px clamp(32px, 7vw, 74px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 20px 0 60px rgba(18, 53, 70, 0.06);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.login-brand > div:last-child {
  display: grid;
  gap: 2px;
}

.login-brand strong {
  color: var(--navy);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.login-brand span {
  color: var(--muted);
  font-size: 9px;
}

.login-heading .eyebrow {
  color: var(--blue-strong);
}

.login-heading h1 {
  margin: 8px 0 0;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
}

.login-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 15px;
  margin-top: 32px;
}

.login-form .field {
  gap: 7px;
}

.login-form .field > span {
  color: #435c6b;
  font-size: 9px;
  font-weight: 750;
}

.login-form .input {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 12px;
}

.login-submit {
  justify-content: center;
  min-height: 48px;
  margin-top: 4px;
  border-radius: 11px;
  font-size: 11px;
}

.login-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.login-help code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #1f536d;
  background: #e8f5fa;
  font-family: Consolas, monospace;
}

.login-help .link-button {
  flex: 0 0 auto;
  font-size: 9px;
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 12px;
  border: 1px solid #efc4cb;
  border-radius: 10px;
  color: #a63242;
  background: #fff5f6;
  font-size: 9px;
  line-height: 1.5;
}

.login-error.full {
  grid-column: 1 / -1;
}

.login-accounts {
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: #f8fafb;
  font-size: 8px;
  line-height: 1.5;
}

.login-accounts strong {
  margin-bottom: 3px;
  color: #3f5968;
  font-size: 9px;
}

.login-accounts code {
  width: fit-content;
  margin-top: 3px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #1f536d;
  background: #e8f5fa;
  font-family: Consolas, monospace;
}

.login-aside {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(52px, 9vw, 120px);
  color: #fff;
  background:
    radial-gradient(circle at 80% 12%, rgba(38, 170, 210, 0.38), transparent 30%),
    linear-gradient(145deg, #092c41, #0d4d66 62%, #0a6b83);
}

.login-aside::after {
  position: absolute;
  right: -190px;
  bottom: -250px;
  width: 640px;
  height: 640px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 90px rgba(255, 255, 255, 0.025),
    0 0 0 180px rgba(255, 255, 255, 0.018);
  content: "";
}

.login-aside-kicker {
  color: #80d4ef;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.login-aside h2 {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.login-feature-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  max-width: 650px;
  margin-top: 52px;
}

.login-feature-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.login-feature-list span {
  grid-row: 1 / 3;
  color: #79d4ee;
  font-size: 10px;
  font-weight: 850;
}

.login-feature-list strong {
  font-size: 12px;
}

.login-feature-list p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  line-height: 1.6;
}

.server-loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 100vh;
  color: var(--navy);
  background: #eef4f7;
}

.server-loading .brand-symbol {
  margin-bottom: 8px;
}

.server-loading strong {
  font-size: 16px;
}

.server-loading > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.server-loading > span svg {
  animation: spin 1s linear infinite;
}

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

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid--main {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .expense-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .expense-note-cell {
    grid-column: span 2;
  }
}

@media (max-width: 960px) {
  .login-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-aside {
    display: none;
  }

  .login-card {
    max-width: 620px;
    min-height: 100vh;
    padding: 44px 32px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    min-height: 64px;
    padding: 0 18px;
  }

  .mobile-brand {
    display: flex;
  }

  .breadcrumb {
    display: none;
  }

  .content {
    padding: 22px 18px 96px;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 10px;
    left: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(206, 223, 232, 0.9);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 38px rgba(22, 58, 78, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-nav--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mobile-nav-item {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 49px;
    padding: 5px;
    border: 0;
    border-radius: 11px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 8px;
    font-weight: 700;
  }

  .mobile-nav-item.active {
    color: var(--blue-strong);
    background: var(--blue-soft);
  }

  .detail-hero-top {
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

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

  .content-grid--2,
  .content-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .hero-task {
    grid-template-columns: minmax(0, 1fr);
  }

  .task-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .task-card-photo {
    width: 94px;
    height: 74px;
  }

  .task-card-progress {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .login-page {
    display: block;
    min-height: 100vh;
  }

  .login-card {
    min-height: 100vh;
    padding: 34px 22px;
    box-shadow: none;
  }

  .login-brand {
    margin-bottom: 36px;
  }

  .login-heading h1 {
    font-size: 30px;
  }

  .login-aside {
    display: none;
  }

  .sync-indicator {
    padding: 5px 7px;
  }

  .logout-button {
    width: 31px;
    height: 31px;
  }

  .topbar {
    padding: 0 13px;
  }

  .content {
    padding: 18px 13px 92px;
  }

  .topbar-right {
    gap: 6px;
  }

  .role-switch {
    padding: 3px;
  }

  .role-option {
    width: 31px;
    height: 29px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .user-copy {
    display: none;
  }

  .user-chip {
    gap: 4px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .metrics-grid {
    gap: 10px;
  }

  .metric-card {
    min-height: 121px;
    padding: 14px;
  }

  .metric-value {
    font-size: 24px;
  }

  .panel-head {
    padding: 15px 15px 12px;
  }

  .panel-body {
    padding: 15px;
  }

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

  .checkbox-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-hero {
    padding: 18px 15px;
  }

  .meta-grid {
    gap: 8px;
  }

  .check-body {
    padding: 0 13px 13px;
  }

  .defect-card .check-body {
    padding: 0 13px 13px;
  }

  .check-header {
    padding: 13px;
  }

  .check-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .defect-fields {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .defect-field--severity {
    grid-column: 1 / -1;
  }

  .defect-toolbar,
  .defect-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .defect-toolbar .btn {
    width: 100%;
  }

  .defect-summary-severities {
    justify-content: space-between;
  }

  .supplement-attachment-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .quality-check-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .inspection-auto-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .aql-decision-card summary {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px;
  }

  .aql-decision-icon {
    width: 38px;
    height: 38px;
  }

  .aql-decision-title {
    font-size: 13px;
  }

  .aql-detail-toggle {
    width: 100%;
    justify-content: flex-end;
    margin-top: 2px;
  }

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

  .check-conclusion-panel {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .attendance-clock {
    align-items: flex-start;
    flex-direction: column;
  }

  .attendance-clock-actions,
  .btn-clock,
  .attendance-photo-action {
    width: 100%;
  }

  .attendance-proof-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .ledger-grid,
  .finance-summary {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .expense-note-cell {
    grid-column: 1 / -1;
  }

  .expense-actions,
  .sticky-action-bar,
  .bill-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-action-buttons {
    justify-content: stretch;
  }

  .sticky-action-buttons .btn {
    flex: 1;
  }

  .task-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
  }

  .task-card-photo {
    width: 78px;
    height: 68px;
  }

  .hero-task {
    padding: 18px;
  }

  .template-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .template-preview {
    max-width: 170px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal,
  .modal.modal-lg,
  .modal.modal-xl {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-body {
    max-height: calc(92vh - 145px);
    padding: 16px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
  }

  .report-preview {
    padding: 8px;
  }

  .report-sheet {
    min-height: 520px;
    padding: 16px;
  }

  .report-heading {
    font-size: 10px;
  }

  .toast-root {
    right: 12px;
    bottom: 80px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 420px) {
  .metrics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-card {
    min-height: 105px;
  }

  .photo-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .attendance-payline {
    grid-template-columns: minmax(0, 1fr);
  }

  .attendance-payline > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .attendance-payline > div:last-child {
    border-bottom: 0;
  }

  .expense-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .defect-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .defect-field--severity {
    grid-column: auto;
  }

  .expense-note-cell {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
