/* frontend/src/styles.css */
:root {
  --bg-main: #f4f0e8;
  --bg-card: #fffdf8;
  --bg-soft: #f5ede0;
  --ink: #1d1a17;
  --ink-soft: #5a5248;
  --accent: #ca5f2b;
  --accent-dark: #8f3e1a;
  --line: #e2d4c0;
  --error: #b21f1f;
  --ok: #257045;
  --warn: #9a5a00;
  --shadow: 0 12px 24px rgba(92, 58, 38, 0.12);
}
* {
  box-sizing: border-box;
}
html,
body,
#root {
  margin: 0;
  padding: 0;
  min-height: 100%;
}
body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(
      circle at 20% 20%,
      #ffd7a9 0%,
      transparent 50%),
    radial-gradient(
      circle at 80% 10%,
      #ffd9c8 0%,
      transparent 40%),
    linear-gradient(
      180deg,
      #f9f3ea 0%,
      #efe3d0 100%);
  padding: 24px 16px 140px;
}
.container {
  width: min(1250px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.card-soft {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
}
.hero p {
  margin: 0 0 8px;
  color: var(--ink-soft);
}
.hero button {
  margin-top: 6px;
}
.login-card {
  max-width: 520px;
  margin: 10vh auto 0;
}
.login-card form {
  display: grid;
  gap: 10px;
}
.login-env-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.form-card {
  display: grid;
  gap: 10px;
}
.worker-token-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.worker-token-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.worker-token-row code {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3ece1;
  font-size: 12px;
}
.worker-token-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.worker-token-issued {
  margin-bottom: 12px;
}
.access-exp-inline {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 700;
}
.cut-percent-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cut-percent-row input {
  max-width: 180px;
}
label {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 700;
}
textarea,
input {
  width: 100%;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
select {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink);
}
textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(202, 95, 43, 0.28);
  border-color: var(--accent);
}
.grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  transition: transform 0.15s ease, filter 0.15s ease;
}
button:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}
button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
button:disabled:hover {
  transform: none;
  filter: none;
}
button.secondary {
  background: #f2ece2;
  color: var(--ink);
}
.month-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.month-head h2 {
  margin: 0;
  font-size: 22px;
}
.month-actions {
  display: flex;
  gap: 8px;
}
.stats-scope-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.stats-scope-btn {
  background: #f2ece2;
  color: var(--ink);
}
.stats-scope-btn.active {
  background: var(--accent);
  color: #fff;
}
.stats-panel {
  background: #fff7ed;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}
.stats-panel h3 {
  margin: 0;
  font-size: 18px;
}
.kpi-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kpi-card {
  background: #fff;
  border: 1px solid #ead8bf;
  border-radius: 12px;
  padding: 10px;
}
.kpi-span-2 {
  grid-column: span 2;
}
.kpi-label {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}
.kpi-value {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}
.kpi-value.ok {
  color: var(--ok);
}
.kpi-value.warn {
  color: var(--warn);
}
.kpi-value.bad {
  color: var(--error);
}
.always-stats {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.always-stats h4 {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.info-card p {
  margin: 0;
}
.error {
  color: var(--error);
}
.table-card {
  overflow: hidden;
}
.switch-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.switch-btn {
  background: #f2ece2;
  color: var(--ink);
}
.switch-btn.active {
  background: var(--accent);
  color: #fff;
}
.filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.mini-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.tx-toolbar-anchor {
  height: 0;
}
.tx-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.tx-toolbar.is-docked {
  position: fixed;
  bottom: 10px;
  z-index: 30;
  box-shadow: 0 10px 22px rgba(45, 32, 21, 0.24);
}
.tx-toolbar-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.bulk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  flex-wrap: nowrap;
}
.bulk-selected-stats {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
}
.pager-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  margin-left: auto;
  flex-wrap: nowrap;
}
.deductions-pager {
  margin-top: 12px;
  margin-bottom: 12px;
  margin-left: 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
#deals-table {
  min-width: 1420px;
}
#deductions-table {
  min-width: 900px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  font-size: 14px;
  vertical-align: middle;
}
th {
  background: #f9f2e8;
  position: sticky;
  top: 0;
}
.id-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  vertical-align: middle;
}
.id-cell code {
  font-size: 12px;
  background: #f3ece1;
  padding: 4px 6px;
  border-radius: 8px;
}
.copy-btn {
  padding: 4px 8px;
  border-radius: 8px;
  background: #efe3d0;
  color: var(--ink);
  font-size: 12px;
}
.bank-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.bank-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}
.tx-row.tx-class-unclassified {
  background: #fffdf8;
}
.tx-row.tx-class-work {
  background: #eefaf2;
}
.tx-row.tx-class-other_dept {
  background: #fff9e8;
}
.tx-row.tx-class-salary {
  background: #fff0ef;
}
.tx-row.tx-status-canceled {
  background: #f7f2ef;
  color: #6f6661;
}
.tx-row .class-na {
  color: #8a7f76;
  font-size: 13px;
  font-weight: 700;
}
.deduction-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(300px, 1fr) minmax(240px, 340px);
  margin-bottom: 10px;
}
.deduction-form {
  display: grid;
  gap: 8px;
}
.deduction-form h3,
.deduction-summary h3 {
  margin: 0;
}
#deduction-month-total {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}
#deduction-month-count {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}
.danger-btn {
  background: #b94b2b;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 22px 8px;
}
@media (max-width: 1080px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .kpi-span-2 {
    grid-column: span 1;
  }
  .deduction-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .actions,
  .switch-row,
  .filters-row,
  .stats-scope-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .month-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .worker-token-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cut-percent-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cut-percent-row input {
    max-width: none;
  }
}
/*# sourceMappingURL=app.css.map */
