:root {
  --m7-ink: #172331;
  --m7-muted: #687786;
  --m7-line: #dce5ec;
  --m7-surface: #ffffff;
  --m7-canvas: #f3f6f8;
  --m7-brand: #155f86;
  --m7-brand-dark: #0b3e5b;
  --m7-brand-soft: #e7f2f7;
  --m7-accent: #f28b2c;
  --m7-accent-dark: #d96e12;
  --m7-danger: #c93c48;
  --m7-success: #1f7a55;
  --m7-warning: #9a6412;
  --m7-radius-sm: 8px;
  --m7-radius: 14px;
  --m7-radius-lg: 22px;
  --m7-shadow: 0 12px 32px rgba(28, 53, 73, 0.08);
  --m7-shadow-sm: 0 4px 14px rgba(28, 53, 73, 0.08);
  --m7-content: 1440px;
}

html {
  color-scheme: light;
  background: var(--m7-canvas);
}

body.m7-modern {
  min-width: 0 !important;
  margin: 0 !important;
  background: var(--m7-canvas);
  color: var(--m7-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.m7-modern .m7-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.m7-modern .m7-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(205, 220, 229, .9);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
}

.m7-modern .m7-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 32px));
  min-height: 88px;
  margin: 0 auto;
}

.m7-modern .m7-brand { display: inline-flex; align-items: center; }
.m7-modern .m7-brand img { display: block; width: 130px; height: auto; }

.m7-modern .m7-site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 30px);
}

.m7-modern .m7-site-nav a { color: #3c4c59; font-size: .9rem; }
.m7-modern .m7-site-nav .m7-nav-button {
  border-radius: 999px;
  background: var(--m7-brand-dark);
  color: #fff;
  padding: 10px 18px;
}

.m7-modern .m7-eyebrow--light { color: #f8bd84; }

.m7-modern .m7-access {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto 76px;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius-lg);
  background: #fff;
  padding: clamp(24px, 5vw, 52px);
  box-shadow: var(--m7-shadow);
}

.m7-modern .m7-access__intro h2 { margin-bottom: 12px; }
.m7-modern .m7-access__intro > p:last-child { color: var(--m7-muted); }

.m7-modern .m7-login-card {
  display: grid;
  gap: 14px;
  border-radius: var(--m7-radius);
  background: var(--m7-canvas);
  padding: 22px;
}

.m7-modern .m7-login-card button { width: 100%; min-height: 46px; }
.m7-modern .m7-login-card p { margin: 0; color: var(--m7-muted); font-size: .88rem; text-align: center; }

.m7-modern .m7-access__actions { display: grid; gap: 12px; }
.m7-modern .m7-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius-sm);
  background: #fff;
  padding: 16px 18px;
}
.m7-modern .m7-link-card span { color: var(--m7-muted); font-size: .85rem; }

.m7-modern .m7-site-footer {
  border-top: 1px solid #264a5e;
  background: #092f46;
  color: #d9e8ef;
}

