:root {
  --app-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--app-font);
  color: #182026;
  background: #f6f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #f6f7f5;
  --sidebar: #16201d;
  --surface: #ffffff;
  --surface-soft: #eef3ef;
  --surface-muted: #e7eee9;
  --text: #182026;
  --muted: #66736b;
  --muted-light: #94a199;
  --line: #d8ded8;
  --line-soft: #e7ece7;
  --primary: #256f63;
  --primary-dark: #184f48;
  --brand-fiesta: #f08b43;
  --accent: #256f63;
  --blue-soft: #b8d6ce;
  --blue-pale: #e8f1ee;
  --red-soft: #efc9bd;
  --red-pale: #fff3ef;
  --yellow-soft: #f6db8b;
  --green: #2da981;
  --danger: #bf3030;
  --danger-bg: #fff0ee;
  --sidebar-hover: #263530;
  --sidebar-line: #30413b;
  --shadow: 0 12px 34px rgba(22, 32, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
  font-family: var(--app-font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

body.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-shell {
  width: min(100%, 420px);
}

.login-panel {
  display: grid;
  gap: 20px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 18px;
}

.login-kicker {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel h1 {
  margin: 0;
  font-size: 26px;
}

.login-form {
  display: grid;
  gap: 14px;
}

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

.login-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 111, 99, 0.14);
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.login-submit {
  width: 100%;
  justify-content: center;
}

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

button {
  white-space: nowrap;
  cursor: pointer;
}

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

h1 {
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: 0;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.top-notice {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 5px 42px;
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 11px;
  line-height: 1.3;
}

.top-notice.is-success {
  background: #155f4a;
}

.top-notice.is-error {
  background: #8a241f;
}

.top-notice span {
  color: rgba(255, 255, 255, 0.74);
}

.top-notice strong {
  font-weight: 700;
}

.top-notice button {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
}

.app-shell {
  display: flex;
  min-height: calc(100vh - 30px);
  background: var(--bg);
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  min-height: calc(100vh - 30px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px 16px;
  background: var(--sidebar);
  color: #eff5f0;
  border-right: 0;
  position: sticky;
  top: 30px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  padding: 8px 4px 10px;
  text-align: left;
}

.brand-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  border-radius: 16px;
  flex: 0 0 auto;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.28));
}

.brand-text h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

.brand-word-bill,
.brand-word-marx {
  color: var(--brand-fiesta);
}

.brand-word-attack {
  color: #eff5f0;
}

.brand-text p {
  display: block;
  margin: 3px 0 0;
  color: #b8c6bd;
  font-size: 13px;
  font-weight: 600;
}

.brand-text {
  min-width: 0;
}

.sidebar-search {
  position: relative;
}

.sidebar-search input {
  width: 100%;
  height: 29px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--sidebar-line);
  border-radius: 6px;
  background: #1d2a26;
  color: #eff5f0;
  font-size: 13px;
  outline: none;
}

.sidebar-search input::placeholder {
  color: #b8c6bd;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1.5px solid #b8c6bd;
  border-radius: 50%;
  transform: translateY(-58%);
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 1.5px;
  border-radius: 2px;
  background: #b8c6bd;
  transform: rotate(45deg);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e7eee9;
  padding: 11px 27px 11px 33px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.nav-btn::before,
.nav-btn::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.nav-btn::before {
  left: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1.3px solid currentColor;
  border-radius: 3px;
  transform: translateY(-50%);
  opacity: 0.78;
}

.nav-btn:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.nav-btn.active {
  background: var(--sidebar-hover);
  color: #ffffff;
  font-weight: 800;
}

.nav-btn.active::before {
  background: var(--brand-fiesta);
  border-color: var(--brand-fiesta);
  box-shadow: inset 0 0 0 3px var(--sidebar-hover);
  opacity: 1;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.nav-issuer::before,
.nav-customers::before {
  border-radius: 50%;
}

.nav-overview::before {
  border-radius: 2px;
  box-shadow: 0 4px 0 -2px currentColor, 4px 0 0 -2px currentColor;
}

.nav-quick::before {
  border-radius: 50%;
}

.nav-orders::before {
  border-radius: 2px;
}

.nav-orders::after {
  left: 10px;
  top: 50%;
  width: 10px;
  height: 6px;
  border-bottom: 1.3px solid currentColor;
  border-left: 1.3px solid currentColor;
  transform: translateY(-45%) rotate(-12deg);
}

.nav-invoice::after,
.nav-gigs::after,
.nav-expenses::after,
.nav-bank::after,
.nav-taxes::after,
.nav-reports::after,
.nav-inventory::after,
.nav-extensions::after,
.nav-settings::after,
.nav-templates::after {
  left: 11px;
  top: 50%;
  width: 6px;
  height: 1.3px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
  transform: translateY(-4px);
}

.nav-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.55;
  transition: transform 140ms ease, opacity 140ms ease;
}

.nav-btn[aria-expanded="true"] .nav-chevron {
  opacity: 0.9;
  transform: translateY(-35%) rotate(225deg);
}

.nav-expenses::before {
  border-radius: 2px;
}

.nav-gigs::before {
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px currentColor;
}

.nav-bank::before {
  border-radius: 2px;
}

.nav-taxes::before {
  border-radius: 50%;
}

.nav-reports::before {
  border-radius: 2px;
}

.nav-inventory::before,
.nav-extensions::before,
.nav-settings::before {
  border-radius: 50%;
}

.nav-templates::before {
  border-radius: 2px;
  border-top-width: 4px;
}

.nav-btn::before {
  left: 9px;
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
  opacity: 0.82;
  -webkit-mask: var(--nav-icon) center / 17px 17px no-repeat;
  mask: var(--nav-icon) center / 17px 17px no-repeat;
}

.nav-btn::after {
  display: none;
}

.nav-btn.active::before {
  background: var(--brand-fiesta);
  border-color: transparent;
  box-shadow: none;
  opacity: 1;
}

.nav-overview {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.nav-invoice {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2Z'/%3E%3Cpath d='M14 8H8'/%3E%3Cpath d='M16 12H8'/%3E%3Cpath d='M13 16H8'/%3E%3C/svg%3E");
}

.nav-gigs {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}

.nav-orders {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E");
}

.nav-expenses {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2'/%3E%3Cpath d='M3 7h18v10H3z'/%3E%3Cpath d='M16 12h.01'/%3E%3C/svg%3E");
}

.nav-bank {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V10'/%3E%3Cpath d='M19 21V10'/%3E%3Cpath d='M12 3 2 8h20Z'/%3E%3Cpath d='M9 10v11'/%3E%3Cpath d='M15 10v11'/%3E%3C/svg%3E");
}

.nav-taxes {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M8 6h8'/%3E%3Cpath d='M8 10h.01'/%3E%3Cpath d='M12 10h.01'/%3E%3Cpath d='M16 10h.01'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3Cpath d='M8 18h.01'/%3E%3Cpath d='M12 18h.01'/%3E%3Cpath d='M16 18h.01'/%3E%3C/svg%3E");
}

.nav-reports {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 15 4-4 3 3 5-7'/%3E%3C/svg%3E");
}

.nav-customers {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.nav-issuer {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M9 21v-4h6v4'/%3E%3Cpath d='M7 7h.01'/%3E%3Cpath d='M11 7h.01'/%3E%3Cpath d='M15 7h.01'/%3E%3Cpath d='M7 11h.01'/%3E%3Cpath d='M11 11h.01'/%3E%3Cpath d='M15 11h.01'/%3E%3C/svg%3E");
}

.nav-inventory {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h11'/%3E%3Cpath d='M10 12h11'/%3E%3Cpath d='M10 18h11'/%3E%3Cpath d='m3 6 1.5 1.5L8 4'/%3E%3Cpath d='m3 12 1.5 1.5L8 10'/%3E%3Cpath d='m3 18 1.5 1.5L8 16'/%3E%3C/svg%3E");
}

.nav-settings {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4h-7'/%3E%3Cpath d='M10 4H3'/%3E%3Cpath d='M21 12h-4'/%3E%3Cpath d='M13 12H3'/%3E%3Cpath d='M21 20h-7'/%3E%3Cpath d='M10 20H3'/%3E%3Ccircle cx='12' cy='4' r='2'/%3E%3Ccircle cx='15' cy='12' r='2'/%3E%3Ccircle cx='12' cy='20' r='2'/%3E%3C/svg%3E");
}

.nav-templates {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='m10 13-2 2 2 2'/%3E%3Cpath d='m14 17 2-2-2-2'/%3E%3C/svg%3E");
}

.nav-subnav {
  display: none;
  gap: 1px;
  margin: -1px 0 8px;
}

.nav-subnav.open {
  display: grid;
}

.nav-group-label {
  margin: 10px 0 4px;
  padding: 0 9px;
  color: #b8c6bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-subitem {
  position: relative;
  min-height: 26px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c9d4ce;
  padding: 4px 8px 4px 31px;
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
}

.nav-subitem:hover {
  color: #ffffff;
  background: var(--sidebar-hover);
}

.nav-subitem.active {
  color: #ffffff;
  font-weight: 700;
}

.nav-subitem.active::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--brand-fiesta);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  border-top-color: var(--sidebar-line);
}

.profile-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.sidebar-footer strong {
  font-size: 14px;
  line-height: 1.1;
}

.sidebar-footer span {
  color: #b8c6bd;
  font-size: 12px;
  margin-top: 2px;
}

.sidebar-footer span.error {
  color: var(--danger);
}

.logout-btn {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--sidebar-line);
  border-radius: 6px;
  background: transparent;
  color: #eff5f0;
  font-size: 12px;
}

