:root {
  color-scheme: light;
  --bg: #cfeee6;
  --shell: #f8f8f8;
  --surface: #ffffff;
  --surface-2: #f2f5f3;
  --text: #18352d;
  --muted: #6e7f79;
  --line: #edf1ef;
  --brand: #2f8a70;
  --brand-dark: #2b8068;
  --brand-2: #dff3eb;
  --danger: #b42318;
  --success: #167348;
  --shadow: 0 14px 36px rgba(31, 76, 63, 0.12);
  --deep-shadow: 0 22px 50px rgba(24, 61, 48, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-attachment: fixed;
  background-color: var(--bg);
  background-image: var(--reference-bg, none);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  padding: 26px;
}

body.is-locked {
  overflow: hidden;
}

body.is-locked #app-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 52px);
  max-width: 1440px;
  margin: 0 auto;
  border-radius: 24px;
  background: var(--shell);
  box-shadow: var(--deep-shadow);
  overflow: hidden;
}

.sidebar {
  background: linear-gradient(180deg, #2f8a70, #28765f);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  position: sticky;
  top: 0;
  height: calc(100vh - 52px);
}

.brand {
  display: grid;
  gap: 10px;
  align-items: start;
  margin-bottom: 28px;
}

.brand-logo {
  width: 100%;
  height: 68px;
  border-radius: 16px;
  background: #ffffff;
  object-fit: contain;
  padding: 7px;
  box-shadow: 0 8px 20px rgba(15, 65, 49, 0.18);
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin: 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #bed2c2;
}

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

h1 {
  font-size: 1.14rem;
  margin-bottom: 0;
}

.version-label {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 4px 0 0;
}

.sidebar-clock {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: grid;
  gap: 3px;
  margin: -12px 0 18px;
  padding: 12px 14px;
}

.sidebar-clock strong {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.sidebar-clock span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.45rem);
  line-height: 1.08;
  margin-bottom: 0;
}

h3 {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 0;
}

.nav-tabs {
  display: grid;
  gap: 9px;
}

.nav-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin: 10px 0 6px;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: auto;
  padding-top: 16px;
}

.sidebar-footer strong {
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.35;
}

.sidebar-footer span {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.sidebar-footer a {
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.new-batch-action {
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  background: #ffffff;
  color: var(--brand-dark);
  cursor: pointer;
  display: flex;
  gap: 10px;
  font-weight: 800;
  justify-content: center;
  text-align: left;
  box-shadow: 0 10px 22px rgba(18, 68, 52, 0.14);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.new-batch-action:hover {
  background: #f3faef;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(18, 68, 52, 0.2);
}

.new-batch-action:active {
  transform: translateY(1px);
}

.new-batch-action.secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
}

.draft-section {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin: 8px 0;
  padding: 14px 0;
}

.draft-title {
  color: #bed2c2;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.draft-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}

.draft-item {
  align-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 3px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.draft-item.active,
.draft-item:hover {
  background: rgba(255, 255, 255, 0.22);
}

.draft-item-text {
  display: grid;
  min-width: 0;
}

.draft-item-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-delete {
  align-items: center;
  background: #f32020;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.1rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  width: 30px;
}

.draft-delete:hover {
  background: #c81414;
}

.draft-item small,
.draft-empty {
  color: #bed2c2;
  font-size: 0.78rem;
}

.draft-empty {
  margin: 0;
}

.nav-tab {
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: transparent;
  color: #dbe8dc;
  display: flex;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.94rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 28px;
}

.new-batch-action .menu-icon {
  background: rgba(47, 138, 112, 0.12);
}

.nav-tab.active,
.nav-tab:hover {
  background: #ffffff;
  color: #fff;
}

.nav-tab:not(.active):hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.nav-tab.active {
  color: var(--brand-dark);
  font-weight: 900;
  box-shadow: inset 4px 0 0 #ffffff, 0 12px 24px rgba(13, 62, 48, 0.18);
}

.nav-tab.active .menu-icon,
.nav-tab:hover .menu-icon {
  background: var(--brand-dark);
  color: #ffffff;
}

.workspace {
  padding: 24px;
  min-width: 0;
  background: #f7f7f7;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

#batch-view .page-header {
  align-items: center;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 16px;
}

#batch-view .page-header > div:first-child {
  grid-column: 1 / -1;
}

#batch-view .page-header .batch-number-display {
  justify-self: start;
}

#batch-view .header-actions {
  justify-self: end;
}

#summary-view .page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.month-filter {
  min-width: 220px;
}

.summary-header-actions {
  align-items: end;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}

.primary-action,
.ghost-action {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.primary-action {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 138, 112, 0.22);
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(47, 138, 112, 0.3);
}

.ghost-action {
  background: var(--brand-2);
  color: var(--brand-dark);
}

.draft-action {
  background: #fff7d6;
  color: #8a5b00;
}

.ghost-action:hover {
  background: #ccebdf;
  transform: translateY(-1px);
}

.primary-action:active,
.ghost-action:active {
  transform: translateY(1px);
}

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

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.danger-action:hover {
  border-color: #f2c4c0;
  background: #fff2f0;
  color: var(--danger);
}

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

