:root {
  color-scheme: light;
  --ink: #142019;
  --muted: #637367;
  --line: #cfdfd2;
  --panel: #ffffff;
  --soft: #f4f8f3;
  --brand: #198754;
  --brand-strong: #0f5f3a;
  --brand-soft: #e8f6ec;
  --brand-faint: #f6fbf7;
  --mint: #2fb66d;
  --sun: #d69e2e;
  --rose: #dc4c3f;
  --violet: #4f7d63;
  --shadow: 0 22px 55px rgba(22, 88, 47, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #edf7ee 0%, #f8fbf7 44%, #eef5ef 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1.05fr);
}

.login-art {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  background:
    linear-gradient(145deg, rgba(15, 77, 104, 0.95), rgba(20, 108, 148, 0.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 1200'%3E%3Crect width='900' height='1200' fill='%23146c94'/%3E%3Cg opacity='.34' fill='%23ffffff'%3E%3Crect x='88' y='160' width='250' height='140' rx='16'/%3E%3Crect x='388' y='160' width='330' height='140' rx='16'/%3E%3Crect x='88' y='356' width='630' height='58' rx='12'/%3E%3Crect x='88' y='454' width='520' height='58' rx='12'/%3E%3Crect x='88' y='552' width='610' height='58' rx='12'/%3E%3Ccircle cx='712' cy='862' r='170'/%3E%3Cpath d='M103 831h378v54H103zM103 928h462v54H103zM103 1025h315v54H103z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.login-art::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% 36%;
  height: 42%;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-8deg);
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 18px;
}

.brand-lockup span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: var(--brand);
  font-weight: 900;
}

.brand-lockup.compact span {
  color: var(--muted);
}

.brand-lockup.compact .brand-mark {
  background: var(--brand);
  color: white;
}

.login-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 520px;
}