.m7-modern .m7-site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.m7-modern .m7-site-footer p { margin: 4px 0 0; color: #a9c2cf; }
.m7-modern .m7-site-footer a { color: #fff; }
.m7-modern .m7-site-footer__meta { display: flex; align-items: center; gap: 24px; }

.m7-modern *,
.m7-modern *::before,
.m7-modern *::after {
  box-sizing: border-box;
}

.m7-modern a {
  color: var(--m7-brand);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}

.m7-modern a:hover {
  color: var(--m7-brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m7-modern h1,
.m7-modern h2,
.m7-modern h3 {
  color: var(--m7-ink);
  font-family: inherit;
  line-height: 1.15;
}

.m7-modern h1 { font-size: clamp(2rem, 5vw, 4.25rem); }
.m7-modern h2 { margin: 0 0 18px; font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 760; }
.m7-modern h3 { font-size: 1.15rem; }

.m7-modern button,
.m7-modern input,
.m7-modern select,
.m7-modern textarea {
  max-width: 100%;
  border: 1px solid #c7d3dc;
  border-radius: var(--m7-radius-sm);
  background: var(--m7-surface);
  color: var(--m7-ink);
  font: inherit;
  min-height: 40px;
  padding: 8px 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}

.m7-modern input[type="checkbox"],
.m7-modern input[type="radio"] {
  min-height: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--m7-brand);
}

.m7-modern input:focus,
.m7-modern select:focus,
.m7-modern textarea:focus {
  outline: none;
  border-color: var(--m7-brand);
  box-shadow: 0 0 0 4px rgba(21, 95, 134, .13);
}

.m7-modern button,
.m7-modern input[type="submit"],
.m7-modern input[type="button"],
.m7-modern input.searchbutton,
.m7-modern input.searchbutton1,
.m7-modern input.searchbutton2 {
  width: auto;
  border: 0;
  background: var(--m7-brand);
  color: #fff;
  cursor: pointer;
  font-weight: 720;
  padding: 9px 16px;
}

.m7-modern button:hover,
.m7-modern input[type="submit"]:hover,
.m7-modern input[type="button"]:hover {
  background: var(--m7-brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--m7-shadow-sm);
}

.m7-modern input[type="image"] {
  border: 0;
  min-height: 0;
  padding: 0;
}

.m7-modern .head,
.m7-modern .head1,
.m7-modern .head2,
.m7-modern .head3,
.m7-modern .head4,
.m7-modern .head5,
.m7-modern .str,
.m7-modern .shapka,
.m7-modern .name,
.m7-modern .name1 {
  font-family: inherit;
}

.m7-modern .head,
.m7-modern .head2 { color: var(--m7-muted); font-size: .9rem; }
.m7-modern .head1,
.m7-modern .str { color: var(--m7-ink); font-size: .86rem; }
.m7-modern .name { color: var(--m7-brand); font-weight: 800; }

.m7-modern table[border="1"],
.m7-modern table[border="1px"],
.m7-modern table[bgcolor="#FFFFFF"] {
  border: 1px solid var(--m7-line) !important;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--m7-surface) !important;
}

.m7-modern table[border="1"] th,
.m7-modern table[border="1"] td,
.m7-modern table[border="1px"] th,
.m7-modern table[border="1px"] td {
  border: 0 !important;
  border-right: 1px solid var(--m7-line) !important;
  border-bottom: 1px solid var(--m7-line) !important;
  padding: 10px 12px;
}

.m7-modern table[border="1"] tr:last-child td,
.m7-modern table[border="1px"] tr:last-child td { border-bottom: 0 !important; }
.m7-modern table[border="1"] td:last-child,
.m7-modern table[border="1"] th:last-child,
.m7-modern table[border="1px"] td:last-child,
.m7-modern table[border="1px"] th:last-child { border-right: 0 !important; }

.m7-modern tr[bgcolor="#26668A"],
.m7-modern tr[bgcolor="333399"],
.m7-modern td[bgcolor="333399"] {
  background: var(--m7-brand-dark) !important;
  color: #fff !important;
}

.m7-modern tr[bgcolor="#e6e6e6"],
.m7-modern tr[bgcolor="f7f7f7"],
.m7-modern tr[bgcolor="#f7f7f7"] { background: #f8fafb !important; }

.m7-modern .m7-shell {
  width: min(var(--m7-content), calc(100% - 32px));
  margin: 0 auto;
}

.m7-modern .m7-page {
  width: min(var(--m7-content), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.m7-modern .m7-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.m7-modern .m7-page-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.m7-modern .m7-eyebrow {
  margin: 0 0 8px;
  color: var(--m7-brand);
  font-size: .76rem;
  font-weight: 820;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.m7-modern .m7-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--m7-muted);
  font-size: 1rem;
}

.m7-modern .m7-card {
  border: 1px solid rgba(211, 224, 233, .9);
  border-radius: var(--m7-radius);
  background: var(--m7-surface);
  box-shadow: var(--m7-shadow);
  padding: 22px;
}

.m7-modern .m7-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius);
  background: var(--m7-surface);
}

.m7-modern .m7-field {
  display: grid;
  gap: 6px;
}

.m7-modern .m7-field > span {
  color: var(--m7-muted);
  font-size: .78rem;
  font-weight: 720;
}

.m7-modern .m7-table-scroll {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius);
  background: var(--m7-surface);
  box-shadow: var(--m7-shadow);
}

.m7-search-toolbar .m7-field {
    flex: 1 1 28rem;
}

.m7-site-header--catalog .m7-site-header__inner {
    display: grid;
    grid-template-columns: auto 1fr minmax(17rem, 25rem);
    gap: 1rem 1.5rem;
}

.m7-header-search {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.m7-header-search input {
    min-width: 0;
    width: 100%;
}

.m7-account-bar,
.m7-catalog-filter {
    width: min(100% - 2rem, var(--m7-content));
    margin: 1rem auto 0;
    padding: 1rem;
    border: 1px solid var(--m7-line);
    border-radius: var(--m7-radius-sm);
    background: var(--m7-surface);
    box-shadow: var(--m7-shadow-sm);
}

.m7-account-login,
.m7-account-summary {
    display: flex;
    align-items: end;
    gap: .75rem 1rem;
    flex-wrap: wrap;
}

.m7-account-login .m7-field {
    flex: 1 1 12rem;
}

.m7-account-summary {
    align-items: center;
}

.m7-legacy-content {
    min-height: 45vh;
}

.m7-legacy-content > :not(.m7-page) {
    max-width: 100%;
}

.m7-counter img {
    display: block;
}

.m7-role-header {
    position: sticky;
    z-index: 30;
    top: 0;
    border-bottom: 1px solid var(--m7-line);
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--m7-shadow-sm);
}

.m7-role-header__top,
.m7-role-nav {
    width: min(100% - 2rem, 1500px);
    margin: 0 auto;
}

.m7-role-header__top {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.m7-role-brand {
    color: var(--m7-brand-dark) !important;
    font-size: 1.15rem !important;
    font-weight: 850 !important;
}

.m7-role-brand span {
    margin-left: .5rem;
    color: var(--m7-muted);
    font-size: .75rem;
    font-weight: 650;
}

.m7-role-quick,
.m7-rate-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.m7-role-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .65rem;
    padding: .75rem 0;
}

.m7-role-nav label {
    display: grid;
    flex: 1 1 9rem;
    gap: .25rem;
}

.m7-role-nav label > span {
    color: var(--m7-muted);
    font-size: .68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.m7-role-nav select {
    width: 100%;
}

.m7-rate-actions {
    margin-left: auto;
}

.m7-rate-actions form {
    margin: 0;
}

.m7-rate-actions button {
    min-height: 40px;
    padding: .55rem .75rem;
    font-size: .75rem;
}

.m7-role-link-card {
    display: grid;
    flex: 1 1 13rem;
    min-height: 64px;
    align-content: center;
    padding: .65rem .85rem;
    border: 1px solid var(--m7-line);
    border-radius: var(--m7-radius-sm);
    background: var(--m7-surface);
}

.m7-role-link-card span {
    color: var(--m7-muted);
    font-size: .72rem;
    font-weight: 550;
}

.m7-summary-pill {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: var(--m7-brand-soft);
    color: var(--m7-brand-dark);
    font-weight: 800;
}

.m7-bulk-bar {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--m7-line);
    border-radius: var(--m7-radius);
    background: var(--m7-surface);
}

.m7-table-empty {
    padding: 2rem !important;
    color: var(--m7-muted);
    text-align: center;
}

.m7-role-tools {
    display: flex;
    width: min(100% - 2rem, 1500px);
    margin: 0 auto;
    gap: .75rem;
    padding: 0 0 .8rem;
}

.m7-role-search {
    display: flex;
    flex: 1 1 auto;
    gap: .5rem;
}

.m7-role-search input { flex: 1 1 12rem; min-width: 0; }

.m7-customer-context {
    display: grid;
    width: min(100% - 2rem, 1500px);
    margin: 1rem auto 0;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid var(--m7-line);
    border-radius: var(--m7-radius);
    background: var(--m7-surface);
    box-shadow: var(--m7-shadow-sm);
}

.m7-customer-context > div,
.m7-customer-context nav,
.m7-vehicle-context {
    display: flex;
    align-items: center;
    gap: .65rem 1rem;
    flex-wrap: wrap;
}

.m7-customer-context > div > span:first-child { color: var(--m7-muted); font-size: .75rem; font-weight: 750; text-transform: uppercase; }
.m7-vehicle-context { padding-top: .75rem; border-top: 1px solid var(--m7-line); color: var(--m7-muted); }

@media (max-width: 700px) {
    .m7-role-tools, .m7-role-search { flex-direction: column; }
    .m7-role-tools { width: calc(100% - 20px); }
    .m7-role-search > * { width: 100%; }
    .m7-role-search input { flex: 1 1 auto; }
    .m7-bulk-bar { align-items: stretch; flex-direction: column; }
}

.m7-admin-content {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 1rem;
}

/*
 * Legacy pages are assembled from different combinations of tables, forms and
 * plain blocks.  Some of them still have an old align="center" attribute, while
 * others do not.  Keep every top-level page block on the same content axis as
 * the modern header without forcing narrow controls to stretch.  Oversized
 * tables remain left-anchored inside the scrolling content area, so their first
 * columns are always reachable on small screens.
 */
.m7-admin-content > :where(div, section, article, aside, main, form, fieldset, table, center, ul, ol),
.m7-legacy-content > :where(div, section, article, aside, main, form, fieldset, table, center, ul, ol) {
    max-width: var(--m7-content);
    margin-right: auto;
    margin-left: auto;
}

.m7-admin-content > form > table,
.m7-admin-content > center > table,
.m7-legacy-content > form > table,
.m7-legacy-content > center > table {
    margin-right: auto;
    margin-left: auto;
}

.m7-admin-content h1,
.m7-admin-content h2,
.m7-admin-content h3,
.m7-legacy-content h1,
.m7-legacy-content h2,
.m7-legacy-content h3 {
    color: var(--m7-ink);
}

.m7-admin-content > h1,
.m7-admin-content > h2,
.m7-admin-content > h3,
.m7-admin-content > p,
.m7-legacy-content > h1,
.m7-legacy-content > h2,
.m7-legacy-content > h3,
.m7-legacy-content > p {
    width: min(100%, var(--m7-content));
    margin-right: auto;
    margin-left: auto;
}

.m7-admin-content table,
.m7-legacy-content table {
    max-width: 100%;
    border-collapse: collapse;
    border-color: var(--m7-line) !important;
    background-color: var(--m7-surface);
}

.m7-admin-content table[border] th,
.m7-admin-content table[border] td,
.m7-legacy-content table[border] th,
.m7-legacy-content table[border] td {
    padding: .55rem .65rem;
    border-color: var(--m7-line) !important;
}

.m7-admin-content th,
.m7-legacy-content th {
    color: var(--m7-ink);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.m7-admin-content > table,
.m7-admin-content > form > table,
.m7-legacy-content > table,
.m7-legacy-content > form > table {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--m7-radius-sm);
}

.m7-admin-content form,
.m7-legacy-content form {
    max-width: 100%;
}

@media (max-width: 640px) {
    .m7-role-header { position: static; }
    .m7-role-header__top, .m7-role-nav { width: calc(100% - 20px); }
    .m7-role-brand span, .m7-role-quick a:not(.m7-nav-button) { display: none; }
    .m7-role-nav label { flex-basis: calc(50% - .5rem); min-width: 0; }
    .m7-rate-actions { width: 100%; margin-left: 0; }
    .m7-rate-actions form { flex: 1; }
    .m7-rate-actions button { width: 100%; }
}

@media (max-width: 900px) {
    .m7-site-header--catalog .m7-site-header__inner {
        grid-template-columns: auto 1fr;
    }

    .m7-site-header--catalog .m7-header-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .m7-site-header--catalog .m7-site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .m7-site-header--catalog .m7-site-nav a:not(.m7-nav-button) {
        display: none;
    }

    .m7-account-login > * {
        width: 100%;
    }
}

.m7-search-results {
    margin-top: 1rem;
    overflow-x: auto;
}

.m7-search-results > table,
.m7-product-info table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    background: var(--m7-surface);
}

