:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --primary: #ed1c24;
  --primary-contrast: #ffffff;
  --secondary: #0f172a;
  --muted: #f2f2f2;
  --border: rgba(15, 23, 42, 0.22);
  --ring: rgba(237, 28, 36, 0.2);
  --radius: 6px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 1px;
}
a {
  color: inherit;
  text-decoration: none;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
}
.auth-hero {
  background: var(--secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.auth-hero-inner {
  max-width: 420px;
}
.auth-title {
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 8px;
}
.auth-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.auth-card {
  width: 100%;
  max-width: 390px;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--muted);
}
.sidebar {
  background: var(--secondary);
  color: #fff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
}
.sidebar-brand:hover {
  opacity: 0.9;
}
.sidebar-brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}
.sidebar-brand-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
}
.nav-list {
  display: grid;
  gap: 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
  gap: 12px;
}
.nav-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.nav-link.active,
.nav-link.active:hover {
  background: var(--primary);
  color: #fff;
}
@media (min-width: 993px) {
.sidebar {
    overflow: hidden;
  }
.sidebar-brand {
    gap: 12px;
    margin: 0;
    padding: 0 4px 20px;
  }
.sidebar-brand-subtitle {
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.7px;
    white-space: nowrap;
  }
.nav-list {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    gap: 4px;
    padding: 4px 3px 6px 0;
    overflow-y: auto;
  }
.nav-link {
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
  }
.sidebar .sidebar-logout {
    flex: 0 0 auto;
    padding-top: 12px;
  }
.sidebar .logout-btn {
    height: 48px;
    border-color: var(--primary);
    background: var(--primary);
    font-size: 15px;
    font-weight: 600;
  }
.sidebar .logout-btn:hover {
    border-color: #b91f30;
    background: #b91f30;
  }
}
.sidebar-logout {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: transparent;
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.05s ease;
}
.logout-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.logout-btn:active {
  transform: translateY(1px);
}
.mobile-header,
.sidebar-overlay,
.sidebar-close {
  display: none;
}
.main {
  min-width: 0;
  padding: 0;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 82px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.main-content {
  padding: 34px;
}
.header-user {
  min-width: 205px;
  height: 48px;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-left: 1px solid var(--border);
  border-radius: 6px;
  color: inherit;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.header-user:hover,
.header-user.active {
  background: var(--muted);
}
.header-user:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--ring);
}
.header-user-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.header-user-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}
.header-user-name {
  color: #050b20;
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-user-role {
  color: #6b7280;
  margin-top: 4px;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 1px;
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.profile-summary-body {
  padding: 28px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 28px;
}
.profile-avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
}
.profile-name {
  margin: 0;
  color: #050b20;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.profile-role {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 18px;
  line-height: 1.35;
}
.profile-facts {
  margin: 0;
  border-top: 1px solid var(--border);
}
.profile-fact {
  min-height: 60px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border);
}
.profile-fact:last-child {
  border-bottom: 0;
}
.profile-fact dt,
.profile-fact dd {
  margin: 0;
}
.profile-fact dt {
  color: #6b7280;
  font-size: 17px;
}
.profile-fact dd {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.profile-status.active {
  color: var(--foreground);
}
.profile-status.inactive {
  color: var(--primary);
}
.profile-password-header {
  padding: 24px 26px;
  border-bottom: 1px solid var(--border);
}
.profile-password-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}
.profile-password-header p {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 17px;
}
.profile-password-body {
  padding: 26px;
}
.profile-password-fields {
  display: grid;
  gap: 20px;
}
.profile-password-fields .input {
  height: 58px;
}
.required {
  color: var(--primary);
}
.profile-password-actions {
  margin-top: 22px;
}
.profile-password-actions .btn {
  min-height: 50px;
  padding: 0 20px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 1px;
}
.page-subtitle {
  margin: 4px 0 0;
  color: var(--secondary);
  font-size: 14px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}
.card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}
.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.card-body {
  padding: 18px;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field {
  display: grid;
  gap: 7px;
}
.label {
  font-size: 14px;
  font-weight: 500;
}
.input,
.select {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input,
.select {
  height: 44px;
  padding: 0 12px;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='8 9 12 5 16 9'/%3E%3Cpolyline points='8 15 12 19 16 15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
.input[readonly] {
  background: var(--muted);
  color: #64748b;
  cursor: default;
}
.input:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
.error {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.btn {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
  cursor: pointer;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn-primary:hover {
  background: #b91f30;
}
.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-danger {
  background: #fff;
  border-color: rgba(237, 28, 36, 0.35);
  color: var(--primary);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table th {
  background: var(--muted);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 12px;
  white-space: nowrap;
  text-transform: uppercase;
}
.table td {
  border-top: 1px solid var(--border);
  padding: 12px;
  font-size: 14px;
  vertical-align: top;
}
.table tbody tr.row-link {
  cursor: pointer;
  transition: background 0.15s ease;
}
.table tbody tr.row-link:hover {
  background: var(--muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--muted);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
}
.badge-red {
  background: rgba(237, 28, 36, 0.1);
  color: var(--primary);
}
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success {
  border-color: rgba(15, 23, 42, 0.22);
  color: var(--secondary);
}
.alert-error {
  border-color: rgba(237, 28, 36, 0.28);
  color: var(--primary);
}
.pagination {
  margin-top: 18px;
}
.amax-pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; }
.amax-pagination-summary { margin: 0; color: #525d75; font-size: 13px; }
.amax-pagination-summary strong { color: #111827; font-weight: 600; }
.amax-pagination-pages { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.amax-page-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--secondary); font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none; }
.amax-page-button svg { display: block; width: 18px !important; height: 18px !important; max-width: 18px; max-height: 18px; flex: 0 0 18px; }
.amax-page-button:hover,
.amax-page-button:focus-visible { border-color: var(--secondary); background: rgba(15, 23, 42,.06); outline: none; }
.amax-page-button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.amax-page-button.disabled { color: #a0a7b5; background: #f7f8fb; cursor: default; }
.amax-page-button.text { width: auto; min-width: 86px; padding: 0 14px; }
.amax-pagination.simple { justify-content: flex-end; }
@media (max-width: 600px) {
.amax-pagination { align-items: flex-start; flex-direction: column; gap: 12px; }
.amax-pagination-pages { width: 100%; }
.amax-page-button { width: 36px; height: 36px; }
}
.inline-form {
  display: inline;
}
@media (max-width: 992px) {
.auth-page {
    grid-template-columns: 1fr;
  }
.auth-hero {
    display: none;
  }
.app-shell {
    display: block;
  }
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 12px;
    background: var(--secondary);
    color: #fff;
    z-index: 40;
  }
.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
  }
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 264px;
    max-width: 82vw;
    height: 100vh;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.32);
  }
body.sidebar-open .sidebar {
    transform: translateX(0);
  }
.sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }
.sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
  }
.main {
    padding: 56px 0 0;
  }
.app-header {
    position: static;
    height: 82px;
    padding: 14px 16px;
    gap: 16px;
  }
.header-user {
    min-width: 0;
    padding-left: 10px;
  }
.header-user-copy {
    display: none;
  }
.main-content {
    padding: 20px 16px;
  }
.topbar,
.actions {
    align-items: stretch;
    flex-direction: column;
  }
.grid-2,
.form-grid {
    grid-template-columns: 1fr;
  }
.profile-layout {
    grid-template-columns: 1fr;
  }
.btn {
    width: 100%;
  }
.table th,
.table td {
    padding: 10px;
  }
.page-title {
    font-size: 24px;
  }
}
@media (max-width: 640px) {
.profile-layout {
    gap: 16px;
  }
.profile-summary-body,
.profile-password-body {
    padding: 20px;
  }
.profile-password-header {
    padding: 20px;
  }
.profile-identity {
    align-items: flex-start;
    padding-bottom: 22px;
  }
.profile-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 20px;
  }
.profile-name {
    font-size: 20px;
  }
.profile-role,
.profile-password-header p {
    font-size: 14px;
  }
.profile-fact {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
  }
.profile-fact dt,
.profile-fact dd {
    font-size: 14px;
  }
.profile-password-fields .input {
    height: 48px;
  }
.profile-password-actions .btn {
    width: 100%;
  }
.app-header {
    height: 74px;
    padding: 10px 12px;
  }
.header-user {
    width: 48px;
    height: 48px;
    padding-left: 0;
    border-left: 0;
  }
.header-user-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
.main-content {
    padding: 16px 12px 20px;
  }
.table-cards-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
.table-cards thead {
    display: none;
  }
.table-cards,
.table-cards tbody,
.table-cards tr,
.table-cards td {
    display: block;
    width: 100%;
  }
.table-cards tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 4px 14px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
.table-cards tr:last-child {
    margin-bottom: 0;
  }
.table-cards tr.row-link:hover {
    background: #fff;
    border-color: var(--secondary);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  }
.table-cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 0;
    border-bottom: 1px solid var(--border);
    text-align: right;
    font-weight: 500;
  }