.login-metrics article {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.login-metrics strong {
  display: block;
  font-size: 38px;
}

.login-metrics span {
  color: rgba(255, 255, 255, 0.78);
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 20px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 0;
  font-size: 21px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(20, 108, 148, 0.12);
}

.primary-action,
.secondary-action,
.ghost-action,
.icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-action {
  color: white;
  background: var(--brand);
}

.primary-action:hover {
  background: var(--brand-strong);
}

.secondary-action {
  color: var(--brand);
  background: rgba(20, 108, 148, 0.1);
}

.ghost-action {
  width: 100%;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.icon-button {
  width: 42px;
  padding: 0;
  color: var(--muted);
  background: var(--soft);
}

.form-error {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
}

.app-view {
  min-height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.module-nav {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow: auto;
  padding-right: 2px;
}

.nav-item {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px 6px 6px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: #edf6f8;
}

.nav-item.active .nav-icon {
  background: var(--brand);
  color: white;
}

.nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.workspace {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.searchbox {
  width: min(310px, 38vw);
  display: block;
  position: relative;
}

.searchbox span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.searchbox input {
  width: 100%;
  padding-left: 48px;
}

.user-badge {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  white-space: nowrap;
}

.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f5f2;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.summary-item {
  min-height: 106px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.summary-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.summary-item small {
  color: var(--mint);
  font-weight: 800;
}

.content-band {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.section-heading.is-hidden {
  display: none;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.module-body {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.employee-subtabs,
.production-subtabs,
.settings-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow-x: auto;
}

.employee-subtab,
.production-subtab,
.settings-subtab {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.employee-subtab:hover,
.employee-subtab.active,
.production-subtab:hover,
.production-subtab.active,
.settings-subtab:hover,
.settings-subtab.active {
  color: white;
  background: var(--brand);
}

.employee-tabbar,
.contract-tabbar,
.settings-tabbar,
.payroll-tabbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.employee-tabbar .employee-subtabs,
.contract-tabbar .contract-subtabs,
.settings-tabbar .settings-subtabs,
.payroll-tabbar .payroll-subtabs {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.employee-tab-actions,
.contract-tab-actions,
.settings-tab-actions,
.payroll-tab-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.employee-tab-actions .secondary-action,
.contract-tab-actions .secondary-action,
.settings-tab-actions .secondary-action,
.module-actionbar .secondary-action,
.payroll-tab-actions .secondary-action {
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--brand-strong);
  background: white;
  white-space: nowrap;
}

.employee-tab-actions .secondary-action:hover,
.contract-tab-actions .secondary-action:hover,
.settings-tab-actions .secondary-action:hover,
.module-actionbar .secondary-action:hover,
.payroll-tab-actions .secondary-action:hover {
  border-color: rgba(25, 135, 84, 0.28);
  background: var(--brand-faint);
}

.module-actionbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}

.catalog-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.catalog-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.catalog-card header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.catalog-card header strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.catalog-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.catalog-list {
  display: grid;
  gap: 8px;
}

.catalog-item,
.catalog-empty {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.catalog-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.catalog-empty {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.production-entry h4 {
  margin: 0;
}

.entry-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(130px, 0.8fr)) auto;
  gap: 12px;
  align-items: end;
}

.production-filter {
  display: grid;
  grid-template-columns: minmax(160px, 220px) auto auto auto auto;
  gap: 12px;
  align-items: end;
  justify-content: start;
}

.production-output-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  white-space: nowrap;
}

.production-output-filter label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  font-size: 12px;
}

.production-output-filter input {
  min-height: 34px;
  width: 142px;
  padding: 0 9px;
}

.production-output-filter input[type="month"] {
  width: 150px;
}

.month-picker-shell {
  position: relative;
  display: inline-flex;
  width: 172px;
  min-width: 172px;
  vertical-align: middle;
}

.form-grid .month-picker-shell,
.entry-form .month-picker-shell {
  width: 100%;
  min-width: 0;
}

.native-month-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.month-picker-trigger {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(25, 135, 84, 0.28);
  border-radius: 10px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f5fbf7);
  box-shadow: 0 8px 20px rgba(22, 88, 47, 0.06);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.month-picker-trigger:hover {
  border-color: rgba(25, 135, 84, 0.55);
  box-shadow: 0 12px 24px rgba(22, 88, 47, 0.1);
  transform: translateY(-1px);
}

.month-picker-trigger:focus-visible {
  outline: 3px solid rgba(47, 182, 109, 0.22);
  outline-offset: 2px;
}

.month-picker-trigger.placeholder {
  color: var(--muted);
  font-weight: 800;
}

.month-picker-icon,
.month-picker-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--brand);
}

.month-picker-chevron {
  margin-left: auto;
  color: var(--muted);
}

.month-picker-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-picker-popover {
  position: fixed;
  width: 314px;
  padding: 12px;
  border: 1px solid rgba(25, 135, 84, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(20, 32, 25, 0.16);
  z-index: 10000;
}

.month-picker-popover[hidden] {
  display: none;
}

.month-picker-head {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.month-picker-head strong {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 15px;
}

.month-picker-nav {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand-strong);
  background: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

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

.month-picker-grid button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: #f5f9f5;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.month-picker-grid button:hover {
  border-color: rgba(25, 135, 84, 0.34);
  background: #ecfaf2;
}

.month-picker-grid button.current {
  border-color: rgba(25, 135, 84, 0.34);
  color: var(--brand-strong);
}

.month-picker-grid button.selected {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), #13b88f);
  box-shadow: 0 12px 24px rgba(25, 135, 84, 0.25);
}

.month-picker-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  margin-top: 11px;
  border-top: 1px solid var(--line);
}

.month-picker-foot button {
  border: 0;
  color: var(--brand-strong);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.date-picker-shell {
  width: 158px;
  min-width: 158px;
}

.form-grid .date-picker-shell,
.entry-form .date-picker-shell {
  width: 100%;
  min-width: 0;
}

.date-picker-popover {
  width: 336px;
}

.date-picker-head strong {
  font-size: 14px;
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.date-picker-weekdays {
  margin-bottom: 7px;
}

.date-picker-weekdays span {
  min-height: 26px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.date-picker-weekdays span:last-child {
  color: var(--rose);
}

.date-picker-empty {
  min-height: 38px;
}

.date-picker-day {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: #f5f9f5;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.date-picker-day:hover {
  border-color: rgba(25, 135, 84, 0.34);
  background: #ecfaf2;
}

.date-picker-day.current {
  border-color: rgba(25, 135, 84, 0.38);
  color: var(--brand-strong);
  background: #f0fbf4;
}

.date-picker-day.sunday {
  color: var(--rose);
  background: #fff7f6;
}

.date-picker-day.selected {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), #13b88f);
  box-shadow: 0 10px 22px rgba(25, 135, 84, 0.24);
}

.production-output-filter select {
  min-height: 34px;
  width: 190px;
  padding: 0 9px;
}

.production-output-filter .primary-action,
.production-output-filter .secondary-action {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.production-output-filter .lock-status {
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  min-height: 34px;
  padding: 5px 10px;
}

.production-output-filter .lock-status small {
  font-size: 11px;
}

.lock-status {
  display: grid;
  gap: 3px;
  min-width: 132px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 900;
}

.lock-status span {
  color: var(--brand-strong);
  font-size: 13px;
}

.lock-status small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.lock-status.locked {
  border-color: #fecaca;
  background: #fff1f2;
}

.lock-status.locked span {
  color: #dc2626;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.data-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.division-group-row td {
  padding: 10px 14px;
  color: var(--brand-strong);
  background: #eaf6f7;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.division-group-row span {
  color: var(--brand);
}

.production-overtime-row td {
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
  color: #64748b;
  background: #fbfefe;
  font-size: 12px;
  font-weight: 800;
}

.production-overtime-row .overtime-label-cell {
  color: var(--brand-strong);
}

.production-overtime-row .overtime-active-cell {
  color: #0f766e;
  background: #eefcf8;
  text-align: center;
}

.production-stat-table .production-paired-cell {
  vertical-align: middle;
  background: #fff;
}

.production-stat-table .production-work-type-head,
.production-stat-table .production-work-type-cell {
  min-width: 76px;
  text-align: center;
  font-weight: 900;
}

.production-stat-table .production-work-type-cell {
  color: #15594e;
  background: #f5fbf7;
}

.production-stat-table .production-total-cell {
  min-width: 82px;
  text-align: right;
  font-weight: 900;
}

.production-stat-table .production-action-cell {
  min-width: 122px;
}

.production-stat-table .production-workday-main-row > td:not([rowspan]) {
  border-bottom-color: #d6e8dc;
}

td {
  color: #2b3544;
}

tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: #e5f4f4;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.warn {
  color: #8a4b00;
  background: #fff3d8;
}

.status-pill.danger {
  color: #a13820;
  background: #ffe7df;
}

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

.table-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--brand);
  background: white;
  font-size: 12px;
  font-weight: 900;
}

.table-action:hover {
  background: #edf6f8;
}

.table-action.danger {
  color: #a13820;
  background: #fff5f1;
}

.table-action.danger:hover {
  background: #ffe7df;
}

.table-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.table-action.lock {
  color: #8a5d00;
  background: #fff8dc;
}

.table-action.unlock {
  color: #0f766e;
  background: #e7fbf6;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(420px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.mini-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.mini-panel h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8ed;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--mint));
}

.payroll-total {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
}

.payroll-total div {
  padding: 14px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.payroll-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payroll-total strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.payroll-table {
  table-layout: auto;
  border: 0;
}

.payroll-table th,
.payroll-table td {
  padding: 5px 6px;
  border-right: 1px solid #e3ebf0;
  border-bottom: 1px solid #dfe8ee;
  font-size: 11px;
  line-height: 1.15;
}

.payroll-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.payroll-table th {
  color: #15594e;
  background: #edf9f5;
  font-size: 10.5px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
}

.payroll-table th:last-child,
.payroll-table td:last-child {
  border-right: 0;
}

.payroll-table .payroll-group-head {
  text-align: center;
  color: var(--brand-strong);
  background: #edf9f5;
  border-bottom: 1px solid #b9dbd1;
}

.payroll-table .payroll-subhead-row th {
  top: 30px;
  background: #f7fcfa;
  color: #15594e;
  border-top: 1px solid #dfe8ee;
  border-bottom: 1px solid #b9dbd1;
  border-right: 1px solid #e3ebf0;
  box-shadow: none;
}

.payroll-table .payroll-leaf-head {
  border-bottom: 1px solid #b9dbd1;
  box-shadow: none;
}

.payroll-header-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.08;
  white-space: nowrap;
}

.payroll-header-label small {
  color: #617690;
  font-size: 9.5px;
  font-weight: 900;
}

.production-seasonal-quantity-table .seasonal-quantity-cell {
  text-align: center;
}

.production-seasonal-quantity-table .seasonal-total-cell {
  text-align: right;
  font-weight: 800;
}

.production-seasonal-total-row td {
  font-weight: 900;
}

.payroll-table tbody tr:first-child td {
  border-top: 0;
}

.payroll-summary-row td {
  color: #15594e;
  background: #f3fbf7;
  border-top: 1px solid #acd8cc;
  font-weight: 900;
}

.payroll-table tbody tr.payroll-missing-workday-row td,
.payroll-table tbody tr.payroll-missing-workday-row td *,
.payroll-table tbody tr.salary-advance-no-row td,
.payroll-table tbody tr.salary-advance-no-row td * {
  color: #dc2626 !important;
}

.salary-advance-no-filter {
  overflow: visible;
  flex-wrap: nowrap;
  align-items: center;
}

.salary-advance-no-filter .salary-advance-no-employee-field {
  width: 330px;
  min-width: 330px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.salary-advance-no-filter .salary-advance-no-employee-field > label {
  min-width: max-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.salary-advance-no-filter .employee-autocomplete {
  width: 238px;
}

.salary-advance-no-filter .salary-advance-no-note {
  min-width: max-content;
}

.salary-advance-no-filter .salary-advance-no-note input {
  width: 160px;
}

.settings-section {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settings-section h4,
.appearance-group h4 {
  margin: 0;
}

.settings-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

.settings-create-form .primary-action {
  min-height: 44px;
}

.settings-user-list {
  padding-top: 2px;
}

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

.settings-list-head h4 {
  margin: 0;
}

.account-row-actions {
  white-space: nowrap;
}

.current-account-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.role-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(520px, 2fr) auto;
  gap: 14px;
  align-items: end;
}

.role-permission-options {
  min-height: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 8px 12px;
  align-content: center;
}

.role-form-actions {
  display: flex;
  gap: 8px;
}

.company-settings-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

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

.status-inactive {
  color: #b42318;
  background: #fff0ed;
}

.permission-manager {
  gap: 8px;
}

.permission-list {
  display: grid;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 0.8fr) minmax(420px, 2.4fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

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

.permission-identity {
  min-width: 0;
}

.permission-identity strong,
.permission-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-identity span,
.permission-role > span {
  color: var(--muted);
  font-size: 12px;
}

.permission-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px 12px;
}

.action-permission-details {
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  overflow: hidden;
}

.action-permission-details > summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--brand-strong);
  font-weight: 700;
  list-style-position: inside;
}

.action-permission-details[open] > summary {
  border-bottom: 1px solid var(--line);
  background: var(--brand-faint);
}

.action-permission-matrix {
  min-width: 620px;
  max-height: 520px;
  overflow: auto;
}

.action-permission-header,
.action-permission-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) repeat(4, minmax(82px, 110px));
  align-items: center;
}

.action-permission-header {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #f2f8f4;
}

.action-permission-header strong:not(:first-child) {
  text-align: center;
  font-size: 12px;
}

.action-permission-group-title {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--brand-strong);
  background: #eef9f2;
  font-weight: 800;
}

.action-permission-row {
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid #e8efeb;
}

.action-permission-row > span:first-child {
  padding-right: 12px;
  font-weight: 600;
}

.action-permission-check {
  display: grid;
  place-items: center;
  min-height: 40px;
  cursor: pointer;
}