.m7-search-results td,
.m7-search-results th,
.m7-product-info td,
.m7-product-info th {
    padding: .65rem .75rem;
    border-bottom: 1px solid var(--m7-line);
}

.m7-product-info > table {
    border-radius: var(--m7-radius);
    overflow: hidden;
    box-shadow: var(--m7-shadow-sm);
}

.m7-modern .m7-data-table {
  width: 100%;
  min-width: 780px;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--m7-surface);
}

.m7-modern .m7-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border: 0;
  border-bottom: 1px solid #153d53;
  background: var(--m7-brand-dark);
  color: #fff;
  font-size: .74rem;
  font-weight: 760;
  letter-spacing: .035em;
  padding: 12px 14px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.m7-modern .m7-data-table td {
  border: 0;
  border-bottom: 1px solid var(--m7-line);
  padding: 12px 14px;
  vertical-align: middle;
}

.m7-modern .m7-data-table tbody tr:hover { background: #f1f7fa; }
.m7-modern .m7-data-table tbody tr:last-child td { border-bottom: 0; }

.m7-modern .m7-invoice-heading { align-items: center; margin-bottom: 20px; }
.m7-modern .m7-invoice-heading h1 { margin: 0; }
.m7-modern .m7-invoice-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  background: var(--m7-brand-soft);
  color: var(--m7-brand-dark);
  font-size: .82rem;
  font-weight: 780;
  padding: 7px 12px;
  white-space: nowrap;
}
.m7-modern .m7-invoice-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}
.m7-modern .m7-audit-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.m7-modern .m7-inline-adjust { display: inline-flex !important; align-items: center; gap: 6px; margin: 0; }
.m7-modern .m7-inline-adjust input[name="new_kolich"] { width: 62px; min-width: 62px; }
.m7-modern .m7-inline-adjust button { min-height: 34px; padding: 6px 9px; }
.m7-modern .m7-invoice-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--m7-muted);
  font-weight: 700;
}
.m7-modern .m7-invoice-check input { width: auto; }
.m7-modern .m7-invoice-actions { display: flex; justify-content: flex-end; }
.m7-modern .m7-invoice-actions button { width: 100%; }
.m7-modern .m7-page > .m7-card + .m7-card { margin-top: 18px; }
.m7-modern .m7-data-table tfoot th {
  position: static;
  border-top: 2px solid var(--m7-line);
  border-bottom: 0;
  background: #edf5f8;
  color: var(--m7-brand-dark);
}
.m7-modern .m7-table-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: var(--m7-radius-sm);
  background: var(--m7-brand-soft);
  color: var(--m7-brand-dark);
  font-weight: 760;
  padding: 7px 11px;
  white-space: nowrap;
}
.m7-modern .m7-order-search__filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 14px;
  align-items: end;
}
.m7-modern .m7-order-search__results { min-width: 1450px; }
.m7-modern .m7-order-search__order { color: var(--m7-brand); font-weight: 800; }
.m7-modern .m7-section-title { margin: 0 0 16px; font-size: 1.25rem; }
.m7-modern .m7-document-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}
.m7-modern .m7-document-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 122px;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius-sm);
  background: #f8fbfc;
  padding: 15px;
}
.m7-modern .m7-document-link span { display: block; color: var(--m7-muted); font-size: .78rem; font-weight: 760; }
.m7-modern .m7-document-link strong { display: block; margin-top: 5px; color: var(--m7-brand-dark); font-size: 1.05rem; }
.m7-modern .m7-document-link--empty { opacity: .62; }
.m7-modern .m7-order-trace__history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.m7-modern .m7-order-history { min-width: 620px; }
.m7-modern .m7-notice--error { margin-top: 16px; border-left-color: var(--m7-danger); background: #fff0f0; color: #873d43; }

/* Supplier work queue: calm row colors keep operational statuses scannable. */
.m7-modern .m7-data-table .m7-status-row {
  --m7-status-bg: #f7f9fa;
  --m7-status-bg-hover: #eef3f5;
  --m7-status-line: #91a2ab;
  --m7-status-ink: #41535d;
  background: var(--m7-status-bg);
}

.m7-modern .m7-data-table .m7-status-row:hover { background: var(--m7-status-bg-hover); }
.m7-modern .m7-data-table .m7-status-row > td:first-child { box-shadow: inset 4px 0 0 var(--m7-status-line); }

.m7-modern .m7-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid color-mix(in srgb, var(--m7-status-line) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--m7-status-line) 10%, #fff);
  color: var(--m7-status-ink);
  font-size: .76rem;
  font-weight: 780;
  line-height: 1;
  padding: 5px 9px;
  white-space: nowrap;
}