.logout-btn:hover {
  background: var(--sidebar-hover);
}

body[data-user-role="readonly"] .workspace-actions .primary-btn,
body[data-user-role="readonly"] .workspace-actions .secondary-btn {
  opacity: 0.62;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 22px 24px 54px;
  background: var(--bg);
}

.workspace-header,
.tab-section {
  width: min(100%, 874px);
  margin-inline: auto;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  min-height: 96px;
  margin-bottom: 22px;
  padding: 22px 0 0;
}

.workspace-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workspace-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}

.workspace-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.tab-section {
  display: block;
}

.hidden {
  display: none !important;
}

body[data-active-tab="angebote"] .workspace-header,
body[data-active-tab="auftrag-detail"] .workspace-header,
body[data-active-tab="auftraege"] .workspace-header,
body[data-active-tab="auftragsbestaetigungen"] .workspace-header,
body[data-active-tab="rechnungen"] .workspace-header,
body[data-active-tab="wiederkehrend"] .workspace-header,
body[data-active-tab="mahnungen"] .workspace-header,
body[data-active-tab="ausgaben"] .workspace-header,
body[data-active-tab="ausgaben-wiederkehrend"] .workspace-header,
body[data-active-tab="anlagen"] .workspace-header,
body[data-active-tab="bank"] .workspace-header,
body[data-active-tab="kassenbuch"] .workspace-header,
body[data-active-tab="unvollstaendig"] .workspace-header,
body[data-active-tab="ustva"] .workspace-header,
body[data-active-tab="euer"] .workspace-header,
body[data-active-tab="steuerberater"] .workspace-header,
body[data-active-tab="susa"] .workspace-header,
body[data-active-tab="bwa"] .workspace-header,
body[data-active-tab="kontakte"] .workspace-header,
body[data-active-tab="schueler"] .workspace-header,
body[data-active-tab="inventar"] .workspace-header,
body[data-active-tab="einstellungen-benutzer"] .workspace-header,
body[data-active-tab="einstellungen-buchhaltung"] .workspace-header,
body[data-active-tab="einstellungen-unternehmen"] .workspace-header,
body[data-active-tab="rechnung-erstellen"] .workspace-header,
body[data-active-tab="angebot-erstellen"] .workspace-header,
body[data-active-tab="einstellungen"] .workspace-header {
  display: none;
}

body[data-active-tab="angebote"] .main-content,
body[data-active-tab="auftrag-detail"] .main-content,
body[data-active-tab="auftraege"] .main-content,
body[data-active-tab="auftragsbestaetigungen"] .main-content,
body[data-active-tab="rechnungen"] .main-content,
body[data-active-tab="wiederkehrend"] .main-content,
body[data-active-tab="mahnungen"] .main-content,
body[data-active-tab="ausgaben"] .main-content,
body[data-active-tab="ausgaben-wiederkehrend"] .main-content,
body[data-active-tab="anlagen"] .main-content,
body[data-active-tab="bank"] .main-content,
body[data-active-tab="kassenbuch"] .main-content,
body[data-active-tab="unvollstaendig"] .main-content,
body[data-active-tab="ustva"] .main-content,
body[data-active-tab="euer"] .main-content,
body[data-active-tab="steuerberater"] .main-content,
body[data-active-tab="susa"] .main-content,
body[data-active-tab="bwa"] .main-content,
body[data-active-tab="kontakte"] .main-content,
body[data-active-tab="schueler"] .main-content,
body[data-active-tab="inventar"] .main-content,
body[data-active-tab="einstellungen-benutzer"] .main-content,
body[data-active-tab="einstellungen-buchhaltung"] .main-content,
body[data-active-tab="einstellungen-unternehmen"] .main-content,
body[data-active-tab="einstellungen"] .main-content {
  padding-top: 0;
}

body[data-active-tab="rechnung-erstellen"] .main-content,
body[data-active-tab="angebot-erstellen"] .main-content {
  padding: 12px 14px 28px;
  background: var(--bg);
}

body[data-active-tab="rechnungen"] .main-content,
body[data-active-tab="auftrag-detail"] .main-content,
body[data-active-tab="auftraege"] .main-content,
body[data-active-tab="wiederkehrend"] .main-content,
body[data-active-tab="mahnungen"] .main-content,
body[data-active-tab="ausgaben"] .main-content,
body[data-active-tab="ausgaben-wiederkehrend"] .main-content,
body[data-active-tab="anlagen"] .main-content,
body[data-active-tab="bank"] .main-content,
body[data-active-tab="kassenbuch"] .main-content,
body[data-active-tab="unvollstaendig"] .main-content,
body[data-active-tab="ustva"] .main-content,
body[data-active-tab="euer"] .main-content,
body[data-active-tab="steuerberater"] .main-content,
body[data-active-tab="susa"] .main-content,
body[data-active-tab="bwa"] .main-content,
body[data-active-tab="kontakte"] .main-content,
body[data-active-tab="schueler"] .main-content,
body[data-active-tab="inventar"] .main-content,
body[data-active-tab="einstellungen-benutzer"] .main-content,
body[data-active-tab="einstellungen-buchhaltung"] .main-content,
body[data-active-tab="einstellungen-unternehmen"] .main-content,
body[data-active-tab="einstellungen"] .main-content {
  padding: 0;
}

body[data-active-tab="rechnung-erstellen"] .tab-section,
body[data-active-tab="angebot-erstellen"] .tab-section,
body[data-active-tab="auftrag-detail"] .tab-section,
body[data-active-tab="auftraege"] .tab-section {
  width: 100%;
  max-width: none;
}

.ledger-section {
  width: 100%;
  margin-inline: 0;
}

.ledger-page {
  min-height: calc(100vh - 30px);
  padding: 22px 28px 40px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

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

.ledger-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.ledger-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.ledger-search {
  width: min(280px, 28vw);
  min-width: 190px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  outline: none;
}

.ledger-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 111, 99, 0.12);
}

.slim-btn {
  min-height: 26px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  box-shadow: none;
}

.split-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-dark);
}

.split-btn:hover {
  background: var(--primary);
}

.ledger-tabs {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.ledger-tabs button {
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.ledger-tabs button.active {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.ledger-toolbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.ledger-toolbar > div {
  display: flex;
  gap: 4px;
}

.tool-btn {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.tool-btn::before {
  display: inline-block;
  margin-right: 4px;
  color: var(--primary-dark);
}

.tool-btn:first-child::before {
  content: "▾";
}

.tool-btn:last-child::before {
  content: "↧";
}

.ledger-table-wrap {
  min-height: calc(100vh - 150px);
  border-right: 1px solid var(--line-soft);
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ledger-table th,
.ledger-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 11px;
}

.ledger-table th {
  height: 26px;
  background: #fbfcfb;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
}

.ledger-table td {
  height: 37px;
  color: var(--muted);
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 58px;
}

.ledger-table th:nth-child(2),
.ledger-table td:nth-child(2) {
  width: 112px;
}

.ledger-table th:nth-child(3),
.ledger-table td:nth-child(3) {
  width: 72px;
}

.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4) {
  width: 112px;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5) {
  width: auto;
}

.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7),
.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  width: 116px;
  text-align: right;
}

.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6) {
  width: 96px;
}

.ledger-table th:nth-child(3),
.ledger-table td:nth-child(3),
.ledger-table th:nth-child(4),
.ledger-table td:nth-child(4),
.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6),
.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7),
.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8) {
  white-space: nowrap;
}

