@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/salary/static/fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/salary/static/fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/salary/static/fonts/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/salary/static/fonts/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/salary/static/fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/salary/static/fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/salary/static/fonts/inter-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/salary/static/fonts/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/salary/static/fonts/inter-cyrillic-800-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/salary/static/fonts/inter-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #142536;
  background: #eef3f2;
  --navy-950: #102737;
  --navy-900: #142d3e;
  --green-700: #00664c;
  --green-800: #00543e;
  --green-50: #edf8f4;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --text: #142536;
  --muted: #657586;
  --line: #d5dfe4;
  --line-strong: #c7d4da;
  --focus: rgba(0, 102, 76, 0.16);
  --danger: #a83c34;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #eef3f2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
select,
.employee-picker-toggle,
.employee-suggestion {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.shell {
  width: 100%;
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 24px;
}

.brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand .logo,
.sidebar-brand .logo {
  display: block;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: none;
}

.brand h1 {
  margin: 0;
  color: var(--text);
  font-size: 23px;
  line-height: 1.15;
  font-weight: 800;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login {
  width: min(620px, 100%);
  margin: 8vh auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(16, 39, 55, 0.1);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-heading h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.login-heading p {
  margin: 0;
}

.login-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--green-700);
}

.login-icon i {
  font-size: 22px;
}

body.authenticated .shell {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.authenticated .topbar,
body.authenticated #loginPage {
  display: none !important;
}

.application:not(.hidden) {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  background: #ffffff;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 252px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 23px 18px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(255, 255, 255, 0.32) transparent;
  scrollbar-width: thin;
  color: #f4f8fa;
  background: var(--navy-950);
}

.sidebar::-webkit-scrollbar {
  width: 7px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid var(--navy-950);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.sidebar-brand {
  flex: 0 0 auto;
  padding: 0 2px 32px;
}

.sidebar-brand strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.35px;
}

.nav {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  margin: 0 -5px 0 -9px;
  padding: 0;
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 62px;
  padding: 0 22px;
  gap: 27px;
  border: 0;
  border-radius: 11px;
  color: #d9e3e8;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  text-align: left;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.nav button i {
  width: 24px;
  flex: 0 0 24px;
  font-size: 24px;
  line-height: 1;
}

.nav button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav button:active {
  transform: translateY(1px);
}

.nav button.active,
.nav button.active:hover {
  color: #ffffff;
  background: var(--green-700);
  font-weight: 700;
}

.account {
  display: block;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 3px 20px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  color: #ffffff;
  background: #4d927b;
  font-size: 17px;
  font-weight: 800;
}

.profile-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: #cfdde3;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}

.profile-copy strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.profile-copy span::before {
  content: "• ";
  color: #4dba93;
}

.logout-button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  padding: 0 3px;
  gap: 12px;
  border: 0;
  color: #edf3f5;
  background: transparent;
  font-size: 15px;
  text-align: left;
}

.logout-button i {
  width: 23px;
  font-size: 23px;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  padding: 27px 58px 25px 52px;
  background: #ffffff;
}

.screen-head {
  margin: 0;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.screen-head h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 34px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.screen-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.page {
  display: none;
  width: 100%;
}

.page.on {
  display: block;
}

.card {
  margin: 20px 0 0;
  padding: 22px;
  border: 1px solid #e0e7ea;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(16, 39, 55, 0.05);
}

.entry-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.entry-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.main-section {
  padding-top: 24px;
  padding-bottom: 18px;
}

.production-section {
  padding-top: 22px;
}

.extra-section {
  padding-top: 22px;
  padding-bottom: 0;
  border-bottom: 0;
}

.step-title {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 15px;
  gap: 13px;
}

.step-title > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green-700);
  font-size: 16px;
  font-weight: 800;
}

.step-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.25px;
}

.substep-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 20px 0 12px;
}

.substep-title > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green-700);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.substep-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.2;
  font-weight: 750;
}

.entry-main-grid .employee-pair-field {
  grid-column: span 2;
}

.entry-main-grid .employee-pair-controls {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
}

.employee-pair-controls .toggle,
.employee-pair-controls .manual-control {
  margin: 0;
}

.substep-title .substep-note {
  margin-left: auto;
}

@media (max-width: 900px) {
  .entry-main-grid .employee-pair-field {
    grid-column: span 1;
  }
  .entry-main-grid .employee-pair-controls {
    grid-column: span 1;
  }
}

.production-section .step-title {
  margin-bottom: 11px;
}

.extra-section .step-title {
  margin-bottom: 5px;
}

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

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

.entry-main-grid {
  grid-template-columns: 1fr 0.7fr 0.96fr 1.04fr;
  gap: 20px;
}

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

.entry-main-grid > .full {
  margin-top: 8px;
}

.field {
  min-width: 0;
}