.kpi {
  background: var(--surface);
  border: 0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.kpi strong {
  font-size: 1.28rem;
  color: var(--brand-dark);
}

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

.view > .panel,
.view > .kpi-grid {
  margin-bottom: 22px;
}

.view > .panel:last-child,
.view > .kpi-grid:last-child {
  margin-bottom: 0;
}

.panel {
  background: var(--surface);
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--deep-shadow);
}

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

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

.panel-header h3 {
  color: #14233d;
  font-size: 1.3rem;
  font-weight: 900;
}

.batch-section-heading {
  color: #14233d;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0;
}

.panel-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.danger-panel {
  border: 1px solid #f2c4c0;
}

.field-grid {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

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

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  background: #f9fbfa;
  transition: all 0.2s ease;
}

textarea {
  min-height: 92px;
  border-radius: 16px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(31, 107, 67, 0.14);
}

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

.factory-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.batch-company-name {
  color: var(--brand-dark);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 6px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.batch-number-display {
  display: inline-block;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-dark);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  justify-self: end;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  padding: 0 2px 2px;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

.row-action-cell {
  width: 46px;
  text-align: center;
}

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

.table-actions .ghost-action {
  padding: 10px 14px;
}

.inactive-row {
  opacity: 0.58;
}

.inactive-row td {
  background: rgba(148, 163, 184, 0.08);
}

th {
  background: var(--surface-2);
  color: #4b5d56;
  font-size: 0.8rem;
}

td input {
  min-width: 96px;
}

.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.success {
  color: var(--success);
  font-weight: 700;
}

.danger {
  color: var(--danger);
  font-weight: 700;
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: transparent;
  padding: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fbfa;
  border-radius: 12px;
}

.summary-row span {
  color: var(--muted);
}

.empty-state {
  padding: 28px;
}

.empty-state p {
  color: var(--muted);
  max-width: 620px;
}

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

.modal-backdrop {
  align-items: center;
  background: rgba(12, 25, 16, 0.48);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(12, 25, 16, 0.24);
  max-width: 460px;
  padding: 22px;
  width: 100%;
}

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

.password-action-dialog,
.program-message-dialog {
  display: grid;
  gap: 16px;
  max-width: 500px;
  padding: 26px;
}

.dialog-heading {
  align-items: flex-start;
  display: flex;
  gap: 14px;
}

.dialog-heading h3 {
  color: #16263f;
  font-size: 1.18rem;
  margin-bottom: 4px;
}

.dialog-heading p {
  line-height: 1.45;
  margin: 0;
}

.dialog-icon {
  align-items: center;
  background: #fff1ee;
  border: 1px solid #ffd6cf;
  border-radius: 14px;
  color: var(--danger);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.info-icon {
  background: #eef7ff;
  border-color: #cae3ff;
  color: #4534b5;
}

.dialog-field {
  display: grid;
  gap: 8px;
}

.dialog-field span {
  color: #526078;
  font-size: 0.82rem;
  font-weight: 800;
}

.password-action-dialog input {
  border-color: #dfe6ef;
  font-size: 1rem;
  height: 46px;
  text-align: left;
}

.password-action-dialog input:focus {
  border-color: #4534b5;
  box-shadow: 0 0 0 4px rgba(69, 52, 181, 0.12);
  outline: 0;
}

.danger-action {
  background: #e53935;
  box-shadow: 0 12px 24px rgba(229, 57, 53, 0.2);
  color: #fff;
}

.danger-action:hover {
  background: #c62828;
}

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

.startup-overlay {
  align-items: center;
  background: rgba(9, 14, 24, 0.42);
  backdrop-filter: blur(8px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 50;
}

.startup-overlay[hidden],
.startup-card[hidden] {
  display: none;
}

.startup-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(10, 20, 36, 0.28);
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 30px;
  text-align: center;
  width: 100%;
}

.startup-logo {
  justify-self: center;
  max-height: 88px;
  max-width: 240px;
  object-fit: contain;
  width: 80%;
}

.startup-card h3 {
  font-size: 1.3rem;
}

.startup-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.loading-track {
  background: #eef1f7;
  border-radius: 999px;
  box-shadow: inset 0 1px 4px rgba(24, 34, 55, 0.14);
  height: 28px;
  overflow: hidden;
}

.loading-fill {
  animation: loading-gradient 1.8s ease-in-out infinite;
  background: linear-gradient(90deg, #2a1b78, #4534b5, #13d5df, #6cf2d4);
  background-size: 220% 100%;
  border-radius: inherit;
  height: 100%;
  overflow: hidden;
  position: relative;
  transition: width 0.18s ease;
  width: 0%;
}

.loading-fill::after {
  animation: loading-shine 1.6s linear infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  content: "";
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}

@keyframes loading-gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes loading-shine {
  to {
    transform: translateX(100%);
  }
}

.password-card input {
  text-align: center;
}

.password-error {
  color: var(--danger) !important;
  font-weight: 800;
  margin: -4px 0 0;
}

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

.background-settings {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.background-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-action {
  align-items: center;
  background: var(--brand-dark);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
}

.file-action input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.background-preview {
  align-items: center;
  background: #f8fbfa;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  display: flex;
  min-height: 120px;
  overflow: hidden;
  padding: 14px;
}

.background-preview.has-image {
  background-image: var(--reference-bg, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.background-preview.has-image span {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
  padding: 8px 12px;
}

.bill-search-panel {
  border-top: 1px solid var(--line);
  padding: 18px;
}

.search-actions {
  align-items: end;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.settings-tabs,
.salary-tabs,
.accounting-tabs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 22px;
}

.salary-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.accounting-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-tab,
.salary-tab,
.accounting-tab {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 13px 14px;
}

.settings-tab.active,
.settings-tab:hover,
.salary-tab.active,
.salary-tab:hover,
.accounting-tab.active,
.accounting-tab:hover {
  background: var(--brand-2);
  color: var(--brand-dark);
}

.settings-tab.active,
.salary-tab.active,
.accounting-tab.active {
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(47, 138, 112, 0.18);
  transform: translateY(-1px);
}

.settings-section,
.salary-section,
.accounting-section {
  display: none;
}

.settings-section.active,
.salary-section.active,
.accounting-section.active {
  display: block;
}

.theme-option {
  align-items: center;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  padding: 16px;
}

.theme-option input {
  width: auto;
}

.theme-option span {
  display: grid;
  gap: 4px;
}

.theme-option small {
  color: var(--muted);
}

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

.report-group-title {
  font-size: 1.12rem;
  margin: 24px 18px 0;
}

.report-group-title:first-child {
  margin-top: 18px;
}

.report-batch-picker {
  border-top: 1px solid var(--line);
}

.month-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.month-chip {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 11px 16px;
}

.month-chip.active,
.month-chip:hover {
  background: var(--brand-2);
  color: var(--brand-dark);
}

.panel-header.compact {
  padding-bottom: 10px;
}

.link-action {
  background: transparent;
  border: 0;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-decoration: underline;
}

.link-action:hover {
  color: var(--brand);
}

.report-action {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 18px;
  text-align: left;
}

.report-action:hover {
  background: var(--brand-2);
  border-color: transparent;
}

.report-action strong {
  color: var(--brand-dark);
  font-size: 1rem;
}

.report-action span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

body[data-theme="estate"] {
  --bg: #e6eaf2;
  --shell: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --text: #1b233d;
  --muted: #737b92;
  --line: #e7ebf3;
  --brand: #0fb7bf;
  --brand-dark: #18203e;
  --brand-2: #e9fbfb;
  --shadow: 0 16px 36px rgba(25, 34, 63, 0.1);
  --deep-shadow: 0 24px 60px rgba(25, 34, 63, 0.2);
}

body[data-theme="estate"] .app-shell {
  background: #f4f6fb;
}

body[data-theme="estate"] .sidebar {
  background: #ffffff;
  color: #1b233d;
}

body[data-theme="estate"] .sidebar .eyebrow,
body[data-theme="estate"] .draft-title,
body[data-theme="estate"] .draft-item small,
body[data-theme="estate"] .draft-empty {
  color: #8a92a8;
}

body[data-theme="estate"] .brand-logo {
  background: #f0f4ff;
  box-shadow: 0 8px 22px rgba(25, 34, 63, 0.1);
}

body[data-theme="estate"] .new-batch-action {
  background: #18203e;
  color: #ffffff;
}

body[data-theme="estate"] .nav-tab {
  color: #737b92;
}

body[data-theme="estate"] .nav-tab.active,
body[data-theme="estate"] .nav-tab:hover {
  background: #eef3ff;
  color: #18203e;
}

body[data-theme="estate"] .nav-tab.active {
  box-shadow: inset 4px 0 0 #18203e, 0 12px 24px rgba(25, 34, 63, 0.12);
}

body[data-theme="estate"] .draft-section {
  border-color: #eef1f7;
}

body[data-theme="estate"] .draft-item {
  background: #f4f6fb;
  color: #1b233d;
}

body[data-theme="estate"] .draft-item.active,
body[data-theme="estate"] .draft-item:hover {
  background: #eef3ff;
}

body[data-theme="estate"] .workspace {
  background: #f4f6fb;
}

body[data-theme="estate"] .view.active::before {
  background:
    linear-gradient(90deg, rgba(24, 32, 62, 0.96), rgba(24, 32, 62, 0.78)),
    linear-gradient(135deg, rgba(15, 183, 191, 0.35), transparent 42%),
    repeating-linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0 12px, transparent 12px 24px);
  border-radius: 20px;
  box-shadow: var(--shadow);
  content: "";
  display: block;
  height: 136px;
  margin-bottom: -112px;
}

body[data-theme="estate"] .page-header {
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  min-height: 112px;
  padding: 22px 24px;
  position: relative;
  z-index: 1;
}

body[data-theme="estate"] .page-header .eyebrow,
body[data-theme="estate"] .page-header .factory-line {
  color: rgba(255, 255, 255, 0.72);
}

body[data-theme="estate"] .batch-number-display {
  background: rgba(255, 255, 255, 0.96);
  color: #18203e;
}

body[data-theme="estate"] .primary-action {
  background: #18203e;
}

body[data-theme="estate"] .page-header .primary-action {
  background: #ffffff;
  color: #18203e;
}

body[data-theme="estate"] .page-header .ghost-action {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

body[data-theme="estate"] #batch-view .page-header .ghost-action {
  background: #ffffff;
  color: #18203e;
  box-shadow: 0 10px 22px rgba(24, 32, 62, 0.16);
}

body[data-theme="estate"] #batch-view .page-header .draft-action {
  background: #fff3c4;
  color: #725000;
}

body[data-theme="estate"] .kpi,
body[data-theme="estate"] .panel {
  border: 1px solid rgba(231, 235, 243, 0.7);
  box-shadow: var(--shadow);
}

body[data-theme="estate"] .kpi strong {
  color: #18203e;
}

body[data-theme="estate"] input,
body[data-theme="estate"] select,
body[data-theme="estate"] textarea {
  background: #ffffff;
}

body[data-theme="estate"] .settings-tab,
body[data-theme="estate"] .salary-tab,
body[data-theme="estate"] .accounting-tab {
  background: #ffffff;
  color: #737b92;
}

body[data-theme="estate"] .settings-tab.active,
body[data-theme="estate"] .settings-tab:hover,
body[data-theme="estate"] .salary-tab.active,
body[data-theme="estate"] .salary-tab:hover,
body[data-theme="estate"] .accounting-tab.active,
body[data-theme="estate"] .accounting-tab:hover {
  background: #eef3ff;
  color: #18203e;
}

body[data-theme="purple"] {
  --bg: #dde2ea;
  --shell: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5fb;
  --text: #26384d;
  --muted: #8f95a5;
  --line: #edf0f6;
  --brand: #6a4fc4;
  --brand-dark: #4534b5;
  --brand-2: #eeeafd;
  --shadow: 0 18px 42px rgba(61, 57, 108, 0.1);
  --deep-shadow: 0 24px 70px rgba(49, 58, 79, 0.18);
}

body[data-theme="purple"] .app-shell {
  background: #ffffff;
}

body[data-theme="purple"] .sidebar {
  background: #f7f6ff;
  color: #26384d;
  border-right: 1px solid #eaedf5;
}

body[data-theme="purple"] .sidebar .eyebrow,
body[data-theme="purple"] .brand-subtitle,
body[data-theme="purple"] .version-label,
body[data-theme="purple"] .draft-title,
body[data-theme="purple"] .draft-item small,
body[data-theme="purple"] .draft-empty {
  color: #8f95a5;
}

body[data-theme="purple"] .sidebar-footer {
  border-color: #e8e9f3;
  color: #8f95a5;
}

body[data-theme="purple"] .sidebar-footer strong,
body[data-theme="purple"] .sidebar-footer a {
  color: #26384d;
}

body[data-theme="purple"] .sidebar-footer span {
  color: #8f95a5;
}

body[data-theme="purple"] .sidebar-clock {
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(61, 57, 108, 0.08);
}

body[data-theme="purple"] .sidebar-clock strong {
  color: #4534b5;
}

body[data-theme="purple"] .sidebar-clock span {
  color: #8f95a5;
}

body[data-theme="purple"] .brand-logo {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(69, 52, 181, 0.14);
}

body[data-theme="purple"] .new-batch-action {
  background: linear-gradient(135deg, #ffbd68, #ffda9a);
  color: #26384d;
}

body[data-theme="purple"] .new-batch-action .menu-icon {
  background: rgba(69, 52, 181, 0.12);
  color: #4534b5;
}

body[data-theme="purple"] .new-batch-action.secondary {
  background: #ffffff;
  color: #4534b5;
}

body[data-theme="purple"] .nav-tab {
  color: #8f95a5;
}

body[data-theme="purple"] .nav-tab.active,
body[data-theme="purple"] .nav-tab:hover {
  background: #eeeafd;
  color: #4534b5;
}

body[data-theme="purple"] .nav-tab .menu-icon {
  background: rgba(69, 52, 181, 0.08);
  color: #8f95a5;
}

body[data-theme="purple"] .nav-tab.active .menu-icon,
body[data-theme="purple"] .nav-tab:hover .menu-icon {
  background: #4534b5;
  color: #ffffff;
}

body[data-theme="purple"] .nav-tab.active {
  box-shadow: inset 4px 0 0 #4534b5, 0 12px 24px rgba(69, 52, 181, 0.14);
}

body[data-theme="purple"] .draft-section {
  border-color: #e8e9f3;
}

body[data-theme="purple"] .nav-divider {
  border-color: #e8e9f3;
}

body[data-theme="purple"] .draft-item {
  background: #ffffff;
  color: #26384d;
  box-shadow: 0 8px 20px rgba(61, 57, 108, 0.08);
}

body[data-theme="purple"] .draft-item.active,
body[data-theme="purple"] .draft-item:hover {
  background: #eeeafd;
}

body[data-theme="purple"] .workspace {
  background: #ffffff;
}

body[data-theme="purple"] .view.active::before {
  background:
    radial-gradient(circle at 96% 0%, rgba(255, 255, 255, 0.16) 0 86px, transparent 87px),
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.11) 0 180px, transparent 181px),
    linear-gradient(135deg, #4534b5, #9a62d8);
  border-radius: 0;
  box-shadow: none;
  content: "";
  display: block;
  height: 190px;
  margin: -24px -24px -158px;
}

body[data-theme="purple"] .page-header {
  background: transparent;
  box-shadow: none;
  color: #ffffff;
  min-height: 150px;
  padding: 20px 22px;
  position: relative;
  z-index: 1;
}

body[data-theme="purple"] #summary-view .page-header {
  min-height: 150px;
  padding: 22px 28px;
}

body[data-theme="purple"] #summary-view .month-filter {
  color: rgba(255, 255, 255, 0.72);
  justify-self: end;
}

body[data-theme="purple"] #summary-view .primary-action {
  justify-self: end;
  min-width: 192px;
}

body[data-theme="purple"] #batch-view .page-header h2 {
  white-space: nowrap;
}