.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1) {
  width: 54px;
  white-space: nowrap;
}

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) {
  width: 120px;
}

.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3) {
  width: 140px;
  white-space: nowrap;
}

.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) {
  width: 132px;
  white-space: nowrap;
}

.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) {
  width: 240px;
  white-space: normal;
}

.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6) {
  width: 360px;
  white-space: normal;
}

.invoice-table th:nth-child(7),
.invoice-table td:nth-child(7) {
  width: 150px;
  text-align: left;
  white-space: nowrap;
}

.invoice-table th:nth-child(8),
.invoice-table td:nth-child(8) {
  width: 124px;
  text-align: right;
  white-space: nowrap;
}

.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4),
.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6) {
  overflow-wrap: anywhere;
}

.ledger-table strong {
  display: block;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.ledger-table td span:not(.status-chip) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.status-select {
  max-width: 92px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 10px,
    calc(100% - 8px) 10px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 20px;
}

.status-select:focus {
  box-shadow: 0 0 0 2px rgba(37, 111, 99, 0.16);
}

.status-draft {
  background-color: #fff4d6;
  color: #8a5a00;
}

.status-open {
  background-color: #ffe3df;
  color: #c23024;
}

.status-sent {
  background-color: #e1efff;
  color: #1e5aa8;
}

.status-paid {
  background-color: #e8f7f1;
  color: #13845f;
}

.status-cancelled {
  background-color: #efedf7;
  color: #62578f;
}

.readonly-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.readonly-status-line small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
}

.filter-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.filter-grid select {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 6px 8px;
}

.gig-filters {
  align-items: stretch;
}

.gig-table th,
.gig-table td {
  vertical-align: top;
}

.gig-table {
  min-width: 1180px;
}

.gig-table th:nth-child(1),
.gig-table td:nth-child(1) {
  width: 72px;
}

.gig-table th:nth-child(2),
.gig-table td:nth-child(2) {
  width: 132px;
  text-align: left;
}

.gig-table th:nth-child(3),
.gig-table td:nth-child(3) {
  width: 104px;
}

.gig-table th:nth-child(4),
.gig-table td:nth-child(4) {
  width: 220px;
}

.gig-table th:nth-child(5),
.gig-table td:nth-child(5) {
  width: 280px;
  text-align: left;
}

.gig-table th:nth-child(6),
.gig-table td:nth-child(6) {
  width: 220px;
  text-align: left;
  white-space: normal;
}

.gig-table th:nth-child(7),
.gig-table td:nth-child(7) {
  width: 280px;
  text-align: left;
}

.gig-table th:nth-child(8),
.gig-table td:nth-child(8) {
  width: 180px;
  text-align: left;
}

.gig-table th:nth-child(9),
.gig-table td:nth-child(9) {
  width: 64px;
  text-align: right;
}

.gig-table th:nth-child(4),
.gig-table td:nth-child(4),
.gig-table th:nth-child(5),
.gig-table td:nth-child(5),
.gig-table th:nth-child(6),
.gig-table td:nth-child(6),
.gig-table th:nth-child(7),
.gig-table td:nth-child(7),
.gig-table th:nth-child(9),
.gig-table td:nth-child(9) {
  white-space: normal;
}

.gig-table td {
  line-height: 1.32;
}

.gig-number-cell {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.gig-table strong,
.gig-table td span:not(.status-chip),
.gig-table td:nth-child(5),
.gig-table td:nth-child(6),
.gig-table td:nth-child(7),
.gig-table td:nth-child(8) {
  overflow-wrap: anywhere;
}

.gig-table .status-chip {
  white-space: nowrap;
}

.gig-table .status-select {
  max-width: 118px;
}

.invoice-table,
.gig-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
}

.invoice-table th,
.invoice-table td,
.gig-table th,
.gig-table td {
  max-width: none;
}

.invoice-table th,
.invoice-table td {
  text-align: left;
}

.invoice-table .row-actions,
.gig-table .row-actions {
  width: 44px !important;
  text-align: left !important;
}

.invoice-table strong,
.invoice-table td span:not(.status-chip),
.gig-table strong,
.gig-table td span:not(.status-chip) {
  display: inline;
  margin-top: 0;
}

.invoice-table td span:not(.status-chip)::before,
.gig-table td span:not(.status-chip)::before {
  content: " ";
}

.gig-table th:nth-child(7),
.gig-table td:nth-child(7) {
  width: 118px !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.gig-table th:nth-child(8),
.gig-table td:nth-child(8) {
  width: 320px !important;
  text-align: left !important;
  white-space: normal !important;
}

.gig-table th:nth-child(9),
.gig-table td:nth-child(9) {
  width: 220px !important;
  text-align: left !important;
  white-space: normal !important;
}

.gig-invoice-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.gig-link-stack {
  display: grid;
  gap: 6px;
}

.gig-link-state {
  color: var(--text);
  font-weight: 700;
}

.gig-invoice-cell .secondary-btn {
  margin-top: 0;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  justify-content: center;
}

.gig-open-btn {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.ledger-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ledger-export-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.ledger-export-group select {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 6px 8px;
}

.gig-setlist-panel {
  display: grid;
  gap: 10px;
}

.setlist-file-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.setlist-file-card strong,
.setlist-file-card span {
  display: block;
}

.setlist-file-card strong {
  color: var(--text);
  margin-bottom: 4px;
}

.setlist-file-card span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.setlist-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

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

.setlist-preview-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.setlist-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
}

.setlist-preview-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.setlist-pdf-preview,
.setlist-pdf-placeholder {
  min-height: 560px;
  height: min(78vh, 760px);
}

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

.gig-musician-list {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gig-musician-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(120px, 1fr) minmax(110px, 0.9fr) 90px auto auto 130px minmax(110px, 1fr) auto;
  min-width: 1120px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.gig-musician-row input,
.gig-musician-row select {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 6px 8px;
}

.gig-musician-row label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.contract-page {
  display: grid;
  gap: 18px;
}

.contract-table-wrap {
  max-height: 320px;
}

.contract-table {
  min-width: 1160px;
}

.contract-table th,
.contract-table td {
  vertical-align: top;
}

.contract-table th:nth-child(1),
.contract-table td:nth-child(1) {
  width: 120px;
  white-space: nowrap;
}

.contract-table th:nth-child(2),
.contract-table td:nth-child(2) {
  width: 140px;
  white-space: nowrap;
}

.contract-table th:nth-child(3),
.contract-table td:nth-child(3) {
  width: 132px;
  white-space: nowrap;
}

.contract-table th:nth-child(4),
.contract-table td:nth-child(4) {
  width: 20%;
  overflow-wrap: anywhere;
}

.contract-table th:nth-child(5),
.contract-table td:nth-child(5) {
  width: 24%;
  overflow-wrap: anywhere;
}

.contract-table th:nth-child(6),
.contract-table td:nth-child(6) {
  width: 120px;
  text-align: right;
  white-space: nowrap;
}

.contract-table th:nth-child(7),
.contract-table td:nth-child(7) {
  width: 110px;
  white-space: nowrap;
}

.contract-table th:nth-child(8),
.contract-table td:nth-child(8) {
  width: 72px;
  white-space: nowrap;
}

.contract-table td span:not(.status-chip) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.contract-musician-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.contract-musician-row {
  grid-template-columns: minmax(170px, 1.1fr) minmax(180px, 1fr) minmax(170px, 1fr) auto;
  min-width: 760px;
}

.inline-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.inline-details summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 13px;
}

.inline-details[open] summary {
  margin-bottom: 10px;
}

.inline-details.is-disabled {
  opacity: 0.64;
}

.inline-details.is-disabled summary {
  cursor: default;
}

.gig-recurring-details {
  margin: 12px 0;
}

.gig-recurring-details .form-grid {
  margin-top: 8px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

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

.row-actions-left {
  text-align: center !important;
  padding-left: 8px !important;
  padding-right: 6px !important;
}

.row-actions button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.row-actions button:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.row-actions .invoice-edit-action {
  width: 40px;
  height: 34px;
  font-size: 17px;
}

.row-actions .danger-action {
  color: var(--danger);
}

.row-actions .danger-action:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.ledger-empty-line {
  min-height: calc(100vh - 122px);
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.recurring-page .ledger-header {
  margin-bottom: 18px;
}

.recurring-page .section-text {
  margin: 5px 0 0;
}

.recurring-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 14px;
}

.recurring-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--surface);
}

.recurring-panel h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15px;
}

.recurring-item {
  align-items: stretch;
}

.recurring-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.recurring-item-main strong,
.recurring-item-main span {
  overflow-wrap: anywhere;
}