.action-permission-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.action-permission-check span {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #b8cfc0;
  border-radius: 5px;
  background: white;
}

.action-permission-check input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
}

.action-permission-check input:checked + span::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.action-permission-check input:focus-visible + span {
  outline: 3px solid rgba(25, 135, 84, 0.2);
  outline-offset: 2px;
}

.action-permission-na {
  color: #a5b2aa;
  text-align: center;
}

.check-control {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
}

.check-control input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--brand);
}

.switch-control {
  display: inline-grid;
  grid-template-columns: 36px auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 36px;
  height: 20px;
  position: relative;
  border-radius: 10px;
  background: #cbd5e1;
  transition: 160ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  transition: 160ms ease;
}

.switch-control input:checked + .switch-track {
  background: var(--brand);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch-control strong {
  font-size: 12px;
  white-space: nowrap;
}

.appearance-settings {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-faint) 70%, white), var(--panel) 190px),
    var(--panel);
}

.appearance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, var(--brand-faint));
}

.appearance-hero h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
}

.appearance-hero p:not(.eyebrow) {
  margin: 0;
  max-width: 660px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.appearance-preview {
  min-height: 168px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 40px rgba(20, 97, 57, 0.1);
}

.appearance-preview-sidebar,
.appearance-preview-main {
  border: 1px solid #d8ebe0;
  border-radius: 8px;
  background: #f5fbf7;
}

.appearance-preview-sidebar {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 12px 10px;
}

.appearance-preview-sidebar span {
  height: 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 20%, white);
}

.appearance-preview-sidebar span:first-child {
  width: 42px;
  height: 32px;
  background: var(--brand);
}

.appearance-preview-main {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: white;
}

.appearance-preview-title {
  width: 48%;
  height: 18px;
  border-radius: 8px;
  background: var(--brand-strong);
}

.appearance-preview-toolbar {
  display: flex;
  gap: 8px;
}

.appearance-preview-toolbar span {
  width: 82px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 16%, white);
}

.appearance-preview-toolbar span:last-child {
  background: linear-gradient(90deg, var(--brand), #19a7c7);
}

.appearance-preview-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #cfe3d4;
  border-radius: 8px;
  overflow: hidden;
}

.appearance-preview-table span {
  height: 24px;
  border-right: 1px solid #dce9df;
  border-bottom: 1px solid #dce9df;
  background: #ffffff;
}

.appearance-preview-table span:nth-child(-n+3) {
  background: color-mix(in srgb, var(--brand) 12%, white);
}

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

.appearance-group {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.appearance-group-wide {
  grid-column: 1 / -1;
}

.appearance-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.appearance-group-head h4 {
  color: var(--ink);
}

.appearance-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.segmented-options {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segmented-options.wide {
  width: 100%;
}

.segmented-options.wide label {
  flex: 1;
}

.segmented-options label {
  cursor: pointer;
}

.segmented-options input,
.accent-options input,
.appearance-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-options span {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.segmented-options input:checked + span {
  color: white;
  background: var(--brand);
}

.accent-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.appearance-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

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

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

.appearance-choice {
  min-height: 72px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.appearance-choice:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
}

.appearance-choice.selected,
.appearance-choice:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-faint) 70%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent);
}

.appearance-choice strong,
.appearance-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appearance-choice strong {
  color: var(--ink);
  font-size: 13px;
}

.appearance-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.appearance-choice-mark,
.appearance-choice-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 14%, white);
}