.m7-modern .m7-data-table .m7-status-row--progress { --m7-status-bg: #edf6fb; --m7-status-bg-hover: #e2f1f8; --m7-status-line: #3f8db5; --m7-status-ink: #235d7a; }
.m7-modern .m7-data-table .m7-status-row--shipped { --m7-status-bg: #f1f0fb; --m7-status-bg-hover: #e8e6f8; --m7-status-line: #786bb5; --m7-status-ink: #51458b; }
.m7-modern .m7-data-table .m7-status-row--ordered { --m7-status-bg: #eef2fa; --m7-status-bg-hover: #e4eaf7; --m7-status-line: #5879b8; --m7-status-ink: #39578f; }
.m7-modern .m7-data-table .m7-status-row--removed { --m7-status-bg: #f4f5f6; --m7-status-bg-hover: #e9edef; --m7-status-line: #88969d; --m7-status-ink: #536269; }
.m7-modern .m7-data-table .m7-status-row--refused { --m7-status-bg: #fbefef; --m7-status-bg-hover: #f7e3e3; --m7-status-line: #bc6265; --m7-status-ink: #8b3f43; }
.m7-modern .m7-data-table .m7-status-row--delayed { --m7-status-bg: #fff6e5; --m7-status-bg-hover: #ffedcf; --m7-status-line: #d29a37; --m7-status-ink: #805c1d; }
.m7-modern .m7-data-table .m7-status-row--reordered { --m7-status-bg: #f7eef8; --m7-status-bg-hover: #f0e2f2; --m7-status-line: #a76bab; --m7-status-ink: #744779; }
.m7-modern .m7-data-table .m7-status-row--waiting { --m7-status-bg: #edf8f7; --m7-status-bg-hover: #e1f2f0; --m7-status-line: #41988d; --m7-status-ink: #276c64; }
.m7-modern .m7-data-table .m7-status-row--stock { --m7-status-bg: #edf7ef; --m7-status-bg-hover: #e1f0e4; --m7-status-line: #5c9a68; --m7-status-ink: #376d42; }

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

.m7-modern .m7-actions form { display: inline-flex !important; margin: 0; }
.m7-modern .m7-button-danger { background: var(--m7-danger) !important; }
.m7-modern .m7-button-muted { background: #dce6ec !important; color: var(--m7-ink) !important; }
.m7-modern .m7-button-accent { background: var(--m7-accent) !important; color: #172331 !important; }

.m7-modern a.m7-button-muted,
.m7-modern a.m7-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--m7-radius-sm);
  padding: 9px 16px;
}

.m7-modern a.m7-primary-link { background: var(--m7-brand); color: #fff; }

.m7-modern .m7-code {
  display: inline-block;
  border-radius: 6px;
  background: #edf3f6;
  color: #173f54;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .84rem;
  font-weight: 700;
  padding: 3px 7px;
  white-space: nowrap;
}

.m7-modern .m7-counter {
  border-radius: 999px;
  background: var(--m7-brand-soft);
  color: var(--m7-brand-dark);
  font-weight: 750;
  padding: 8px 14px;
}

.m7-modern .m7-empty-state { text-align: center; padding: clamp(38px, 7vw, 80px); }
.m7-modern .m7-empty-state h2 { margin: 14px 0 8px; }
.m7-modern .m7-empty-state p { margin: 0 auto 22px; max-width: 520px; color: var(--m7-muted); }
.m7-modern .m7-empty-state__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 18px;
  background: var(--m7-brand-dark);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 850;
}

.m7-modern .m7-empty-row { color: var(--m7-muted); padding: 38px !important; text-align: center; }

.m7-modern .m7-quantity-form { display: flex; align-items: center; gap: 7px; }
.m7-modern .m7-quantity-form input[type="number"] { width: 76px; }
.m7-modern .m7-quantity-form button { min-height: 38px; padding: 7px 10px; }

.m7-modern .m7-checkout-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr) auto;
  gap: 24px;
  align-items: end;
  margin-top: 18px;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius);
  background: #fff;
  padding: 22px;
  box-shadow: var(--m7-shadow);
}

.m7-modern .m7-checkout-card h2 { margin-bottom: 8px; font-size: 1.35rem; }
.m7-modern .m7-checkout-card p { margin: 0; color: var(--m7-muted); }

.m7-modern .m7-bulk-bar {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px auto 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--m7-radius);
  background: rgba(9, 47, 70, .96);
  color: #fff;
  padding: 14px 18px;
  box-shadow: 0 12px 30px rgba(9,47,70,.25);
}

.m7-modern .m7-notice {
  margin: 0 0 18px;
  border-left: 4px solid var(--m7-brand);
  border-radius: var(--m7-radius-sm);
  background: var(--m7-brand-soft);
  color: var(--m7-brand-dark);
  padding: 13px 16px;
}

.m7-modern .m7-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 18px;
  border-radius: var(--m7-radius);
  background: var(--m7-brand-dark);
  color: #fff;
  padding: 18px 22px;
}

.m7-modern .m7-summary strong { font-size: 1.55rem; }

.m7-modern .m7-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  min-height: 560px;
  margin: 26px auto 48px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 15%, rgba(242, 139, 44, .28), transparent 30%),
    linear-gradient(135deg, #092f46 0%, #155f86 58%, #1b769f 100%);
  color: #fff;
  padding: clamp(30px, 7vw, 84px);
  box-shadow: 0 24px 60px rgba(9, 47, 70, .22);
}

.m7-modern .m7-hero > * { text-align: left; }

.m7-modern .m7-hero::after {
  content: "M7";
  position: absolute;
  right: -3%;
  bottom: -22%;
  z-index: -1;
  color: rgba(255,255,255,.055);
  font-size: clamp(16rem, 35vw, 34rem);
  font-weight: 900;
  letter-spacing: -.1em;
  line-height: .8;
}

.m7-modern .m7-hero h1 {
  max-width: 790px;
  margin: 0 0 20px;
  color: #fff;
  font-weight: 820;
  letter-spacing: -.045em;
}

.m7-modern .m7-hero p {
  max-width: 650px;
  margin: 0 0 28px;
  color: #d9edf7;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.m7-modern .m7-hero-search {
  display: flex;
  gap: 10px;
  max-width: 680px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
}

.m7-modern .m7-hero-search input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  box-shadow: none;
  min-height: 48px;
}

.m7-modern .m7-hero-search button { background: var(--m7-accent); color: #192b37; }

.m7-modern .m7-hero-panel {
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--m7-radius-lg);
  background: rgba(255,255,255,.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(12px);
  padding: 26px;
}

.m7-modern .m7-hero-panel h2 { color: #fff; font-size: 1.3rem; }
.m7-modern .m7-hero-panel ol { margin: 0; padding-left: 22px; }
.m7-modern .m7-hero-panel li { margin: 12px 0; color: #e8f5fa; }

.m7-modern .m7-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 60px;
}

.m7-modern .m7-feature {
  min-height: 180px;
  border: 1px solid var(--m7-line);
  border-radius: var(--m7-radius);
  background: #fff;
  padding: 24px;
  box-shadow: var(--m7-shadow-sm);
}

.m7-modern .m7-feature-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  border-radius: 11px;
  background: var(--m7-brand-soft);
  color: var(--m7-brand);
  font-size: .83rem;
  font-weight: 850;
}

.m7-modern .m7-feature h3 { margin: 0 0 8px; }
.m7-modern .m7-feature p { margin: 0; color: var(--m7-muted); }

@media (max-width: 900px) {
  .m7-modern .m7-hero { grid-template-columns: 1fr; min-height: auto; }
  .m7-modern .m7-feature-grid { grid-template-columns: 1fr; }
  .m7-modern .m7-page-head { align-items: flex-start; flex-direction: column; }
  .m7-modern .m7-summary { justify-content: space-between; }
  .m7-modern .m7-access { grid-template-columns: 1fr; }
  .m7-modern .m7-checkout-card { grid-template-columns: 1fr; align-items: stretch; }
  .m7-modern .m7-invoice-filter { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .m7-modern .m7-audit-filter { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .m7-modern .m7-order-search__filter { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .m7-modern .m7-document-links { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 640px) {
  body.m7-modern { font-size: 14px; }
  .m7-modern .m7-page, .m7-modern .m7-shell { width: min(100% - 20px, var(--m7-content)); }
  .m7-modern .m7-hero { width: calc(100% - 20px); margin-top: 10px; padding: 28px 20px; border-radius: 20px; }
  .m7-modern .m7-hero-search { align-items: stretch; flex-direction: column; }
  .m7-modern .m7-hero-search button { width: 100%; }
  .m7-modern .m7-feature-grid { width: calc(100% - 20px); }
  .m7-modern .m7-toolbar { align-items: stretch; flex-direction: column; }
  .m7-modern .m7-toolbar > * { width: 100%; }
  .m7-modern .m7-search-toolbar .m7-field { flex: 1 1 auto; }
  .m7-modern .m7-toolbar button, .m7-modern .m7-toolbar input[type="submit"] { width: 100%; }
  .m7-modern .m7-invoice-filter { grid-template-columns: 1fr; }
  .m7-modern .m7-audit-filter { grid-template-columns: 1fr; }
  .m7-modern .m7-order-search__filter { grid-template-columns: 1fr; }
  .m7-modern .m7-document-links { grid-template-columns: 1fr; }
  .m7-modern .m7-summary { align-items: flex-start; flex-direction: column; }
  .m7-modern .m7-site-header__inner { min-height: 70px; }
  .m7-modern .m7-brand img { width: 105px; }
  .m7-modern .m7-site-nav a:not(.m7-nav-button) { display: none; }
  .m7-modern .m7-site-footer__inner, .m7-modern .m7-site-footer__meta { align-items: flex-start; flex-direction: column; }
}

@media print {
  body.m7-modern { background: #fff; }
  .m7-modern .m7-toolbar, .m7-modern .m7-actions, .m7-modern button { display: none !important; }
  .m7-modern .m7-card, .m7-modern .m7-table-scroll { border: 0; box-shadow: none; }
}