.recurring-actions {
  width: 194px;
  flex: 0 0 194px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.recurring-actions label {
  font-size: 11px;
}

.recurring-actions input {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.contacts-section {
  width: 100%;
  margin-inline: 0;
}

.contacts-page {
  min-height: calc(100vh - 30px);
  padding: 22px 28px 40px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.contacts-header {
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.contacts-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.contacts-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.contacts-actions .primary-btn {
  background: var(--primary);
}

.contacts-actions .primary-btn:hover {
  background: var(--primary-dark);
}

.contacts-tabs {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.contacts-tabs button {
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.contacts-tabs button.active {
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.contacts-toolbar {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.contacts-toolbar > div {
  display: flex;
  gap: 4px;
}

.contacts-toolbar .tool-btn:first-child::before {
  content: "↧";
}

.contacts-toolbar .tool-btn:last-child::before {
  content: "▾";
}

.contacts-table-wrap {
  min-height: calc(100vh - 130px);
  overflow-x: auto;
}

.contacts-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.contacts-table th,
.contacts-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 11px;
}

.contacts-table th {
  height: 26px;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
}

.contacts-table td {
  height: 31px;
  color: var(--text);
}

.contacts-table th:nth-child(1),
.contacts-table td:nth-child(1) {
  width: 72px;
}

.contacts-table th:nth-child(2),
.contacts-table td:nth-child(2) {
  width: 92px;
  white-space: nowrap;
}

.contacts-table th:nth-child(3),
.contacts-table td:nth-child(3) {
  width: 32%;
  overflow-wrap: anywhere;
}

.contacts-table th:nth-child(4),
.contacts-table td:nth-child(4) {
  width: 26%;
  overflow-wrap: anywhere;
}

.contacts-table th:nth-child(5),
.contacts-table td:nth-child(5) {
  width: 24%;
  overflow-wrap: anywhere;
}

.contacts-table th:nth-child(6),
.contacts-table td:nth-child(6) {
  width: 84px;
  text-align: right;
  white-space: nowrap;
}

.contacts-table strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.contact-type-icon {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  background: var(--primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
}

.contacts-empty-cell {
  height: 80px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.inventory-section,
.settings-list-section,
.settings-section {
  width: 100%;
  margin-inline: 0;
}

.inventory-page {
  min-height: calc(100vh - 30px);
  padding: 22px 28px 40px;
  background: var(--bg);
}

.inventory-header {
  min-height: 32px;
  display: flex;
  align-items: flex-start;
}

.inventory-header h2,
.settings-page-title {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.inventory-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.inventory-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
}

.inventory-card h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15px;
}

.settings-table-wrap {
  min-height: calc(100vh - 82px);
  overflow-x: auto;
}

.settings-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  table-layout: fixed;
}

.settings-table th,
.settings-table td {
  height: 31px;
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
  color: var(--text);
  font-size: 11px;
}

.settings-table th {
  height: 30px;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
}

.settings-table strong {
  color: var(--text);
  font-weight: 500;
}

.settings-users-table th:nth-child(1),
.settings-users-table td:nth-child(1) {
  width: 30%;
  overflow-wrap: anywhere;
}

.settings-users-table th:nth-child(2),
.settings-users-table td:nth-child(2) {
  width: 34%;
  overflow-wrap: anywhere;
}

.settings-users-table th:nth-child(3),
.settings-users-table td:nth-child(3) {
  width: 24%;
  overflow-wrap: anywhere;
}

.settings-users-table th:nth-child(4),
.settings-users-table td:nth-child(4) {
  width: 96px;
  white-space: nowrap;
}

.settings-accounting-tabs {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}

.settings-accounting-tabs button {
  min-height: 22px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 3px 0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.settings-accounting-tabs button.active {
  color: var(--primary-dark);
}

.settings-accounting-table th:nth-child(1),
.settings-accounting-table td:nth-child(1) {
  width: 24%;
  overflow-wrap: anywhere;
}

.settings-accounting-table th:nth-child(2),
.settings-accounting-table td:nth-child(2) {
  width: 20%;
  overflow-wrap: anywhere;
}

.settings-accounting-table th:nth-child(3),
.settings-accounting-table td:nth-child(3),
.settings-accounting-table th:nth-child(4),
.settings-accounting-table td:nth-child(4) {
  width: 21%;
  white-space: nowrap;
}

.settings-accounting-table th:nth-child(5),
.settings-accounting-table td:nth-child(5) {
  width: 96px;
  white-space: nowrap;
}

.settings-row-actions {
  text-align: right !important;
}

.settings-row-actions button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.settings-page {
  min-height: calc(100vh - 30px);
  padding: 22px 28px 42px;
  background: var(--bg);
}

.settings-layout {
  display: grid;
  grid-template-columns: 190px 360px;
  align-items: start;
  justify-content: center;
  gap: 35px;
  padding-top: 15px;
}

.settings-side-menu {
  display: grid;
  width: 190px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(22, 32, 29, 0.08);
}

.settings-side-menu button {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 8px 9px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.settings-side-menu button + button {
  border-top: 1px solid var(--line-soft);
}

.settings-side-menu button.active {
  border-left-color: var(--primary);
  background: var(--surface-soft);
  font-weight: 800;
}

.settings-side-menu span {
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.settings-form {
  width: 360px;
}

.settings-form h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.settings-form h2 span {
  color: var(--muted);
  font-size: 11px;
}

.settings-block {
  margin-bottom: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.settings-backup-block h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.settings-backup-block p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.settings-backup-actions {
  display: flex;
  margin-top: 10px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 6px;
}

.settings-form label {
  display: grid;
  gap: 3px;
  color: #34413b;
  font-size: 10.5px;
  font-weight: 700;
}

.settings-form input,
.settings-form select {
  width: 100%;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 3px 7px;
  font-size: 11px;
  outline: none;
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 111, 99, 0.14);
}

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

.settings-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.settings-save-row span {
  color: #2da981;
  font-size: 11px;
  font-weight: 700;
}

.bank-section {
  width: 100%;
  margin-inline: 0;
}

.bank-page {
  min-height: calc(100vh - 30px);
  padding: 22px 28px 40px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.bank-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.bank-page-header h2 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.bank-page-header span {
  color: var(--text);
  font-size: 12px;
}

.bank-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.primary-btn:disabled:hover,
.secondary-btn:disabled:hover,
.danger-btn:disabled:hover {
  transform: none;
}

.bank-empty-state {
  min-height: calc(100vh - 145px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(135deg, rgba(238, 243, 239, 0.86), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 29px, rgba(37, 111, 99, 0.05) 30px);
  padding: 36px 18px;
  text-align: center;
}

.bank-empty-state > span {
  width: 42px;
  height: 28px;
  border: 2px solid var(--primary-dark);
  border-radius: 5px;
  position: relative;
}

.bank-empty-state > span::before,
.bank-empty-state > span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--primary-dark);
}

.bank-empty-state > span::before {
  top: 9px;
}

.bank-empty-state > span::after {
  bottom: 8px;
}

.bank-empty-state h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.bank-empty-state p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.bank-account-tabs {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-bottom: 0;
  padding: 7px 10px 0;
}

.bank-account-tabs button {
  min-height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.bank-account-tabs button.active {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.bank-table-toolbar {
  min-height: 33px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-inline: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 0 10px;
}

.bank-table-toolbar > div {
  display: flex;
  gap: 4px;
}

.bank-table-toolbar .tool-btn:first-child::before {
  content: "↧";
}

.bank-table-toolbar .tool-btn:last-child::before {
  content: "▾";
}

.bank-table-wrap {
  min-height: calc(100vh - 165px);
  border-inline: 1px solid var(--line-soft);
  overflow-x: auto;
}

.bank-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  table-layout: fixed;
}

.bank-table th,
.bank-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 6px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 10.5px;
}

.bank-table th {
  height: 27px;
  background: #fbfcfb;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
}

.bank-table td {
  height: 35px;
  color: var(--muted);
}

.bank-table th:nth-child(1),
.bank-table td:nth-child(1) {
  width: 108px;
  white-space: nowrap;
}

.bank-table th:nth-child(2),
.bank-table td:nth-child(2) {
  width: 34%;
  overflow-wrap: anywhere;
}

.bank-table th:nth-child(3),
.bank-table td:nth-child(3) {
  width: 120px;
  white-space: nowrap;
}

.bank-table th:nth-child(4),
.bank-table td:nth-child(4),
.bank-table th:nth-child(5),
.bank-table td:nth-child(5) {
  width: 112px;
  white-space: nowrap;
}

.bank-table th:nth-child(6),
.bank-table td:nth-child(6) {
  width: 88px;
  white-space: nowrap;
}

.bank-table th:nth-child(7),
.bank-table td:nth-child(7) {
  width: 56px;
  white-space: nowrap;
}

.bank-table strong {
  display: block;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
}

.bank-table td span:not(.bank-status) {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-status {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff4c6;
  color: #997211;
  font-size: 9.5px;
  font-weight: 700;
}

.amount-negative {
  color: #c22e3a !important;
  font-weight: 700;
}

.amount-positive {
  color: #16876a !important;
  font-weight: 700;
}

.bank-link-cell {
  white-space: nowrap;
}

.bank-link-cell button {
  width: 17px;
  height: 17px;
  margin-right: 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 11px;
}

.bank-pagination {
  position: relative;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-inline: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
}

.bank-pagination strong {
  font-weight: 600;
}

.bank-pagination button {
  position: absolute;
  right: 28px;
  min-height: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
}

.tax-section {
  width: 100%;
  margin-inline: 0;
}

.tax-page {
  min-height: calc(100vh - 30px);
  display: grid;
  place-items: start center;
  padding: 134px 22px 70px;
  background: var(--bg);
}

.tax-onboarding {
  width: min(100%, 610px);
  display: grid;
  grid-template-columns: minmax(0, 310px) 252px;
  align-items: center;
  gap: 48px;
}

.tax-copy h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.34;
}

.tax-benefits {
  display: grid;
  gap: 10px;
  margin: 0 0 17px;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.35;
}

.tax-benefits li {
  position: relative;
  padding-left: 16px;
}

.tax-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 7px;
  line-height: 1;
}

.tax-copy p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11.5px;
}

.tax-actions {
  display: flex;
  gap: 5px;
}

.tax-actions .compact-primary {
  margin-top: 0;
}

.tax-visual {
  width: 252px;
  text-align: center;
}

.tax-card {
  min-height: 118px;
  padding: 17px 17px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #184f48 0%, #256f63 62%, #f08b43 100%);
  color: #ffffff;
  box-shadow: 0 16px 38px rgba(22, 32, 29, 0.16);
}

.tax-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  margin-bottom: 13px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--primary-dark);
}

.tax-card-head strong {
  color: var(--primary);
  font-size: 8px;
  font-weight: 800;
}

.tax-card-head span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.tax-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  min-height: 21px;
  align-items: center;
  padding: 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.33);
  color: rgba(255, 255, 255, 0.86);
  font-size: 7px;
  text-align: left;
}

.tax-row strong {
  color: #ffffff;
  font-size: 7px;
}

.tax-visual a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.tax-empty {
  width: min(100%, 460px);
  text-align: center;
  color: var(--muted);
}

.tax-empty h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.tax-empty p {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.5;
}

.report-section {
  width: 100%;
  margin-inline: 0;
}

.report-page {
  min-height: calc(100vh - 30px);
  display: grid;
  place-items: start center;
  padding: 128px 22px 70px;
  background: var(--bg);
}

.report-onboarding {
  width: min(100%, 620px);
  display: grid;
  grid-template-columns: minmax(0, 315px) 252px;
  align-items: center;
  gap: 48px;
}

.report-copy h2 {
  margin: 5px 0 18px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.34;
}

.report-copy p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11.5px;
}

.report-beta {
  display: inline-flex;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.report-card .tax-row:first-of-type strong {
  color: #ffffff;
}

.voucher-section {
  width: 100%;
  margin-inline: 0;
}

.voucher-page {
  min-height: calc(100vh - 30px);
  display: grid;
  place-items: start center;
  padding: 142px 22px 70px;
  background: var(--bg);
}

.voucher-onboarding {
  width: min(100%, 610px);
  display: grid;
  grid-template-columns: minmax(0, 330px) 222px;
  align-items: center;
  gap: 38px;
}

.voucher-copy h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.voucher-benefits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.35;
}

.voucher-benefits li {
  display: grid;
  grid-template-columns: 13px 1fr;
  align-items: center;
  gap: 7px;
}

.voucher-benefits strong {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
  vertical-align: middle;
}

.benefit-icon {
  position: relative;
  width: 12px;
  height: 12px;
  color: var(--primary);
}

.benefit-icon::before,
.benefit-icon::after {
  content: "";
  position: absolute;
}

.mail-icon::before {
  inset: 2px 1px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
}

.mail-icon::after {
  left: 4px;
  top: 4px;
  width: 4px;
  height: 3px;
  border-left: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor;
  transform: rotate(-45deg);
}

.scan-icon::before {
  inset: 1px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
}

.scan-icon::after {
  left: 4px;
  top: 4px;
  width: 4px;
  height: 4px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
}

.upload-small-icon::before {
  inset: 2px 1px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
}

.upload-small-icon::after {
  left: 5px;
  top: 2px;
  width: 3px;
  height: 6px;
  border-left: 1.2px solid currentColor;
  border-top: 1.2px solid currentColor;
  transform: rotate(45deg);
}

.tax-small-icon::before {
  inset: 1px;
  border: 1.2px solid currentColor;
  border-radius: 50%;
}

.tax-small-icon::after {
  left: 3px;
  top: 5px;
  width: 6px;
  height: 1.2px;
  background: currentColor;
  box-shadow: 0 3px 0 currentColor;
}

.voucher-actions {
  display: flex;
  gap: 5px;
  margin-top: 19px;
}

.voucher-actions .compact-primary {
  margin-top: 0;
}

.voucher-visual {
  position: relative;
  width: 222px;
  height: 139px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #184f48 0%, #256f63 58%, #f08b43 100%);
}

.voucher-paper {
  position: absolute;
  width: 63px;
  min-height: 72px;
  padding: 9px 8px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 6px 12px rgba(25, 20, 53, 0.12);
}

.voucher-paper span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.voucher-paper i {
  display: block;
  height: 2px;
  margin-bottom: 5px;
  border-radius: 2px;
  background: var(--line-soft);
}

.voucher-paper i:nth-child(3) {
  width: 72%;
}

.voucher-paper i:nth-child(4) {
  width: 86%;
}

.voucher-paper-back {
  left: 51px;
  top: 23px;
  transform: rotate(2deg);
}

.voucher-paper-front {
  left: 32px;
  top: 72px;
  width: 75px;
  min-height: 61px;
}

.voucher-badge {
  position: absolute;
  display: flex;
  align-items: center;
  min-height: 29px;
  max-width: 105px;
  padding: 6px 8px 6px 29px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 15px rgba(22, 32, 29, 0.12);
  color: var(--muted);
  font-size: 7px;
  line-height: 1.25;
  font-weight: 700;
}

.voucher-badge::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface-soft);
  transform: translateY(-50%);
}

.voucher-badge::after {
  content: "✓";
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
  transform: translateY(-54%);
}

.top-badge {
  right: 9px;
  top: 17px;
}

.mid-badge {
  right: 7px;
  top: 57px;
}

.mid-badge::before {
  background: var(--red-pale);
}

.mid-badge::after {
  content: "✦";
  color: var(--accent);
}

.voucher-empty-line {
  width: min(100%, 460px);
  text-align: center;
  color: var(--muted);
}

.voucher-empty-line h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
}

