:root {
  --background: 210 28% 97%;
  --foreground: 222 42% 12%;
  --card: 0 0% 100%;
  --card-foreground: 222 42% 12%;
  --muted-surface: 215 30% 94%;
  --muted-foreground: 218 12% 44%;
  --border-token: 216 22% 86%;
  --brand-blue: 211 88% 48%;
  --brand-purple: 265 78% 58%;
  --brand-green: 151 64% 38%;
  --brand-orange: 28 92% 52%;
  --status-pending: 38 92% 50%;
  --status-approved: 151 64% 38%;
  --status-shipped: 211 88% 48%;
  --status-cancelled: 0 72% 51%;
  --status-neutral: 218 12% 44%;
  --license-active: 151 64% 38%;
  --license-warning: 38 92% 50%;
  --license-expired: 0 72% 51%;
  --bg: hsl(var(--background));
  --surface: hsl(var(--card));
  --surface-muted: hsl(var(--muted-surface));
  --border: hsl(var(--border-token));
  --text: hsl(var(--foreground));
  --muted: hsl(var(--muted-foreground));
  --primary: hsl(var(--brand-blue));
  --primary-dark: hsl(215 88% 37%);
  --accent: hsl(var(--brand-orange));
  --danger: hsl(var(--status-cancelled));
  --danger-soft: hsl(var(--status-cancelled) / 0.10);
  --success: hsl(var(--brand-green));
  --success-soft: hsl(var(--brand-green) / 0.11);
  --warning-soft: hsl(var(--status-pending) / 0.14);
  --shadow: 0 18px 40px hsl(222 42% 12% / 0.08);
  --shadow-soft: 0 10px 26px hsl(222 42% 12% / 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

html,
body {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

textarea {
  resize: vertical;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex: none;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  background: #14231f;
  color: #f8faf6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  padding: 4px 6px;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: #e0f2ef;
  color: var(--primary-dark);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #b7c7c0;
  font-size: 12px;
}

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

.nav a,
.sidebar-footer .button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: var(--radius);
  color: #dce7e1;
  padding: 10px 12px;
}

.nav a:hover,
.nav a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
}

.content {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  overflow: visible;
  padding: 28px 28px 72px;
  scrollbar-gutter: stable;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.topbar p,
.toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button {
  padding: 9px 14px;
}

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

.button-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button-secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.button-danger:hover {
  background: #8f1c13;
  color: #fff;
}

.button-ghost {
  background: transparent;
  color: inherit;
}

.button-full {
  width: 100%;
}

.icon-button {
  width: 36px;
  height: 36px;
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.icon-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-button.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 700;
}

.flash-success {
  background: var(--success-soft);
  color: var(--success);
}

.flash-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -6px 0 18px;
  border: 1px solid #f0d48a;
  border-radius: var(--radius);
  background: #fff8df;
  color: #6b4b04;
  padding: 12px 14px;
}

.impersonation-banner strong,
.impersonation-banner span {
  display: block;
}

.impersonation-banner span {
  color: #7d641f;
  font-size: 13px;
  font-weight: 700;
}

.impersonation-banner form {
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 110px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.stat-card > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--primary);
}

.stat-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  font-size: 25px;
  line-height: 1.2;
}

.forecast-heading {
  align-items: flex-end;
}

.forecast-heading p {
  margin: 4px 0 0;
}

.forecast-coverage {
  border: 1px solid #b9d7bc;
  border-radius: 999px;
  background: #eff8f0;
  color: #245c2c;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

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

.forecast-stat-card {
  align-items: flex-start;
  min-width: 0;
}

.forecast-stat-card strong {
  font-size: clamp(18px, 1.7vw, 23px);
  letter-spacing: -0.35px;
  white-space: nowrap;
}

.forecast-stat-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.forecast-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  align-items: start;
  gap: 16px;
  margin-bottom: 28px;
}

.forecast-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 14px;
}

.forecast-table-heading h3 {
  margin: 0;
  font-size: 16px;
}

.forecast-table-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.forecast-table-panel th,
.forecast-table-panel td {
  padding: 10px 12px;
}

.forecast-warning {
  display: block;
  margin-top: 3px;
  color: var(--danger);
  font-weight: 700;
}

.forecast-unpriced-heading {
  margin-top: 2px;
}

.forecast-warning-count {
  border-radius: 999px;
  background: #fff0ef;
  color: var(--danger);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.forecast-unpriced-panel {
  margin-bottom: 28px;
}

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

.permission-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 16px;
}

.permission-card input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
}

.permission-card strong,
.permission-card small {
  display: block;
}

.permission-card small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.customer-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.contact-management-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  align-items: start;
  margin-bottom: 24px;
}

.compact-form {
  display: grid;
  gap: 12px;
}

.compact-check-row {
  margin-top: 0;
}

.new-customer-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  margin-top: 16px;
  padding: 16px;
}

.new-customer-panel[hidden] {
  display: none;
}

.is-muted-row {
  opacity: 0.62;
}

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

@media (max-width: 720px) {
  .permission-grid,
  .customer-contact-grid,
  .contact-management-grid {
    grid-template-columns: 1fr;
  }
}

.toolbar,
.detail-header,
.form-actions,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.toolbar-actions form {
  margin: 0;
}

.toolbar {
  margin: 0 0 16px;
}

.secondary-toolbar {
  margin-top: 24px;
}

.toolbar h2,
.form-section h2,
.detail-box h3 {
  margin: 0;
  font-size: 18px;
}

.search-form {
  position: relative;
  width: min(520px, 100%);
}

.catalog-toolbar {
  align-items: stretch;
}

.catalog-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto auto;
  gap: 10px;
  width: min(980px, 100%);
}

.account-filters {
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  width: min(720px, 100%);
}

.admin-partner-toolbar {
  align-items: center;
}

.admin-partner-toolbar .account-filters {
  grid-template-columns: minmax(280px, 1fr) 190px auto auto;
  width: min(900px, 100%);
}

.admin-result-count {
  margin-left: auto;
  white-space: nowrap;
}

.lifecycle-filters {
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  width: min(760px, 100%);
}