.appearance-choice-mark::after {
  content: "";
  width: 12px;
  height: 12px;
  display: block;
  margin: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.accent-blue,
.appearance-choice-swatch.accent-blue { background: linear-gradient(135deg, #146c94, #32a6d8); }
.accent-teal,
.appearance-choice-swatch.accent-teal { background: linear-gradient(135deg, #0f766e, #35d0c2); }
.accent-green,
.appearance-choice-swatch.accent-green { background: linear-gradient(135deg, #198754, #57d17a); }
.accent-emerald,
.appearance-choice-swatch.accent-emerald { background: linear-gradient(135deg, #0f8f6e, #32e1a8); }
.accent-cyan,
.appearance-choice-swatch.accent-cyan { background: linear-gradient(135deg, #0e7490, #38bdf8); }
.accent-rose,
.appearance-choice-swatch.accent-rose { background: linear-gradient(135deg, #c2415d, #fb7185); }

.appearance-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  padding-top: 4px;
}

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

.audit-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.audit-item strong {
  display: block;
  font-size: 14px;
}

.audit-item span {
  color: var(--muted);
  font-size: 12px;
}

.modal {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(24, 33, 47, 0.24);
}

.modal form {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.production-output-modal {
  width: min(720px, calc(100vw - 28px));
}

.contract-modal {
  width: min(1100px, calc(100vw - 28px));
}

.contract-appendix-modal {
  width: min(820px, calc(100vw - 28px));
}

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

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

.contract-form-grid input[readonly],
.contract-form-grid :disabled,
.contract-appendix-grid input[readonly] {
  color: var(--muted);
  background: var(--soft);
}

#employeePaymentMethodField.field-disabled span {
  color: var(--muted);
}

#employeePaymentMethodField select:disabled {
  color: var(--muted);
  background: var(--soft);
  cursor: not-allowed;
}

#employeeCardNumberField.field-disabled span {
  color: var(--muted);
}

#employeeCardNumberField input:disabled {
  color: var(--muted);
  background: var(--soft);
  cursor: not-allowed;
}

.account-modal {
  width: min(780px, calc(100vw - 28px));
}

.reset-password-modal {
  width: min(620px, calc(100vw - 28px));
}

.salary-modal {
  width: min(900px, calc(100vw - 28px));
}

.insurance-modal {
  width: min(760px, calc(100vw - 28px));
}

.salary-history-modal {
  width: min(1120px, calc(100vw - 28px));
}

.salary-history-modal .data-table {
  min-width: 980px;
}

.salary-total-field input {
  color: var(--brand-strong);
  background: var(--soft);
  font-weight: 900;
}

.salary-row-actions {
  min-width: 168px;
}

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

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

.production-output-items-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

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

.production-output-items-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.production-output-items {
  display: grid;
  gap: 10px;
}

.production-output-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.production-output-item-row label {
  min-width: 0;
}

.production-output-item-row .production-output-item-remove {
  min-width: 58px;
  min-height: 42px;
}

.employee-autocomplete-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.employee-autocomplete-field > label {
  display: block;
}

.employee-autocomplete {
  position: relative;
  min-width: 0;
}

.employee-autocomplete > input[type="search"] {
  width: 100%;
  padding-right: 36px;
}

.employee-suggestions {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 286px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #bad5c2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 95, 58, 0.16);
}

.employee-suggestion {
  width: 100%;
  min-height: 50px;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.employee-suggestion:hover,
.employee-suggestion:focus {
  outline: none;
  background: var(--brand-soft);
}

.employee-suggestion strong,
.employee-suggestion small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-suggestion strong {
  font-size: 13px;
}

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

.employee-suggestion-empty {
  padding: 13px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.production-stat-modal {
  width: min(1120px, calc(100vw - 28px));
}

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

.stat-days-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(7, minmax(74px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.stat-fill-row {
  align-self: end;
}

.stat-days-grid label span {
  font-size: 11px;
}

.stat-day-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.stat-day-inputs input {
  min-width: 0;
  padding-right: 7px;
  padding-left: 7px;
  text-align: center;
}

.stat-day-inputs input[data-stat-overtime] {
  color: #0f766e;
  background: #eefcf8;
  font-weight: 800;
}

.stat-day-inputs input[data-stat-overtime]:disabled {
  color: var(--muted);
  background: #eef2f5;
  cursor: not-allowed;
  opacity: 0.72;
}

.stat-days-grid label.sunday-input span {
  color: #dc2626;
}

.stat-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 900;
}

.production-stat-table th,
.production-stat-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.production-output-table th,
.production-output-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.production-report-total {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.production-report-total div {
  padding: 13px 14px;
  border: 1px solid #cfe0e8;
  border-radius: 8px;
  background: #ffffff;
}

.production-report-total span {
  display: block;
  color: #617690;
  font-size: 12px;
  font-weight: 800;
}

.production-report-total strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
}

.production-report-section {
  display: grid;
  gap: 10px;
}

.production-report-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.production-stat-table th:last-child,
.production-stat-table td:last-child,
.production-output-table th:last-child,
.production-output-table td:last-child {
  border-right: 0;
}

.production-stat-table th:nth-child(n + 6),
.production-stat-table td:nth-child(n + 6) {
  text-align: center;
}

.production-stat-table .sunday-column {
  color: #dc2626;
  font-weight: 900;
}

.production-stat-table thead tr:first-child th {
  top: 0;
}

.production-stat-table .weekday-row th {
  top: 41px;
  color: #64748b;
  background: #eef6f7;
  font-size: 11px;
  text-transform: none;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

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

#salaryAdvanceMaxAmount[readonly] {
  color: var(--brand-strong);
  background: #eefcf7;
  border-color: rgba(19, 184, 143, 0.28);
  cursor: pointer;
  font-weight: 900;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(440px, calc(100vw - 32px));
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: start;
  gap: 12px;
  overflow: hidden;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  padding: 16px 16px 18px;
  border: 1px solid color-mix(in srgb, var(--toast-accent, var(--brand)) 28%, white);
  border-radius: 8px;
  color: #113323;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--toast-accent, var(--brand)) 10%, white), #ffffff 58%),
    #ffffff;
  box-shadow: 0 22px 55px rgba(15, 50, 29, 0.18);
  transition: transform 180ms ease, opacity 180ms ease;
  z-index: 80;
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.toast.in-modal {
  position: sticky;
  right: auto;
  bottom: 14px;
  z-index: 3;
  justify-self: end;
  width: min(430px, 100%);
  margin: 12px 0 0 auto;
  transform: translateY(8px) scale(0.98);
  box-shadow: 0 18px 42px rgba(15, 50, 29, 0.16);
}

.toast.in-modal.show {
  transform: translateY(0) scale(1);
}

.toast-success {
  --toast-accent: #0fba8c;
}

.toast-warning {
  --toast-accent: #d97706;
}

.toast-error {
  --toast-accent: #dc2626;
}

.toast-info {
  --toast-accent: #0284c7;
}

.toast-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 72%, #111827));
  box-shadow: 0 12px 22px color-mix(in srgb, var(--toast-accent) 24%, transparent);
}

.toast-icon svg,
.toast-close svg {
  width: 18px;
  height: 18px;
}

.toast-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.toast-copy strong {
  color: #092719;
  font-size: 14px;
  line-height: 1.2;
}

.toast-copy span {
  color: #425466;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-line;
}

.toast-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
}

.toast-close:hover {
  color: #0f172a;
  background: #eef7f2;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 55%, white));
  transform-origin: left center;
}

.toast.show .toast-progress {
  animation: toast-progress var(--toast-life, 3600ms) linear forwards;
}

body[data-theme="dark"] .toast {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--toast-accent, var(--brand)) 34%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--toast-accent, var(--brand)) 16%, #172129), #172129 62%),
    #172129;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

body[data-theme="dark"] .toast-copy strong {
  color: #eefaf4;
}

body[data-theme="dark"] .toast-copy span {
  color: #b6c7bd;
}

body[data-theme="dark"] .toast-close {
  color: #a8b8c5;
}

body[data-theme="dark"] .toast-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

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

/* Green professional refresh */
.login-art {
  background:
    linear-gradient(145deg, rgba(8, 64, 33, 0.97), rgba(28, 135, 76, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 1200'%3E%3Crect width='900' height='1200' fill='%23155f35'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2' opacity='.22'%3E%3Cpath d='M74 178h294v138H74zM406 178h396v138H406zM74 402h690M74 486h560M74 570h640M104 846h322M104 938h448M104 1030h274'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.13'%3E%3Crect x='88' y='740' width='382' height='64' rx='8'/%3E%3Crect x='88' y='834' width='610' height='64' rx='8'/%3E%3Crect x='88' y='928' width='486' height='64' rx='8'/%3E%3Cpath d='M702 668h86v86h-86zM616 754h86v86h-86zM702 840h86v86h-86z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.login-art::after {
  inset: auto -10% -14% 30%;
  height: 38%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 34px rgba(6, 45, 24, 0.18);
}

.login-panel {
  background: linear-gradient(180deg, #f9fcf8 0%, #eef7f0 100%);
}

.login-card {
  position: relative;
  overflow: hidden;
  border-color: #d7e8db;
  box-shadow: 0 28px 70px rgba(23, 80, 42, 0.16);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-strong), var(--mint));
}

h1 {
  max-width: 10ch;
}

input,
select {
  border-color: #cbded0;
  background: #fbfefc;
}

input:hover,
select:hover {
  border-color: #aacbb4;
}

input:focus,
select:focus {
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.13);
}

.primary-action {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 20px rgba(25, 135, 84, 0.18);
}

.primary-action:hover {
  background: linear-gradient(135deg, #1f9b60, var(--brand-strong));
}

.secondary-action {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.secondary-action:hover,
.icon-button:hover {
  background: #dcf0e2;
}

.app-view {
  background: linear-gradient(180deg, #f5faf5 0%, #eef5ef 100%);
}

.sidebar {
  position: sticky;
  overflow: hidden;
  color: white;
  border-right: 0;
  background: linear-gradient(180deg, #0b3b22 0%, #145f35 58%, #0e4b2c 100%);
  box-shadow: 14px 0 38px rgba(14, 75, 44, 0.18);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar .brand-lockup.compact strong {
  color: white;
}

.sidebar .brand-lockup.compact span,
.sidebar .ghost-action {
  color: rgba(255, 255, 255, 0.74);
}

.sidebar .brand-lockup.compact .brand-mark {
  color: var(--brand-strong);
  background: #eef9f1;
}

.sidebar .ghost-action {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .ghost-action:hover {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.nav-item {
  color: rgba(255, 255, 255, 0.72);
}

.nav-icon {
  color: #d8f8e2;
  background: rgba(255, 255, 255, 0.11);
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 3px 0 0 #a8efbf;
}

.nav-item.active .nav-icon {
  color: var(--brand-strong);
  background: white;
}

.topbar {
  padding: 16px 18px;
  border: 1px solid #d9e8dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(32, 84, 47, 0.08);
}

.user-badge,
.summary-item,
.content-band,
.mini-panel,
.catalog-card,
.company-settings-form,
.appearance-settings {
  border-color: #d7e6d9;
}

.user-badge,
.summary-item,
.content-band {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(26, 85, 45, 0.08);
}

.avatar {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.summary-item {
  background: linear-gradient(180deg, white, var(--brand-faint));
}

.summary-item strong {
  color: var(--brand-strong);
}

.section-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid #dce9df;
}

.employee-subtabs,
.production-subtabs,
.settings-subtabs,
.segmented-options {
  border-color: #cfe5d5;
  background: #edf8f0;
}

.employee-subtab:hover,
.employee-subtab.active,
.production-subtab:hover,
.production-subtab.active,
.settings-subtab:hover,
.settings-subtab.active,
.segmented-options input:checked + span {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.data-table-wrap {
  border-color: #b8d4c0;
  background: white;
  box-shadow: 0 10px 24px rgba(31, 92, 50, 0.07);
}

th {
  color: #174c2e;
  background: #eaf6ed;
  border-bottom: 2px solid #a9cdb3;
}

td {
  color: #24352a;
}

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

.division-group-row td {
  color: #0f5f3a;
  background: #dff2e5;
  border-top-color: #a7ccb2;
  border-bottom-color: #a7ccb2;
}

.status-pill {
  color: #0f5f3a;
  background: #dff2e5;
}

.table-action {
  color: var(--brand-strong);
  border-color: #bad7c2;
  background: #fbfefc;
}

.table-action:hover {
  background: #eaf7ee;
}

.table-action.unlock {
  color: #0f6b3e;
  background: #e3f8ea;
}

.lock-status span,
.salary-total-field input {
  color: var(--brand-strong);
}

.bar-track {
  background: #dbe9de;
}

.payroll-table {
  border: 0;
}

.payroll-table th,
.payroll-table td {
  border-right-color: #e3ebf0;
  border-bottom-color: #dfe8ee;
}

.payroll-table th {
  color: #15594e;
  background: #edf9f5;
}

.payroll-table .payroll-group-head {
  color: var(--brand-strong);
  background: #edf9f5;
  border-bottom-color: #b9dbd1;
}

.payroll-table .payroll-subhead-row th {
  color: #15594e;
  background: #f7fcfa;
  border-top-color: #dfe8ee;
  border-bottom-color: #b9dbd1;
  border-right-color: #e3ebf0;
  box-shadow: none;
}

.payroll-table .payroll-leaf-head {
  border-bottom-color: #b9dbd1;
  box-shadow: none;
}

.payroll-header-label small {
  color: #617690;
}

.payroll-table tbody tr:first-child td {
  border-top-color: transparent;
}

.payroll-summary-row td {
  color: #15594e;
  background: #f3fbf7;
  border-top-color: #acd8cc;
}

.production-stat-table .weekday-row th {
  color: #52705b;
  background: #eef8f1;
}

.modal {
  border: 1px solid #cfe3d4;
  box-shadow: 0 30px 80px rgba(14, 73, 42, 0.22);
}

.modal::backdrop {
  background: rgba(15, 55, 31, 0.24);
}

.modal form {
  background: linear-gradient(180deg, white, #fbfefc);
}

.modal-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #dce9df;
}

body[data-accent="teal"] {
  --brand: #0f766e;
  --brand-strong: #115e59;
}

body[data-accent="green"] {
  --brand: #198754;
  --brand-strong: #0f5f3a;
}

body[data-accent="rose"] {
  --brand: #c2415d;
  --brand-strong: #9f1239;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eef3;
  --muted: #9eacb7;
  --line: #34434d;
  --panel: #172129;
  --soft: #111a20;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  background: #0d151a;
}

body[data-theme="dark"] .sidebar {
  background: rgba(18, 28, 35, 0.96);
}

body[data-theme="dark"] .content-band,
body[data-theme="dark"] .mini-panel,
body[data-theme="dark"] .user-badge,
body[data-theme="dark"] .summary-item,
body[data-theme="dark"] .payroll-total div,
body[data-theme="dark"] .stat-total,
body[data-theme="dark"] .data-table,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .accent-options label {
  color: var(--ink);
  background: var(--panel);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  color: var(--ink);
  border-color: var(--line);
  background: #111a20;
}

body[data-theme="dark"] .nav-item:hover,
body[data-theme="dark"] .nav-item.active,
body[data-theme="dark"] .production-stat-table .weekday-row th {
  color: var(--ink);
  background: #1b3038;
}

body[data-theme="dark"] .avatar {
  color: #8bd8cf;
  background: #183833;
}

body[data-density="compact"] .workspace {
  gap: 12px;
  padding: 18px;
}

body[data-density="compact"] .sidebar {
  gap: 14px;
  padding: 16px 14px;
}

body[data-density="compact"] .nav-item {
  min-height: 40px;
}

body[data-density="compact"] .content-band,
body[data-density="compact"] .mini-panel {
  padding: 14px;
}

body[data-density="compact"] .data-table th,
body[data-density="compact"] .data-table td {
  padding: 8px 10px;
}

body[data-density="compact"] .payroll-table th,
body[data-density="compact"] .payroll-table td {
  padding: 4px 5px;
}

body[data-density="compact"] .module-body {
  gap: 12px;
}

@media (max-width: 1040px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 330px;
  }

  .login-panel {
    min-height: auto;
  }

  .app-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .module-nav {
    grid-auto-flow: column;
    grid-auto-columns: 156px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .ghost-action {
    width: auto;
    justify-self: start;
  }

  .summary-strip,
  .insight-grid,
  .account-grid,
  .catalog-grid,
  .entry-form,
  .production-filter {
    grid-template-columns: 1fr 1fr;
  }

  .settings-create-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .permission-row {
    grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 0.8fr) minmax(360px, 2fr);
  }

  .role-form,
  .company-form-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .role-permission-options {
    grid-column: 1 / -1;
  }

  .permission-row .switch-control,
  .permission-row .secondary-action {
    justify-self: start;
  }

  .stat-days-grid {
    grid-template-columns: repeat(4, minmax(74px, 1fr));
  }
}

@media (max-width: 720px) {
  .login-art,
  .login-panel,
  .workspace {
    padding: 18px;
  }

  .login-card {
    padding: 22px;
  }

  .login-metrics,
  .summary-strip,
  .insight-grid,
  .payroll-total,
  .account-grid,
  .catalog-grid,
  .entry-form,
  .production-filter,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .settings-create-form,
  .permission-row,
  .role-form,
  .company-form-grid,
  .account-form-grid,
  .reset-password-grid {
    grid-template-columns: 1fr;
  }

  .company-address {
    grid-column: auto;
  }

  .permission-modules {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .catalog-form {
    grid-template-columns: 1fr;
  }

  .production-output-modal .form-grid,
  .production-stat-modal .form-grid {
    grid-template-columns: 1fr;
  }

  .production-output-item-row {
    grid-template-columns: 1fr;
  }

  .stat-days-grid {
    grid-template-columns: repeat(2, minmax(74px, 1fr));
  }

  .topbar,
  .section-heading {
    display: grid;
  }

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

  .searchbox {
    width: 100%;
  }

  .content-band {
    padding: 16px;
  }
}

/* 2026 professional UI */
:root {
  --ink: #0b2144;
  --muted: #687b96;
  --line: #dce7ef;
  --panel: #ffffff;
  --soft: #f5f9fc;
  --brand: #0fba8c;
  --brand-strong: #078467;
  --brand-soft: #e5f9f3;
  --brand-faint: #f4fcf9;
  --mint: #35d5b4;
  --sky: #eaf6ff;
  --sun: #e6a72d;
  --rose: #dd4f55;
  --shadow: 0 16px 40px rgba(35, 72, 112, 0.1);
}

body {
  overflow-x: hidden;
  background: #f4f8fc;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input,
select {
  min-height: 46px;
  border-color: #d5e1eb;
  border-radius: 8px;
  background: #ffffff;
}

input:hover,
select:hover {
  border-color: #afc7d9;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 186, 140, 0.12);
}

.primary-action,
.secondary-action,
.ghost-action,
.icon-button {
  border-radius: 8px;
  min-height: 42px;
}

.primary-action {
  background: linear-gradient(135deg, #15c99c, #159ed4);
  box-shadow: 0 10px 22px rgba(15, 186, 140, 0.2);
}

.primary-action:hover {
  background: linear-gradient(135deg, #0db187, #118dbd);
  transform: translateY(-1px);
}

.secondary-action {
  color: #087d64;
  border: 1px solid #cde7df;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(31, 82, 103, 0.05);
}

.secondary-action:hover,
.icon-button:hover {
  border-color: #8fd7c4;
  background: #edfaf6;
}

.eyebrow {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
}

/* Login */
.login-view {
  min-height: 100vh;
  grid-template-columns: minmax(580px, 1.25fr) minmax(430px, 0.75fr);
  background: #f7fbfe;
}

.login-art {
  min-height: 100vh;
  padding: 30px clamp(32px, 4vw, 68px);
  gap: 22px;
  justify-content: initial;
  color: var(--ink);
  background: linear-gradient(138deg, #ecfbf6 0%, #e7f8ff 58%, #d9edff 100%);
}

.login-art::after {
  inset: auto -8% -24% 15%;
  height: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(69, 167, 226, 0.08));
  transform: rotate(-8deg);
}

.brand-lockup {
  gap: 14px;
}

.brand-lockup strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}

.brand-lockup span {
  color: var(--muted);
}

.brand-mark {
  position: relative;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(38, 102, 125, 0.12);
}

.brand-mark i {
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 9px;
  border-radius: 5px;
  background: linear-gradient(180deg, #18d3a4, #12aeb8);
}

.brand-mark i:first-child {
  left: 13px;
}

.brand-mark i:last-child {
  right: 13px;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  top: 22px;
  height: 8px;
  background: linear-gradient(90deg, #18d3a4, #12aeb8);
  transform: skewY(-25deg);
}

.login-story {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
  margin-top: clamp(12px, 4vh, 42px);
}

.login-kicker {
  margin-bottom: 12px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-story h1 {
  max-width: none;
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.06;
}

.login-story h1 span {
  color: #0b9f8b;
}

.login-lead {
  max-width: 620px;
  margin-bottom: 20px;
  color: #3f5879;
  font-size: 15px;
  line-height: 1.7;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.login-features > span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 6px;
  border: 1px solid rgba(141, 205, 194, 0.65);
  border-radius: 8px;
  color: #234365;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.login-features b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #087d64;
  background: #dff8f1;
  font-size: 9px;
}

.login-visual {
  position: relative;
  z-index: 1;
  min-height: 228px;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 12px;
  margin-top: auto;
}

.login-visual img {
  width: 100%;
  height: 100%;
  min-height: 228px;
  max-height: 300px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(46, 104, 141, 0.12);
}

.login-metrics {
  width: auto;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: stretch;
}

.login-metrics article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  border: 1px solid rgba(167, 213, 211, 0.78);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

.login-metrics article > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.login-metrics strong {
  margin: 6px 0 2px;
  color: var(--ink);
  font-size: 30px;
}

.login-metrics small {
  color: #0b9274;
  font-size: 10px;
  font-weight: 800;
}

.login-panel {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 74px);
  background: linear-gradient(150deg, #f5fbff 0%, #e7f4ff 100%);
}

.login-card {
  width: min(500px, 100%);
  gap: 22px;
  padding: clamp(30px, 4vw, 48px);
  overflow: visible;
  border-color: rgba(200, 219, 232, 0.9);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(32, 75, 112, 0.14);
}

.login-card::before {
  display: none;
}

.login-card-heading h1 {
  max-width: none;
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.08;
}

.login-card-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.field-control {
  position: relative;
  display: block;
}

.field-control > svg {
  position: absolute;
  z-index: 1;
  left: 15px;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  color: #7e93ad;
}

.field-control input {
  width: 100%;
  min-height: 50px;
  padding-left: 45px;
  background: #ffffff;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  color: #7086a0;
  background: transparent;
}

.password-toggle:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.remember-login {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-top: -4px;
  color: #526b88;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.remember-login input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}

.login-submit {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
}

.login-submit svg {
  width: 19px;
  height: 19px;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 4px;
  color: #74869d;
  font-size: 11px;
  font-weight: 700;
}

.login-security svg {
  width: 17px;
  height: 17px;
  color: var(--brand);
}

/* Application shell */
.app-view {
  grid-template-columns: 272px minmax(0, 1fr);
  background: #f4f8fc;
}

.sidebar {
  overflow: hidden;
  gap: 26px;
  padding: 28px 22px 22px;
  color: var(--ink);
  border-right: 1px solid #cfe4e8;
  background: linear-gradient(165deg, #e8fbf6 0%, #e9f8fb 56%, #d9f3ff 100%);
  box-shadow: 8px 0 30px rgba(47, 94, 126, 0.07);
}

.sidebar::before {
  inset: auto -35% -18% -25%;
  width: auto;
  height: 42%;
  border-top: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(60, 172, 199, 0.08));
  transform: rotate(-12deg);
}

.sidebar .brand-lockup.compact {
  min-height: 58px;
  padding: 0 6px;
}

.sidebar .brand-lockup.compact strong {
  color: var(--ink);
  font-size: 18px;
}

.sidebar .brand-lockup.compact span {
  color: #617894;
  font-size: 11px;
}

.sidebar .brand-lockup.compact .brand-mark {
  width: 48px;
  height: 48px;
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.88);
}

.sidebar .brand-lockup.compact .brand-mark i {
  top: 11px;
  bottom: 11px;
}

.module-nav {
  gap: 9px;
  padding: 0 2px;
}

.nav-item {
  min-height: 54px;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 7px 11px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #285276;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 4px 14px rgba(43, 100, 121, 0.03);
}

.nav-item:hover,
.nav-item.active {
  color: #087f67;
  border-color: rgba(161, 222, 211, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 22px rgba(22, 126, 108, 0.1);
  transform: translateX(2px);
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--brand), 0 9px 22px rgba(22, 126, 108, 0.1);
}

.nav-icon,
.nav-item.active .nav-icon {
  width: 36px;
  height: 36px;
  color: #139f87;
  background: #f3fffb;
  border: 1px solid #d7efe8;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.nav-label {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.workspace {
  gap: 20px;
  padding: 28px;
  background: linear-gradient(180deg, #f5f9fd 0%, #f8fbfd 100%);
}

.topbar {
  min-height: 108px;
  padding: 20px 24px;
  border: 1px solid #e1ebf2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 9px 28px rgba(48, 85, 118, 0.06);
}

.topbar h2 {
  color: var(--ink);
  font-size: 26px;
}

.topbar-actions {
  gap: 16px;
}

.searchbox {
  width: min(340px, 34vw);
}

.searchbox > svg {
  position: absolute;
  z-index: 1;
  left: 15px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: #68809e;
}

.searchbox input {
  min-height: 48px;
  padding-left: 46px;
  border-color: #d5e1eb;
  background: #fbfdff;
}

.user-badge {
  min-height: 58px;
  gap: 11px;
  padding: 7px 13px 7px 8px;
  border-color: #dce7ef;
  background: #ffffff;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.user-menu {
  position: relative;
  z-index: 12;
}

.user-badge:hover,
.user-menu.open .user-badge {
  border-color: #9cd8c8;
  background: #f8fdfb;
  box-shadow: 0 8px 20px rgba(29, 97, 94, 0.09);
}

.user-menu.open .user-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 220px;
  padding: 7px;
  border: 1px solid #d7e4eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(35, 72, 112, 0.16);
}

.user-menu-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 0 11px;
  color: #244463;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.user-menu-item:hover {
  color: #087d64;
  background: #edf9f5;
}

.user-menu-item.danger {
  color: #b33c45;
}

.user-menu-item.danger:hover {
  background: #fff2f3;
}

.user-menu-item svg {
  width: 19px;
  height: 19px;
}

.user-menu-divider {
  height: 1px;
  margin: 5px 4px;
  background: #e5edf2;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #078467;
  background: #e4f9f3;
  font-size: 13px;
}

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

.user-copy strong {
  color: var(--ink);
  font-size: 13px;
}

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

.user-chevron {
  width: 16px;
  height: 16px;
  color: #7c90a8;
  transition: transform 160ms ease;
}

.change-password-modal {
  width: min(560px, calc(100vw - 28px));
}

.change-password-grid {
  grid-template-columns: 1fr;
}

.password-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.content-band {
  gap: 16px;
  padding: 22px;
  border-color: #e0eaf1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(43, 81, 113, 0.06);
}

.section-heading {
  align-items: center;
  padding: 2px 0 18px;
  border-bottom-color: #e5edf3;
}

.section-heading > div:first-child {
  min-width: 0;
  max-width: 62%;
}

.section-heading h3 {
  color: var(--ink);
  font-size: 20px;
}

.section-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.module-actions {
  flex-wrap: nowrap;
  gap: 10px;
}

.module-actions button {
  white-space: nowrap;
}

.employee-subtabs,
.production-subtabs,
.settings-subtabs,
.segmented-options {
  padding: 3px;
  border-color: #d9e6ed;
  background: #f5f9fc;
}

.employee-subtab,
.production-subtab,
.settings-subtab {
  min-height: 38px;
  color: #617690;
}

.employee-subtab:hover,
.employee-subtab.active,
.production-subtab:hover,
.production-subtab.active,
.settings-subtab:hover,
.settings-subtab.active,
.segmented-options input:checked + span {
  color: #ffffff;
  background: linear-gradient(135deg, #14c99a, #159fd1);
  box-shadow: 0 6px 14px rgba(15, 186, 140, 0.16);
}

.data-table-wrap {
  border-color: #cfe0e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

th,
td {
  padding: 11px 12px;
  border-right: 1px solid #e3ebf0;
  border-bottom: 1px solid #dfe8ee;
  font-size: 12px;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  color: #15594e;
  border-bottom: 1px solid #b9dbd1;
  background: #edf9f5;
  font-size: 10.5px;
  font-weight: 900;
}

td {
  color: #263f5d;
}

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

.division-group-row td {
  padding: 10px 12px;
  color: #067a62;
  border-top: 1px solid #acd8cc;
  border-bottom: 1px solid #acd8cc;
  background: linear-gradient(90deg, #dcf8ef, #eafaf6);
  font-size: 12px;
}

/* Keep the employee identity visible while the wide profile table scrolls. */
.employee-table {
  --employee-index-width: 50px;
  --employee-code-width: 88px;
  --employee-name-width: 165px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.employee-table-wrap {
  max-height: calc(100vh - 350px);
  min-height: 320px;
  overscroll-behavior: contain;
}

.employee-table thead th {
  top: 0;
  z-index: 3;
  padding: 8px;
  white-space: nowrap;
  line-height: 1.25;
}

.employee-table tbody td {
  padding: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-table th:nth-child(1),
.employee-table tbody tr:not(.division-group-row) td:nth-child(1) {
  left: 0;
  width: var(--employee-index-width);
  min-width: var(--employee-index-width);
  max-width: var(--employee-index-width);
}

.employee-table th:nth-child(2),
.employee-table tbody tr:not(.division-group-row) td:nth-child(2) {
  left: var(--employee-index-width);
  width: var(--employee-code-width);
  min-width: var(--employee-code-width);
  max-width: var(--employee-code-width);
}

.employee-table th:nth-child(3),
.employee-table tbody tr:not(.division-group-row) td:nth-child(3) {
  left: calc(var(--employee-index-width) + var(--employee-code-width));
  width: var(--employee-name-width);
  min-width: var(--employee-name-width);
  max-width: var(--employee-name-width);
  box-shadow: 3px 0 0 rgba(21, 89, 78, 0.12);
}

.employee-table thead th:nth-child(-n + 3) {
  position: sticky;
  z-index: 5;
  background: #edf9f5;
}

.employee-table tbody tr:not(.division-group-row) td:nth-child(-n + 3) {
  position: sticky;
  z-index: 2;
  background: #ffffff;
}

.employee-table tbody tr:hover:not(.division-group-row) td:nth-child(-n + 3) {
  background: #f7fcfa;
}

.employee-table th:nth-child(4),
.employee-table tbody tr:not(.division-group-row) td:nth-child(4) {
  color: #dc2626;
}

.employee-card-number-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 2px 9px;
  border: 1px solid #f0b9ab;
  border-radius: 8px;
  color: #a13820;
  background: #fff5f1;
  font-weight: 800;
  line-height: 1.15;
  box-shadow: 0 2px 8px rgba(161, 56, 32, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .employee-table thead th:nth-child(-n + 3),
body[data-theme="dark"] .employee-table tbody tr:not(.division-group-row) td:nth-child(-n + 3) {
  background: var(--panel);
}

.employee-pagination {
  min-height: 48px;
  padding: 10px 2px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.employee-pagination-summary {
  color: #617690;
  font-size: 12px;
  font-weight: 700;
}

.employee-pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-button {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #36546f;
  border: 1px solid #cfe0e8;
  border-radius: 7px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.pagination-button:hover:not(:disabled),
.pagination-button.active {
  color: #ffffff;
  border-color: #0db98c;
  background: linear-gradient(135deg, #14c99a, #159fd1);
}

.pagination-button.active {
  cursor: default;
}

.pagination-arrow {
  font-size: 20px;
  line-height: 1;
}

.pagination-ellipsis {
  width: 22px;
  color: #7890a5;
  text-align: center;
  font-weight: 800;
}

.managed-table-wrap {
  max-height: calc(100vh - 350px);
  overscroll-behavior: contain;
}

.managed-data-table {
  table-layout: fixed;
}

.managed-data-table th,
.managed-data-table td {
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.25;
}

.managed-data-table thead th {
  position: sticky;
  z-index: 5;
  white-space: nowrap;
  overflow-wrap: normal;
}

.managed-data-table tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.managed-data-table .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.managed-data-table .table-action {
  min-height: 26px;
  padding: 0 6px;
  font-size: 10.5px;
}

.managed-data-table .managed-sticky-column {
  position: sticky;
}

.managed-data-table thead .managed-sticky-column {
  z-index: 7;
}

.managed-data-table tbody tr:not(.division-group-row):not(.payroll-summary-row) .managed-sticky-column {
  z-index: 3;
  background: #ffffff;
}

.managed-data-table tbody tr:hover:not(.division-group-row):not(.payroll-summary-row) .managed-sticky-column {
  background: #f7fcfa;
}

.managed-data-table .payroll-summary-row .managed-sticky-column {
  z-index: 3;
  background: #f3fbf7;
}

.managed-data-table .managed-sticky-edge {
  box-shadow: 3px 0 0 rgba(21, 89, 78, 0.14);
}

.managed-page-hidden {
  display: none !important;
}

body[data-theme="dark"] .managed-data-table tbody tr:not(.division-group-row):not(.payroll-summary-row) .managed-sticky-column {
  background: var(--panel);
}

@media (max-width: 700px) {
  .employee-table-wrap {
    max-height: calc(100vh - 300px);
    min-height: 280px;
  }

  .employee-pagination {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .managed-table-wrap {
    max-height: calc(100vh - 300px);
  }
}

.status-pill {
  min-height: 25px;
  padding: 0 9px;
  color: #087b63;
  background: #e1f8f1;
}

.table-action {
  min-height: 29px;
  padding: 0 9px;
  color: #087d64;
  border-color: #c7ded8;
  background: #ffffff;
}

.table-action:hover {
  border-color: #8bd3c1;
  background: #ecfaf6;
}

.modal {
  border: 1px solid #d3e3e9;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(17, 61, 88, 0.24);
}

.modal::backdrop {
  background: rgba(12, 36, 56, 0.24);
  backdrop-filter: blur(1px);
}

.modal form {
  background: #ffffff;
}

.modal-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom-color: #e1ebf1;
}

body[data-accent="green"] {
  --brand: #0fba8c;
  --brand-strong: #078467;
}

body[data-accent="teal"] {
  --brand: #0e9f9a;
  --brand-strong: #08736f;
}

body[data-theme="dark"] .workspace,
body[data-theme="dark"] .app-view {
  background: #0d151a;
}

body[data-theme="dark"] .sidebar {
  background: #15232b;
}

body[data-theme="dark"] .sidebar .brand-lockup.compact strong,
body[data-theme="dark"] .nav-item,
body[data-theme="dark"] .nav-label {
  color: var(--ink);
}

body[data-theme="dark"] .nav-item {
  border-color: #34434d;
  background: #172129;
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .content-band,
body[data-theme="dark"] .user-badge {
  border-color: #34434d;
  background: var(--panel);
}

@media (max-width: 1180px) {
  .login-view {
    grid-template-columns: minmax(500px, 1.05fr) minmax(420px, 0.95fr);
  }

  .login-story h1 {
    font-size: 42px;
  }

  .login-visual {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .app-view {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 16px;
  }

  .workspace {
    padding: 20px;
  }

  .searchbox {
    width: 270px;
  }

  .user-copy {
    min-width: 100px;
  }
}

@media (max-width: 1040px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: auto;
    padding: 28px;
  }

  .login-story {
    margin-top: 18px;
  }

  .login-visual {
    min-height: 210px;
  }

  .login-panel {
    min-height: auto;
    padding: 42px 24px;
  }

  .app-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 14px;
    padding: 14px 18px;
  }

  .sidebar .brand-lockup.compact {
    min-height: 48px;
  }

  .module-nav {
    grid-auto-columns: 190px;
  }

  .nav-item {
    min-height: 48px;
  }

  .section-heading > div:first-child {
    max-width: 55%;
  }
}

@media (max-width: 720px) {
  .login-art,
  .login-panel,
  .workspace {
    padding: 16px;
  }

  .login-art {
    gap: 18px;
  }

  .login-story h1 {
    font-size: 34px;
  }

  .login-lead {
    font-size: 14px;
  }

  .login-visual {
    grid-template-columns: 1fr;
  }

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

  .login-visual img {
    min-height: 190px;
  }

  .login-card {
    padding: 26px 20px;
  }

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

  .topbar {
    min-height: auto;
    padding: 16px;
  }

  .topbar-actions {
    gap: 10px;
  }

  .searchbox {
    width: 100%;
  }

  .user-badge {
    width: 100%;
  }

  .user-menu {
    width: 100%;
  }

  .user-dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }

  .section-heading {
    gap: 14px;
  }

  .section-heading > div:first-child {
    max-width: none;
  }

  .module-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .content-band {
    padding: 14px;
  }
}

body[data-accent="green"] {
  --brand: #0fba8c;
  --brand-strong: #078467;
  --brand-soft: #def8ef;
  --brand-faint: #f2fcf8;
}

body[data-accent="emerald"] {
  --brand: #059669;
  --brand-strong: #047857;
  --brand-soft: #dff8ee;
  --brand-faint: #f1fcf7;
}

body[data-accent="teal"] {
  --brand: #0e9f9a;
  --brand-strong: #08736f;
  --brand-soft: #def7f5;
  --brand-faint: #f0fcfb;
}

body[data-accent="cyan"] {
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --brand-soft: #e0f2fe;
  --brand-faint: #f0f9ff;
}

body[data-accent="blue"] {
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #dbeafe;
  --brand-faint: #f3f7ff;
}

body[data-accent="rose"] {
  --brand: #e11d48;
  --brand-strong: #be123c;
  --brand-soft: #ffe4ea;
  --brand-faint: #fff5f7;
}

body[data-font-scale="small"] .app-view {
  font-size: 13px;
}

body[data-font-scale="large"] .app-view {
  font-size: 15px;
}

body[data-table-style="lined"] .data-table th,
body[data-table-style="lined"] .data-table td,
body[data-table-style="lined"] .payroll-table th,
body[data-table-style="lined"] .payroll-table td,
body[data-table-style="lined"] .managed-data-table th,
body[data-table-style="lined"] .managed-data-table td {
  border-color: #aacabe;
}

body[data-table-style="lined"] .data-table thead th,
body[data-table-style="lined"] .payroll-table thead th {
  box-shadow: inset 0 -1px 0 #81b99f;
}

body[data-table-style="zebra"] .data-table tbody tr:not(.division-group-row):nth-child(even) td,
body[data-table-style="zebra"] .payroll-table tbody tr:not(.payroll-group-row):nth-child(even) td,
body[data-table-style="zebra"] .managed-data-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--brand-faint) 70%, white);
}

body[data-sidebar-style="solid"] .sidebar {
  color: #ffffff;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--brand-strong) 94%, #07331f), color-mix(in srgb, var(--brand) 78%, #082a20)),
    var(--brand-strong);
}

body[data-sidebar-style="solid"] .brand-lockup.compact strong,
body[data-sidebar-style="solid"] .brand-lockup.compact span,
body[data-sidebar-style="solid"] .nav-label {
  color: #ffffff;
}

body[data-sidebar-style="solid"] .nav-item {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

body[data-sidebar-style="solid"] .nav-item:hover,
body[data-sidebar-style="solid"] .nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

body[data-sidebar-style="solid"] .sidebar .ghost-action {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

body[data-sidebar-style="glass"] .sidebar {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.74), color-mix(in srgb, var(--brand-faint) 80%, white)),
    rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

body[data-sidebar-style="glass"] .nav-item {
  background: rgba(255, 255, 255, 0.62);
}

body[data-corner-style="sharp"] .content-band,
body[data-corner-style="sharp"] .mini-panel,
body[data-corner-style="sharp"] .topbar,
body[data-corner-style="sharp"] .nav-item,
body[data-corner-style="sharp"] .data-table-wrap,
body[data-corner-style="sharp"] .user-badge,
body[data-corner-style="sharp"] .modal,
body[data-corner-style="sharp"] .appearance-group,
body[data-corner-style="sharp"] .appearance-choice,
body[data-corner-style="sharp"] button,
body[data-corner-style="sharp"] input,
body[data-corner-style="sharp"] select,
body[data-corner-style="sharp"] textarea {
  border-radius: 4px;
}

body[data-corner-style="round"] .content-band,
body[data-corner-style="round"] .mini-panel,
body[data-corner-style="round"] .topbar,
body[data-corner-style="round"] .nav-item,
body[data-corner-style="round"] .data-table-wrap,
body[data-corner-style="round"] .user-badge,
body[data-corner-style="round"] .modal,
body[data-corner-style="round"] .appearance-group,
body[data-corner-style="round"] .appearance-choice,
body[data-corner-style="round"] button,
body[data-corner-style="round"] input,
body[data-corner-style="round"] select,
body[data-corner-style="round"] textarea {
  border-radius: 12px;
}

body[data-button-style="outline"] .primary-action {
  color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  background: #ffffff;
  box-shadow: none;
}

body[data-button-style="outline"] .primary-action:hover {
  color: #ffffff;
  background: var(--brand);
}

body[data-button-style="quiet"] .primary-action {
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand-soft) 82%, white);
  box-shadow: none;
}

body[data-data-emphasis="focus"] .data-table thead th,
body[data-data-emphasis="focus"] .payroll-table thead th,
body[data-data-emphasis="focus"] .managed-data-table thead th {
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand-soft) 80%, white);
  border-bottom-color: color-mix(in srgb, var(--brand) 38%, var(--line));
}

body[data-data-emphasis="focus"] .managed-sticky-column,
body[data-data-emphasis="focus"] .employee-table th:nth-child(-n + 3),
body[data-data-emphasis="focus"] .employee-table tbody tr:not(.division-group-row) td:nth-child(-n + 3) {
  box-shadow: 8px 0 14px rgba(16, 94, 61, 0.08);
}

body[data-data-emphasis="calm"] .data-table th,
body[data-data-emphasis="calm"] .payroll-table th,
body[data-data-emphasis="calm"] .managed-data-table th {
  color: #24513a;
  background: #f5faf7;
}

body[data-theme="dark"] .appearance-hero,
body[data-theme="dark"] .appearance-group,
body[data-theme="dark"] .appearance-choice,
body[data-theme="dark"] .appearance-preview,
body[data-theme="dark"] .appearance-preview-main,
body[data-theme="dark"] .appearance-preview-sidebar {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

body[data-theme="dark"] .appearance-choice.selected,
body[data-theme="dark"] .appearance-choice:has(input:checked) {
  background: #1b3030;
}

@media (max-width: 980px) {
  .appearance-hero,
  .appearance-grid {
    grid-template-columns: 1fr;
  }

  .accent-options,
  .appearance-choice-grid.two,
  .appearance-choice-grid.three {
    grid-template-columns: 1fr;
  }

  .appearance-group-wide {
    grid-column: auto;
  }
}

.data-table thead th,
.payroll-table thead th,
.production-stat-table thead th,
.managed-data-table thead th {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  overflow: visible;
  text-overflow: clip;
}

.employee-table,
.managed-data-table {
  table-layout: auto !important;
}

.payroll-table {
  table-layout: auto;
}

.payroll-header-label {
  display: inline-flex !important;
  white-space: nowrap !important;
}