.voucher-empty-line p {
  margin: 0 0 16px;
  font-size: 12px;
}

.orders-empty-section {
  min-height: calc(100vh - 30px);
  display: grid;
  place-items: center;
  padding: 0 24px 130px;
  background: var(--bg);
}

.orders-empty {
  width: min(100%, 760px);
  padding: 36px 32px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(22, 32, 29, 0.08);
  text-align: center;
  color: var(--text);
}

.orders-empty h2 {
  margin: 0 0 11px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.orders-checks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  font-size: 10.8px;
  line-height: 1.35;
}

.orders-checks span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.orders-checks span::before {
  content: "✓";
  color: #2ea371;
  font-size: 10px;
  line-height: 1;
}

.compact-primary {
  min-height: 26px;
  margin-top: 23px;
  padding: 6px 13px;
  border-radius: 4px;
  background: var(--primary-dark);
  box-shadow: none;
  font-size: 11px;
}

.compact-primary:hover {
  background: var(--primary);
}

.orders-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.orders-help button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-size: inherit;
  cursor: pointer;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 8px;
}

.quick-action {
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.quick-action:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.quick-action strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.2;
}

.dashboard-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.dashboard-nav-card {
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 31, 28, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.dashboard-nav-card:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 34px rgba(37, 111, 99, 0.12);
  transform: translateY(-1px);
}