.catalog-filters .search-form {
  width: 100%;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 12px;
  white-space: nowrap;
}

.filter-check input {
  width: 18px;
  height: 18px;
}

.filter-check span {
  margin: 0;
  color: var(--text);
}

.search-form.compact {
  width: min(280px, 100%);
}

.search-form svg {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-form input,
.search-form select {
  padding-left: 40px;
}

.table-panel,
.form-section,
.detail-box,
.login-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table-panel {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  background: #f9fbf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-weight: 900;
}

.sort-link:hover,
.sort-link.is-active {
  color: var(--primary);
}

.sort-indicator {
  min-width: 12px;
  color: var(--primary);
}

tbody tr:hover {
  background: #fbfcfa;
}

tfoot td {
  background: #fbfcfa;
  font-weight: 800;
}

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

code {
  display: inline-block;
  border-radius: 6px;
  background: var(--surface-muted);
  color: #31453d;
  padding: 3px 6px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.align-right {
  text-align: right;
}

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

td.row-actions {
  display: table-cell;
  text-align: right;
  white-space: nowrap;
}

td.row-actions > a,
td.row-actions > button,
td.row-actions > form {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 0 6px 6px;
}

.row-actions form {
  margin: 0;
}

.empty-cell,
.empty-state {
  color: var(--muted);
  text-align: center;
}

.muted-block {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.strong-link {
  color: var(--text);
  font-weight: 900;
}

.strong-link:hover {
  color: var(--primary);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.account-list-panel,
.appliance-list-panel,
.document-list-panel,
.order-list-panel,
.invoice-list-panel {
  overflow-x: auto;
}

.account-table,
.appliance-renewal-table,
.document-table,
.order-table,
.invoice-table {
  min-width: 900px;
  table-layout: fixed;
}

.overview-hint {
  margin: -6px 0 16px;
}

.renewal-overview-panel {
  max-height: calc(100vh - 230px);
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.renewal-overview-table {
  width: 100%;
  min-width: 0;
}

.order-table {
  min-width: 1780px;
}

.order-list-panel {
  max-width: 100%;
  max-height: calc(100vh - 320px);
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.order-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

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

.order-table th:nth-child(2) {
  width: 110px;
}

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

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

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

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

.order-table th:nth-child(7) {
  width: 135px;
}

.order-table th:nth-child(8) {
  width: 210px;
}

.order-table th:nth-child(9) {
  width: 135px;
}

.order-table th:nth-child(10) {
  width: 145px;
}

.order-table th:nth-child(11) {
  width: 145px;
}

.order-table th:nth-child(12),
.order-table th:nth-child(13) {
  width: 120px;
}

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

.order-table th,
.order-table td {
  overflow-wrap: normal;
}

.order-table td:nth-child(1) a,
.order-table td:nth-child(2),
.order-table td:nth-child(4),
.order-table td:nth-child(9),
.order-table td:nth-child(10),
.order-table td:nth-child(11),
.order-table td:nth-child(12),
.order-table td:nth-child(13),
.order-table td:nth-child(14) {
  white-space: nowrap;
}

.order-table td:nth-child(5),
.order-table td:nth-child(6),
.order-table td:nth-child(7),
.order-table td:nth-child(8) {
  line-height: 1.35;
}

.renewal-overview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.renewal-overview-table th:nth-child(1) {
  width: 260px;
}

.renewal-overview-table th:nth-child(2),
.renewal-overview-table th:nth-child(3) {
  width: 145px;
}

.renewal-overview-table th:nth-child(4) {
  width: 210px;
}

.renewal-overview-table th:nth-child(5) {
  width: 175px;
}

.renewal-overview-table th:nth-child(6) {
  width: 210px;
}

.renewal-overview-table th:nth-child(7) {
  width: 250px;
}

.renewal-overview-table th:nth-child(8) {
  width: 190px;
}

.auto-renew-cell {
  min-width: 190px;
}

.auto-renew-form,
.inline-pack-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.auto-renew-form select,
.inline-pack-form select {
  min-width: 86px;
  padding: 8px 9px;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.toggle-row span {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.account-table th:nth-child(1) {
  width: 28%;
}

.account-table th:nth-child(2) {
  width: 135px;
}

.account-table th:nth-child(3) {
  width: 145px;
}

.account-table th:nth-child(4) {
  width: 185px;
}

.account-table th:nth-child(6) {
  width: 170px;
}

.admin-scroll-panel {
  max-height: calc(100vh - 250px);
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.admin-scroll-panel th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-account-table {
  min-width: 1160px;
  table-layout: fixed;
}

.admin-account-table th:nth-child(1) {
  width: 220px;
}

.admin-account-table th:nth-child(2) {
  width: 145px;
}

.admin-account-table th:nth-child(3) {
  width: 160px;
}

.admin-account-table th:nth-child(4) {
  width: 185px;
}

.admin-account-table th:nth-child(5),
.admin-account-table th:nth-child(6),
.admin-account-table th:nth-child(7) {
  width: 190px;
}

.admin-account-table th:nth-child(8) {
  width: 150px;
}

.admin-recent-table {
  min-width: 1040px;
  table-layout: fixed;
}

.admin-recent-table th:nth-child(1) {
  width: 250px;
}

.admin-recent-table th:nth-child(2) {
  width: 145px;
}

.admin-recent-table th:nth-child(3),
.admin-recent-table th:nth-child(4),
.admin-recent-table th:nth-child(5) {
  width: 190px;
}

.admin-recent-table th:nth-child(6) {
  width: 150px;
}

.appliance-renewal-table th:nth-child(1) {
  width: 34%;
}

.appliance-renewal-table th:nth-child(2) {
  width: 170px;
}

.appliance-renewal-table th:nth-child(3) {
  width: 270px;
}

.appliance-renewal-table th:nth-child(5) {
  width: 120px;
}

.appliance-renewal-table.renewal-overview-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(1) {
  width: 16%;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(2) {
  width: 13%;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(3) {
  width: 14%;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(4) {
  width: 10%;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(5) {
  width: 13%;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(6) {
  width: 17%;
}

.appliance-renewal-table.renewal-overview-table th:nth-child(7) {
  width: 17%;
}

.renewal-overview-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.renewal-overview-table .muted-block {
  line-height: 1.35;
}

.renewal-overview-table .status {
  white-space: nowrap;
}

.renewal-overview-table .auto-renew-form {
  display: grid;
  grid-template-columns: minmax(54px, auto) minmax(78px, 1fr) 36px;
  gap: 6px;
  align-items: center;
}

.renewal-overview-table .auto-renew-form select,
.renewal-overview-table .inline-pack-form select {
  min-width: 0;
  width: 100%;
}

.renewal-overview-table .inline-pack-form {
  grid-template-columns: minmax(84px, 1fr) 58px 36px;
  max-width: none;
}

.renewal-overview-table td.row-actions {
  text-align: left;
  white-space: normal;
}

.renewal-overview-table td.row-actions > a,
.renewal-overview-table td.row-actions > button,
.renewal-overview-table td.row-actions > form {
  margin: 0 6px 6px 0;
}

.renewal-overview-table td.row-actions .button {
  white-space: nowrap;
}

.renewal-overview-table .row-actions .button {
  min-height: 38px;
  padding: 8px 12px;
}

@media (max-width: 1800px) {
  .appliance-renewal-table.renewal-overview-table {
    min-width: 0;
  }
}

.document-table th:nth-child(1) {
  width: 28%;
}

.document-table th:nth-child(3) {
  width: 170px;
}

.document-table th:nth-child(4) {
  width: 210px;
}

.document-table th:nth-child(5) {
  width: 120px;
}

.document-table th:nth-child(6) {
  width: 90px;
}

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

.invoice-table th:nth-child(1) {
  width: 155px;
}

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

.invoice-table th:nth-child(5) {
  width: 220px;
}

.invoice-table th:nth-child(6) {
  width: 145px;
}

.invoice-table th:nth-child(10) {
  width: 130px;
}

.firewall-cell strong {
  display: block;
  margin-bottom: 3px;
}

.appliance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.renewal-cell {
  display: grid;
  gap: 7px;
}

td.renewal-cell {
  display: table-cell;
}

td.renewal-cell > * {
  margin-bottom: 7px;
}

td.renewal-cell > *:last-child {
  margin-bottom: 0;
}

.customer-stats {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.discount-input-cell input {
  max-width: 120px;
  margin-left: auto;
  text-align: right;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 70px 20px;
}

.empty-state > svg {
  width: 44px;
  height: 44px;
  color: var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  background: var(--surface-muted);
  color: var(--muted);
}

.status-concept {
  background: #eef0f2;
  color: #495057;
}

.status-aangevraagd {
  background: #e7f0ff;
  color: #24538f;
}

.status-wacht_op_subdistributor {
  background: var(--warning-soft);
  color: var(--accent);
}

.status-bevestigd {
  background: #e0f2ef;
  color: var(--primary-dark);
}

.status-wacht_op_betaling {
  background: var(--warning-soft);
  color: var(--accent);
}

.status-in_behandeling {
  background: var(--warning-soft);
  color: var(--accent);
}

.status-verzonden {
  background: #e7f0ff;
  color: #24538f;
}

.status-afgerond {
  background: var(--success-soft);
  color: var(--success);
}

.status-active {
  background: var(--success-soft);
  color: var(--success);
}

.status-end_of_sales,
.status-eol_soon {
  background: var(--warning-soft);
  color: var(--accent);
}

.status-end_of_life {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-unknown {
  background: #eef0f2;
  color: #495057;
}

.status-geannuleerd {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-gegenereerd {
  background: #e7f0ff;
  color: #24538f;
}

.status-verzendfout {
  background: var(--danger-soft);
  color: var(--danger);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 18px;
}

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

.channel-preview > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 12px;
}

.channel-preview span,
.channel-preview small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.channel-preview strong {
  display: block;
  margin: 4px 0;
  color: var(--text);
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

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

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

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  margin-top: 24px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.check-row span {
  margin: 0;
  color: var(--text);
}

.order-lines-wrap {
  overflow: auto;
}

.order-lines {
  min-width: 980px;
}

.renewal-lines {
  min-width: 1120px;
}

.order-lines select,
.order-lines input {
  min-width: 0;
}

.numeric-col {
  width: 120px;
}

.line-meta {
  display: block;
  min-height: 17px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.lifecycle-grid > div,
.uptrade-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfcfa;
  padding: 14px;
}

.lifecycle-grid span,
.uptrade-box span:first-child {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lifecycle-grid strong,
.uptrade-box strong {
  display: block;
  margin-top: 5px;
}

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

.totals-section {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.totals-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfcfa;
  padding: 14px;
}

.totals-box div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.grand-total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 12px;
  font-size: 18px;
}

.detail-header {
  margin-bottom: 18px;
}

.detail-header h2 {
  margin: 0;
  font-size: 28px;
}

.detail-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--accent) !important;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-form select {
  min-width: 180px;
}

.document-status-form select {
  min-width: 150px;
}

.document-status-form .icon-button {
  flex: none;
}

.inline-pack-form {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) 68px 36px;
  gap: 6px;
  align-items: center;
  max-width: 250px;
}

.inline-pack-form select {
  min-height: 36px;
  padding: 6px 8px;
}

.compact-pack-form {
  max-width: 230px;
}

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

.detail-box {
  padding: 18px;
}

.detail-box p {
  margin: 6px 0;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.brand-preview-logo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: hsl(0 0% 100%);
  padding: 8px;
  color: var(--portal-brand-primary, var(--primary));
}

.brand-preview strong,
.brand-preview p {
  display: block;
  margin: 0;
}

.brand-preview strong {
  font-size: 16px;
}

.brand-preview p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.brand-preview-box {
  border-top: 3px solid var(--portal-brand-accent, var(--accent));
}

.order-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.workflow-step > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
}

.workflow-done > span {
  background: var(--success-soft);
  color: var(--success);
}

.workflow-step strong,
.workflow-step small {
  display: block;
}

.workflow-step small {
  color: var(--muted);
  font-weight: 700;
}

.document-panel {
  margin-bottom: 16px;
}

.document-panel form {
  margin: 0;
}

.document-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.document-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.document-card h3,
.document-card p {
  margin: 4px 0 0;
}

.document-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.document-card-actions form {
  margin: 0;
}

.document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.document-actions form {
  margin: 0;
}

.document-mail-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
}

.mail-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mail-panel-header h3,
.mail-panel-header p {
  margin: 0;
}

.mail-panel-header p {
  margin-top: 4px;
  color: var(--muted);
}

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

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

.recipient-option-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 12px;
}

.recipient-option-card input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.recipient-option-card strong,
.recipient-option-card small {
  display: block;
}

.recipient-option-card small {
  margin-top: 3px;
  color: var(--muted);
}

.mail-attachment-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 12px;
}

.mail-attachment-list h4 {
  margin: 0 0 10px;
}

.mail-attachment-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-attachment-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.mail-attachment-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail-attachment-list small {
  color: var(--muted);
  white-space: nowrap;
}

.invoice-tax-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.document-sheet {
  display: grid;
  gap: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 30px;
}

.document-header,
.document-parties {
  display: grid;
  gap: 18px;
}

.document-header {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.document-header h2 {
  margin: 0;
  font-size: 30px;
}

.document-header p,
.document-meta p {
  margin: 4px 0 0;
  color: var(--muted);
}

.document-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

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

.document-parties article,
.document-note {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfcfa;
  padding: 14px;
}

.document-parties h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.document-parties p,
.document-note p {
  margin: 4px 0;
}

.document-lines {
  min-width: 780px;
}

.invoice-sheet {
  min-height: 1120px;
  gap: 30px;
  color: #111827;
  font-size: 15px;
}

.invoice-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 28px;
  align-items: start;
}

.invoice-brand {
  padding-top: 14px;
}

.invoice-brand h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  text-transform: uppercase;
}

.invoice-brand-logo {
  width: min(260px, 100%);
  height: 86px;
  object-position: left center;
}

.invoice-brand p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.has-document-brand .invoice-brand p {
  color: var(--portal-brand-primary, var(--primary));
}

.has-document-brand .invoice-company-meta {
  border-bottom-color: var(--portal-brand-primary, #111827);
}

.has-document-brand .invoice-title-block h1,
.has-document-brand .invoice-grand-total {
  color: var(--portal-brand-primary, #111827);
}

.invoice-company-meta,
.invoice-title-block dl,
.invoice-total-block dl {
  margin: 0;
}

.invoice-company-meta {
  display: grid;
  gap: 4px;
  border-bottom: 2px solid #111827;
  padding-bottom: 10px;
}

.invoice-company-meta div,
.invoice-title-block dl div,
.invoice-total-block dl div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
}

.invoice-company-meta dt,
.invoice-title-block dt,
.invoice-total-block dt {
  margin: 0;
  font-weight: 900;
}

.invoice-company-meta dd,
.invoice-title-block dd,
.invoice-total-block dd {
  margin: 0;
}

.invoice-recipient {
  min-height: 150px;
  align-self: end;
}

.invoice-recipient p {
  margin: 4px 0;
}

.invoice-title-block {
  display: grid;
  gap: 12px;
}

.invoice-title-block h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

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

.invoice-title-block dl {
  display: grid;
  gap: 5px;
}

.invoice-lines {
  min-width: 780px;
}

.invoice-lines th {
  border-bottom: 2px solid #111827;
  background: transparent;
  color: #111827;
  font-size: 13px;
  text-transform: none;
}

.invoice-lines td {
  border-bottom: 0;
  vertical-align: top;
}

.invoice-total-block {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  border-top: 1px solid #b7c0ca;
  padding-top: 12px;
}

.invoice-total-block dl {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
}

.invoice-total-block dl div {
  grid-template-columns: minmax(0, 1fr) 140px;
}

.invoice-total-block dd {
  text-align: right;
}

.invoice-grand-total {
  border-top: 2px solid #111827;
  border-bottom: 1px solid #111827;
  padding: 12px 0;
  font-weight: 900;
}

.invoice-footer {
  margin-top: 56px;
  text-align: center;
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(183, 121, 31, 0.10)),
    var(--bg);
}

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

.login-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.login-brand h1 {
  margin: 0;
  font-size: 24px;
}

.login-brand p {
  margin: 2px 0 0;
  color: var(--muted);
}

.auth-flash {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 32px));
}

/* Enterprise portal theme */
body {
  background:
    linear-gradient(180deg, hsl(210 28% 98%), hsl(var(--background)) 34%, hsl(216 30% 95%));
}

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.sidebar {
  gap: 18px;
  border-right: 1px solid hsl(220 24% 20% / 0.75);
  background:
    linear-gradient(180deg, hsl(222 42% 13%), hsl(225 36% 10%) 62%, hsl(220 34% 8%));
  box-shadow: 18px 0 45px hsl(222 42% 12% / 0.12);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  min-width: 0;
  padding: 4px;
}

.brand-mark,
.role-mark,
.gradient-icon {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: var(--radius);
  color: hsl(0 0% 100%);
  background: linear-gradient(135deg, hsl(var(--brand-blue)), hsl(var(--brand-purple)));
  box-shadow: 0 10px 20px hsl(var(--brand-blue) / 0.18);
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-logo-mark {
  width: 76px;
  background: hsl(0 0% 100%);
  padding: 7px;
}

.login-logo-mark {
  width: 88px;
  height: 58px;
  padding: 6px;
  box-shadow: 0 10px 22px hsl(222 42% 12% / 0.10);
}

.brand-logo-mark img,
.portal-brand-card img,
.invoice-brand-logo,
.brand-preview-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

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

.brand strong {
  max-width: 166px;
  overflow: hidden;
  color: hsl(0 0% 100%);
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: hsl(216 24% 76%);
  font-weight: 700;
}

.sidebar-collapse {
  width: 36px;
  height: 36px;
  border-color: hsl(0 0% 100% / 0.10);
  background: hsl(0 0% 100% / 0.06);
  color: hsl(216 24% 82%);
}

.sidebar-collapse:hover {
  border-color: hsl(var(--brand-purple) / 0.45);
  background: hsl(0 0% 100% / 0.10);
  color: hsl(0 0% 100%);
}

.has-portal-brand .sidebar {
  box-shadow:
    inset 4px 0 0 var(--portal-brand-accent, var(--accent)),
    18px 0 45px hsl(222 42% 12% / 0.12);
}

.has-portal-brand .nav a.is-active,
.has-portal-brand .nav a:hover {
  box-shadow: inset 3px 0 0 var(--portal-brand-accent, var(--accent));
}

.portal-brand-card {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 360px;
  border: 1px solid hsl(216 22% 86%);
  border-radius: var(--radius);
  background: hsl(0 0% 100% / 0.78);
  padding: 8px 10px;
  box-shadow: var(--shadow-soft);
}

.portal-brand-card img {
  width: 86px;
  height: 36px;
}

.portal-brand-card div {
  min-width: 0;
  text-align: right;
}

.portal-brand-card strong,
.portal-brand-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-brand-card strong {
  color: var(--text);
  font-size: 13px;
}

.portal-brand-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav {
  gap: 18px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-label {
  padding: 0 12px;
  color: hsl(216 24% 65%);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a,
.sidebar-footer .button {
  min-height: 42px;
  border: 1px solid transparent;
  color: hsl(216 24% 82%);
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav a:hover {
  border-color: hsl(0 0% 100% / 0.08);
  background: hsl(0 0% 100% / 0.07);
  color: hsl(0 0% 100%);
  transform: translateX(2px);
}

.nav a.is-active {
  border-color: hsl(var(--brand-blue) / 0.38);
  background: linear-gradient(135deg, hsl(var(--brand-blue) / 0.22), hsl(var(--brand-purple) / 0.18));
  color: hsl(0 0% 100%);
  box-shadow: inset 3px 0 0 hsl(var(--brand-blue));
}

.sidebar-footer {
  display: grid;
  gap: 10px;
}

.user-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid hsl(0 0% 100% / 0.09);
  border-radius: var(--radius);
  background: hsl(0 0% 100% / 0.06);
  padding: 10px;
}

.role-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, hsl(var(--brand-green)), hsl(var(--brand-blue)));
}

.user-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-meta strong,
.user-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  color: hsl(0 0% 100%);
  font-size: 13px;
}

.user-meta small {
  color: hsl(216 24% 76%);
  font-size: 11px;
}

.user-meta em {
  justify-self: start;
  border-radius: 999px;
  background: hsl(var(--brand-purple) / 0.20);
  color: hsl(262 86% 86%);
  padding: 2px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.logout-button {
  border-color: hsl(0 0% 100% / 0.08);
  background: hsl(0 0% 100% / 0.04);
}

.logout-button:hover {
  border-color: hsl(var(--status-cancelled) / 0.42);
  background: hsl(var(--status-cancelled) / 0.14);
  color: hsl(0 0% 100%);
}

.is-sidebar-collapsed .sidebar {
  align-items: center;
  padding-right: 14px;
  padding-left: 14px;
}

.is-sidebar-collapsed .brand-copy,
.is-sidebar-collapsed .nav-group-label,
.is-sidebar-collapsed .nav span,
.is-sidebar-collapsed .user-meta,
.is-sidebar-collapsed .logout-button span {
  display: none;
}

.is-sidebar-collapsed .sidebar-head,
.is-sidebar-collapsed .sidebar-footer,
.is-sidebar-collapsed .nav,
.is-sidebar-collapsed .nav-group {
  width: 100%;
}

.is-sidebar-collapsed .brand,
.is-sidebar-collapsed .nav a,
.is-sidebar-collapsed .logout-button {
  justify-content: center;
}

.is-sidebar-collapsed .sidebar-collapse {
  margin: 0 auto;
}

.is-sidebar-collapsed .user-tile {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px;
}

.content {
  padding: 24px 24px 64px;
}

.topbar,
.page-container {
  width: min(1400px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.topbar {
  min-height: 64px;
  margin-bottom: 20px;
}

.topbar h1,
.detail-header h2 {
  color: hsl(var(--foreground));
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar p,
.toolbar p,
.detail-header p {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 700;
}

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

.animate-fade-in {
  animation: fade-in 0.28s ease both;
}

.animate-scale-in {
  animation: scale-in 0.24s ease both;
  animation-delay: var(--entry-delay, 0ms);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.loading-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: hsl(var(--muted-foreground));
}

.loading-state svg {
  animation: loader-spin 0.9s linear infinite;
}

.button,
.icon-button {
  border-radius: var(--radius);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, hsl(var(--brand-blue)), hsl(var(--brand-purple)));
  box-shadow: 0 10px 22px hsl(var(--brand-blue) / 0.20);
}

.button-primary:hover {
  background: linear-gradient(135deg, hsl(215 88% 42%), hsl(265 70% 52%));
}

.button-secondary {
  background: hsl(var(--card));
  border-color: hsl(var(--border-token));
  color: hsl(var(--foreground));
}

.button-secondary:hover {
  border-color: hsl(var(--brand-blue) / 0.45);
  background: hsl(var(--muted-surface) / 0.45);
  color: hsl(var(--brand-blue));
}

.button-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

input,
select,
textarea {
  border-color: hsl(var(--border-token));
  background: hsl(var(--card));
}

input:focus,
select:focus,
textarea:focus {
  border-color: hsl(var(--brand-blue));
  box-shadow: 0 0 0 3px hsl(var(--brand-blue) / 0.14);
}

.table-panel,
.form-section,
.detail-box,
.login-card,
.document-card,
.workflow-step,
.document-sheet {
  border-color: hsl(var(--border-token));
  background: hsl(var(--card));
  box-shadow: var(--shadow-soft);
}

.table-panel,
.form-section,
.detail-box,
.login-card {
  border-radius: var(--radius);
}

th {
  background: hsl(var(--muted-surface) / 0.52);
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.04em;
}

tbody tr:hover {
  background: hsl(var(--muted-surface) / 0.32);
}

.stats-grid {
  gap: 12px;
}

.stat-card {
  position: relative;
  min-width: 0;
  border-color: hsl(var(--border-token));
  background: hsl(var(--card));
  box-shadow: none;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.stat-card.clickable-card {
  color: inherit;
  cursor: pointer;
}

.stat-card.clickable-card:hover,
.stat-card:hover {
  border-color: hsl(var(--brand-blue) / 0.34);
  background: hsl(var(--muted-surface) / 0.26);
}

.stat-card > span,
.gradient-icon {
  width: 34px;
  height: 34px;
  background: hsl(var(--muted-surface));
  color: hsl(var(--brand-blue));
}

.stat-card p {
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stat-card strong {
  color: hsl(var(--foreground));
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}

.stat-card small {
  display: block;
  margin-top: 3px;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 650;
}

.stat-card-blue .gradient-icon,
.gradient-blue {
  background: linear-gradient(135deg, hsl(var(--brand-blue)), hsl(var(--brand-purple)));
}

.stat-card-purple .gradient-icon,
.gradient-purple {
  background: linear-gradient(135deg, hsl(var(--brand-purple)), hsl(292 72% 55%));
}

.stat-card-green .gradient-icon,
.gradient-green {
  background: linear-gradient(135deg, hsl(var(--brand-green)), hsl(var(--brand-blue)));
}

.stat-card-orange .gradient-icon,
.gradient-orange {
  background: linear-gradient(135deg, hsl(var(--brand-orange)), hsl(var(--brand-purple)));
}

.stat-card-amber .gradient-icon,
.gradient-amber {
  background: linear-gradient(135deg, hsl(var(--status-pending)), hsl(var(--brand-orange)));
}

.stat-card-red .gradient-icon,
.gradient-red {
  background: linear-gradient(135deg, hsl(var(--status-cancelled)), hsl(var(--brand-orange)));
}

.dashboard-kpis .stat-card-blue .gradient-icon,
.quick-actions-card .gradient-blue {
  background: hsl(var(--brand-blue) / 0.10);
  color: hsl(var(--brand-blue));
}

.dashboard-kpis .stat-card-purple .gradient-icon,
.quick-actions-card .gradient-purple {
  background: hsl(var(--brand-purple) / 0.10);
  color: hsl(var(--brand-purple));
}

.dashboard-kpis .stat-card-green .gradient-icon,
.quick-actions-card .gradient-green {
  background: hsl(var(--brand-green) / 0.10);
  color: hsl(var(--brand-green));
}

.dashboard-kpis .stat-card-orange .gradient-icon,
.quick-actions-card .gradient-orange {
  background: hsl(var(--brand-orange) / 0.12);
  color: hsl(var(--brand-orange));
}

.dashboard-kpis .stat-card-amber .gradient-icon,
.quick-actions-card .gradient-amber {
  background: hsl(var(--status-pending) / 0.12);
  color: hsl(var(--status-pending));
}

.dashboard-kpis .stat-card-red .gradient-icon,
.quick-actions-card .gradient-red {
  background: hsl(var(--status-cancelled) / 0.10);
  color: hsl(var(--status-cancelled));
}

.dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.dashboard-focus-grid,
.dashboard-operations-grid {
  display: grid;
  gap: 16px;
}

.dashboard-focus-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 16px;
}

.dashboard-operations-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: start;
}

.dashboard-operations-clean {
  gap: 16px;
}

.compact-heading {
  margin-bottom: 14px;
}

.compact-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.quick-actions-card,
.portal-signal-card,
.activity-card,
.expiring-card {
  padding: 16px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.quick-action-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  min-height: 64px;
  padding: 10px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.quick-action-button:hover {
  border-color: hsl(var(--brand-blue) / 0.40);
  background: hsl(var(--muted-surface) / 0.26);
  color: hsl(var(--foreground));
}

.quick-action-button strong,
.quick-action-button small {
  display: block;
}

.quick-action-button strong {
  font-size: 13px;
  font-weight: 850;
}

.quick-action-button small {
  margin-top: 2px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.auto-renew-summary {
  margin-bottom: 16px;
}

.auto-renew-instructions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
}

.auto-renew-instructions h2,
.auto-renew-instructions p {
  margin: 0;
}

.auto-renew-instructions h2 {
  font-size: 22px;
}

.auto-renew-instructions p {
  margin-top: 8px;
  color: hsl(var(--muted-foreground));
  font-weight: 650;
}

.instruction-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: hsl(var(--foreground));
  font-weight: 720;
}

.auto-renew-savebar {
  align-items: center;
  margin-bottom: 12px;
}

.review-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: hsl(var(--foreground));
  font-weight: 760;
  line-height: 1.35;
}

.review-confirmation input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
}

.auto-renew-table-panel {
  max-height: calc(100vh - 260px);
}

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

.auto-renew-table select {
  min-width: 112px;
}

.auto-renew-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.security-setup-card,
.security-enabled-card {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
}

.security-setup-card {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
}

.security-enabled-card {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
}

.security-setup-card h2,
.security-enabled-card h2,
.security-enabled-card p {
  margin: 0;
}

.security-secret-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: hsl(var(--muted-surface) / 0.55);
  padding: 14px;
}

.security-secret-panel > span {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.security-secret-panel code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: 12px;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

.security-secret-panel .form-hint {
  margin: 0;
}

.security-qr-code {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 236px);
  aspect-ratio: 1;
  border: 1px solid hsl(var(--border-token));
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 12px 28px hsl(var(--foreground) / 0.08);
}

.security-qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.security-qr-placeholder {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.security-confirm-form {
  max-width: 860px;
}

.secondary-login-action {
  margin-top: 10px;
  padding: 12px;
}

.portal-signal-card {
  display: grid;
  align-content: space-between;
  gap: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, hsl(var(--brand-blue) / 0.10), hsl(var(--brand-purple) / 0.09)),
    hsl(var(--card));
}

.portal-signal-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.portal-signal-card p:not(.eyebrow) {
  margin: 8px 0 0;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

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

.signal-metrics span {
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: hsl(var(--card) / 0.72);
  padding: 10px;
}

.signal-metrics strong,
.signal-metrics small {
  display: block;
}

.signal-metrics strong {
  font-size: 22px;
  font-weight: 900;
}

.signal-metrics small {
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-list,
.license-list {
  display: grid;
  gap: 2px;
}

.activity-row,
.license-row {
  display: grid;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: hsl(var(--foreground));
  min-height: 54px;
  padding: 8px 10px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.activity-row {
  grid-template-columns: 12px minmax(0, 1fr) minmax(210px, auto);
}

.license-row {
  grid-template-columns: 28px minmax(0, 1fr) minmax(118px, auto) 36px;
}

.activity-row:hover,
.license-row:hover {
  background: hsl(var(--muted-surface) / 0.28);
  color: hsl(var(--foreground));
}

.activity-copy,
.license-copy,
.activity-meta,
.license-meta {
  min-width: 0;
}

.activity-copy strong,
.activity-copy small,
.license-copy strong,
.license-copy small,
.activity-meta small,
.license-meta small {
  display: block;
}

.activity-copy strong,
.license-copy strong {
  overflow: hidden;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy small,
.license-copy small,
.activity-meta small,
.license-meta small {
  overflow: hidden;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.activity-meta strong {
  font-size: 13px;
}

.license-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.license-meta strong {
  color: hsl(var(--foreground));
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.license-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: hsl(var(--license-active) / 0.12);
  color: hsl(var(--license-active));
}

.license-icon.status-eol_soon,
.license-icon.status-end_of_sales {
  background: hsl(var(--license-warning) / 0.14);
  color: hsl(var(--license-warning));
}

.license-icon.status-end_of_life {
  background: hsl(var(--license-expired) / 0.12);
  color: hsl(var(--license-expired));
}

.dashboard-kpis .gradient-icon,
.quick-actions-card .gradient-icon,
.expiring-card .license-icon {
  background: hsl(var(--muted-surface) / 0.78);
  color: hsl(var(--brand-blue));
}

.expiring-card .license-icon.status-eol_soon {
  background: hsl(var(--license-warning) / 0.16);
  color: hsl(34 88% 36%);
}

.expiring-card .license-icon.status-end_of_life {
  background: hsl(var(--license-expired) / 0.12);
  color: hsl(var(--license-expired));
}

.expiring-card .license-row.status-eol_soon .license-meta strong {
  color: hsl(34 88% 36%);
}

.expiring-card .license-row.status-end_of_life .license-meta strong {
  color: hsl(var(--license-expired));
}

.dashboard-kpis .stat-card-blue .gradient-icon,
.dashboard-kpis .stat-card-purple .gradient-icon,
.dashboard-kpis .stat-card-green .gradient-icon,
.dashboard-kpis .stat-card-orange .gradient-icon,
.dashboard-kpis .stat-card-amber .gradient-icon,
.dashboard-kpis .stat-card-red .gradient-icon {
  background: hsl(var(--muted-surface) / 0.78);
  color: hsl(var(--brand-blue));
}

.dashboard-kpis .stat-card-red .gradient-icon,
.dashboard-kpis .stat-card-amber .gradient-icon {
  color: hsl(var(--muted-foreground));
}

.dashboard-operations-clean .button-primary {
  background: hsl(var(--brand-blue));
  box-shadow: 0 12px 24px hsl(var(--brand-blue) / 0.16);
}

.attention-badge,
.forecast-coverage,
.forecast-warning-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: hsl(var(--status-cancelled) / 0.10);
  color: hsl(var(--status-cancelled));
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.attention-badge.amber,
.forecast-coverage {
  background: hsl(var(--status-pending) / 0.15);
  color: hsl(34 88% 34%);
}

.warning-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: hsl(34 88% 40%) !important;
}

.expiring-card .warning-eyebrow,
.quick-actions-card .eyebrow,
.dashboard-operations-clean .eyebrow {
  color: hsl(var(--muted-foreground)) !important;
}

.warning-eyebrow svg {
  width: 15px;
  height: 15px;
}

.status {
  gap: 6px;
  border: 1px solid transparent;
  background: hsl(var(--status-neutral) / 0.11);
  color: hsl(var(--status-neutral));
  line-height: 1.2;
}

.status::before,
.status-dot {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}

.status-dot {
  width: 9px;
  height: 9px;
}

.status-concept,
.status-unknown {
  background: hsl(var(--status-neutral) / 0.10);
  color: hsl(var(--status-neutral));
}

.status-aangevraagd,
.status-wacht_op_subdistributor,
.status-wacht_op_betaling,
.status-in_behandeling,
.status-end_of_sales,
.status-eol_soon {
  background: hsl(var(--status-pending) / 0.14);
  color: hsl(34 88% 36%);
}

.status-bevestigd,
.status-afgerond,
.status-active,
.status-gegenereerd {
  background: hsl(var(--status-approved) / 0.12);
  color: hsl(var(--status-approved));
}

.status-verzonden {
  background: hsl(var(--status-shipped) / 0.12);
  color: hsl(var(--status-shipped));
}

.status-end_of_life,
.status-geannuleerd,
.status-verzendfout {
  background: hsl(var(--status-cancelled) / 0.12);
  color: hsl(var(--status-cancelled));
}

.status-dot-concept,
.status-dot-unknown {
  background: hsl(var(--status-neutral));
}

.status-dot-aangevraagd,
.status-dot-wacht_op_subdistributor,
.status-dot-wacht_op_betaling,
.status-dot-in_behandeling {
  background: hsl(var(--status-pending));
}

.status-dot-bevestigd,
.status-dot-afgerond,
.status-dot-gegenereerd {
  background: hsl(var(--status-approved));
}

.status-dot-verzonden {
  background: hsl(var(--status-shipped));
}

.status-dot-geannuleerd,
.status-dot-verzendfout {
  background: hsl(var(--status-cancelled));
}

.impersonation-banner {
  width: min(1400px, 100%);
  margin-right: auto;
  margin-left: auto;
  border-color: hsl(var(--status-cancelled) / 0.30);
  background: hsl(var(--status-cancelled) / 0.10);
  color: hsl(var(--status-cancelled));
}

.impersonation-banner > svg {
  width: 22px;
  height: 22px;
}

.impersonation-banner span {
  color: hsl(var(--status-cancelled) / 0.86);
}

.flash {
  width: min(1400px, 100%);
  margin-right: auto;
  margin-left: auto;
  box-shadow: var(--shadow-soft);
}

.document-card {
  border-radius: var(--radius);
}

.document-card:hover,
.workflow-step:hover {
  border-color: hsl(var(--brand-blue) / 0.28);
  box-shadow: var(--shadow-soft);
}

.workflow-step > span {
  background: hsl(var(--status-neutral) / 0.10);
  color: hsl(var(--status-neutral));
}

.workflow-done > span {
  background: hsl(var(--status-approved) / 0.12);
  color: hsl(var(--status-approved));
}

.compact-empty {
  min-height: 140px;
  padding: 24px;
}

.auth-shell {
  background:
    linear-gradient(135deg, hsl(var(--brand-blue) / 0.16), hsl(var(--brand-purple) / 0.12) 46%, hsl(var(--brand-green) / 0.08)),
    hsl(var(--background));
}

.login-card {
  padding: 26px;
}

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

.order-type-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: hsl(var(--card));
  cursor: pointer;
  padding: 12px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.order-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.order-type-card strong,
.order-type-card small {
  display: block;
}

.order-type-card strong {
  font-size: 14px;
  font-weight: 900;
}

.order-type-card small {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 700;
}

.order-type-card:hover,
.order-type-card.is-selected {
  border-color: hsl(var(--brand-blue) / 0.42);
  background: hsl(var(--muted-surface) / 0.35);
  box-shadow: var(--shadow-soft);
}

.firewall-config-panel[hidden],
.js-renewal-only[hidden] {
  display: none;
}

.firewall-config-summary {
  display: grid;
  align-content: center;
  min-height: 76px;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: linear-gradient(135deg, hsl(var(--brand-blue) / 0.08), hsl(var(--brand-purple) / 0.08));
  padding: 12px;
}

.firewall-config-summary span,
.firewall-config-summary small {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 800;
}

.firewall-config-summary strong {
  font-size: 20px;
  font-weight: 900;
}

.firewall-options-panel {
  display: grid;
  gap: 10px;
}

.firewall-options-panel h3 {
  margin: 0;
  font-size: 15px;
}

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

.firewall-option-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: hsl(var(--card));
  padding: 10px;
}

.firewall-option-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.firewall-option-item strong,
.firewall-option-item small {
  display: block;
}

.firewall-option-item strong {
  font-size: 13px;
}

.firewall-option-item small {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 700;
}

.firewall-preview {
  display: grid;
  gap: 8px;
}

.firewall-preview-row {
  display: grid;
  grid-template-columns: 130px 180px minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  border: 1px solid hsl(var(--border-token));
  border-radius: var(--radius);
  background: hsl(var(--muted-surface) / 0.32);
  padding: 10px 12px;
}

.firewall-preview-row span,
.firewall-preview-row small,
.firewall-preview-row em {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.firewall-preview-row strong {
  font-size: 13px;
}

.firewall-preview-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firewall-preview-row em {
  justify-self: end;
  color: hsl(var(--foreground));
}

@media (max-width: 980px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .nav {
    display: flex;
    min-width: max-content;
  }

  .sidebar-footer {
    margin: 0 0 0 auto;
  }

    .stats-grid,
    .field-grid.three,
    .detail-grid,
    .channel-preview,
    .order-workflow,
    .document-card-grid,
    .mail-recipient-grid,
    .document-header,
    .document-parties,
    .invoice-top,
    .invoice-meta-grid,
    .lifecycle-grid,
    .dashboard-focus-grid,
    .dashboard-operations-grid,
    .order-type-switch,
    .firewall-option-list,
    .forecast-grid,
    .totals-section {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-actions-grid,
    .forecast-stats-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  .catalog-filters {
    grid-template-columns: minmax(220px, 1fr) 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell,
  .content {
    min-width: 0;
    width: 100%;
  }

  .content {
    overflow: visible;
    padding: 20px 14px 56px;
  }

  .topbar,
  .toolbar,
  .detail-header,
  .detail-actions,
  .form-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-brand-card {
    align-self: stretch;
    justify-content: flex-start;
    max-width: none;
  }

  .portal-brand-card div {
    text-align: left;
  }

    .stats-grid,
    .catalog-filters,
    .field-grid.two,
    .field-grid.three,
    .detail-grid,
    .channel-preview,
    .order-workflow,
    .document-card-grid,
    .mail-recipient-grid,
    .document-header,
    .document-parties,
    .invoice-top,
    .invoice-meta-grid,
    .lifecycle-grid,
    .dashboard-focus-grid,
    .dashboard-operations-grid,
    .quick-actions-grid,
    .order-type-switch,
    .firewall-option-list,
    .firewall-preview-row,
    .forecast-grid,
    .totals-section {
      grid-template-columns: 1fr;
    }

    .forecast-stats-grid {
      grid-template-columns: 1fr;
    }

  .span-2 {
    grid-column: auto;
  }

  .mail-attachment-list li {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .mail-attachment-list small {
    grid-column: 2;
    white-space: normal;
  }

  .sidebar {
    align-items: stretch;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 14px;
  }

  .brand span:last-child,
  .nav span,
  .sidebar-footer span {
    display: none;
  }

  .sidebar-footer .user-tile {
    display: none;
  }

  .sidebar-footer .logout-button {
    width: 44px;
    padding: 10px;
  }

  .nav a,
  .sidebar-footer .button {
    width: 44px;
    justify-content: center;
    padding: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-logo-mark {
    width: 72px;
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-row,
  .license-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .activity-meta,
  .license-meta {
    justify-items: start;
  }

  .firewall-preview-row em {
    justify-self: start;
  }

  .account-table,
  .appliance-renewal-table {
    min-width: 760px;
  }

  .uptrade-box {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .impersonation-banner,
  .flash,
  .no-print {
    display: none !important;
  }

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

  .content {
    max-width: none;
    overflow: visible;
    padding: 0;
  }

  .document-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .document-lines {
    min-width: 0;
  }

  .invoice-sheet {
    min-height: 100vh;
    font-size: 12px;
  }

  .invoice-lines {
    min-width: 0;
  }

  .invoice-brand h2 {
    font-size: 24px;
  }
}