.table-cards td:last-child {
    border-bottom: 0;
  }
.table-cards td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--secondary);
    text-align: left;
  }
}
.muted {
  color: #64748b;
}
.link {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: underline;
}
.perm-table th:not(:first-child),
.perm-table td:not(:first-child) {
  text-align: center;
  width: 90px;
}
.perm-module {
  font-weight: 600;
}
.perm-check {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}
html[data-sidebar-design="studio"] .app-shell {
  background: #f4f6fb;
}
html[data-sidebar-design="studio"] .sidebar {
  border-right: 1px solid #dce3f0;
  background:
    radial-gradient(circle at 16% 92%, rgba(55, 102, 181, 0.11), transparent 25%),
    linear-gradient(180deg, #fbfcff 0%, #f2f5fb 100%);
  color: #13224a;
  padding: 16px 14px;
  box-shadow: 10px 0 36px rgba(24, 47, 93, 0.08);
}
html[data-sidebar-design="studio"] .sidebar-brand {
  position: relative;
  gap: 13px;
  margin: 0 0 18px;
  padding: 15px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(135deg, #102b66 0%, #244a96 72%, #3159a2 100%);
  color: #fff;
  box-shadow: 0 13px 26px rgba(18, 48, 108, 0.22);
}
html[data-sidebar-design="studio"] .sidebar-brand::after {
  content: '';
  position: absolute;
  top: -36px;
  right: -31px;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
html[data-sidebar-design="studio"] .sidebar-brand-subtitle {
  position: relative;
  z-index: 1;
}
html[data-sidebar-design="studio"] .sidebar-brand-subtitle {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
html[data-sidebar-design="studio"] .nav-list {
  gap: 5px;
  padding: 1px 3px 8px 0;
  scrollbar-color: #cbd5e1 transparent;
}
html[data-sidebar-design="studio"] .nav-link {
  min-height: 47px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #314162;
  font-size: 14px;
  font-weight: 600;
}
html[data-sidebar-design="studio"] .nav-link svg {
  width: 20px;
  height: 20px;
  color: #63759a;
  transition: color 0.16s ease, transform 0.16s ease;
}
html[data-sidebar-design="studio"] .nav-link:hover {
  border-color: #dde5f2;
  background: #fff;
  color: #102b66;
  box-shadow: 0 7px 16px rgba(33, 60, 107, 0.08);
  transform: translateX(2px);
}
html[data-sidebar-design="studio"] .nav-link:hover svg {
  color: #244a96;
  transform: scale(1.06);
}
html[data-sidebar-design="studio"] .nav-link.active,
html[data-sidebar-design="studio"] .nav-link.active:hover {
  border-color: #c83240;
  background: linear-gradient(135deg, #c83240, #b82434);
  color: #fff;
  box-shadow: 0 9px 19px rgba(191, 42, 57, 0.24);
  transform: none;
}
html[data-sidebar-design="studio"] .nav-link.active svg,
html[data-sidebar-design="studio"] .nav-link.active:hover svg {
  color: #fff;
}
html[data-sidebar-design="studio"] .sidebar-logout {
  margin-top: 10px;
  padding-top: 10px;
  border-color: #dbe3ef;
}
html[data-sidebar-design="studio"] .sidebar .logout-btn {
  border: 1px solid #f0cbd0;
  border-radius: 12px;
  background: #fff6f7;
  color: #b62939;
  box-shadow: none;
}
html[data-sidebar-design="studio"] .sidebar .logout-btn:hover {
  border-color: #c83240;
  background: #c83240;
  color: #fff;
}
@media (min-width: 993px) {
html[data-sidebar-design="studio"] .app-shell {
    grid-template-columns: 282px minmax(0, 1fr);
  }
html[data-sidebar-design="studio"] .nav-list {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(2px, 0.55vh, 5px);
    overflow: hidden;
  }
html[data-sidebar-design="studio"] .nav-link {
    min-height: 0;
    height: clamp(40px, 5.3vh, 54px);
  }
}
@media (max-width: 992px) {
body.sidebar-open {
    overflow: hidden;
  }
html[data-sidebar-design="studio"] .sidebar {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    padding: 18px;
    border-right-color: #dce3f0;
    box-shadow: none;
  }
html[data-sidebar-design="studio"] .sidebar-close {
    top: 54px;
    right: 30px;
    z-index: 3;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    border-color: #d7dfed;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }
html[data-sidebar-design="studio"] .sidebar-brand {
    flex: 0 0 auto;
    margin-bottom: 14px;
    padding: 15px 62px 15px 15px;
  }
html[data-sidebar-design="studio"] .nav-list {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    align-content: stretch;
    gap: clamp(6px, 1.1dvh, 10px);
    padding: 3px 2px 8px;
    overflow: hidden;
  }
html[data-sidebar-design="studio"] .nav-link {
    min-width: 0;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    gap: clamp(4px, 0.7dvh, 7px);
    padding: clamp(5px, 1dvh, 9px) 7px;
    border-color: #e0e6f1;
    background: rgba(255, 255, 255, 0.76);
    text-align: center;
    box-shadow: 0 6px 15px rgba(31, 55, 99, 0.06);
  }
html[data-sidebar-design="studio"] .nav-link svg {
    width: clamp(19px, 2.7dvh, 23px);
    height: clamp(19px, 2.7dvh, 23px);
    flex-basis: clamp(19px, 2.7dvh, 23px);
  }
html[data-sidebar-design="studio"] .nav-link:hover {
    transform: none;
  }
html[data-sidebar-design="studio"] .sidebar-logout {
    flex: 0 0 auto;
    margin-top: 0;
    padding-top: 12px;
  }
html[data-sidebar-design="studio"] .sidebar .logout-btn {
    min-height: 48px;
  }
}
@media (min-width: 993px) and (max-height: 720px) {
html[data-sidebar-design="studio"] .sidebar {
    padding-top: 12px;
    padding-bottom: 12px;
  }
html[data-sidebar-design="studio"] .sidebar-brand {
    margin-bottom: 10px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
html[data-sidebar-design="studio"] .sidebar-logout {
    padding-top: 8px;
  }
html[data-sidebar-design="studio"] .sidebar .logout-btn {
    height: 40px;
  }
}
.card-title .badge {
  vertical-align: middle;
  margin-left: 6px;
}
.btn-loading {
  opacity: 0.6;
  pointer-events: none;
}
.settings-card-body {
  display: grid;
  gap: 14px;
}
.settings-text {
  margin: 0;
  font-size: 14px;
  color: #475569;
}
.field-hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}
.field-hint a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: underline;
}
@media print {
.sidebar,
.mobile-header,
.app-header,
.sidebar-overlay {
    display: none !important;
  }
.app-shell {
    display: block;
  }
.main {
    padding: 0;
  }
}
.required { color:var(--primary); }
.form-grid .full {
  grid-column: 1 / -1;
}
#ai-elapsed {margin-left:auto;font-variant-numeric:tabular-nums;font-weight:700}
@keyframes ai-spin {to{transform:rotate(360deg)}}
[data-channel-primary][aria-pressed="true"] { background: #e5f6ed; color: #17673f; border-color: #9bd0b2; }
.auth-brand-logo { display:block; width:280px; max-width:100%; height:auto; margin-bottom:32px; }
.sidebar-brand-logo { display:block; width:170px; max-width:100%; height:auto; flex-shrink:0; }
.mobile-brand-logo { display:block; width:140px; height:auto; }
html[data-sidebar-design="studio"] .sidebar-brand { flex-direction:column; align-items:flex-start; gap:10px; }
.btn-primary:hover { background:#be1e2d; }
html[data-sidebar-design="studio"] .sidebar { background:#f2f2f2; color:#0f172a; border-right-color:#dee2e6; box-shadow:10px 0 36px rgba(15,23,42,.06); }
html[data-sidebar-design="studio"] .sidebar-brand { background:#0f172a; box-shadow:0 13px 26px rgba(15,23,42,.15); }
html[data-sidebar-design="studio"] .sidebar-brand-logo { background:#fff; padding:8px 10px; border-radius:6px; }
.auth-hero { background:#0f172a; }

.settings-card-body .actions { justify-content:flex-start; flex-wrap:wrap; gap:10px; }
.settings-card-body .btn { max-width:100%; white-space:normal; text-align:center; }

html[data-sidebar-design="studio"] .sidebar-brand {
  width: fit-content;
  max-width: 100%;
  padding: 10px;
  gap: 0;
}

html[data-sidebar-design="studio"] .sidebar-brand {
  width: 100%;
}
html[data-sidebar-design="studio"] .sidebar-brand-logo {
  width: 100%;
  min-width: 0;
}

.auth-switch { margin-top:24px; font-size:13px; }
.auth-switch a { color:var(--primary); text-decoration:underline; }
.customer-search { display:flex; gap:10px; margin-bottom:20px; flex-wrap:wrap; }
.customer-search .input { flex:1; min-width:200px; }
.customer-address { white-space:pre-line; overflow-wrap:anywhere; max-width:320px; }
.customer-textarea { height:auto; padding:12px; resize:vertical; min-height:100px; }
.customer-reset-card { margin-top:24px; }
.empty-state { padding:36px 20px; text-align:center; }
.empty-state h2,.empty-state h3 { margin:0 0 10px; }
.empty-state p { color:#64748b; }
.btn-sm { min-height:34px; padding:0 12px; font-size:12px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:992px) {
  html[data-sidebar-design="studio"] .sidebar-brand { margin-top:35px; }
  html[data-sidebar-design="studio"] .sidebar-close { background:#0f172a; top:8px; }
  .customer-search .input { flex-basis:100%; }
  .customer-reset-card { margin-top:18px; }
  .profile-fact { gap:12px; }
}

.form-grid .field { align-content:start; }

.catalog-tabs { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:22px; }
.catalog-row-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.catalog-row-actions form { margin:0; }
.fabric-thumbnail { display:block; width:76px; height:76px; object-fit:cover; border-radius:8px; border:1px solid var(--border); }
.fabric-preview { display:block; width:280px; max-width:100%; max-height:280px; object-fit:contain; border-radius:8px; border:1px solid var(--border); background:#f2f2f2; }
.fabric-preview[hidden] { display:none; }
.catalog-file { height:auto; min-height:44px; padding:9px; }
@media(max-width:640px) { .catalog-tabs .btn { flex:1; } .catalog-row-actions { width:100%; } }

.order-fields { display:grid; gap:24px; }
.order-fields .field { align-content:start; }
.order-layer-field { border:0; padding:0; margin:0; min-width:0; }
.order-layer-field legend { margin-bottom:8px; }
.foam-layer { display:grid; gap:10px; padding:16px; border:1px solid var(--border); border-radius:8px; margin:12px 0; }
.layer-actions,.order-fabric-summary { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
button:disabled { opacity:.45; cursor:not-allowed; }
.fabric-picker { border:1px solid var(--border); border-radius:8px; background:#fff; }
.fabric-picker summary { padding:10px 12px; display:flex; align-items:center; gap:12px; cursor:pointer; min-height:56px; list-style:none; }
.fabric-picker summary::-webkit-details-marker { display:none; }
.fabric-picker summary>span:last-child { margin-left:auto; }
.fabric-options { max-height:320px; overflow:auto; border-top:1px solid var(--border); }
.fabric-option { display:flex; align-items:center; gap:12px; padding:12px; cursor:pointer; }
.fabric-option:hover,.fabric-option:has(input:checked) { background:#fff1f2; }
.fabric-option-image { width:48px; height:48px; border-radius:5px; object-fit:cover; border:1px solid var(--border); }
.fabric-option-image[hidden] { display:none; }
.order-layer-summary { display:grid; gap:5px; margin-top:12px; padding:12px; border:1px solid var(--border); border-radius:6px; }
.order-fabric-summary { margin-top:12px; }
.order-remark { white-space:pre-wrap; overflow-wrap:anywhere; }
.order-status { margin-bottom:20px; }
@media(min-width:993px) { .order-form,.order-fields { max-width:900px; } }

.size-dimensions { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.dimension-input { display:flex; align-items:center; gap:10px; }
.dimension-input .input { min-width:0; }
.dimension-input span { color:#64748b; font-size:13px; font-weight:400; line-height:1; letter-spacing:0; flex-shrink:0; }
.order-status form { margin-top:14px; }
@media(max-width:640px) { .size-dimensions { grid-template-columns:1fr; } }

/* Order workspace: shared form, collection, and specification view. */
.order-page-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:0 0 28px; }
.order-page-heading h1 { font-size:clamp(30px,3vw,44px); letter-spacing:-1.6px; font-weight:600; line-height:1.1; margin:10px 0 12px; color:#101827; }
.order-page-heading p:not(.order-eyebrow) { font-size:13px; letter-spacing:0; color:#6b7280; margin:0; }
.order-eyebrow { font-size:10px; letter-spacing:1.7px; font-weight:700; color:#8a929f; margin:0 0 8px; }
.order-back-link { display:inline-block; font-size:12px; letter-spacing:0; color:#6b7280; margin:0 0 22px; }
.order-back-link:hover { color:#ed1c24; }
.order-heading-tag { font-size:10px; letter-spacing:1.6px; border:1px solid #e3e5eb; border-radius:99px; padding:10px 15px; white-space:nowrap; color:#6b7280; }
.order-heading-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; max-width:470px; }
.order-heading-actions form { margin:0; }
.order-separator { margin:0 9px; color:#c8cdd4; }
.order-form,.order-form .order-fields { max-width:none; }
.order-editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }
.order-editor-card,.order-detail-card { background:white; border:1px solid #e8e9ee; border-radius:20px; overflow:hidden; box-shadow:0 4px 20px rgba(15,23,42,.025); }
.order-editor-card-heading { padding:25px 28px; display:flex; align-items:center; gap:14px; border-bottom:1px solid #f0f0f3; }
.order-step-dot { width:38px; height:38px; display:grid; place-items:center; background:#fff0f1; color:#be1e2d; font-size:12px; font-weight:700; border-radius:12px; flex-shrink:0; }
.order-editor-card-heading h2 { margin:0 0 5px; font-size:17px; letter-spacing:-.4px; }
.order-editor-card-heading p { margin:0; font-size:12px; color:#8a929f; letter-spacing:0; }
.order-form .order-fields { padding:28px; gap:26px; }
.order-form .label { font-size:12px; font-weight:600; letter-spacing:0; color:#303b4c; }
.order-form .input,.order-form .select { border-color:#e1e4ea; background:#fbfbfc; border-radius:10px; min-height:46px; font-size:13px; letter-spacing:0; }
.order-form .input:focus,.order-form .select:focus { background:#fff; border-color:#ed1c24; }
.order-form .field-hint { font-size:11px; letter-spacing:0; line-height:1.6; }
.order-form .foam-layer { background:#fcfcfd; border-color:#e8e9ee; border-radius:12px; padding:18px; }
.order-form .layer-label { color:#b52230; font-size:11px; text-transform:uppercase; letter-spacing:1px; }
.order-form .layer-actions .btn { min-height:28px; font-size:10px; border:0; background:#f0f1f4; color:#667085; border-radius:6px; }
.order-form .fabric-picker { border-color:#e1e4ea; border-radius:12px; }
.order-form .fabric-picker summary { font-size:13px; letter-spacing:0; }
.order-form #add-foam-layer { border:1px dashed #d9dde5; background:transparent; font-size:12px; border-radius:10px; }
.order-live-summary { position:sticky; top:104px; background:#111a2b; color:#fff; border-radius:20px; padding:26px; overflow:hidden; }
.order-live-summary .order-eyebrow { color:#9aa6ba; }
.order-live-summary h2 { font-size:23px; font-weight:500; letter-spacing:-.7px; margin:0; line-height:1.3; }
.order-live-summary dl { margin:0; }
.order-live-summary dl>div { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:15px 0; border-bottom:1px solid #ffffff12; }
.order-live-summary dt { color:#98a6bb; font-size:11px; letter-spacing:0; }
.order-live-summary dd { font-size:12px; letter-spacing:0; margin:0; text-align:right; overflow-wrap:anywhere; max-width:160px; }
.order-summary-foot { color:#98a6bb; font-size:11px; letter-spacing:0; line-height:1.8; margin-top:22px; }
.mattress-illustration { position:relative; height:146px; margin:8px 0; }
.mattress-illustration span { position:absolute; left:25px; width:185px; height:70px; border-radius:16px; transform:rotate(-15deg) skewX(12deg); box-shadow:0 10px 20px #0002; }
.mattress-illustration span:nth-child(1) { top:56px; background:#93414b; border:1px solid #d86876; }
.mattress-illustration span:nth-child(2) { top:38px; background:#c99b8b; border:1px solid #ecd1c5; }
.mattress-illustration span:nth-child(3) { top:20px; background:linear-gradient(135deg,#fff7ef,#d5cfc9); border:1px solid white; }
.order-form-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:12px 2px; }
.order-form-footer>span { color:#8a929f; font-size:11px; letter-spacing:0; max-width:55%; }
.order-form-footer .actions { margin:0; }
.order-form-footer .btn { min-height:46px; border-radius:10px; font-size:12px; }
.order-detail-metrics { display:grid; grid-template-columns:1.7fr 1fr 1fr 1fr; gap:1px; background:#e9ebef; border:1px solid #e9ebef; border-radius:16px; overflow:hidden; margin-bottom:26px; }
.order-detail-metrics>div { padding:23px; background:white; }
.order-detail-metrics span { display:block; font-size:9px; letter-spacing:1.5px; color:#9299a5; margin-bottom:10px; }
.order-detail-metrics strong { font-size:22px; letter-spacing:-.6px; font-weight:600; }
.order-detail-metrics small { font-size:11px; color:#9299a5; font-weight:400; letter-spacing:0; }
.order-priority-high { color:#c02b3a; }.order-priority-medium { color:#ad7939; }.order-priority-low { color:#43886a; }
.order-detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }
.order-detail-main,.order-detail-side { display:grid; gap:22px; }
.order-section-heading { padding:26px 26px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.order-section-heading h2 { font-size:22px; letter-spacing:-.7px; font-weight:500; margin:0; }
.order-muted-tag { font-size:9px; letter-spacing:0; background:#f5f6f8; padding:7px 10px; border-radius:99px; color:#8993a1; }
.order-construction-list { padding:0 26px 12px; }
.order-construction-row { display:flex; align-items:center; gap:16px; border-top:1px solid #f0f1f4; padding:24px 0; }
.order-layer-number { font-size:11px; color:#b0b8c5; align-self:flex-start; padding-top:5px; }
.order-layer-copy { flex:1; min-width:0; }.order-layer-copy h3 { font-size:17px; font-weight:600; letter-spacing:-.4px; margin:6px 0 12px; }
.order-layer-caption { font-size:10px; letter-spacing:1px; color:#939ba8; text-transform:uppercase; }
.order-layer-specs { display:flex; gap:18px; flex-wrap:wrap; }.order-layer-specs span { font-size:11px; color:#939ba8; letter-spacing:0; }.order-layer-specs strong { color:#3a4556; margin-left:5px; font-weight:500; }


.order-finishing { margin:0; padding:0 26px 26px; }.order-finishing>div { border-top:1px solid #f0f1f4; padding:18px 0 0; margin-top:16px; }.order-finishing dt { font-size:10px; color:#9199a6; text-transform:uppercase; letter-spacing:1px; margin-bottom:9px; }.order-finishing dd { margin:0; color:#3a4556; font-size:13px; letter-spacing:0; line-height:1.8; }
.order-fabric-card { border:1px solid #e8e9ee; border-radius:20px; overflow:hidden; background:white; }.order-fabric-image { height:190px; background:#eeeae5; position:relative; }.order-fabric-image img { width:100%; height:100%; object-fit:cover; }.order-fabric-image>span { position:absolute; bottom:14px; left:16px; background:#fffc; color:#303949; font-size:8px; letter-spacing:1.4px; padding:8px 10px; border-radius:5px; }.order-fabric-copy { padding:22px; }.order-fabric-copy h2 { font-size:21px; letter-spacing:-.5px; margin:5px 0 10px; }.order-fabric-copy>p:last-child { color:#9299a5; font-size:12px; margin:0; letter-spacing:0; }
.order-customer-card,.order-workflow-card { border:1px solid #e8e9ee; background:#fff; border-radius:16px; padding:22px; }.order-customer-card h3 { font-size:15px; letter-spacing:-.3px; margin:10px 0; }.order-customer-card>p:not(.order-eyebrow),.order-workflow-card>p:not(.order-eyebrow) { font-size:11px; letter-spacing:0; line-height:1.8; color:#8a929f; margin-bottom:0; }.order-workflow-state { display:flex; align-items:center; gap:9px; margin-top:14px; }.order-workflow-state>span { width:7px; height:7px; border-radius:50%; background:#c79442; flex-shrink:0; }.order-workflow-state strong { font-size:12px; letter-spacing:0; font-weight:500; }
.order-delete-button { background:#fff0f1; color:#b42b39; border-color:transparent; }.order-delete-button:hover { background:#ffe0e3; }
.order-list-summary { display:flex; align-items:baseline; gap:10px; margin-bottom:20px; }.order-list-summary strong { font-size:26px; letter-spacing:-1px; font-weight:600; }.order-list-summary span { font-size:12px; letter-spacing:0; color:#9299a5; }
.order-list-card { border-radius:16px; border:1px solid #e8e9ee; overflow:hidden; }.order-list-card .table th { background:#fafafb; font-size:9px; letter-spacing:1px; color:#8c95a3; }.order-list-card .table td { padding-top:20px; padding-bottom:20px; font-size:12px; letter-spacing:0; }.order-list-card .catalog-row-actions .btn { font-size:10px; border-radius:7px; }
@media(max-width:1190px) { .order-editor-layout,.order-detail-layout { grid-template-columns:minmax(0,1fr) 260px; gap:18px; }.order-live-summary { padding:22px; }.mattress-illustration span { left:10px; width:160px; }.order-detail-metrics>div { padding:18px; }.order-detail-metrics strong { font-size:18px; } }
@media(max-width:992px) { .order-editor-layout,.order-detail-layout { grid-template-columns:1fr; }.order-live-summary { position:static; }.order-live-summary .mattress-illustration { display:none; }.order-live-summary dl { display:grid; grid-template-columns:1fr 1fr; gap:0 22px; }.order-detail-side { grid-template-columns:1fr 1fr; }.order-page-heading { align-items:flex-start; }.order-heading-actions { max-width:290px; }.order-detail-metrics { grid-template-columns:1fr 1fr; } }
@media(max-width:640px) { .order-page-heading { flex-direction:column; gap:18px; }.order-heading-tag { display:none; }.order-page-heading h1 { font-size:30px; }.order-heading-actions { max-width:none; justify-content:flex-start; }.order-editor-card-heading { padding:20px; }.order-form .order-fields { padding:20px; gap:22px; }.order-form-footer { align-items:stretch; flex-direction:column; }.order-form-footer>span { max-width:none; }.order-form-footer .actions { flex-direction:row; }.order-form-footer .btn { flex:1; }.order-detail-side { grid-template-columns:1fr; }.order-section-heading { padding:22px 20px 18px; }.order-muted-tag { display:none; }.order-construction-list { padding:0 20px 5px; }.order-finishing { padding:0 20px 20px; }.order-live-summary dl { grid-template-columns:1fr; } }

/* A single material story: outer fabric beside the actual ordered foam core. */
.order-metrics-five { grid-template-columns:1.5fr 1.15fr 1.35fr .9fr 1fr; }
.order-metrics-five>div { padding:22px 20px; min-width:0; }
.order-metrics-five strong { display:block; font-size:19px; overflow-wrap:anywhere; }
.order-metrics-five .order-customer-value { font-size:16px; line-height:1.4; letter-spacing:-.3px; }
.order-metrics-five .order-mobile-value { font-size:16px; letter-spacing:0; }
.mattress-detail-card { margin-bottom:24px; }
.mattress-detail-structure { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); padding:6px 28px 30px; gap:0; }
.mattress-fabric-panel { background:#f6f3ef; padding:24px; border-radius:14px 0 0 14px; min-width:0; }
.mattress-panel-label { display:flex; align-items:center; gap:10px; margin-bottom:24px; }
.mattress-panel-label>span { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; border:1px solid #c9c6c0; color:#96928b; font-size:8px; letter-spacing:0; }
.mattress-panel-label>p { margin:0; font-size:9px; letter-spacing:1.6px; color:#8b8883; font-weight:600; }
.mattress-fabric-frame { display:block; position:relative; margin:0 4px 24px; height:240px; border-radius:34px 34px 25px 25px; background:#e4ddd3; box-shadow:0 11px 0 -2px #d4cabe,0 16px 0 -2px #bcb0a1,0 25px 26px -15px #80746865; overflow:hidden; border:1px solid #ded5c9; }
.mattress-fabric-frame>img { width:100%; height:100%; object-fit:cover; display:block; }
.mattress-piping { position:absolute; inset:9px; border:1px dashed #ffffffab; border-radius:25px 25px 18px 18px; pointer-events:none; box-shadow:0 0 0 1px #0000000a; }
.mattress-photo-hint { position:absolute; bottom:18px; left:18px; font-size:9px; letter-spacing:.3px; background:#ffffffeb; border-radius:99px; padding:8px 11px; color:#4e4a43; }
.mattress-fabric-caption { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding-top:10px; }
.mattress-fabric-caption h3 { font-size:19px; letter-spacing:-.5px; margin:0; font-weight:600; }.mattress-fabric-caption>span { font-size:11px; color:#8b8883; white-space:nowrap; letter-spacing:0; }
.mattress-core-panel { padding:24px 10px 8px 30px; border-left:1px dashed #ddd8d1; min-width:0; }
.mattress-core-panel .mattress-panel-label>span { border-color:#edc9cc; color:#b53442; }.mattress-core-panel .mattress-panel-label>p { color:#a1666b; }
.mattress-core-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:5px; }
.mattress-core-heading h3 { font-size:22px; letter-spacing:-.7px; font-weight:500; margin:0; }.mattress-core-heading>span { font-size:10px; color:#9299a5; letter-spacing:0; }
.mattress-core-panel .order-construction-list { padding:0; }.mattress-core-panel .order-construction-row { padding:22px 0; }.mattress-core-panel .order-construction-row:first-child { border-top:0; }.mattress-core-panel .order-layer-copy h3 { font-size:18px; }
.mattress-secondary-grid { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:24px; align-items:start; }.mattress-secondary-grid>.order-detail-card:only-child { grid-column:1/-1; }
@media(max-width:1190px) { .order-metrics-five { grid-template-columns:1.4fr 1.15fr 1.3fr .8fr .9fr; }.order-metrics-five>div { padding:20px 15px; }.order-metrics-five strong { font-size:16px; }.order-metrics-five .order-mobile-value { font-size:14px; }.mattress-fabric-frame { height:210px; }.mattress-detail-structure { padding:4px 22px 24px; }.mattress-core-panel { padding-left:24px; } }
@media(max-width:800px) { .order-metrics-five { grid-template-columns:1fr 1fr; }.order-metrics-five>div:last-child { grid-column:1/-1; }.mattress-detail-structure { grid-template-columns:1fr; }.mattress-fabric-panel { border-radius:14px; }.mattress-fabric-frame { height:260px; }.mattress-core-panel { border-left:0; padding:26px 0 0; }.mattress-secondary-grid { grid-template-columns:1fr; gap:18px; } }
@media(max-width:480px) { .mattress-detail-structure { padding:0 18px 20px; }.mattress-fabric-panel { padding:18px; }.mattress-fabric-frame { height:210px; }.mattress-fabric-caption h3 { font-size:17px; }.order-metrics-five>div { padding:18px 15px; }.order-metrics-five .order-customer-value { font-size:15px; } }

.order-metrics-four { grid-template-columns:1.5fr 1.4fr 1fr 1fr; }
.order-metrics-four .order-customer-value { display:block; font-size:17px; line-height:1.35; }

.mattress-core-panel { padding-top:12px; }
.mattress-core-panel .order-layer-caption { font-size:14px; color:#667085; font-weight:600; letter-spacing:.4px; }
.mattress-core-panel .order-layer-number { font-size:13px; color:#7b8492; padding-top:4px; }
.foam-specification-line { display:flex; align-items:baseline; flex-wrap:wrap; gap:12px 20px; margin-top:12px; }
.mattress-core-panel .foam-specification-line h3 { font-size:20px; line-height:1.4; margin:0; }
.foam-specification-line>span { font-size:15px; color:#667085; letter-spacing:0; line-height:1.5; }
.foam-specification-line strong { color:#263244; font-weight:600; margin-left:5px; }
@media(min-width:993px) { .mattress-detail-structure { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); } }
@media(max-width:640px) { .foam-specification-line { gap:10px 16px; }.mattress-core-panel .foam-specification-line h3 { font-size:19px; }.foam-specification-line>span { font-size:15px; } }@media(max-width:800px) { .order-detail-metrics.order-metrics-four { grid-template-columns:1fr 1fr; } }

.order-metrics-round { grid-template-columns:1.5fr 1.4fr 1fr 1fr .8fr; }
.order-metrics-round>div { min-width:0; padding:22px 18px; }
.order-metrics-round strong { display:block; overflow-wrap:anywhere; font-size:19px; }
.order-metrics-round .order-customer-value { font-size:17px; line-height:1.4; }
@media(max-width:800px) { .order-detail-metrics.order-metrics-round { grid-template-columns:1fr 1fr; } }

.order-priority-field { border:0; padding:0; margin:0; min-width:0; }
.order-priority-field legend { margin-bottom:10px; }
.priority-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.priority-choice { --priority-accent:#b52e3c; display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; border:1px solid var(--priority-accent); border-radius:10px; color:#fff; background:var(--priority-accent); font-size:13px; font-weight:600; letter-spacing:0; cursor:pointer; transition:filter .15s,box-shadow .15s; position:relative; }
.priority-choice-medium { --priority-accent:#a4772e; }.priority-choice-low { --priority-accent:#398163; }
.priority-choice input { position:absolute; width:1px; height:1px; opacity:0; }
.priority-choice-dot { display:none; }
.priority-choice-check { display:none; }
.priority-choice:hover { filter:brightness(.94); }
.priority-choice:has(input:checked) { color:#fff; border-color:var(--priority-accent); background:var(--priority-accent); box-shadow:0 0 0 2px #fff,0 0 0 4px var(--priority-accent); }
.priority-choice:has(input:checked) .priority-choice-check { display:inline; font-size:12px; }
.priority-choice:focus-within { outline:3px solid #ed1c2426; outline-offset:3px; }
.order-submit-approve { border-color:#b52e3c; color:#b52e3c; background:#fff; }

.production-tabs { display:flex; gap:9px; flex-wrap:wrap; margin-bottom:24px; }
.production-tab { display:flex; align-items:center; gap:12px; border:1px solid #e1e5ec; background:white; border-radius:10px; padding:12px 15px; font-size:12px; letter-spacing:0; color:#6b7280; }
.production-tab b { background:#f0f2f6; min-width:22px; padding:3px 6px; text-align:center; font-size:10px; font-weight:500; border-radius:5px; }
.production-tab.active { background:#111b2d; border-color:#111b2d; color:#fff; }.production-tab.active b { background:#ffffff20; }
.production-queue-count { font-size:36px; letter-spacing:-1px; font-weight:600; white-space:nowrap; }.production-queue-count small { font-size:13px; font-weight:400; letter-spacing:0; color:#8b94a2; }
.production-customer-name { display:block; font-size:11px; margin-top:6px; color:#7b8595; }
.production-priority { padding:5px 9px; border-radius:5px; font-size:10px; background:#f5f3ee; color:#9c7d41; }.production-priority.priority-high { background:#fcebee; color:#b62c3d; }.production-priority.priority-low { background:#eaf4ee; color:#3e8060; }
.production-permission-note { margin-top:20px; }
.production-history { margin-top:24px; }.production-event-list { list-style:none; padding:0 26px 24px; margin:0; }.production-event-list li { display:flex; gap:14px; border-top:1px solid #f0f1f4; padding:18px 0; }.production-event-dot { width:8px; height:8px; background:#59856a; border-radius:50%; margin-top:5px; flex-shrink:0; }.production-event-list strong { font-size:13px; letter-spacing:0; font-weight:600; }.production-event-list strong>span { color:#6e8d77; font-weight:400; margin-left:6px; font-size:11px; }.production-event-list p { margin:6px 0 0; color:#929baa; font-size:11px; letter-spacing:0; }
.production-dashboard { margin-bottom:28px; }.production-dashboard-heading h2 { font-size:20px; letter-spacing:-.5px; margin:0 0 6px; }.production-dashboard-heading p { color:#8b94a2; margin:0 0 20px; font-size:12px; letter-spacing:0; }.production-dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:14px; }.production-dashboard-card { display:flex; flex-direction:column; gap:15px; background:#fff; border:1px solid #e5e8ee; border-radius:14px; padding:20px; transition:border-color .15s,transform .15s; }.production-dashboard-card:hover { border-color:#be1e2d; transform:translateY(-2px); }.production-dashboard-card>span { font-size:11px; color:#758092; letter-spacing:0; }.production-dashboard-card>strong { font-size:32px; letter-spacing:-1px; line-height:1; }.production-dashboard-card>small { font-size:10px; color:#a1a8b3; letter-spacing:0; }
@media(max-width:640px) { .production-tabs { display:grid; grid-template-columns:1fr 1fr; }.production-tab { justify-content:space-between; padding:10px; }.production-dashboard-grid { grid-template-columns:1fr 1fr; }.production-dashboard-card { padding:16px; }.production-event-list { padding:0 20px 20px; } }

/* Full specifications at the workstation, without opening each order. */
.production-order-cards{display:grid;gap:32px}
.production-order-card{padding:24px;border:1px solid #dedee7;border-radius:22px;background:#fff;box-shadow:0 5px 22px rgba(15,23,42,.035)}
.production-order-card-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px}
.production-order-card-heading h2{font-size:24px;margin:4px 0 8px;color:#0f172a}
.production-order-card-heading p:last-child{margin:0;font-size:13px;color:#64748b}
.production-order-card .order-detail-metrics{background:#f8f8fb}
.production-order-card .order-detail-card{box-shadow:none}
.production-order-card .mattress-secondary-grid{margin-bottom:0}
@media(max-width:640px){.production-order-card{padding:14px;border-radius:16px}.production-order-card-heading{align-items:flex-start}.production-order-card-heading h2{font-size:21px}}

/* Compact cards used only by the three manufacturing queues. */
.production-compact-list{gap:16px}
.production-compact-card{background:#fff;border:1px solid #e1e3ea;border-radius:14px;padding:18px 20px;color:#0f172a;letter-spacing:0}
.production-compact-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}
.production-compact-heading>div:first-child{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.production-compact-heading h2{margin:0;font-size:18px;font-weight:600;letter-spacing:0}
.production-compact-heading>div>span{font-size:14px;color:#475569}
.production-compact-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.production-compact-actions form{margin:0}
.production-compact-metrics{display:flex;flex-wrap:wrap;gap:14px 32px;margin:0 0 14px;padding:10px 14px;background:#f7f7fa;border-radius:8px}
.production-compact-metrics>div{display:flex;align-items:baseline;gap:10px}
.production-compact-metrics dt{font-size:12px;color:#64748b}
.production-compact-metrics dd{margin:0;font-size:15px;font-weight:600}
.production-compact-materials{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:20px;align-items:start}
.production-compact-fabric{display:flex;gap:12px;align-items:center;min-width:0;color:inherit}
.production-compact-fabric img{width:68px;height:68px;object-fit:cover;border:1px solid #e2e5ea;border-radius:9px;flex-shrink:0}
.production-compact-fabric strong{display:block;font-size:14px;overflow-wrap:anywhere}
.production-compact-fabric small{display:block;font-size:11px;color:#64748b;margin-top:6px}
.production-compact-layers{display:grid;gap:0}
.production-compact-layer{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 18px;padding:8px 0;border-bottom:1px solid #eff0f4;font-size:13px}
.production-compact-layer:first-child{padding-top:0}.production-compact-layer:last-child{border-bottom:0}
.production-compact-layer-label{color:#64748b;font-size:12px;min-width:48px}
.production-compact-layer>strong{font-size:15px;min-width:110px}
.production-compact-layer>span:not(:first-child){color:#64748b}.production-compact-layer b{color:#0f172a;font-weight:500;margin-left:4px}
.production-compact-remark{display:flex;gap:12px;border-top:1px solid #eff0f4;padding-top:10px;margin:12px 0 0;font-size:13px;line-height:1.6}
.production-compact-remark>strong{font-weight:500;color:#64748b}.production-compact-remark>span{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0}
@media(max-width:700px){.production-compact-card{padding:14px}.production-compact-heading{align-items:flex-start}.production-compact-heading>div:first-child{display:block}.production-compact-heading h2{margin-bottom:5px}.production-compact-materials{grid-template-columns:1fr;gap:14px}.production-compact-metrics{gap:10px 20px}.production-compact-actions{gap:8px}.production-compact-actions .btn{padding:9px 12px}}

.dispatch-customer-picker{display:flex;align-items:flex-end;gap:16px}.dispatch-customer-picker .field{flex:1;max-width:550px}.dispatch-create-form{display:grid;gap:20px;margin-top:24px}.dispatch-create-form>.card{margin:0}.dispatch-quantity{max-width:120px;min-width:85px}.dispatch-selection input[type=checkbox]{width:18px;height:18px;accent-color:#ed1c24}.dispatch-selection input:disabled{opacity:.45;background:#f3f4f6}.dispatch-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;background:#fff;border:1px solid #e1e3ea;border-radius:12px}.dispatch-submit-bar p{margin:0;font-size:14px;color:#64748b}.dispatch-submit-bar strong{color:#0f172a;font-size:20px;margin-right:5px}.dispatch-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #e1e3ea;background:#fff;border-radius:16px;margin-bottom:24px;overflow:hidden}.dispatch-overview>div{padding:22px;border-right:1px solid #eceef2;overflow-wrap:anywhere}.dispatch-overview>div:last-child{border:0}.dispatch-overview span{display:block;font-size:10px;letter-spacing:1px;color:#64748b;margin-bottom:12px}.dispatch-overview strong{font-size:18px;color:#0f172a}.dispatch-overview small{display:block;margin-top:6px;color:#64748b}.dispatch-recorded-badge{font-size:12px;background:#eaf4ee;color:#347252;padding:10px 14px;border-radius:8px}@media(max-width:700px){.dispatch-customer-picker{align-items:stretch;flex-direction:column}.dispatch-overview{grid-template-columns:1fr 1fr}.dispatch-overview>div{padding:16px}.dispatch-submit-bar{padding:14px;flex-wrap:wrap}}

.orders-compact-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid #eff0f4}.orders-compact-footer>div:first-child{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.orders-compact-date{color:#64748b;font-size:12px}.orders-compact-footer form{margin:0}

.order-customer-control{display:flex;gap:10px;align-items:center}.order-customer-control>.input{flex:1;min-width:0}.order-customer-control>.btn{white-space:nowrap}.order-customer-dialog{border:1px solid #e1e3ea;border-radius:18px;padding:26px;width:min(660px,calc(100vw - 32px));max-height:90vh;overflow:auto;color:#0f172a;box-shadow:0 24px 80px #0f172a30}.order-customer-dialog::backdrop{background:#0f172a88}.order-customer-dialog-heading{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.order-customer-dialog h2{margin:0;font-size:24px;letter-spacing:-.5px}.order-customer-dialog-heading p{font-size:13px;line-height:1.7;color:#64748b;margin:8px 0 0}.order-customer-dialog .actions{margin-top:24px}.order-customer-dialog .alert{white-space:pre-line}.order-customer-dialog [hidden]{display:none}#order-customer-feedback:empty{display:none}@media(max-width:640px){.order-customer-control{align-items:stretch;flex-direction:column}.order-customer-control>.btn{align-self:flex-start}.order-customer-dialog{padding:18px}}
.order-customer-combobox{position:relative;flex:1;min-width:0}.order-customer-results{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:30;border:1px solid #dfe3ea;border-radius:10px;background:#fff;box-shadow:0 12px 30px #0f172a18;max-height:260px;overflow:auto;padding:5px}.order-customer-results[hidden]{display:none}.order-customer-results button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:6px;padding:12px;font:inherit;font-size:13px;color:#0f172a;cursor:pointer}.order-customer-results button:hover,.order-customer-results button[aria-selected=true]{background:#f5f3f7}.order-customer-results p{padding:8px;font-size:13px;line-height:1.6;color:#64748b}

/* Select-only customer control: the search exists inside the open popover. */
.customer-select-trigger{display:flex;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;background:#fff;border:1px solid #dedee8;border-radius:12px;padding:10px 14px;color:#0f172a;cursor:pointer;min-height:48px;height:48px;box-sizing:border-box}.customer-select-trigger:hover{border-color:#babdcc}.customer-select-trigger:focus-visible,.customer-select-trigger[aria-expanded=true]{outline:3px solid #ed1c2412;border-color:#bd3440}.customer-trigger-avatar,.customer-result-avatar{display:grid;place-items:center;flex-shrink:0;border-radius:10px;background:#f4f1f5;color:#75515b;width:36px;height:36px}.customer-trigger-copy{display:flex;align-items:center;gap:10px;flex:1;min-width:0;overflow:hidden}.customer-trigger-copy strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}.customer-trigger-copy small{font-size:11px;color:#7d8594}.customer-select-trigger .customer-picker-chevron{position:static;margin-left:auto;color:#6b7280;pointer-events:none}.customer-select-popover{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:45;background:#fff;border:1px solid #e5e3eb;border-radius:14px;box-shadow:0 16px 45px #18223b20;padding:8px}.customer-select-popover[hidden]{display:none}.customer-popover-search{padding:5px 5px 10px;border-bottom:1px solid #f0eef4}.customer-popover-search .input{padding:11px 12px;border-radius:9px;background:#f8f7fa;font-size:13px;min-height:42px}.customer-select-popover .order-customer-results{position:static;max-height:240px;border:0;box-shadow:none;padding:6px 0;background:transparent;border-radius:0;overflow:auto}.customer-select-popover .order-customer-results button{display:flex;align-items:center;gap:12px;padding:10px;border-radius:9px}.customer-result-avatar{width:34px;height:34px;font-size:13px;font-weight:600}.customer-result-copy{display:grid;gap:4px;flex:1;min-width:0}.customer-result-copy strong{font-size:13px;font-weight:500;overflow-wrap:anywhere}.customer-result-copy small{font-size:11px;color:#7c8393}.customer-result-check{font-size:14px;color:#a8acb8}.customer-select-popover .order-customer-results button[aria-selected=true]{background:#fbf0f1}.customer-select-popover .order-customer-results button[aria-selected=true] .customer-result-check{color:#be1e2d}.customer-select-popover .order-customer-results button.is-keyboard-active,.customer-select-popover .order-customer-results button:hover{background:#f3f2f7}.customer-popover-footer{border-top:1px solid #f0eef4;padding:10px 12px 5px;color:#9398a5;font-size:10px;letter-spacing:.15px}.order-customer-control>.btn{min-height:48px}.customer-select-trigger[aria-invalid=true]{border-color:#ed1c24}

.order-customer-control{align-items:stretch}.order-customer-control>#open-order-customer{min-height:48px;height:48px;box-sizing:border-box;padding:10px 16px;align-self:stretch}@media(max-width:640px){.order-customer-control>#open-order-customer{min-height:48px;align-self:flex-start}}

.customer-trigger-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px}.customer-trigger-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}.customer-trigger-copy small[hidden]{display:none}.customer-trigger-copy small::before{content:'·';margin-right:10px;color:#b1b5c0}.customer-select-trigger .customer-picker-chevron{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:24px;border-left:1px solid #e8e8ef;padding-left:10px;color:#596174}.customer-picker-chevron svg{transition:transform .15s}.customer-select-trigger[aria-expanded=true] .customer-picker-chevron svg{transform:rotate(180deg)}

.order-priority-delivery-row{display:grid;grid-template-columns:1fr;gap:24px;align-items:start}.order-delivery-field .input{min-height:48px;height:48px;box-sizing:border-box}.order-delivery-field>.label{margin-bottom:10px}.order-detail-metrics.order-metrics-delivery{grid-template-columns:1.4fr 1.2fr .9fr .9fr 1.2fr .7fr}@media(max-width:800px){.order-priority-delivery-row{grid-template-columns:1fr}.order-detail-metrics.order-metrics-delivery{grid-template-columns:1fr 1fr}}

/* Priority tints apply to the Orders list cards only. */
.orders-priority-card.orders-priority-high{background:#fff3f4;border-color:#f0cdd2}
.orders-priority-card.orders-priority-medium{background:#fffaf0;border-color:#ebdfc4}
.orders-priority-card.orders-priority-low{background:#f0faf4;border-color:#cde5d6}
.orders-priority-card .production-compact-metrics{background:rgba(255,255,255,.65)}
.orders-priority-card .production-compact-layer,.orders-priority-card .production-compact-remark,.orders-priority-card .orders-compact-footer{border-color:rgba(15,23,42,.08)}

.orders-page-actions{display:flex;align-items:center;gap:24px}.orders-page-actions .order-list-summary{margin:0;flex-direction:column;align-items:flex-end;gap:3px}.orders-page-actions .order-list-summary strong{font-size:26px;line-height:1.1}.orders-page-actions .order-list-summary span{font-size:11px;white-space:nowrap}@media(max-width:640px){.orders-page-actions{width:100%;justify-content:space-between;gap:16px}.orders-page-actions .order-list-summary{align-items:flex-start}}

.orders-priority-card .production-compact-heading>div:first-child>span{font-size:17px;line-height:1.5;font-weight:500}.orders-priority-card .customer-order-city{font-size:inherit;font-weight:inherit}

.order-filter-bar{margin-bottom:24px;padding:18px;background:#fff;border:1px solid #e5e3eb;border-radius:14px}.order-filter-grid{display:grid;grid-template-columns:1fr 1.4fr .85fr 1.15fr auto;gap:12px;align-items:end}.order-filter-control{position:relative;min-width:0}.order-filter-control>.label{margin-bottom:9px;font-size:12px}.order-filter-trigger{height:46px;min-height:46px;padding:9px 12px;gap:8px}.order-filter-trigger .customer-trigger-copy{gap:7px}.order-filter-trigger .customer-trigger-copy strong{font-size:12px}.order-filter-trigger .customer-trigger-copy small{font-size:10px}.order-filters-clear{height:46px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.order-filter-popover{min-width:220px}.order-filter-control[data-filter-name=customer_account_id] .order-filter-popover{min-width:280px}.order-filter-popover [hidden]{display:none!important}.order-filter-popover .order-customer-results button{gap:8px}.order-filter-date-range{display:flex;gap:16px;align-items:end;margin-top:18px;border-top:1px solid #efedf3;padding-top:16px}.order-filter-date-range[hidden]{display:none}.order-filter-date-range>.field{flex:1;max-width:240px}.order-filter-date-range .field-hint{max-width:250px;margin:0 0 12px;line-height:1.6}.order-filter-bar[aria-busy=true]{opacity:.65;pointer-events:none}@media(max-width:1100px){.order-filter-grid{grid-template-columns:1fr 1fr}.order-filters-clear{justify-self:start;min-width:90px}.order-filter-date-range{flex-wrap:wrap}}@media(max-width:640px){.order-filter-bar{padding:14px}.order-filter-grid{grid-template-columns:1fr}.order-filter-popover,.order-filter-control[data-filter-name=customer_account_id] .order-filter-popover{min-width:0}.order-filter-date-range{flex-direction:column;align-items:stretch}.order-filter-date-range>.field{max-width:none}}

.overview-dispatched-quantity{display:block;font-size:11px;font-weight:400;line-height:1.5;color:#64748b;margin-top:4px}

.dispatch-identity-heading{display:flex;align-items:baseline;gap:14px 24px;flex-wrap:wrap}.dispatch-identity-heading .dispatch-customer-heading{font-size:clamp(21px,2vw,28px);font-weight:600;color:#25334b;letter-spacing:-.4px;line-height:1.3;margin:0;overflow-wrap:anywhere}

.dispatch-page-heading{align-items:flex-end}.dispatch-header-main{min-width:0}.dispatch-page-heading h1.dispatch-customer-title,.dispatch-page-heading .dispatch-header-reference h2{font-size:clamp(26px,2.5vw,34px);font-weight:600;letter-spacing:-.7px;line-height:1.2;margin:10px 0 0;color:#101827;overflow-wrap:anywhere}.dispatch-header-reference{display:flex;align-items:center;justify-content:flex-end;gap:18px;flex-wrap:wrap;flex-shrink:0}.dispatch-page-heading .dispatch-header-reference h2{margin:0}@media(max-width:640px){.dispatch-page-heading{align-items:stretch}.dispatch-header-reference{justify-content:space-between;gap:12px;flex-shrink:1}}

.dispatch-document-actions{display:flex;align-items:center;gap:10px}.dispatch-document-actions .btn{min-width:74px;justify-content:center}