.dashboard-nav-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.2;
}

.dashboard-nav-card span {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.dashboard-menu-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.dashboard-menu-card[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.dashboard-menu-card summary {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.dashboard-menu-card summary::-webkit-details-marker {
  display: none;
}

.dashboard-menu-card summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.2;
}

.dashboard-menu-card summary i {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  color: var(--muted-light);
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.dashboard-menu-card[open] summary i {
  transform: rotate(225deg);
}

.dashboard-menu-actions {
  display: grid;
  gap: 1px;
  padding: 0 8px 8px;
}

.dashboard-menu-actions button {
  min-height: 32px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.dashboard-menu-actions button:hover {
  color: var(--primary-dark);
}

.quick-icon {
  position: relative;
  width: 13px;
  height: 13px;
  color: var(--primary-dark);
}

.quick-icon::before,
.quick-icon::after {
  content: "";
  position: absolute;
}

.invoice-icon::before,
.tax-icon::before {
  inset: 1px 2px;
  border: 1.4px solid currentColor;
  border-radius: 2px;
}

.invoice-icon::after,
.tax-icon::after {
  left: 4px;
  top: 5px;
  width: 5px;
  height: 1.3px;
  background: currentColor;
  box-shadow: 0 3px 0 currentColor;
}

.upload-icon::before {
  left: 2px;
  right: 2px;
  bottom: 1px;
  height: 6px;
  border: 1.4px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.upload-icon::after {
  left: 4px;
  top: 1px;
  width: 5px;
  height: 5px;
  border-left: 1.4px solid currentColor;
  border-top: 1.4px solid currentColor;
  transform: rotate(45deg);
}

.payment-icon::before {
  inset: 2px 1px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}

.payment-icon::after {
  left: 6px;
  top: 1px;
  width: 1.4px;
  height: 11px;
  background: currentColor;
}

.dashboard-card,
.card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.card {
  padding: 18px;
  margin-bottom: 12px;
}

.dashboard-card {
  padding: 18px;
  margin-bottom: 12px;
}

.dashboard-card h3,
.card h3,
.card h2 {
  margin-top: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.15;
}

.dashboard-card h3 {
  margin-bottom: 13px;
  font-size: 15px;
}

.card h2 {
  font-size: 20px;
}

.card h3 {
  font-size: 16px;
}

.card-header {
  margin-bottom: 15px;
}

.section-text {
  max-width: 720px;
  color: var(--muted);
  margin: 7px 0 17px;
  font-size: 13px;
  line-height: 1.5;
}

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

.metric-label,
.muted-metric span,
.bank-balance span {
  display: block;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 600;
}

.metric-value {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.metric-split {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.metric-split span,
.score-legend span,
.legend-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot-blue {
  background: #bfc0ea;
}

.dot-soft-blue {
  background: #e1e0f8;
}

.dot-red {
  background: #ffc8c3;
}

.dot-soft-red {
  background: #ffe6e4;
}

.dot-yellow {
  background: var(--yellow-soft);
}

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

.bar-chart {
  height: 121px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 38px;
  margin: 8px 6px 0;
  padding: 16px 28px 20px;
  background:
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent 27px,
      #edf2ee 28px
    );
}

.chart-group {
  position: relative;
  width: 112px;
  height: 88px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.bar {
  display: block;
  width: 48px;
  min-height: 10px;
  border-radius: 2px 2px 0 0;
}

.bar-blue {
  background: var(--blue-soft);
}

.bar-red {
  background: var(--red-soft);
}

.chart-group small {
  position: absolute;
  left: 50%;
  bottom: -17px;
  color: var(--muted-light);
  font-size: 9px;
  transform: translateX(-50%);
}

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

.dashboard-grid .dashboard-card {
  margin-bottom: 0;
}

.muted-metric {
  min-height: 54px;
  padding: 14px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
}

.muted-metric strong,
.bank-balance strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
}

.status-list {
  display: grid;
  gap: 1px;
  margin-top: 9px;
}

.status-list div {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  min-height: 30px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.status-list strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.pill {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 16px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.pill-red {
  background: var(--red-pale);
  color: #cf5a50;
}

.pill-yellow {
  background: #fff8dd;
  color: #a8811c;
}

.pill-blue {
  background: var(--blue-pale);
  color: var(--primary);
}

.limit-meter {
  padding: 13px 0 10px;
}

.progress-track {
  height: 31px;
  background: var(--blue-pale);
  border-radius: 8px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--blue-soft);
  transition: width 200ms ease;
}

.progress-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted-light);
  font-size: 11px;
  margin-top: 7px;
}

.band-stat-list {
  display: grid;
  gap: 0;
  min-height: 112px;
  margin-top: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}

.band-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 37px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
}

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

.band-stat-row span {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.band-stat-row strong {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-empty-note {
  display: grid;
  min-height: 112px;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.small-copy {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.bank-card {
  min-height: 212px;
}

.bank-balance {
  padding: 13px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
}

.bank-row {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.bank-row button,
.card-footer button,
.empty-mini button,
.receipt-row button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.empty-mini {
  min-height: 89px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.empty-mini strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.score-card {
  min-height: 212px;
}

.score-gauge {
  --score-angle: 0deg;
  width: 126px;
  height: 66px;
  display: grid;
  place-items: end center;
  margin: 6px auto 7px;
  padding-bottom: 1px;
  background:
    radial-gradient(circle at 50% 100%, var(--surface) 0 47px, transparent 48px),
    conic-gradient(from 270deg at 50% 100%, var(--surface-muted) 0 180deg, transparent 180deg 360deg);
  border-radius: 126px 126px 0 0;
  position: relative;
}

.score-gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 100%, transparent 0 47px, var(--surface) 48px),
    conic-gradient(from 270deg at 50% 100%, var(--primary) 0 var(--score-angle), transparent 0 360deg);
  border-radius: 126px 126px 0 0;
  opacity: 0.14;
}

.score-gauge span {
  position: relative;
  z-index: 1;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 700;
}

.score-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 13px;
}

.receipt-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 11px;
}

.receipt-row strong {
  color: var(--text);
}

.receipt-row button {
  min-height: 27px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--primary-dark);
  color: #ffffff;
}

.compact-card {
  min-height: 170px;
}

.donut-row {
  display: grid;
  grid-template-columns: 142px 1fr;
  align-items: center;
  gap: 14px;
}

.donut {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  justify-self: center;
  position: relative;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  background: var(--surface);
}

.donut-blue {
  background: conic-gradient(var(--blue-soft) 0 71%, var(--blue-pale) 71% 100%);
}

.donut-red {
  background: conic-gradient(var(--red-soft) 0 68%, var(--red-pale) 68% 100%);
}

.donut span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.legend-list {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.legend-list strong {
  font-weight: 600;
}

.card-footer {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px -14px -14px;
  padding: 8px 14px;
  border-top: 1px solid var(--line-soft);
  background: #fbfcfb;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-card .card-footer {
  margin: 14px -18px -18px;
  padding-inline: 18px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field + .field {
  margin-top: 0;
}

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

label {
  color: #34413b;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

textarea {
  resize: vertical;
  min-height: 118px;
  line-height: 1.45;
}

#offerTemplate,
#invoiceTemplate {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 111, 99, 0.12);
}

.actions {
  margin-top: 17px;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 111, 99, 0.18);
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--primary-dark);
}

.secondary-btn:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.danger-btn {
  background: var(--danger-bg);
  color: var(--danger);
}

.danger-btn:hover {
  background: #ffe0dc;
  transform: translateY(-1px);
}

.mail-template-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 27, 40, 0.42);
}

.mail-template-modal.hidden {
  display: none;
}

.mail-template-panel {
  width: min(560px, 100%);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(22, 32, 29, 0.24);
  padding: 20px;
}

.mail-template-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.mail-template-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.mail-template-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.mail-template-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.mail-template-options {
  display: grid;
  gap: 10px;
}

.mail-template-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.mail-preview-panel {
  width: min(760px, 100%);
}

.mail-preview-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbf9;
  font-size: 13px;
  line-height: 1.45;
}

.mail-preview-meta span {
  color: var(--text);
  overflow-wrap: anywhere;
}

.mail-preview-body-wrap {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.mail-preview-body-wrap textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--text);
}

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

.mail-template-option:hover,
.mail-template-option:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 111, 99, 0.12);
  outline: 0;
}

.mail-template-option strong,
.mail-template-option span {
  display: block;
}

.mail-template-option strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.mail-template-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.list-item strong {
  font-size: 14px;
}

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

