:root {
  --page: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-soft: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.14);
  --line-strong: rgba(60, 60, 67, 0.22);
  --blue: #0071e3;
  --blue-soft: #e8f2ff;
  --green: #248a3d;
  --green-soft: #e9f7ee;
  --orange: #b45a00;
  --orange-soft: #fff1df;
  --red: #b3261e;
  --red-soft: #fff0ee;
  --purple: #7754c9;
  --purple-soft: #f0ebff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--page) 38%, #ececf0 100%);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

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

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 113, 227, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.login-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 232px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: rgba(246, 246, 248, 0.76);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #17181d 0%, #2f5966 48%, #0071e3 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.34);
  font-weight: 700;
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  overflow: visible;
}

.octopus-head {
  fill: rgba(255, 255, 255, 0.96);
}

.octopus-eye {
  fill: #1d1d1f;
}

.octopus-smile,
.octopus-tentacle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4.2;
}

.octopus-smile {
  stroke: #1d1d1f;
  stroke-width: 2.4;
}

.brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.brand-caption,
.eyebrow,
.muted,
.table-meta,
.field-hint {
  color: var(--muted);
}

.brand-caption {
  margin: 2px 0 0;
  font-size: 11px;
}

.period-picker {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.period-picker label,
.field label,
.checkbox-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav {
  display: grid;
  gap: 3px;
}

.nav-button,
.segmented button,
.icon-button,
.button,
.tab-button {
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  color: #333336;
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.nav-button:hover,
.tab-button:hover,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.nav-button.active {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.nav-button svg,
.button svg,
.icon-button svg,
.tab-button svg,
.status-line svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(232, 232, 237, 0.7);
}

.sidebar-bottom .segmented {
  grid-column: 1 / -1;
}

.segmented button {
  min-height: 30px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.06);
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
}

.tab-button.active {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.tab-counter {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 12px;
  font-weight: 800;
}

.page-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(232, 232, 237, 0.7);
}

.main {
  grid-column: 2;
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 0 0 22px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 19px;
}

h3 {
  margin: 0;
  font-size: 15px;
}

.top-actions,
.toolbar,
.row-actions,
.inline-actions,
.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
  font-weight: 650;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.button:disabled:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.button.primary {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.button.danger {
  border-color: rgba(179, 38, 30, 0.26);
  color: var(--red);
  background: var(--red-soft);
}

.button.success {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.button.ghost {
  background: transparent;
}

.sidebar-bottom .button.ghost {
  min-height: 32px;
  padding: 0 8px;
  gap: 6px;
  font-size: 12px;
}

.sidebar-bottom .button.ghost svg {
  width: 14px;
  height: 14px;
}

.sidebar-bottom .button[data-action="logout"] {
  grid-column: 1 / -1;
  min-height: 40px;
  border-color: rgba(179, 38, 30, 0.24);
  color: var(--red);
  background: var(--red-soft);
  font-weight: 760;
}

.sidebar-bottom .button[data-action="logout"]:hover {
  border-color: rgba(179, 38, 30, 0.38);
  background: #ffe8e5;
}

.small-button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.odoo-bill-button {
  justify-content: space-between;
  min-width: 174px;
}

.odoo-bill-button .badge {
  margin-left: 4px;
  min-height: 20px;
  padding: 0 7px;
  font-size: 11px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.content {
  display: grid;
  gap: 16px;
  width: 100%;
  margin: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
}

.metric,
.panel,
.drawer,
.modal-sheet {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.metric {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.metric-label,
.table-meta,
.field-hint {
  font-size: 12px;
}

.metric-value {
  font-size: 26px;
  font-weight: 760;
}

.metric-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.workflow-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: #f5f5f7;
  font-size: 12px;
  font-weight: 720;
}

.workflow-step {
  cursor: default;
}

button.workflow-step {
  cursor: pointer;
}

button.workflow-step:hover {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.workflow-rail.readonly .workflow-step:hover {
  box-shadow: none;
}

.workflow-step.done {
  color: var(--ink);
  background: var(--blue-soft);
}

.workflow-step.active {
  color: #fff;
  background: var(--blue);
}

.workflow-dot {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: start;
  gap: 12px;
}

.panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-title-block {
  min-width: 0;
}

.employees-header {
  align-items: center;
}

.employees-filterbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.employee-search {
  max-width: 520px;
}

.panel-body {
  padding: 16px;
}

.payroll-heading {
  align-items: center;
}

.payroll-filterbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.payroll-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.vacation-page {
  display: grid;
  gap: 14px;
}

.vacation-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.vacation-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(232, 232, 237, 0.7);
}

.vacation-employee-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.employee-local-nav {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
}

.employee-local-nav-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.employee-local-nav-button:hover {
  background: rgba(0, 0, 0, 0.035);
}

.employee-local-nav-button.active {
  border-color: var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.employee-local-nav-button svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.employee-local-nav-button.active svg {
  color: var(--accent);
}

.employee-local-nav-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.employee-local-nav-text strong,
.employee-local-nav-text span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-local-nav-text strong {
  font-size: 14px;
}

.employee-local-nav-text span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.vacation-tab-content {
  min-width: 0;
}

.vacation-admin-tabs {
  margin-bottom: 14px;
}

.subsection-block {
  display: grid;
  gap: 10px;
}

.compact-heading {
  padding: 0;
}

.compact-heading h3 {
  margin: 0;
  font-size: 17px;
}

.vacation-metrics {
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
}

.vacation-overview-grid {
  align-items: stretch;
}

.vacation-request-grid {
  align-items: flex-start;
}

.vacation-line-chart {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.vacation-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.vacation-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
}

.legend-dot.used {
  background: var(--red);
}

.vacation-line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payroll-search {
  max-width: 520px;
}

.panel-stack {
  display: grid;
  gap: 12px;
}

.status-grid {
  display: grid;
  gap: 10px;
}

.risk-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 650;
}

.risk-strip svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.risk-strip.ok {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(36, 138, 61, 0.2);
}

.risk-strip.warning {
  color: var(--orange);
  background: var(--orange-soft);
  border-color: rgba(180, 90, 0, 0.22);
}

.risk-strip.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(179, 38, 30, 0.24);
}

.status-line {
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.status-line:last-child {
  border-bottom: 0;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.green {
  background: var(--green);
}

.status-dot.orange {
  background: var(--orange);
}

.status-dot.red {
  background: var(--red);
}

.status-dot.blue {
  background: var(--blue);
}

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

.readout-card {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.readout-card strong {
  font-size: 17px;
}

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

.overview-charts {
  align-items: stretch;
}

.overview-charts .chart-card {
  grid-column: span 4;
  min-height: 100%;
}

.overview-charts .chart-card.wide {
  grid-column: 1 / -1;
}

.chart-card {
  min-height: 100%;
}

.chart-header {
  min-height: 86px;
}

.chart-card.compact .chart-header {
  min-height: auto;
  padding: 14px 16px 12px;
}

.chart-card.compact .panel-header h2 {
  font-size: 18px;
}

.chart-card.compact .panel-header .muted {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.25;
}

.chart-card.compact .panel-body {
  padding: 12px 16px;
}

.chart-card.compact.wide .receipt-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.chart-card.compact:not(.wide) .receipt-meta {
  grid-template-columns: 1fr;
}

.chart-card.compact:not(.wide) .receipt-meta span:last-child {
  text-align: left;
}

.receipt-list {
  display: grid;
  gap: 0;
}

.overview-charts .receipt-list {
  gap: 0;
}

.receipt-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(60, 60, 67, 0.22);
}

.overview-charts .receipt-row {
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.overview-charts .receipt-row:last-child {
  border-bottom: 0;
}

.receipt-row:first-child {
  padding-top: 0;
}

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

.receipt-row-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.overview-charts .receipt-row-main {
  justify-content: space-between;
  gap: 14px;
}

.receipt-label {
  min-width: 0;
  max-width: 62%;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.overview-charts .receipt-label {
  max-width: none;
  font-weight: 720;
}

.receipt-dots {
  flex: 1 1 auto;
  min-width: 20px;
  border-bottom: 1px dotted rgba(60, 60, 67, 0.36);
  transform: translateY(-3px);
}

.overview-charts .receipt-dots {
  display: none;
}

.receipt-value {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.overview-charts .receipt-value {
  font-size: 14px;
}

.receipt-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.overview-charts .receipt-meta {
  line-height: 1.25;
}

.receipt-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.receipt-meta span:last-child {
  text-align: right;
}

.payee-split-card .receipt-list {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  column-gap: 28px;
}

.payee-split-card .receipt-row {
  padding: 12px 0;
}

.payee-split-card .receipt-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.payee-split-card .receipt-label {
  max-width: none;
  line-height: 1.25;
}

.payee-split-card .receipt-value {
  font-variant-numeric: tabular-nums;
}

.payee-split-card .receipt-meta {
  grid-template-columns: 1fr;
}

.payee-split-card .receipt-meta span:last-child {
  text-align: left;
}

.odoo-partner-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.odoo-partner-link:hover {
  text-decoration: underline;
}

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

.invoice-template-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.invoice-template-preview {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 122px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(90deg, var(--template-accent) 0 4px, transparent 4px),
    linear-gradient(180deg, var(--template-soft), #fff);
}

.template-line,
.template-block {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.16);
}

.template-line.strong {
  width: 64%;
  height: 10px;
  background: var(--template-accent);
}

.template-line.medium {
  width: 82%;
}

.template-line.short {
  width: 48%;
}

.template-block {
  width: 100%;
  height: 34px;
  margin: 6px 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--template-accent) 12%, #fff);
}

.invoice-template-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.employee-insights {
  display: grid;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f1f3;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.confirmed,
.badge.paid {
  color: var(--green);
  background: var(--green-soft);
}

.badge.pending,
.badge.open_review,
.badge.draft {
  color: var(--orange);
  background: var(--orange-soft);
}

.badge.disputed {
  color: var(--red);
  background: var(--red-soft);
}

.badge.disabled {
  color: var(--muted);
  background: #e8e8ed;
}

.badge.locked,
.badge.exported {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.eur {
  color: var(--purple);
  background: var(--purple-soft);
}

.data-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  min-width: 0;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f6f8fb;
}

.table-scroll {
  max-width: 100%;
  overflow-x: visible;
}

.payroll-table {
  min-width: 0;
  table-layout: fixed;
}

.payroll-col-employee {
  width: 16%;
}

.payroll-col-base {
  width: 13%;
}

.payroll-col-accruals {
  width: 20%;
}

.payroll-col-payee {
  width: 25%;
}

.payroll-col-total {
  width: 14%;
}

.payroll-col-status {
  width: 12%;
}

.payroll-table.readonly .payroll-col-employee {
  width: 18%;
}

.payroll-table.readonly .payroll-col-base {
  width: 13%;
}

.payroll-table.readonly .payroll-col-accruals {
  width: 18%;
}

.payroll-table.readonly .payroll-col-payee {
  width: 25%;
}

.payroll-table.readonly .payroll-col-total {
  width: 13%;
}

.payroll-table.readonly .payroll-col-status {
  width: 13%;
}

.payroll-table .name-cell,
.payroll-table .amount-stack,
.payroll-table .amount-lines,
.payroll-table .amount-line {
  min-width: 0;
}

.payroll-table td,
.payroll-table th {
  overflow-wrap: anywhere;
}

.payroll-table td:last-child,
.payroll-table th:last-child {
  text-align: right;
}

.payroll-table.readonly td:last-child,
.payroll-table.readonly th:last-child {
  text-align: center;
}

.payroll-table .row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.payroll-table .badge {
  justify-content: center;
  width: fit-content;
  min-width: 104px;
  max-width: none;
  margin-inline: auto;
}

.data-table .badge {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-align: center;
}

.payroll-table td:nth-child(6),
.payroll-table th:nth-child(6) {
  text-align: center;
}

.payroll-table td:nth-child(6) .name-cell {
  justify-items: center;
  text-align: center;
}

.vacation-requests-table {
  min-width: 0;
  table-layout: fixed;
}

.vacation-requests-table.with-actions {
  min-width: 0;
}

.vacation-col-employee {
  width: 24%;
}

.vacation-col-type {
  width: 12%;
}

.vacation-col-dates {
  width: 38%;
}

.vacation-col-days {
  width: 8%;
}

.vacation-col-status {
  width: 18%;
}

.vacation-requests-table.with-actions .vacation-col-employee {
  width: 18%;
}

.vacation-requests-table.with-actions .vacation-col-type {
  width: 10%;
}

.vacation-requests-table.with-actions .vacation-col-dates {
  width: 32%;
}

.vacation-requests-table.with-actions .vacation-col-days {
  width: 6%;
}

.vacation-requests-table.with-actions .vacation-col-status {
  width: 12%;
}

.vacation-col-action {
  width: 22%;
}

.vacation-requests-table td,
.vacation-requests-table th {
  overflow-wrap: anywhere;
}

.vacation-requests-table .action-heading,
.vacation-requests-table .action-cell {
  text-align: right;
}

.table-action-group {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: stretch;
  gap: 6px;
  white-space: normal;
}

.table-action {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

.table-action.approve {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(36, 138, 61, 0.22);
}

.table-action.reject {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(179, 38, 30, 0.22);
}

@media (min-width: 1280px) {
  .table-action-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.name-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.drawer .name-cell,
.employee-form-grid .field {
  min-width: 0;
}

.amount-stack {
  display: grid;
  gap: 2px;
}

.amount-lines {
  display: grid;
  gap: 10px;
}

.amount-line {
  display: grid;
  gap: 3px;
}

.strong {
  font-weight: 720;
}

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

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

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

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

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field input,
.field textarea,
.search-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select.open {
  z-index: 25;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.custom-select-trigger:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.custom-select-trigger:focus-visible,
.custom-select.open .custom-select-trigger {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.custom-select-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.16s ease;
}

.custom-select.open .custom-select-trigger svg {
  transform: rotate(180deg);
}

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

.custom-select.disabled .custom-select-trigger,
.custom-select-trigger:disabled {
  cursor: default;
  color: var(--muted);
  background: var(--surface-soft);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  max-height: min(340px, 52vh);
  padding: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.custom-select.floating .custom-select-menu {
  position: fixed;
  right: auto;
  z-index: 120;
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 6px;
}

.custom-select-search {
  position: sticky;
  top: -6px;
  z-index: 2;
  display: grid;
  padding: 4px 0 6px;
  background: rgba(255, 255, 255, 0.98);
}

.custom-select-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.custom-select-search input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px 7px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  outline: none;
}

.custom-select-search input:focus {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.custom-select-options {
  display: grid;
  gap: 4px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.custom-select-option[hidden],
.odoo-contact-option[hidden] {
  display: none !important;
}

.custom-select-option:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.custom-select-option.active {
  border-color: rgba(0, 113, 227, 0.28);
  background: var(--blue-soft);
}

.custom-select-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.custom-select-option-copy strong,
.custom-select-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-option-copy strong {
  font-size: 13px;
}

.custom-select-option-copy small {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.custom-select-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(60, 60, 67, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.custom-select-empty {
  margin: 2px 0 0;
}

.top-select-field {
  min-width: 220px;
}

.panel:has(.custom-select.open) {
  overflow: visible;
}

.field .checkbox-label input {
  width: auto;
  min-height: 0;
  padding: 0;
}

.salary-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.salary-control .button {
  align-self: center;
}

.employee-drawer-flow {
  display: grid;
  gap: 0;
}

.employee-drawer-section {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.employee-drawer-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.employee-drawer-section:last-child {
  padding-bottom: 0;
}

.drawer-section-heading {
  padding: 0 2px;
}

.drawer-section-heading h3,
.compact-heading h3 {
  font-size: 15px;
}

.drawer-section-heading .field-hint,
.compact-heading .field-hint {
  display: block;
  margin: 4px 0 0;
}

.employee-drawer-section .field-grid {
  gap: 14px 12px;
}

.employee-insight-grid {
  display: grid;
  gap: 12px;
}

.employee-insight-grid .panel {
  box-shadow: none;
}

.employee-insight-grid .chart-card {
  min-height: auto;
}

.employee-insight-grid .chart-header {
  min-height: auto;
  padding: 14px 14px 10px;
}

.employee-insight-grid .panel-body {
  padding: 14px;
}

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

.field input:focus,
.field textarea:focus,
.search-input:focus {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.field input[readonly] {
  color: var(--muted);
  background: var(--surface-soft);
}

.odoo-contact-picker {
  display: grid;
  gap: 10px;
}

.odoo-query-card,
.odoo-selected-contact,
.odoo-contact-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.odoo-query-card,
.odoo-selected-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
}

.odoo-sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.odoo-sync-status svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.odoo-sync-status.loading {
  color: var(--blue);
  border-color: rgba(0, 113, 227, 0.2);
  background: var(--blue-soft);
}

.odoo-sync-status.ok {
  color: var(--green);
  border-color: rgba(36, 138, 61, 0.24);
  background: var(--green-soft);
}

.odoo-sync-status.error {
  color: var(--red);
  border-color: rgba(179, 38, 30, 0.24);
  background: var(--red-soft);
}

.inline-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.odoo-query-main,
.odoo-contact-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.odoo-selected-contact.linked {
  border-color: rgba(36, 138, 61, 0.22);
  background: var(--green-soft);
}

.odoo-contact-search {
  position: relative;
}

.odoo-contact-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.odoo-contact-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px 8px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.odoo-contact-search input:focus {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.odoo-contact-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px;
}

.odoo-contact-count {
  padding: 2px 2px 4px;
}

.odoo-contact-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px;
  color: var(--ink);
  text-align: left;
}

.odoo-contact-option:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.odoo-contact-option.active {
  border-color: rgba(0, 113, 227, 0.32);
  background: var(--blue-soft);
}

.odoo-contact-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  background: rgba(29, 29, 31, 0.18);
  backdrop-filter: blur(6px);
}

.drawer {
  width: min(560px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.employee-drawer {
  width: min(680px, calc(100vw - 28px));
}

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

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

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.drawer-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.drawer-tab-panel {
  display: grid;
  gap: 14px;
}

.drawer-tab-panel[hidden] {
  display: none;
}

.drawer-body {
  padding: 18px;
  overflow-y: auto;
  overflow-x: hidden;
}

.drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.employee-footer {
  justify-content: space-between;
  align-items: center;
}

.footer-left,
.footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.footer-actions {
  margin-left: auto;
}

.delete-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.delete-control .field-hint {
  max-width: 260px;
}

.modal-center {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(29, 29, 31, 0.18);
  backdrop-filter: blur(6px);
}

.modal-sheet {
  width: min(540px, 100%);
  box-shadow: var(--shadow);
}

.confirm-sheet {
  width: min(460px, 100%);
}

.invoice-preview-sheet {
  position: relative;
  width: min(1180px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
}

.invoice-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: hidden;
  overflow-x: hidden;
  background: var(--surface-soft);
}

.invoice-preview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.invoice-preview-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 650;
}

.invoice-preview-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.invoice-preview-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 4px 64px 10px;
}

.invoice-preview-frame {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 1123px;
  aspect-ratio: 794 / 1123;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.invoice-preview-frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.invoice-preview-side {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.invoice-preview-side:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.invoice-preview-side.prev {
  left: 16px;
}

.invoice-preview-side.next {
  right: 16px;
}

.invoice-preview-side svg {
  width: 20px;
  height: 20px;
}

.confirm-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.confirm-icon svg {
  width: 19px;
  height: 19px;
}

.confirm-icon.warning {
  color: var(--orange);
  background: var(--orange-soft);
}

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

.confirm-icon.success {
  color: var(--green);
  background: var(--green-soft);
}

.pre {
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101114;
  color: #f5f5f7;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.payroll-slip {
  display: grid;
  gap: 16px;
}

.employee-payroll-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slip-total {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.slip-total .amount {
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 780;
  line-height: 1;
}

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

.slip-section {
  display: grid;
  gap: 8px;
}

.slip-section h3 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.accrual-breakdown {
  padding: 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 8px;
  background: #f7fbff;
}

.payroll-breakdown.receipt-card {
  --receipt-tooth: 12px;
  position: relative;
  isolation: isolate;
  gap: 14px;
  margin: 4px 0;
  padding: 22px 14px 18px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(60, 60, 67, 0.16), transparent 1px, transparent calc(100% - 1px), rgba(60, 60, 67, 0.16)),
    repeating-linear-gradient(0deg, rgba(60, 60, 67, 0.035) 0 1px, transparent 1px 28px),
    #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.08);
  filter:
    drop-shadow(0 1px 0 rgba(60, 60, 67, 0.18))
    drop-shadow(0 14px 24px rgba(29, 29, 31, 0.06));
  clip-path: polygon(
    0 var(--receipt-tooth),
    1.25% 0,
    2.5% var(--receipt-tooth),
    3.75% 0,
    5% var(--receipt-tooth),
    6.25% 0,
    7.5% var(--receipt-tooth),
    8.75% 0,
    10% var(--receipt-tooth),
    11.25% 0,
    12.5% var(--receipt-tooth),
    13.75% 0,
    15% var(--receipt-tooth),
    16.25% 0,
    17.5% var(--receipt-tooth),
    18.75% 0,
    20% var(--receipt-tooth),
    21.25% 0,
    22.5% var(--receipt-tooth),
    23.75% 0,
    25% var(--receipt-tooth),
    26.25% 0,
    27.5% var(--receipt-tooth),
    28.75% 0,
    30% var(--receipt-tooth),
    31.25% 0,
    32.5% var(--receipt-tooth),
    33.75% 0,
    35% var(--receipt-tooth),
    36.25% 0,
    37.5% var(--receipt-tooth),
    38.75% 0,
    40% var(--receipt-tooth),
    41.25% 0,
    42.5% var(--receipt-tooth),
    43.75% 0,
    45% var(--receipt-tooth),
    46.25% 0,
    47.5% var(--receipt-tooth),
    48.75% 0,
    50% var(--receipt-tooth),
    51.25% 0,
    52.5% var(--receipt-tooth),
    53.75% 0,
    55% var(--receipt-tooth),
    56.25% 0,
    57.5% var(--receipt-tooth),
    58.75% 0,
    60% var(--receipt-tooth),
    61.25% 0,
    62.5% var(--receipt-tooth),
    63.75% 0,
    65% var(--receipt-tooth),
    66.25% 0,
    67.5% var(--receipt-tooth),
    68.75% 0,
    70% var(--receipt-tooth),
    71.25% 0,
    72.5% var(--receipt-tooth),
    73.75% 0,
    75% var(--receipt-tooth),
    76.25% 0,
    77.5% var(--receipt-tooth),
    78.75% 0,
    80% var(--receipt-tooth),
    81.25% 0,
    82.5% var(--receipt-tooth),
    83.75% 0,
    85% var(--receipt-tooth),
    86.25% 0,
    87.5% var(--receipt-tooth),
    88.75% 0,
    90% var(--receipt-tooth),
    91.25% 0,
    92.5% var(--receipt-tooth),
    93.75% 0,
    95% var(--receipt-tooth),
    96.25% 0,
    97.5% var(--receipt-tooth),
    98.75% 0,
    100% var(--receipt-tooth),
    100% calc(100% - var(--receipt-tooth)),
    98.75% 100%,
    97.5% calc(100% - var(--receipt-tooth)),
    96.25% 100%,
    95% calc(100% - var(--receipt-tooth)),
    93.75% 100%,
    92.5% calc(100% - var(--receipt-tooth)),
    91.25% 100%,
    90% calc(100% - var(--receipt-tooth)),
    88.75% 100%,
    87.5% calc(100% - var(--receipt-tooth)),
    86.25% 100%,
    85% calc(100% - var(--receipt-tooth)),
    83.75% 100%,
    82.5% calc(100% - var(--receipt-tooth)),
    81.25% 100%,
    80% calc(100% - var(--receipt-tooth)),
    78.75% 100%,
    77.5% calc(100% - var(--receipt-tooth)),
    76.25% 100%,
    75% calc(100% - var(--receipt-tooth)),
    73.75% 100%,
    72.5% calc(100% - var(--receipt-tooth)),
    71.25% 100%,
    70% calc(100% - var(--receipt-tooth)),
    68.75% 100%,
    67.5% calc(100% - var(--receipt-tooth)),
    66.25% 100%,
    65% calc(100% - var(--receipt-tooth)),
    63.75% 100%,
    62.5% calc(100% - var(--receipt-tooth)),
    61.25% 100%,
    60% calc(100% - var(--receipt-tooth)),
    58.75% 100%,
    57.5% calc(100% - var(--receipt-tooth)),
    56.25% 100%,
    55% calc(100% - var(--receipt-tooth)),
    53.75% 100%,
    52.5% calc(100% - var(--receipt-tooth)),
    51.25% 100%,
    50% calc(100% - var(--receipt-tooth)),
    48.75% 100%,
    47.5% calc(100% - var(--receipt-tooth)),
    46.25% 100%,
    45% calc(100% - var(--receipt-tooth)),
    43.75% 100%,
    42.5% calc(100% - var(--receipt-tooth)),
    41.25% 100%,
    40% calc(100% - var(--receipt-tooth)),
    38.75% 100%,
    37.5% calc(100% - var(--receipt-tooth)),
    36.25% 100%,
    35% calc(100% - var(--receipt-tooth)),
    33.75% 100%,
    32.5% calc(100% - var(--receipt-tooth)),
    31.25% 100%,
    30% calc(100% - var(--receipt-tooth)),
    28.75% 100%,
    27.5% calc(100% - var(--receipt-tooth)),
    26.25% 100%,
    25% calc(100% - var(--receipt-tooth)),
    23.75% 100%,
    22.5% calc(100% - var(--receipt-tooth)),
    21.25% 100%,
    20% calc(100% - var(--receipt-tooth)),
    18.75% 100%,
    17.5% calc(100% - var(--receipt-tooth)),
    16.25% 100%,
    15% calc(100% - var(--receipt-tooth)),
    13.75% 100%,
    12.5% calc(100% - var(--receipt-tooth)),
    11.25% 100%,
    10% calc(100% - var(--receipt-tooth)),
    8.75% 100%,
    7.5% calc(100% - var(--receipt-tooth)),
    6.25% 100%,
    5% calc(100% - var(--receipt-tooth)),
    3.75% 100%,
    2.5% calc(100% - var(--receipt-tooth)),
    1.25% 100%,
    0 calc(100% - var(--receipt-tooth))
  );
}

.receipt-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(60, 60, 67, 0.24);
}

.receipt-card-header strong {
  flex: 0 0 auto;
  font-size: 15px;
  text-align: right;
  white-space: nowrap;
}

.receipt-card-lines,
.receipt-line-group,
.receipt-sub-lines {
  display: grid;
}

.receipt-card-lines {
  gap: 0;
}

.receipt-line-group {
  padding: 2px 0;
}

.receipt-sub-lines {
  margin: -2px 0 4px;
  padding-left: 14px;
  border-left: 1px dashed rgba(60, 60, 67, 0.2);
}

.receipt-calculation-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 40px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(60, 60, 67, 0.18);
}

.receipt-calculation-line:last-child {
  border-bottom: 0;
}

.receipt-calculation-label {
  min-width: 0;
  color: var(--muted);
}

.receipt-calculation-dots {
  flex: 1 1 auto;
  min-width: 24px;
  border-bottom: 1px dotted rgba(60, 60, 67, 0.42);
  transform: translateY(-3px);
}

.receipt-calculation-value {
  flex: 0 0 auto;
  max-width: 58%;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.receipt-calculation-line.group-head .receipt-calculation-label,
.receipt-calculation-line.total-line .receipt-calculation-label {
  color: var(--ink);
  font-weight: 760;
}

.receipt-calculation-line.sub-line {
  min-height: 32px;
  padding: 5px 0;
  border-bottom-color: rgba(60, 60, 67, 0.12);
  font-size: 13px;
}

.receipt-calculation-line.sub-line .receipt-calculation-label {
  color: var(--ink);
}

.receipt-calculation-line.total-line {
  margin-top: 6px;
  padding: 13px 0 4px;
  border-top: 1px dashed rgba(60, 60, 67, 0.3);
  border-bottom: 0;
  font-size: 15px;
}

.invoice-download-card {
  padding: 12px;
  border: 1px solid rgba(36, 138, 61, 0.2);
  border-radius: 8px;
  background: #f7fcf8;
}

.breakdown-group {
  display: grid;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.breakdown-group-head,
.breakdown-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.breakdown-lines {
  display: grid;
  gap: 6px;
  padding-left: 12px;
  border-left: 2px solid rgba(0, 113, 227, 0.22);
}

.breakdown-line {
  color: var(--muted);
  font-size: 13px;
}

.breakdown-line strong {
  color: var(--ink);
  white-space: nowrap;
}

.calculation-total {
  margin-top: 2px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
}

.compact-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.compact-heading strong {
  white-space: nowrap;
}

.period-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
}

.period-row .nav-button {
  width: 100%;
}

.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

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

.salary-history {
  display: grid;
  gap: 10px;
}

.invite-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 8px;
  background: #f7fbff;
}

.invite-card h3 {
  font-size: 14px;
}

.invite-link-field {
  min-width: 0;
}

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

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

.salary-history-item {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

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

.accrual-editor {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.accrual-lines {
  display: grid;
  gap: 10px;
}

.accrual-line {
  display: grid;
  grid-template-columns: minmax(118px, 0.9fr) minmax(180px, 1.45fr) minmax(130px, 1fr) minmax(96px, 0.72fr) 36px;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.accrual-line.vacation {
  grid-template-columns: minmax(108px, 0.85fr) minmax(148px, 1.2fr) minmax(96px, 0.75fr) minmax(108px, 0.85fr) minmax(118px, 1fr) 36px;
  border-color: rgba(0, 113, 227, 0.22);
  background: #f7fbff;
}

.accrual-line .field {
  min-width: 0;
}

.accrual-title-field {
  min-width: 170px;
}

.accrual-amount-field input {
  min-width: 0;
  text-align: right;
}

.accrual-delete {
  align-self: end;
}

.entry-context-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.entry-context-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.entry-context-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.entry-context-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entry-context-metric strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

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

  .accrual-line,
  .accrual-line.vacation {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 36px;
  }

  .accrual-balance-field {
    grid-column: 1 / -2;
  }
}

.compact-empty {
  padding: 18px;
}

.copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 12px;
  width: min(440px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid rgba(36, 138, 61, 0.28);
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 18px 42px rgba(29, 29, 31, 0.16);
}

.copy-toast.error {
  border-color: rgba(179, 38, 30, 0.28);
  color: var(--red);
  background: var(--red-soft);
}

.copy-toast-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.copy-toast-icon svg {
  width: 19px;
  height: 19px;
}

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

.copy-toast-copy strong {
  color: currentColor;
  font-size: 14px;
}

.copy-toast-copy span {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.copy-toast-close {
  width: 30px;
  height: 30px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.76);
}

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

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

.tiny-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hidden {
  display: none !important;
}

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

  .vacation-metrics {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

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

  .overview-charts .chart-card {
    grid-column: span 1;
  }

  .overview-charts .chart-card.wide {
    grid-column: 1 / -1;
  }

  .chart-card.compact.wide .receipt-list {
    grid-template-columns: 1fr;
  }

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

  .data-table {
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }

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

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

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

  .sidebar {
    position: static;
    inset: auto;
    z-index: auto;
    width: auto;
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .main {
    grid-column: auto;
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .vacation-employee-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .responsive-table {
    display: block;
  }

  .responsive-table colgroup,
  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: grid;
    gap: 10px;
  }

  .responsive-table tr {
    display: grid;
    gap: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(110px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .responsive-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .responsive-table.payroll-table td:nth-child(6) {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .responsive-table.payroll-table td:nth-child(6)::before {
    justify-self: center;
  }

	  .responsive-table .action-cell,
	  .responsive-table .action-heading,
	  .payroll-table td:last-child,
	  .payroll-table th:last-child {
	    text-align: left;
	  }

  .responsive-table.payroll-table td:nth-child(6),
  .responsive-table.payroll-table th:nth-child(6) {
    text-align: center;
  }

  .responsive-table .row-actions,
  .responsive-table .table-action-group {
    justify-content: stretch;
  }

  .vacation-employee-layout {
    grid-template-columns: 1fr;
  }

  .employee-local-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .employee-local-nav-button {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
    padding: 9px 8px;
    text-align: center;
  }

  .employee-local-nav-button .badge {
    position: absolute;
    top: 4px;
    right: 4px;
  }

  .employee-local-nav-text span {
    display: none;
  }
}

@media (max-width: 620px) {
  .metrics,
  .analytics-grid,
  .field-grid,
  .field-grid.three,
  .readout-grid,
  .workflow-rail,
  .nav {
    grid-template-columns: 1fr;
  }

  .overview-charts .chart-card,
  .overview-charts .chart-card.wide {
    grid-column: auto;
  }

  .top-actions,
  .toolbar,
  .employees-header,
  .payroll-tabs,
  .vacation-page-header,
  .page-tabs,
  .vacation-tabs,
  .row-actions,
  .inline-actions {
    width: 100%;
  }

  .vacation-page-header {
    display: grid;
  }

  .page-tabs,
  .vacation-tabs {
    justify-content: stretch;
  }

  .page-tabs .tab-button,
  .vacation-tabs .tab-button {
    flex: 1 1 0;
  }

  .invoice-template-grid,
  .invoice-template-card {
    grid-template-columns: 1fr;
  }

  .invoice-template-preview {
    min-height: 96px;
  }

  .button,
  .search-input,
  .top-select-field,
  .top-select-field .custom-select {
    width: 100%;
  }

  .payroll-filterbar {
    grid-template-columns: 1fr;
  }

  .payroll-search {
    max-width: none;
  }

  .employees-header {
    display: grid;
  }

  .employee-search {
    max-width: none;
  }

  .section-heading,
  .salary-history-head,
  .salary-control,
  .employee-footer,
  .footer-left,
  .footer-actions,
  .delete-control,
  .invite-link-row,
  .receipt-row-main,
  .receipt-meta,
  .receipt-card-header,
  .receipt-calculation-line,
  .odoo-query-card,
  .odoo-selected-contact,
  .odoo-contact-option,
  .accrual-line {
    display: grid;
    grid-template-columns: 1fr;
  }

  .odoo-contact-side {
    justify-items: stretch;
  }

  .footer-actions {
    margin-left: 0;
  }

  .receipt-calculation-dots {
    display: none;
  }

  .receipt-card-header strong,
  .receipt-calculation-value {
    max-width: none;
    text-align: left;
    white-space: normal;
  }

  .accrual-line .icon-button {
    width: 100%;
  }

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