body[data-theme="purple"] .page-header .eyebrow,
body[data-theme="purple"] .page-header .factory-line {
  color: rgba(255, 255, 255, 0.72);
}

body[data-theme="purple"] .batch-company-name {
  color: #ffffff;
}

body[data-theme="purple"] .batch-number-display {
  background: rgba(255, 255, 255, 0.96);
  color: #4534b5;
}

body[data-theme="purple"] .page-header .primary-action {
  background: #ffffff;
  color: #4534b5;
}

body[data-theme="purple"] .file-action {
  background: #4534b5;
}

body[data-theme="purple"] .page-header .ghost-action {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

body[data-theme="purple"] #batch-view .page-header .ghost-action {
  background: #ffffff;
  color: #4534b5;
  box-shadow: 0 10px 22px rgba(69, 52, 181, 0.16);
}

body[data-theme="purple"] .page-header .draft-action {
  background: #ffd66b;
  color: #2e2350;
}

body[data-theme="purple"] #batch-view .page-header .draft-action {
  background: #ffd66b;
  color: #2e2350;
}

body[data-theme="purple"] .kpi {
  border: 0;
  overflow: hidden;
  position: relative;
}

body[data-theme="purple"] .kpi:nth-child(1) {
  background: linear-gradient(135deg, #e4ffd0, #c9f5de);
}

body[data-theme="purple"] .kpi:nth-child(2) {
  background: linear-gradient(135deg, #ff805c, #ff6f87);
  color: #ffffff;
}

body[data-theme="purple"] .kpi:nth-child(3) {
  background: linear-gradient(135deg, #13d5df, #09c1d0);
  color: #071d2b;
}

body[data-theme="purple"] .kpi:nth-child(4) {
  background: linear-gradient(135deg, #ffffff, #f8f7ff);
}

body[data-theme="purple"] .kpi:nth-child(2) span,
body[data-theme="purple"] .kpi:nth-child(2) strong {
  color: #ffffff;
}

body[data-theme="purple"] .kpi strong {
  color: #0d1c2d;
}

body[data-theme="purple"] .panel {
  border: 0;
  box-shadow: var(--shadow);
}

body[data-theme="purple"] .primary-action {
  background: #4534b5;
}

body[data-theme="purple"] .ghost-action {
  background: #eeeafd;
  color: #4534b5;
}

body[data-theme="purple"] input,
body[data-theme="purple"] select,
body[data-theme="purple"] textarea {
  background: #ffffff;
}

body[data-theme="purple"] .settings-tab,
body[data-theme="purple"] .salary-tab,
body[data-theme="purple"] .accounting-tab {
  background: #ffffff;
  color: #8f95a5;
}

body[data-theme="purple"] .settings-tab.active,
body[data-theme="purple"] .settings-tab:hover,
body[data-theme="purple"] .salary-tab.active,
body[data-theme="purple"] .salary-tab:hover,
body[data-theme="purple"] .accounting-tab.active,
body[data-theme="purple"] .accounting-tab:hover {
  background: #eeeafd;
  color: #4534b5;
}

body[data-theme="venus"] {
  --bg: #075d56;
  --shell: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef9fb;
  --text: #073c38;
  --muted: #8a98ad;
  --line: #e6f0f3;
  --brand: #087066;
  --brand-dark: #075d56;
  --brand-2: #e6f7f5;
  --shadow: 0 18px 42px rgba(4, 63, 58, 0.1);
  --deep-shadow: 0 26px 80px rgba(0, 46, 42, 0.24);
}

body[data-theme="venus"] .app-shell {
  background: #ffffff;
}

body[data-theme="venus"] .sidebar {
  background: #ffffff;
  border-right: 1px solid #e6f0f3;
  color: #073c38;
}

body[data-theme="venus"] .sidebar .eyebrow,
body[data-theme="venus"] .brand-subtitle,
body[data-theme="venus"] .version-label,
body[data-theme="venus"] .draft-title,
body[data-theme="venus"] .draft-item small,
body[data-theme="venus"] .draft-empty {
  color: #8a98ad;
}

body[data-theme="venus"] .sidebar-clock,
body[data-theme="venus"] .draft-item {
  background: #f4fbfd;
  box-shadow: 0 8px 22px rgba(4, 63, 58, 0.06);
}

body[data-theme="venus"] .sidebar-clock strong {
  color: #075d56;
}

body[data-theme="venus"] .sidebar-clock span,
body[data-theme="venus"] .sidebar-footer,
body[data-theme="venus"] .sidebar-footer span {
  color: #8a98ad;
}

body[data-theme="venus"] .sidebar-footer,
body[data-theme="venus"] .draft-section,
body[data-theme="venus"] .nav-divider {
  border-color: #e6f0f3;
}

body[data-theme="venus"] .sidebar-footer strong,
body[data-theme="venus"] .sidebar-footer a {
  color: #073c38;
}

body[data-theme="venus"] .brand-logo {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(4, 63, 58, 0.12);
}

body[data-theme="venus"] .new-batch-action {
  background: #075d56;
  color: #ffffff;
}

body[data-theme="venus"] .new-batch-action.secondary {
  background: #f4fbfd;
  color: #075d56;
}

body[data-theme="venus"] .new-batch-action .menu-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

body[data-theme="venus"] .new-batch-action.secondary .menu-icon {
  background: #e6f7f5;
  color: #075d56;
}

body[data-theme="venus"] .nav-tab {
  color: #8a98ad;
}

body[data-theme="venus"] .nav-tab.active,
body[data-theme="venus"] .nav-tab:hover {
  background: #075d56;
  color: #ffffff;
}

body[data-theme="venus"] .nav-tab .menu-icon {
  background: #eef4f6;
  color: #8a98ad;
}

body[data-theme="venus"] .nav-tab.active .menu-icon,
body[data-theme="venus"] .nav-tab:hover .menu-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body[data-theme="venus"] .nav-tab.active {
  box-shadow: 0 12px 26px rgba(7, 93, 86, 0.18);
}

body[data-theme="venus"] .workspace {
  background: #eef9fb;
}

body[data-theme="venus"] .page-header {
  background: #ffffff;
  color: #073c38;
  box-shadow: 0 14px 34px rgba(4, 63, 58, 0.08);
}

body[data-theme="venus"] .page-header .eyebrow,
body[data-theme="venus"] .page-header .factory-line {
  color: #8a98ad;
}

body[data-theme="venus"] .batch-company-name {
  color: #075d56;
}

body[data-theme="venus"] .batch-number-display {
  background: #e6f7f5;
  color: #075d56;
}

body[data-theme="venus"] .primary-action,
body[data-theme="venus"] .file-action {
  background: #075d56;
  color: #ffffff;
}

body[data-theme="venus"] .ghost-action {
  background: #e6f7f5;
  color: #075d56;
}

body[data-theme="venus"] .draft-action {
  background: #fff4bf;
  color: #6c4a00;
}

body[data-theme="venus"] .kpi,
body[data-theme="venus"] .panel {
  border: 1px solid rgba(230, 240, 243, 0.86);
  box-shadow: 0 16px 34px rgba(4, 63, 58, 0.08);
}

body[data-theme="venus"] .kpi strong,
body[data-theme="venus"] .panel-header h3,
body[data-theme="venus"] .batch-section-heading {
  color: #073c38;
}

body[data-theme="venus"] input,
body[data-theme="venus"] select,
body[data-theme="venus"] textarea {
  background: #ffffff;
}

body[data-theme="venus"] .settings-tab,
body[data-theme="venus"] .salary-tab,
body[data-theme="venus"] .accounting-tab {
  background: #ffffff;
  color: #8a98ad;
}

body[data-theme="venus"] .settings-tab.active,
body[data-theme="venus"] .settings-tab:hover,
body[data-theme="venus"] .salary-tab.active,
body[data-theme="venus"] .salary-tab:hover,
body[data-theme="venus"] .accounting-tab.active,
body[data-theme="venus"] .accounting-tab:hover {
  background: #e6f7f5;
  color: #075d56;
}

body[data-theme="sunset"] {
  --bg: #fbc1a0;
  --shell: rgba(255, 255, 255, 0.78);
  --surface: rgba(255, 255, 255, 0.84);
  --surface-2: rgba(255, 247, 232, 0.72);
  --text: #101124;
  --muted: #6f7182;
  --line: rgba(33, 29, 65, 0.12);
  --brand: #22186b;
  --brand-dark: #20145d;
  --brand-2: rgba(255, 255, 255, 0.64);
  --shadow: 0 18px 42px rgba(74, 45, 91, 0.12);
  --deep-shadow: 0 30px 90px rgba(108, 64, 86, 0.22);
  background:
    radial-gradient(circle at 12% 84%, rgba(255, 245, 185, 0.72) 0 120px, transparent 121px),
    radial-gradient(circle at 90% 72%, rgba(255, 127, 104, 0.48) 0 170px, transparent 171px),
    linear-gradient(180deg, #9ec8d6 0%, #f8dac0 45%, #fff3be 72%, #fa8a68 100%);
}

body[data-theme="sunset"] .app-shell {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
}

body[data-theme="sunset"] .sidebar {
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(33, 29, 65, 0.1);
  color: #101124;
  backdrop-filter: blur(16px);
}

body[data-theme="sunset"] .sidebar .eyebrow,
body[data-theme="sunset"] .brand-subtitle,
body[data-theme="sunset"] .version-label,
body[data-theme="sunset"] .draft-title,
body[data-theme="sunset"] .draft-item small,
body[data-theme="sunset"] .draft-empty,
body[data-theme="sunset"] .sidebar-footer,
body[data-theme="sunset"] .sidebar-footer span,
body[data-theme="sunset"] .sidebar-clock span {
  color: #6f7182;
}

body[data-theme="sunset"] .sidebar-footer,
body[data-theme="sunset"] .draft-section,
body[data-theme="sunset"] .nav-divider {
  border-color: rgba(33, 29, 65, 0.1);
}

body[data-theme="sunset"] .sidebar-footer strong,
body[data-theme="sunset"] .sidebar-footer a,
body[data-theme="sunset"] .sidebar-clock strong {
  color: #101124;
}

body[data-theme="sunset"] .brand-logo,
body[data-theme="sunset"] .sidebar-clock,
body[data-theme="sunset"] .draft-item {
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 30px rgba(74, 45, 91, 0.1);
}

body[data-theme="sunset"] .new-batch-action {
  background: #f53d2f;
  color: #ffffff;
}

body[data-theme="sunset"] .new-batch-action.secondary {
  background: rgba(255, 255, 255, 0.82);
  color: #20145d;
}

body[data-theme="sunset"] .new-batch-action .menu-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body[data-theme="sunset"] .new-batch-action.secondary .menu-icon {
  background: rgba(32, 20, 93, 0.1);
  color: #20145d;
}

body[data-theme="sunset"] .nav-tab {
  color: #6f7182;
}

body[data-theme="sunset"] .nav-tab.active,
body[data-theme="sunset"] .nav-tab:hover {
  background: #20145d;
  color: #ffffff;
}

body[data-theme="sunset"] .nav-tab .menu-icon {
  background: rgba(32, 20, 93, 0.08);
  color: #6f7182;
}

body[data-theme="sunset"] .nav-tab.active .menu-icon,
body[data-theme="sunset"] .nav-tab:hover .menu-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

body[data-theme="sunset"] .workspace {
  background: rgba(255, 255, 255, 0.38);
}

body[data-theme="sunset"] .page-header,
body[data-theme="sunset"] .panel,
body[data-theme="sunset"] .kpi {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(33, 29, 65, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px rgba(74, 45, 91, 0.1);
}

body[data-theme="sunset"] .batch-number-display {
  background: rgba(255, 255, 255, 0.86);
  color: #20145d;
}

body[data-theme="sunset"] .primary-action,
body[data-theme="sunset"] .file-action {
  background: #20145d;
  color: #ffffff;
}

body[data-theme="sunset"] .ghost-action {
  background: rgba(32, 20, 93, 0.09);
  color: #20145d;
}

body[data-theme="sunset"] .draft-action {
  background: #fff2bf;
  color: #704700;
}

body[data-theme="sunset"] .kpi strong,
body[data-theme="sunset"] .panel-header h3,
body[data-theme="sunset"] .batch-section-heading {
  color: #101124;
}

body[data-theme="sunset"] .batch-company-name {
  color: #20145d;
}

body[data-theme="sunset"] input,
body[data-theme="sunset"] select,
body[data-theme="sunset"] textarea {
  background: rgba(255, 255, 255, 0.84);
}

body[data-theme="sunset"] .settings-tab,
body[data-theme="sunset"] .salary-tab,
body[data-theme="sunset"] .accounting-tab {
  background: rgba(255, 255, 255, 0.7);
  color: #6f7182;
}

body[data-theme="sunset"] .settings-tab.active,
body[data-theme="sunset"] .settings-tab:hover,
body[data-theme="sunset"] .salary-tab.active,
body[data-theme="sunset"] .salary-tab:hover,
body[data-theme="sunset"] .accounting-tab.active,
body[data-theme="sunset"] .accounting-tab:hover {
  background: rgba(32, 20, 93, 0.1);
  color: #20145d;
}

body[data-theme="dark"] {
  --bg: #101815;
  --shell: #17221e;
  --surface: #1d2a25;
  --surface-2: #25342f;
  --text: #edf7f2;
  --muted: #9fb0a8;
  --line: #2e4039;
  --brand: #44c08e;
  --brand-dark: #5ce0a8;
  --brand-2: #223b31;
  --danger: #ff8076;
  --success: #64e0a6;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  --deep-shadow: 0 26px 72px rgba(0, 0, 0, 0.38);
}

body[data-theme="dark"] .app-shell {
  background: #17221e;
}

body[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0f2a21, #10211c);
  color: #edf7f2;
}

body[data-theme="dark"] .workspace {
  background: #121b18;
}

body[data-theme="dark"] .brand-logo {
  background: #edf7f2;
}

body[data-theme="dark"] .new-batch-action {
  background: #5ce0a8;
  color: #0c1713;
}

body[data-theme="dark"] .new-batch-action .menu-icon {
  background: rgba(12, 23, 19, 0.14);
  color: #0c1713;
}

body[data-theme="dark"] .new-batch-action.secondary,
body[data-theme="dark"] .month-chip {
  background: #14201c;
  border-color: #2e4039;
  color: #7df0b8;
}

body[data-theme="dark"] .nav-tab,
body[data-theme="dark"] .draft-title,
body[data-theme="dark"] .draft-empty,
body[data-theme="dark"] .draft-item small,
body[data-theme="dark"] .sidebar .eyebrow,
body[data-theme="dark"] .brand-subtitle,
body[data-theme="dark"] .version-label {
  color: #a9bab2;
}

body[data-theme="dark"] .sidebar-footer {
  border-color: #223b31;
  color: #a9bab2;
}

body[data-theme="dark"] .sidebar-footer strong,
body[data-theme="dark"] .sidebar-footer a {
  color: #edf7f2;
}

body[data-theme="dark"] .sidebar-footer span {
  color: #a9bab2;
}

body[data-theme="dark"] .sidebar-clock {
  background: rgba(92, 224, 168, 0.1);
}

body[data-theme="dark"] .sidebar-clock strong {
  color: #5ce0a8;
}

body[data-theme="dark"] .sidebar-clock span {
  color: #a9bab2;
}

body[data-theme="dark"] .nav-tab.active,
body[data-theme="dark"] .nav-tab:hover,
body[data-theme="dark"] .draft-item.active,
body[data-theme="dark"] .draft-item:hover {
  background: rgba(92, 224, 168, 0.14);
  color: #edf7f2;
}

body[data-theme="dark"] .nav-tab .menu-icon {
  background: rgba(92, 224, 168, 0.1);
  color: #a9bab2;
}

body[data-theme="dark"] .nav-tab.active .menu-icon,
body[data-theme="dark"] .nav-tab:hover .menu-icon {
  background: #5ce0a8;
  color: #0c1713;
}

body[data-theme="dark"] .nav-tab.active {
  box-shadow: inset 4px 0 0 #5ce0a8, 0 12px 24px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .draft-item {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .nav-divider {
  border-color: #223b31;
}

body[data-theme="dark"] .page-header,
body[data-theme="dark"] .kpi,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .modal,
body[data-theme="dark"] .startup-card {
  background: #1d2a25;
  color: #edf7f2;
}

body[data-theme="dark"] .kpi strong {
  color: #5ce0a8;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: #14201c;
  border-color: #31463d;
  color: #edf7f2;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #7f9289;
}

body[data-theme="dark"] th {
  background: #25342f;
  color: #c7d8d0;
}

body[data-theme="dark"] td,
body[data-theme="dark"] th {
  border-color: #2e4039;
}

body[data-theme="dark"] .summary-row,
body[data-theme="dark"] .theme-option,
body[data-theme="dark"] .report-action,
body[data-theme="dark"] .settings-tab,
body[data-theme="dark"] .salary-tab,
body[data-theme="dark"] .accounting-tab {
  background: #14201c;
  border-color: #2e4039;
}

body[data-theme="dark"] .settings-tab.active,
body[data-theme="dark"] .settings-tab:hover,
body[data-theme="dark"] .salary-tab.active,
body[data-theme="dark"] .salary-tab:hover,
body[data-theme="dark"] .accounting-tab.active,
body[data-theme="dark"] .accounting-tab:hover {
  background: #223b31;
  color: #7df0b8;
}

body[data-theme="dark"] .primary-action {
  background: #5ce0a8;
  color: #0c1713;
}

body[data-theme="dark"] .file-action {
  background: #5ce0a8;
  color: #0c1713;
}

body[data-theme="dark"] .background-preview {
  background-color: #14201c;
}

body[data-theme="dark"] .background-preview.has-image span {
  background: rgba(20, 32, 28, 0.88);
  color: #edf7f2;
}

body[data-theme="dark"] .batch-number-display {
  background: #14201c;
  color: #5ce0a8;
}

body[data-theme="dark"] .ghost-action {
  background: #223b31;
  color: #7df0b8;
}

body[data-theme="dark"] .draft-action {
  background: #4a3b17;
  color: #ffe083;
}

body[data-theme="dark"] .danger-button {
  background: #3d211f;
  color: #ff9b94;
}

body[data-theme] .danger-action {
  background: #e53935;
  color: #ffffff;
}

body[data-theme] .danger-action:hover {
  background: #c62828;
}

body[data-theme="dark"] .link-action {
  color: #7df0b8;
}

@media (max-width: 1050px) {
  body {
    padding: 14px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 28px);
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .new-batch-action,
  .draft-section {
    grid-column: 1 / -1;
  }

  .form-grid,
  .field-grid.four,
  .field-grid.three,
  .kpi-grid,
  .summary-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body {
    padding: 0;
  }

  .app-shell {
    border-radius: 0;
    min-height: 100vh;
  }

  .workspace,
  .sidebar {
    padding: 16px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    border-radius: 14px;
  }

  #batch-view .page-header {
    grid-template-columns: 1fr;
  }

  #summary-view .page-header {
    grid-template-columns: 1fr;
  }

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

  body[data-theme="purple"] #batch-view .page-header h2 {
    white-space: normal;
  }

  body[data-theme="purple"] #summary-view .month-filter,
  body[data-theme="purple"] #summary-view .primary-action {
    justify-self: stretch;
  }

  .batch-number-display {
    justify-self: stretch;
    text-align: center;
  }

  .month-filter {
    min-width: 0;
  }

  .nav-tabs,
  .settings-tabs,
  .salary-tabs,
  .accounting-tabs,
  .form-grid,
  .field-grid.four,
  .field-grid.three,
  .field-grid.two,
  .kpi-grid,
  .summary-list,
  .theme-options {
    grid-template-columns: 1fr;
  }

  .report-action-grid {
    grid-template-columns: 1fr;
  }

  body[data-theme="estate"] .view.active::before {
    border-radius: 14px;
    height: 150px;
    margin-bottom: -126px;
  }

  body[data-theme="purple"] .view.active::before {
    height: 164px;
    margin: -16px -16px -136px;
  }

  table {
    min-width: 760px;
  }
}