.list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.students-page {
  min-height: 100vh;
  background: var(--bg);
  padding: 24px;
}

.students-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.students-header h2 {
  margin: 0 0 5px;
  font-size: 24px;
}

.students-header .section-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.students-summary {
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  text-align: right;
}

.students-summary strong,
.students-summary span {
  display: block;
}

.students-summary strong {
  color: var(--primary-dark);
  font-size: 20px;
}

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

.students-layout {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(420px, 1fr);
  gap: 14px;
  align-items: start;
}

.students-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
}

.students-card h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15px;
}

.students-card-wide {
  overflow: hidden;
}

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

.students-card-head h3 {
  margin-bottom: 0;
}

.students-card-head input {
  width: min(260px, 100%);
}

.students-table-wrap {
  overflow-x: auto;
}

.students-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.students-table th,
.students-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
}

.students-table th {
  color: #000000;
  font-size: 13px;
  font-weight: 800;
}

.students-table th:nth-child(1),
.students-table td:nth-child(1) {
  width: 24%;
  overflow-wrap: anywhere;
}

.students-table th:nth-child(2),
.students-table td:nth-child(2) {
  width: 18%;
  overflow-wrap: anywhere;
}

.students-table td:nth-child(3),
.students-table th:nth-child(3) {
  width: 14%;
  text-align: right;
  white-space: nowrap;
}

.students-table th:nth-child(4),
.students-table td:nth-child(4) {
  width: 22%;
  overflow-wrap: anywhere;
}

.students-table th:nth-child(5),
.students-table td:nth-child(5) {
  width: 16%;
  overflow-wrap: anywhere;
}

.students-table td:last-child {
  width: 96px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff8dd;
  color: #7a5f00;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

.empty-state {
  color: var(--muted);
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  font-size: 13px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

body[data-active-tab="rechnung-erstellen"] .editor-layout,
body[data-active-tab="angebot-erstellen"] .editor-layout {
  grid-template-columns: minmax(292px, 360px) minmax(720px, 1fr);
  min-height: calc(100vh - 70px);
}

body[data-active-tab="gig-erstellen"] .editor-layout {
  grid-template-columns: minmax(300px, 360px) minmax(920px, 1fr);
  min-height: calc(100vh - 70px);
}

body[data-active-tab="auftragsbestaetigungen"] .editor-layout {
  grid-template-columns: minmax(320px, 380px) minmax(980px, 1fr);
  min-height: calc(100vh - 70px);
}

.editor-sidebar,
.editor-preview {
  min-width: 0;
}

.editor-preview {
  display: grid;
  gap: 12px;
  align-content: start;
}

.pdf-preview-card {
  order: -1;
  padding: 12px;
}

body[data-active-tab="rechnung-erstellen"] .pdf-preview-card,
body[data-active-tab="angebot-erstellen"] .pdf-preview-card {
  min-height: calc(100vh - 96px);
}

body[data-active-tab="auftragsbestaetigungen"] .pdf-preview-card {
  min-height: 620px;
}

.document-preview-card,
.latex-preview-card {
  opacity: 0.96;
}

.sticky-card {
  position: sticky;
  top: 52px;
}

.invoice-editor-header {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.invoice-editor-header h2,
.invoice-editor-header p {
  margin: 0;
}

.info-box {
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.compact-info-box {
  min-height: 44px;
}

.compact-info-box strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.compact-info-box span {
  display: block;
  margin-top: 3px;
}

.invoice-duplicate-warning {
  min-height: 0;
  border-color: #d9a441;
  background: #fff8e1;
  color: #6c4f0f;
}

.invoice-duplicate-warning strong {
  display: block;
  color: #4f3907;
}

.invoice-duplicate-warning span {
  display: block;
  margin-top: 4px;
}

.invoice-duplicate-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.invoice-duplicate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(108, 79, 15, 0.18);
  padding-top: 8px;
}

.invoice-duplicate-row span {
  min-width: 180px;
  margin-top: 0;
}

.document-preview {
  min-height: 160px;
}

.print-preview {
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.print-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.print-doc-meta {
  min-width: 160px;
  text-align: right;
}

.print-recipient {
  margin: 20px 0;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.preview-table th,
.preview-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.preview-table th {
  background: var(--surface-soft);
  color: #34413b;
  font-size: 12px;
}

.print-summary {
  max-width: 330px;
  margin: 18px 0 0 auto;
  padding: 13px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.print-summary div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
}

.total-line {
  margin-top: 5px;
  padding-top: 9px !important;
  border-top: 1px solid var(--line);
}

.print-notes {
  margin-top: 20px;
  padding: 13px;
  border-left: 3px solid var(--primary);
  background: var(--surface-soft);
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.preview-card-header h3 {
  margin: 0;
}

.preview-card-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pdf-render-btn {
  white-space: nowrap;
}

.pdf-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.pdf-placeholder.pdf-error {
  max-height: 360px;
  overflow: auto;
  place-items: start;
  background: #fff8f7;
  border-color: #e0aaa3;
  color: #8a241f;
  text-align: left;
}

.latex-box {
  max-width: 100%;
  min-height: 142px;
  padding: 13px;
  border-radius: 8px;
  overflow-x: auto;
  background: #16201d;
  color: #eff5f0;
  white-space: pre-wrap;
  font-size: 12px;
}

.latex-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
  list-style-position: inside;
}

.latex-details .latex-box {
  margin-top: 12px;
}

.pdf-preview {
  width: 100%;
  min-height: 840px;
  height: clamp(840px, calc(200vh - 328px), 1640px);
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pdf-preview-object {
  display: block;
}

.pdf-canvas-preview {
  overflow: auto;
  padding: 20px;
  background: linear-gradient(180deg, #f6f7f7 0%, #eef1f0 100%);
}

.pdf-canvas-stack {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.pdf-canvas-page {
  width: min(100%, 960px);
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(16, 24, 20, 0.08);
}

.pdf-canvas-page canvas {
  display: block;
  width: 100%;
  height: auto;
}

.pdf-preview-fallback {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
}

.pdf-preview-fallback.hidden {
  display: none;
}

.pdf-error-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e0aaa3;
  border-radius: 8px;
  background: #fff8f7;
  color: #8a241f;
}

.pdf-error-details {
  margin: 8px 0 0;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body[data-active-tab="rechnung-erstellen"] .pdf-placeholder,
body[data-active-tab="angebot-erstellen"] .pdf-placeholder {
  min-height: 840px;
  height: clamp(840px, calc(200vh - 328px), 1640px);
}

.template-help {
  margin-top: 17px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
}

.template-help code {
  display: block;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1050px) {
  .sidebar {
    width: 230px;
  }

  .workspace-header,
  .tab-section {
    width: 100%;
  }

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

  .setlist-preview-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-tab="rechnung-erstellen"] .editor-layout,
  body[data-active-tab="angebot-erstellen"] .editor-layout {
    grid-template-columns: 1fr;
  }

  .sticky-card {
    position: static;
  }

}

@media (max-width: 780px) {
  .top-notice {
    position: static;
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-subnav {
    grid-column: 1 / -1;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    padding: 22px 14px 42px;
  }

  body[data-active-tab="rechnung-erstellen"] .main-content,
  body[data-active-tab="angebot-erstellen"] .main-content {
    padding: 14px;
  }

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

  .workspace-actions {
    justify-content: flex-start;
    padding-top: 0;
  }

  .quick-actions,
  .dashboard-nav-grid,
  .dashboard-menu,
  .dashboard-grid,
  .form-grid,
  .recurring-layout,
  .inventory-layout,
  .students-layout {
    grid-template-columns: 1fr;
  }

  .orders-empty-section {
    min-height: 460px;
    padding: 42px 0 80px;
  }

  .voucher-page {
    min-height: 520px;
    padding: 46px 14px 74px;
  }

  .voucher-onboarding {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
  }

  .voucher-copy {
    max-width: 360px;
  }

  .tax-page {
    min-height: 520px;
    padding: 46px 14px 74px;
  }

  .tax-onboarding {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
  }

  .tax-copy {
    max-width: 360px;
  }

  .report-page {
    min-height: 520px;
    padding: 46px 14px 74px;
  }

  .report-onboarding {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
  }

  .report-copy {
    max-width: 360px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
  }

  .settings-side-menu,
  .settings-form {
    width: min(100%, 420px);
  }

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

  .orders-checks,
  .orders-help {
    display: grid;
  }

  .donut-row {
    grid-template-columns: 1fr;
  }

  .list-item,
  .print-head {
    flex-direction: column;
  }

  .list-actions,
  .recurring-actions,
  .print-doc-meta {
    width: 100%;
    flex-basis: auto;
    justify-content: flex-start;
    text-align: left;
  }

  .preview-table {
    display: block;
    overflow-x: auto;
  }

  .pdf-preview,
  body[data-active-tab="rechnung-erstellen"] .pdf-placeholder,
  body[data-active-tab="angebot-erstellen"] .pdf-placeholder {
    min-height: 840px;
    height: 140vh;
  }
}

.orders-page,
.order-detail-page,
.order-report-page {
  padding-bottom: 48px;
}

.order-detail-header {
  margin-bottom: 8px;
}

.order-table-wrap {
  margin-bottom: 24px;
  min-height: 250px;
  overflow-x: auto;
}

.order-table {
  min-width: 980px;
  table-layout: fixed;
}

.order-table th,
.order-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  padding-inline: 8px;
}

.order-table th {
  white-space: nowrap;
}

.order-table th:nth-child(1),
.order-table td:nth-child(1) {
  width: 132px;
}

.order-table th:nth-child(2),
.order-table td:nth-child(2) {
  width: 220px;
  white-space: normal;
}

.order-table th:nth-child(3),
.order-table td:nth-child(3) {
  width: 86px;
}

.order-table-spacer {
  color: transparent;
  pointer-events: none;
}

.order-table th:nth-child(4),
.order-table td:nth-child(4) {
  width: 190px;
  white-space: normal;
}

.order-table th:nth-child(5),
.order-table td:nth-child(5) {
  width: 108px;
}

.order-table th:nth-child(6),
.order-table td:nth-child(6) {
  width: 94px;
}

.order-table th:nth-child(7),
.order-table td:nth-child(7) {
  width: 96px;
  text-align: left;
}

.order-table th:nth-child(8),
.order-table td:nth-child(8) {
  width: 82px;
  overflow: visible;
  text-overflow: clip;
  text-align: right;
}

.order-table .slim-btn {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.order-number-list {
  font-weight: 650;
  white-space: nowrap;
}

.order-number-tail {
  font-weight: 900;
}

.order-editor-layout {
  grid-template-columns: minmax(0, 1fr);
}

.order-editor {
  display: grid;
  gap: 14px;
}

.order-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
  align-items: stretch;
  margin: 18px 0;
}

.order-dashboard-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  min-width: 0;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 31, 28, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.order-dashboard-card:hover {
  border-color: var(--primary);
  box-shadow: 0 16px 34px rgba(37, 111, 99, 0.12);
  transform: translateY(-1px);
}

.order-dashboard-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.22;
}

.order-dashboard-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-dashboard-card span,
.order-dashboard-card small {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  line-height: 1.35;
}

.order-dashboard-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.order-dashboard-summary.is-stacked {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  font-weight: 700;
  line-height: 1.38;
}

.order-dashboard-facts {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--line-soft);
}

.order-dashboard-facts div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(76px, 96px) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.order-dashboard-facts dt,
.order-dashboard-facts dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.3;
}

.order-dashboard-facts dt {
  color: var(--muted-light);
  font-weight: 800;
}

.order-dashboard-facts dd {
  color: var(--text);
  font-weight: 650;
}

.order-dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.order-status-pill {
  max-width: 100%;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}

.order-block-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 31, 28, 0.48);
}

.order-block-modal.hidden {
  display: none;
}

.order-block-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1100px, calc(100vw - 36px));
  max-height: min(86vh, 900px);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

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

.order-block-dialog-header h3 {
  margin: 0;
  font-size: 22px;
}

.order-block-dialog-header .eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-block-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 22px;
}