.field label,
.label,
.manual-label {
  display: block;
  margin: 0 0 9px;
  color: #405364;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

.field-help {
  margin: 7px 2px 0;
  color: #6b7d8d;
  font-size: 12px;
  line-height: 1.4;
}

.field input,
.field select,
.field textarea,
input.control,
select.control,
textarea.control,
.manual-amount-box input,
.rate-list input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input,
.field select,
input.control,
select.control {
  height: 50px;
  padding: 0 14px;
}

.field textarea,
textarea.control {
  min-height: 84px;
  padding: 13px 14px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
input.control:hover,
select.control:hover,
textarea.control:hover {
  border-color: #9fb2bc;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
input.control:focus,
select.control:focus,
textarea.control:focus,
.manual-amount-box input:focus,
.rate-list input:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px var(--focus);
}

.picker-control {
  position: relative;
  width: 100%;
}

.picker-control > input[type="text"] {
  padding-right: 52px;
}

.picker-trigger {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--green-700);
  background: var(--green-50);
  cursor: pointer;
}

.picker-trigger i {
  font-size: 21px;
}

.field .native-picker {
  position: absolute;
  width: 1px;
  min-width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.picker-control:focus-within .picker-trigger,
.picker-control:hover .picker-trigger {
  color: #ffffff;
  background: var(--green-700);
}

.date-stepper {
  display: flex;
  margin-top: 7px;
  justify-content: space-between;
  gap: 8px;
}

.date-stepper button {
  display: inline-flex;
  min-height: 30px;
  padding: 4px 8px;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 6px;
  color: var(--green-700);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.date-stepper button:hover,
.date-stepper button:focus-visible {
  background: var(--green-50);
}

.date-stepper i {
  font-size: 16px;
}

@media (max-width: 520px) {
  .date-stepper button span {
    display: none;
  }
}

.time-text {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.employee-picker {
  position: relative;
  width: 100%;
}

.employee-picker > input {
  padding-right: 74px;
}

.employee-picker-icon {
  position: absolute;
  top: 50%;
  right: 43px;
  z-index: 1;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.employee-picker-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #405364;
  background: transparent;
}

.employee-picker-toggle:hover {
  background: var(--green-50);
}

.employee-picker-toggle i {
  font-size: 18px;
  transition: transform 140ms ease;
}

.employee-picker-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.employee-suggestions {
  position: absolute;
  z-index: 120;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 294px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(16, 39, 55, 0.18);
}

.employee-suggestion {
  display: flex;
  width: 100%;
  padding: 10px 11px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.employee-suggestion:hover,
.employee-suggestion.active {
  background: var(--green-50);
}

.employee-suggestion strong {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

.employee-suggestion span,
.employee-suggestion-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.employee-suggestion-empty {
  padding: 12px;
  text-align: center;
}

.stable-select {
  position: relative;
  width: 100%;
}

.field select.stable-select-native {
  position: absolute;
  width: 1px;
  min-width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.stable-select-button {
  display: flex;
  width: 100%;
  height: 50px;
  padding: 0 13px 0 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: #ffffff;
  font-size: 15px;
  text-align: left;
}

.stable-select-button:hover,
.stable-select-button[aria-expanded="true"] {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px var(--focus);
}

.stable-select-button i {
  flex: 0 0 auto;
  font-size: 18px;
  transition: transform 140ms ease;
}

.stable-select-button[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.stable-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stable-select-menu {
  position: absolute;
  z-index: 240;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 310px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(16, 39, 55, 0.2);
}

/* The production-line list is short enough to show in full. */
#productionLine + .stable-select-button + .stable-select-menu {
  max-height: none;
  overflow: visible;
}

.stable-select-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.stable-select-option:hover,
.stable-select-option:focus-visible,
.stable-select-option.selected {
  background: var(--green-50);
}

.work-area {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.production-section .work-area > .grid:first-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-section .work-area > .grid:first-child > .field:first-child {
  grid-column: 1 / -1;
}

.production-section .work-area > .grid:first-child > #singleKg {
  grid-column: 1 / -1;
}

.production-section .work-area .grid.two.full {
  gap: 30px;
}

.production-section .work-area .field label,
.production-section .work-area .manual-label {
  margin-bottom: 9px;
}

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

.section-title h3 {
  margin: 0;
  font-size: 16px;
}

.note-field {
  margin-top: 15px;
}

#manualAdjustmentField > .manual-control {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.manual-control {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
}

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

.adjustment-option {
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: #3d5161;
  background: var(--surface-soft);
  font-size: 15px;
  font-weight: 700;
}

.adjustment-option:hover {
  border-color: #9fb2bc;
  background: #f4f7f7;
}

.adjustment-option[data-mode="none"].selected,
.adjustment-option[data-mode="bonus"].selected {
  border-color: var(--green-700);
  color: var(--green-800);
  background: var(--green-50);
}

.adjustment-option[data-mode="penalty"].selected {
  border-color: #b8534b;
  color: #8d2f27;
  background: #fff0ee;
}

.manual-amount-box {
  margin-top: 10px;
}

.manual-amount-box input,
.rate-list input {
  height: 44px;
  padding: 0 12px;
}

.entry-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 25px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: var(--green-700);
  font-weight: 750;
  text-decoration: none;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  background: var(--green-800);
}

.button:active {
  transform: translateY(1px);
}

.button i {
  font-size: 20px;
}

.button.secondary {
  border: 1px solid var(--line);
  color: #304653;
  background: #edf2f4;
}

.button.secondary:hover {
  background: #e1e9ec;
}

.button.danger {
  color: var(--danger);
  background: #fff0ee;
}

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

.button.save {
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  padding: 0 18px;
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(0, 102, 76, 0.14);
  font-size: 18px;
}

.entry-actions .button.save {
  margin-top: 0;
}

.clear-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-top: 7px;
  padding: 0 12px;
  gap: 8px;
  border: 0;
  color: var(--green-800);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.clear-button i {
  font-size: 19px;
}

.clear-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.card-head,
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-head h2,
.page-head h2 {
  margin: 0 0 5px;
  font-size: 21px;
  line-height: 1.25;
}

.card-head p,
.page-head .muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar .field {
  min-width: 190px;
  flex: 1;
}

.toolbar .wide-field {
  flex: 2;
  min-width: 270px;
}

.period-switch {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.period-switch button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}

.period-switch button.active {
  color: #fff;
  background: var(--green-700);
  box-shadow: 0 5px 14px rgba(0, 102, 76, .18);
}

.period-range {
  display: flex;
  flex: 2;
  gap: 10px;
  min-width: 390px;
}

.period-range .field {
  min-width: 180px;
}

.filter-summary {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #cfe3db;
  border-radius: 10px;
  color: var(--green-800);
  background: var(--green-50);
  font-size: 13px;
  font-weight: 650;
}

.employee-report-link {
  padding: 0;
  border: 0;
  color: var(--green-700);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(0, 102, 76, .3);
  text-underline-offset: 3px;
  cursor: pointer;
}

.employee-report-link:hover {
  color: var(--green-800);
  text-decoration-color: currentColor;
}

.alert {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  line-height: 1.45;
}

.alert.info {
  border-color: #d5e7f2;
  color: #315a70;
  background: #eef6fb;
}

.alert.ok {
  border-color: #cde8dc;
  color: #155c48;
  background: #eaf6f1;
}

.alert.warn {
  border-color: #f2dfb4;
  color: #75561d;
  background: #fff7e6;
}

.alert.error {
  border-color: #f1d2ce;
  color: #8d2f27;
  background: #fff0ee;
}

.toast-region {
  position: fixed;
  z-index: 2200;
  top: 20px;
  right: 20px;
  display: flex;
  width: min(430px, calc(100vw - 40px));
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 30px;
  align-items: start;
  gap: 10px;
  min-height: 62px;
  overflow: hidden;
  padding: 15px 12px 14px 16px;
  border: 1px solid #d5e0e5;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 50px #10273538;
  color: #20343f;
  pointer-events: auto;
  animation: toast-in 0.24s ease-out both;
}

.toast > .ti {
  margin-top: 1px;
  font-size: 23px;
}

.toast-message {
  padding-top: 1px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.toast.ok {
  border-color: #a9dbc6;
  color: #115c47;
  background: #f2fbf7;
}

.toast.error {
  border-color: #efbbb5;
  color: #8d2f27;
  background: #fff7f5;
}

.toast.warn {
  border-color: #ead49e;
  color: #725117;
  background: #fffaf0;
}

.toast.info {
  border-color: #bddbea;
  color: #315a70;
  background: #f4faff;
}

.toast-close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-top: -5px;
  border: 0;
  border-radius: 8px;
  color: currentColor;
  background: transparent;
  opacity: 0.72;
}

.toast-close:hover,
.toast-close:focus-visible {
  background: #ffffffa8;
  opacity: 1;
  outline: none;
}

.toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.34;
  transform-origin: left;
  animation: toast-progress 5s linear forwards;
}

.toast.toast-out {
  animation: toast-out 0.22s ease-in both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate3d(24px, -8px, 0) scale(0.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(22px, -5px, 0); }
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 620px) {
  .toast-region {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 760px) {
  .period-switch {
    display: flex;
  }

  .period-switch button {
    flex: 1;
  }

  .period-range {
    width: 100%;
    min-width: 0;
    flex-direction: column;
  }

  .period-range .field {
    width: 100%;
  }
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.history-pagination-summary {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.history-pagination-summary b {
  color: var(--text);
}

.history-pagination-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.history-page-number,
.history-page-arrow {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--navy-900);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.history-page-number:hover,
.history-page-arrow:hover:not(:disabled) {
  border-color: var(--green-700);
  color: var(--green-800);
  transform: translateY(-1px);
}

.history-page-number.active {
  border-color: var(--green-700);
  color: #fff;
  background: var(--green-700);
}

.history-page-arrow:disabled {
  opacity: .42;
  cursor: default;
}

.history-pagination-gap {
  min-width: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .history-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .history-pagination-summary {
    text-align: center;
  }

  .history-pagination-pages {
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .history-page-arrow span {
    display: none;
  }
}

.session-expired-warning {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(61, 10, 10, 0.72);
  backdrop-filter: blur(5px);
}

.session-expired-warning-panel {
  width: min(920px, 100%);
  min-height: min(50vh, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: clamp(30px, 6vw, 68px);
  border: 4px solid #b42318;
  border-radius: 24px;
  background: #fff7f6;
  box-shadow: 0 32px 110px rgba(59, 9, 9, 0.48);
  text-align: center;
}

.session-expired-warning-panel > .ti {
  color: #b42318;
  font-size: clamp(54px, 8vw, 86px);
}

.session-expired-warning-panel h2 {
  margin: 0;
  color: #9f1c13;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
}

.session-expired-warning-records {
  display: grid;
  gap: 10px;
  color: #b42318;
  font-size: clamp(21px, 3vw, 31px);
  font-weight: 850;
  line-height: 1.25;
}

.session-expired-warning-panel p {
  margin: 0;
  color: #7a271f;
  font-size: clamp(19px, 2.5vw, 27px);
  font-weight: 800;
}

.session-expired-warning-panel .button {
  min-width: 180px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .session-expired-warning {
    padding: 12px;
  }

  .session-expired-warning-panel {
    min-height: 50vh;
    padding: 28px 18px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.toast-out,
  .toast-progress {
    animation-duration: 0.01ms;
  }
}

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

.data-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(160px, 1.3fr) minmax(220px, 1.5fr) 42px;
  align-items: end;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dde7eb;
  border-radius: 11px;
  background: #ffffff;
}

.data-row.operator-line {
  grid-template-columns: minmax(110px, 0.75fr) minmax(180px, 1.35fr) minmax(84px, 0.5fr) minmax(300px, 4fr) 42px;
}

.data-row.rewinder-line {
  grid-template-columns: minmax(110px, 0.75fr) minmax(84px, 0.5fr) minmax(300px, 4fr) 42px;
}

.data-row.operator-line > .field,
.data-row.rewinder-line > .field,
.data-row.operator-line .employee-picker,
.data-row.operator-line .stable-select,
.data-row.rewinder-line .stable-select,
.data-row.operator-line input,
.data-row.rewinder-line input {
  min-width: 0;
}

.data-row.pack {
  grid-template-columns: 1fr 1fr minmax(220px, 1.4fr) 42px;
}

.data-row.bag-product-row {
  grid-template-columns: minmax(150px, 0.75fr) minmax(280px, 1.35fr) 42px;
}

.data-row.warehouse-worker {
  grid-template-columns: 1.5fr 1fr 1fr minmax(220px, 1.2fr) 1fr 42px;
}

.remove {
  width: 42px;
  height: 50px;
  border: 0;
  border-radius: 9px;
  color: #a6342b;
  background: #fff0ee;
  font-size: 20px;
}

.add {
  margin-top: 10px;
}

.toggle {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 12px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  font-weight: 700;
}

.toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--green-700);
}

.table-wrap {
  overflow: auto;
  margin-top: 16px;
  border: 1px solid #e1e8ec;
  border-radius: 12px;
}

.table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.table th {
  padding: 12px;
  color: #4a5e6b;
  background: #f2f6f8;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 12px;
  border-top: 1px solid #e5ecef;
  font-size: 13px;
  line-height: 1.45;
  vertical-align: top;
}

.right {
  text-align: right !important;
}

.total {
  margin: 18px 0 5px;
  color: var(--green-800);
  font-size: 24px;
  font-weight: 800;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.log,
.position {
  padding: 14px 16px;
  border: 1px solid #dde7eb;
  border-radius: 12px;
  background: #ffffff;
}

.log time {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 800;
}

.log p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.log details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.log pre {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 9px;
  border-radius: 8px;
  background: #f5f7f8;
}

.position {
  margin-bottom: 12px;
}

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

.position-head h3 {
  margin: 0;
  font-size: 16px;
}

.badge {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--green-800);
  background: #e6f2ee;
  font-size: 12px;
  font-weight: 800;
}

.rate-list {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) minmax(130px, 0.7fr);
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}

.rate-list label {
  color: #465b68;
  font-size: 12px;
}

.rules {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f9fa;
}

.rules summary {
  color: #304b5b;
  font-weight: 800;
  cursor: pointer;
}

.worker-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.worker-grid .card {
  margin-top: 20px;
}

.stacked-field {
  margin-top: 14px;
}

.worker-list {
  max-height: 520px;
  overflow: auto;
  margin-top: 10px;
  border: 1px solid #e0e8eb;
  border-radius: 12px;
}

.worker-item {
  padding: 11px 12px;
  border-bottom: 1px solid #e6edef;
}

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

.worker-item b {
  display: block;
  margin-bottom: 3px;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 36, 53, 0.66);
  backdrop-filter: blur(3px);
}

.modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(16, 39, 55, 0.34);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0 0 4px;
  font-size: 21px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions .button {
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

.statistics-filter-card {
  position: relative;
  z-index: 4;
  overflow: visible;
  padding: 22px;
}

.statistics-filter-head,
.statistics-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.statistics-filter-head h2,
.statistics-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.25;
}

.statistics-filter-head p,
.statistics-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.statistics-filter-rule {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #3e5361;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.statistics-filter-step {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  margin-right: 3px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green-700);
  font-size: 10px;
  font-weight: 800;
}

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

.statistics-filter-grid > .field {
  position: relative;
  min-width: 0;
}

.statistics-scope-switch {
  display: grid;
  min-height: 48px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
}

.statistics-scope-switch button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.statistics-scope-switch button:hover {
  color: var(--green-800);
  background: rgba(255, 255, 255, 0.7);
}

.statistics-scope-switch button.active {
  color: #ffffff;
  background: var(--green-700);
  box-shadow: 0 4px 12px rgba(0, 102, 76, 0.18);
}

.statistics-scope-switch button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.statistics-work-equipment-field {
  grid-column: span 2;
}

.statistics-multi {
  position: relative;
  width: 100%;
  min-width: 0;
}

.statistics-multi-toggle {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.statistics-multi-toggle:hover,
.statistics-multi-toggle[aria-expanded="true"] {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px var(--focus);
}

.statistics-multi.has-selection .statistics-multi-toggle {
  border-color: rgba(0, 102, 76, 0.5);
  background: var(--green-50);
}

.statistics-multi-value {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-multi-count {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--green-700);
  font-size: 11px;
  font-weight: 800;
}

.statistics-multi-toggle > i {
  color: var(--muted);
  transition: transform 160ms ease;
}

.statistics-multi-toggle[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.statistics-multi-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  width: max(100%, 330px);
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(16, 39, 55, 0.2);
}

.statistics-work-equipment .statistics-multi-panel {
  right: 0;
  left: auto;
  width: min(720px, calc(100vw - 64px));
  max-width: none;
}

.statistics-filter-grid > .field:nth-child(3n) .statistics-multi-panel {
  right: 0;
  left: auto;
}

.statistics-multi-search {
  position: relative;
}

.statistics-multi-search i {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.statistics-multi-search input {
  height: 42px;
  padding: 0 12px 0 36px;
}

.statistics-multi-tools {
  display: flex;
  min-width: 0;
  align-items: stretch;
  flex-direction: column;
  gap: 9px;
  padding: 11px 2px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.statistics-multi-tools > div {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.statistics-multi-tools button {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--navy-900);
  background: #f7f9f9;
  box-shadow: 0 1px 2px rgba(16, 39, 55, 0.06);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.15;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.statistics-multi-tools button i {
  flex: 0 0 auto;
  font-size: 17px;
}

.statistics-multi-tools button:hover {
  border-color: rgba(0, 102, 76, 0.42);
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(16, 39, 55, 0.1);
  transform: translateY(-1px);
}

.statistics-multi-tools button:active {
  box-shadow: 0 1px 2px rgba(16, 39, 55, 0.06);
  transform: translateY(0);
}

.statistics-multi-tools .statistics-select-all {
  border-color: rgba(0, 102, 76, 0.28);
  color: var(--green-800);
  background: var(--green-50);
}

.statistics-multi-tools .statistics-done {
  border-color: var(--green-700);
  color: #ffffff;
  background: var(--green-700);
  box-shadow: 0 5px 14px rgba(0, 102, 76, 0.2);
}

.statistics-multi-tools .statistics-done:hover {
  border-color: var(--green-800);
  color: #ffffff;
  background: var(--green-800);
}

.statistics-multi-options {
  max-height: 260px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.statistics-work-equipment .statistics-multi-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.statistics-option-group {
  min-width: 0;
}

.statistics-option-group h3 {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 10px 8px 8px;
  color: var(--navy-900);
  background: #ffffff;
  font-size: 12px;
  line-height: 1.3;
}

.statistics-option-group h3 span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
}

.statistics-multi-panel .statistics-multi-option {
  display: grid;
  margin: 0;
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 7px 9px;
  padding: 10px 8px;
  border-bottom: 1px solid #edf1f2;
  border-radius: 7px;
  cursor: pointer;
}

.statistics-multi-option:hover {
  background: var(--green-50);
}

.statistics-multi-option.unavailable {
  color: var(--muted);
  background: #f7f9f9;
}

.statistics-multi-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.statistics-option-check {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: transparent;
  background: #ffffff;
}

.statistics-multi-option input:checked + .statistics-option-check {
  border-color: var(--green-700);
  color: #ffffff;
  background: var(--green-700);
}

.statistics-multi-option input:focus-visible + .statistics-option-check {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.statistics-option-label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.statistics-option-copy {
  display: block;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}

.statistics-option-hint {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-option-count {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  min-width: 26px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.statistics-options-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.statistics-active-filters {
  display: flex;
  min-height: 34px;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.statistics-active-label,
.statistics-no-filters {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.statistics-no-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.statistics-filter-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border: 1px solid rgba(0, 102, 76, 0.25);
  border-radius: 999px;
  color: var(--green-800);
  background: var(--green-50);
  font-size: 12px;
  font-weight: 700;
}

.statistics-filter-chip small {
  padding-right: 6px;
  border-right: 1px solid rgba(0, 102, 76, 0.18);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.statistics-filter-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
}

.statistics-filter-actions .statistics-export {
  border-color: rgba(0, 102, 76, 0.34);
  color: var(--green-800);
  background: var(--green-50);
}

.statistics-filter-actions .statistics-export:hover {
  border-color: var(--green-700);
  background: #ffffff;
}

.statistics-filter-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.statistics-filter-preview {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.statistics-filter-preview > i {
  flex: 0 0 auto;
  color: var(--green-700);
  font-size: 17px;
}

.statistics-filter-preview strong {
  color: var(--text);
  font-weight: 800;
}

.statistics-filter-card.is-refreshing .statistics-multi-toggle {
  background-image: linear-gradient(90deg, transparent, rgba(0, 102, 76, 0.035), transparent);
}

.statistics-pending-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -4px 0 16px;
  padding: 11px 14px;
  border: 1px solid #ead9a9;
  border-radius: 11px;
  color: #6d5316;
  background: #fff9e9;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.statistics-pending-notice i {
  flex: 0 0 auto;
  font-size: 18px;
}

.statistics-submit {
  min-width: 240px;
  min-height: 48px;
}

.statistics-submit.statistics-filters-changed {
  box-shadow: 0 0 0 4px rgba(0, 102, 76, 0.13), 0 9px 24px rgba(0, 102, 76, 0.16);
}

.statistics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.statistics-kpi {
  display: flex;
  min-height: 104px;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(16, 39, 55, 0.05);
}

.statistics-kpi-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 11px;
  color: var(--navy-900);
  background: #edf2f5;
}

.statistics-kpi-icon i {
  font-size: 21px;
}

.statistics-kpi > div {
  min-width: 0;
}

.statistics-kpi span:not(.statistics-kpi-icon) {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.statistics-kpi strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.statistics-kpi.accent {
  border-color: rgba(0, 102, 76, 0.28);
  background: var(--green-50);
}

.statistics-kpi.accent .statistics-kpi-icon,
.statistics-kpi.positive .statistics-kpi-icon {
  color: #ffffff;
  background: var(--green-700);
}

.statistics-kpi.negative .statistics-kpi-icon {
  color: #ffffff;
  background: var(--danger);
}

.statistics-chart-card,
.statistics-trend-card,
.statistics-table-card,
.statistics-day-details,
.statistics-details {
  padding: 22px;
}

.statistics-source {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green-800);
  background: var(--green-50);
  font-size: 12px;
  font-weight: 750;
}

.statistics-chart-hint {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--green-800);
  background: var(--green-50);
  font-size: 11px;
  font-weight: 750;
}

.statistics-chart {
  width: 100%;
  min-height: 338px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line-strong);
}

.statistics-bars {
  display: grid;
  min-width: max(100%, calc(var(--bar-count) * 94px));
  height: 337px;
  grid-template-columns: repeat(var(--bar-count), minmax(78px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 24px 8px 0;
}

.statistics-bar-item {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: 30px 230px 48px;
  gap: 6px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: center;
}

.statistics-bar-value {
  align-self: end;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-bar-track {
  display: flex;
  height: 230px;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 9px 9px 3px 3px;
  background: #f0f4f5;
}

.statistics-bar-fill {
  display: block;
  width: 100%;
  min-height: 5px;
  border-radius: 8px 8px 2px 2px;
  background: var(--green-700);
  transition: height 220ms ease, background-color 160ms ease;
}

.statistics-bar-item:hover .statistics-bar-fill,
.statistics-bar-item:focus-visible .statistics-bar-fill {
  background: var(--navy-900);
}

.statistics-bar-label {
  display: -webkit-box;
  overflow: hidden;
  align-self: start;
  color: #405264;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

.statistics-definition {
  margin-top: 14px;
  padding: 11px 13px;
  border-left: 3px solid var(--green-700);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  line-height: 1.5;
}

.statistics-trend {
  width: 100%;
  min-height: 226px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--line-strong);
}

.statistics-trend-bars {
  display: grid;
  min-width: max(100%, calc(var(--trend-count) * 62px));
  height: 225px;
  grid-template-columns: repeat(var(--trend-count), minmax(52px, 1fr));
  align-items: end;
  gap: 7px;
  padding: 14px 6px 0;
}

.statistics-trend-item {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: 28px 150px 25px;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 9px 9px 0 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.statistics-trend-item:hover,
.statistics-trend-item:focus-visible,
.statistics-trend-item.selected {
  background: var(--green-50);
}

.statistics-trend-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -2px;
}

.statistics-trend-value {
  align-self: end;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-trend-track {
  display: flex;
  height: 150px;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 7px 7px 2px 2px;
  background: #f0f4f5;
}

.statistics-trend-fill {
  display: block;
  width: 100%;
  min-height: 5px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--green-700), #07906e);
  transition: height 220ms ease;
}

.statistics-trend-item time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.statistics-trend-item:hover .statistics-trend-fill,
.statistics-trend-item:focus-visible .statistics-trend-fill,
.statistics-trend-item.selected .statistics-trend-fill {
  background: var(--navy-900);
}

.statistics-trend-item.selected time {
  color: var(--green-800);
  font-weight: 850;
}

.statistics-day-details {
  scroll-margin-top: 22px;
  border-color: rgba(0, 102, 76, 0.3);
  box-shadow: 0 14px 38px rgba(16, 39, 55, 0.09);
}

.statistics-day-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.statistics-day-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.statistics-day-kpis .statistics-kpi {
  min-height: 82px;
  padding: 13px;
  box-shadow: none;
}

.statistics-day-kpis .statistics-kpi-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.statistics-day-kpis .statistics-kpi strong {
  font-size: clamp(17px, 1.6vw, 21px);
}

.statistics-day-shift + .statistics-day-shift {
  margin-top: 18px;
}

.statistics-day-shift-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.statistics-day-shift-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--navy-900);
  font-size: 14px;
}

.statistics-day-shift-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.statistics-day-table {
  min-width: 860px;
}

.statistics-day-table th:last-child,
.statistics-day-table td:last-child {
  min-width: 140px;
}

.statistics-day-empty {
  margin-top: 8px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.statistics-shift-split {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
  font-size: 9px;
  white-space: nowrap;
}

.statistics-shift-split span {
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.statistics-ranking-table {
  min-width: 820px;
}

.statistics-ranking-table th,
.statistics-ranking-table td,
.statistics-detail-table th,
.statistics-detail-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.statistics-row-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.statistics-row-button strong,
.statistics-row-button span {
  display: block;
}

.statistics-row-button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.statistics-row-button:hover strong {
  color: var(--green-700);
}

.statistics-efficiency {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green-800);
  background: var(--green-50);
  font-weight: 800;
}

.statistics-details {
  scroll-margin-top: 22px;
  border-color: rgba(0, 102, 76, 0.28);
}

.statistics-detail-table {
  min-width: 960px;
}

.server-health-nav-badge {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-left: auto;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #ffffff;
  background: #d28b25;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.server-health-nav-badge.is-critical {
  background: #d85149;
  animation: server-alert-pulse 1.8s ease-in-out infinite;
}

.server-health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.server-live-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid #cfe3da;
  border-radius: 999px;
  color: var(--green-800);
  background: var(--green-50);
  font-size: 12px;
  font-weight: 800;
}

.server-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0c9a6d;
  box-shadow: 0 0 0 5px rgba(12, 154, 109, 0.12);
  animation: server-live-pulse 2s ease-out infinite;
}

.server-health-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 156px;
  margin: 24px 0 18px;
  padding: 28px 30px;
  gap: 20px;
  overflow: hidden;
  border: 1px solid #d9e5e1;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(125deg, #0f493b 0%, #0a6b51 58%, #118568 100%);
  box-shadow: 0 18px 40px rgba(12, 77, 60, 0.14);
}

.server-health-hero::after {
  position: absolute;
  top: -110px;
  right: -55px;
  width: 260px;
  height: 260px;
  border: 42px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.server-health-hero.is-warning {
  background: linear-gradient(125deg, #694616 0%, #a66f1d 62%, #c58b32 100%);
}

.server-health-hero.is-critical,
.server-health-hero.is-error {
  background: linear-gradient(125deg, #672a27 0%, #9f3c35 62%, #bd5149 100%);
}

.server-health-hero.is-loading {
  background: linear-gradient(125deg, #243f50 0%, #315d70 100%);
}

.server-health-status-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
}

.server-health-status-icon i {
  font-size: 33px;
}

.server-health-hero.is-loading .server-health-status-icon i {
  animation: spin 1s linear infinite;
}

.server-health-status-copy,
.server-health-updated {
  position: relative;
  z-index: 1;
}

.server-health-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.server-health-status-copy h2 {
  margin: 0 0 7px;
  color: #ffffff;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.45px;
}

.server-health-status-copy p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.79);
  font-size: 14px;
  line-height: 1.5;
}

.server-health-updated {
  display: flex;
  min-width: 154px;
  align-items: flex-end;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
}

.server-health-updated strong {
  margin: 3px 0 11px;
  color: #ffffff;
  font-size: 18px;
}

.server-health-updated button {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
}

.server-health-updated button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.server-health-alerts {
  display: grid;
  margin: 0 0 18px;
  gap: 10px;
}

.server-health-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 15px 17px;
  gap: 12px;
  border: 1px solid #e8d0a9;
  border-radius: 13px;
  color: #654512;
  background: #fff8e9;
}

.server-health-alert.is-critical {
  border-color: #e7bbb7;
  color: #812d28;
  background: #fff1ef;
}

.server-health-alert > i {
  margin-top: 1px;
  font-size: 21px;
}

.server-health-alert strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.server-health-alert p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

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

.server-health-metric {
  position: relative;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 39, 55, 0.06);
}

.server-health-metric::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #168262;
  content: "";
}

.server-health-metric.is-warning::before {
  background: #d08a27;
}

.server-health-metric.is-critical::before {
  background: #c84c44;
}

.server-health-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}

.server-health-metric-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  color: var(--green-700);
  background: var(--green-50);
}

.server-health-metric-icon i {
  font-size: 21px;
}

.server-health-level {
  padding: 5px 8px;
  border-radius: 999px;
  color: #27705c;
  background: #edf8f4;
  font-size: 10px;
  font-weight: 800;
}

.server-health-metric.is-warning .server-health-level {
  color: #835a16;
  background: #fff5df;
}

.server-health-metric.is-critical .server-health-level {
  color: #91352f;
  background: #fff0ee;
}

.server-health-metric-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.server-health-metric > strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-health-metric > p {
  min-height: 34px;
  margin: 7px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.server-health-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0ee;
}

.server-health-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #168262;
  transition: width 400ms ease;
}

.server-health-metric.is-warning .server-health-progress span {
  background: #d08a27;
}

.server-health-metric.is-critical .server-health-progress span {
  background: #c84c44;
}

.server-health-spark {
  display: flex;
  height: 28px;
  align-items: flex-end;
  margin-top: 14px;
  gap: 3px;
}

.server-health-spark i {
  min-width: 2px;
  flex: 1 1 0;
  border-radius: 3px 3px 1px 1px;
  background: rgba(0, 102, 76, 0.18);
  transition: height 300ms ease;
}

.server-health-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
}

.server-health-detail-grid .card {
  margin-bottom: 0;
}

.server-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.server-card-head > i {
  color: #5d7a87;
  font-size: 28px;
}

.server-card-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.server-card-head h2 {
  margin: 0;
  font-size: 18px;
}

.server-load-averages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
  gap: 10px;
}

.server-load-averages div {
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.server-load-averages span,
.server-app-details span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.server-load-averages strong {
  font-size: 22px;
}

.server-card-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.server-app-online {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #168262;
  font-size: 11px;
  font-weight: 800;
}

.server-app-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  gap: 10px;
}

.server-app-details div {
  padding: 12px 13px;
  border: 1px solid #e4ece9;
  border-radius: 11px;
}

.server-app-details strong {
  font-size: 14px;
}

.server-health-guide {
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  gap: 22px;
  border: 1px solid #e2eae7;
  border-radius: 13px;
  color: var(--muted);
  background: #f9fbfa;
  font-size: 10px;
}

.server-health-guide div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.server-health-guide i {
  color: var(--green-700);
  font-size: 17px;
}

.server-health-guide div:nth-child(2) i {
  color: #c48122;
}

.server-health-guide div:nth-child(3) i {
  color: #bf4841;
}

.server-health-guide strong {
  color: var(--text);
}

@keyframes server-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(12, 154, 109, 0.28); }
  70% { box-shadow: 0 0 0 8px rgba(12, 154, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(12, 154, 109, 0); }
}

@keyframes server-alert-pulse {
  50% { transform: scale(1.08); }
}

@media (max-width: 1120px) {
  .application:not(.hidden) {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .sidebar {
    width: 218px;
  }

  .workspace {
    padding-inline: 34px;
  }

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

  .worker-grid {
    grid-template-columns: 1fr;
  }

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

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

  .statistics-filter-grid > .field:nth-child(3n) .statistics-multi-panel {
    right: auto;
    left: 0;
  }

  .statistics-filter-grid > .field:nth-child(even) .statistics-multi-panel {
    right: 0;
    left: auto;
  }

  .data-row.warehouse-worker {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .application:not(.hidden) {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 16px;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .sidebar-brand {
    padding-bottom: 14px;
  }

  .sidebar-brand .logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .sidebar-brand strong {
    font-size: 19px;
  }

  .nav {
    flex-direction: row;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    width: auto;
    height: 44px;
    flex: 0 0 auto;
    padding: 0 14px;
    gap: 10px;
    white-space: nowrap;
  }

  .nav button:not(.active) i {
    display: none;
  }

  .account {
    display: none !important;
  }

  .workspace {
    min-height: 0;
    padding: 24px 18px 30px;
  }

  .screen-head h1 {
    font-size: 29px;
  }

  .screen-head p {
    font-size: 15px;
  }

  .entry-main-grid,
  .grid,
  .grid.two,
  .production-section .work-area > .grid:first-child,
  .production-section .work-area .grid.two.full,
  .adjustment-options,
  .modal-actions,
  .rate-list {
    grid-template-columns: 1fr;
  }

  .entry-main-grid > .full {
    margin-top: 0;
  }

  .production-section .work-area > .grid:first-child > .field:first-child,
  .production-section .work-area > .grid:first-child > #singleKg {
    grid-column: auto;
  }

  .data-row,
  .data-row.operator-line,
  .data-row.rewinder-line,
  .data-row.pack,
  .data-row.bag-product-row,
  .data-row.warehouse-worker {
    grid-template-columns: 1fr;
  }

  .data-row .remove,
  .data-row.operator-line .remove,
  .data-row.rewinder-line .remove {
    width: 100%;
    height: 42px;
    grid-column: auto;
  }

  .card,
  .modal-panel {
    padding: 16px;
  }

  .entry-card {
    padding: 0;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .field,
  .toolbar .wide-field {
    min-width: 100%;
  }

  .toolbar .button {
    width: 100%;
  }

  .card-head,
  .page-head {
    display: block;
  }

  .statistics-filter-head,
  .statistics-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .statistics-filter-rule {
    max-width: none;
    text-align: left;
  }

  .statistics-filter-grid {
    grid-template-columns: 1fr;
  }

  .statistics-work-equipment-field {
    grid-column: auto;
  }

  .statistics-work-equipment .statistics-multi-options {
    grid-template-columns: 1fr;
  }

  .statistics-filter-grid > .field:nth-child(even) .statistics-multi-panel,
  .statistics-filter-grid > .field:nth-child(3n) .statistics-multi-panel {
    right: auto;
    left: 0;
    width: 100%;
    max-width: 100%;
  }

  .statistics-section-head .button {
    width: 100%;
  }

  .statistics-chart-hint {
    align-self: flex-start;
  }

  .statistics-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .statistics-filter-footer {
    align-items: stretch;
    flex-direction: column;
  }

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

  .statistics-filter-actions .button,
  .statistics-submit {
    width: 100%;
    min-width: 0;
  }

  .statistics-chart {
    min-height: 292px;
  }

  .statistics-bars {
    height: 291px;
    grid-template-columns: repeat(var(--bar-count), minmax(72px, 1fr));
  }

  .statistics-bar-item {
    grid-template-rows: 28px 184px 50px;
  }

  .statistics-bar-track {
    height: 184px;
  }

  .page-head .button {
    width: 100%;
    margin-top: 12px;
  }

  .login {
    margin-top: 4vh;
    padding: 20px;
  }
}

@media (max-width: 1120px) {
  .server-health-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .server-health-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-health-hero {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 22px;
  }

  .server-health-updated {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .server-health-metric-grid,
  .server-health-detail-grid {
    grid-template-columns: 1fr;
  }

  .server-health-guide {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .server-health-status-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }

  .server-health-status-icon i {
    font-size: 27px;
  }

  .server-health-status-copy h2 {
    font-size: 21px;
  }

  .server-load-averages,
  .server-app-details {
    grid-template-columns: 1fr;
  }
}

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