.order-block-modal-body .order-block {
  display: none;
  margin: 0;
  border: 0;
  box-shadow: none;
}

.order-block-modal-body .order-block.is-active {
  display: block;
}

.order-block-modal-body .order-block summary {
  display: none;
}

.order-block-modal-body .order-block .form-grid {
  padding: 0;
}

.order-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.order-block summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 16px;
}

.order-block .form-grid {
  padding: 0 16px 16px;
}

.order-block-status-grid {
  align-items: start;
  row-gap: 16px;
}

.order-block-status-grid > .checkbox-line,
.order-block-status-grid > .field:first-of-type {
  grid-column: 1 / -1;
}

.order-block-status-grid > .checkbox-line {
  min-height: 0;
}

.order-subsection-title {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-lineup-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.order-lineup-toolbar .small-copy {
  margin: 0;
}

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

.order-intake-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.order-intake-review,
.order-intake-final {
  display: grid;
  gap: 10px;
}

.order-intake-review.hidden,
.order-intake-final.hidden {
  display: none;
}

.order-intake-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-intake-row.is-accepted {
  border-color: rgba(37, 111, 99, 0.34);
  background: rgba(37, 111, 99, 0.06);
}

.order-intake-row label {
  margin: 8px 0 0;
  font-weight: 800;
  color: var(--text);
}

.order-intake-row textarea {
  min-height: 42px;
  resize: vertical;
}

.order-intake-preview-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-intake-preview-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 8px;
}

.order-intake-preview-list dt,
.order-intake-preview-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.order-intake-preview-list dt {
  color: var(--muted);
  font-weight: 800;
}

.order-migration-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.order-migration-panel > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: var(--text);
}

.order-migration-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.order-migration-controls {
  align-items: end;
}

.order-migration-report {
  display: grid;
  gap: 12px;
}

.order-migration-report.is-ok {
  border-color: rgba(37, 111, 99, 0.34);
  background: rgba(37, 111, 99, 0.05);
}

.order-migration-report.is-blocked {
  border-color: rgba(150, 57, 57, 0.34);
  background: rgba(150, 57, 57, 0.05);
}

.order-migration-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.order-migration-summary div,
.order-migration-backup,
.order-migration-hashes {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-migration-summary span,
.order-migration-hashes span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-migration-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.order-migration-issues {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-migration-issues ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.order-migration-table {
  min-width: 860px;
}

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

.order-technical-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 0.4fr) auto;
}

.order-team-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-team-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.order-team-source {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-incoming-list {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.order-incoming-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1fr) 90px 120px 120px 110px 120px minmax(130px, 0.8fr) minmax(130px, 1fr) auto;
  min-width: 1360px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.order-incoming-party {
  display: grid;
  gap: 5px;
}

.order-incoming-source {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-incoming-row input[readonly] {
  background: #f8faf8;
  color: var(--muted);
}

.order-reference-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.order-invoice-link-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.order-invoice-link-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.order-linked-invoice-preview {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-linked-invoice-item {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-muted);
}

.order-linked-invoice-item div {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

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

.compact-empty {
  padding: 10px;
  font-size: 13px;
}

.order-invoice-link-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 31, 28, 0.48);
}

.order-invoice-link-modal.hidden {
  display: none;
}

.order-invoice-link-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(760px, calc(100vw - 36px));
  max-height: min(82vh, 760px);
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

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

.order-invoice-link-header h2,
.order-invoice-link-header p {
  margin: 0;
}

.order-invoice-link-header h2 {
  font-size: 20px;
}

.order-invoice-link-header .eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-invoice-link-header h2 + p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.order-invoice-link-list {
  max-height: none;
  min-height: 0;
  padding: 16px 20px;
}

.order-invoice-link-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

.order-reference-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-muted);
}

.order-reference-item span,
.order-reference-item em {
  display: block;
}

.order-reference-item em {
  color: var(--muted);
  font-style: normal;
  margin-top: 3px;
}

.order-inline-actions,
.order-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

@media (max-width: 900px) {
  .order-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .top-notice {
    justify-content: flex-start;
  }

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

  .workspace-actions .primary-btn,
  .workspace-actions .secondary-btn,
  .actions .primary-btn,
  .actions .secondary-btn,
  .actions .danger-btn {
    width: 100%;
  }

  .quick-actions,
  .dashboard-nav-grid,
  .dashboard-menu {
    grid-template-columns: 1fr;
  }

  .card-footer,
  .receipt-row,
  .dashboard-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .receipt-row {
    display: flex;
  }

  .bar-chart {
    gap: 14px;
    padding-inline: 10px;
  }

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

  .students-page {
    padding: 16px 14px 42px;
  }

  .students-header,
  .students-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .students-summary,
  .students-card-head input {
    width: 100%;
    text-align: left;
  }

  .form-grid-compact,
  .order-intake-row,
  .order-lineup-row,
  .order-incoming-row,
  .gig-musician-row {
    grid-template-columns: 1fr;
  }

  .order-incoming-row,
  .gig-musician-row {
    min-width: 0;
  }

}
