:root {
  --green: #42a347;
  --green-dark: #34863a;
  --ink: #202329;
  --muted: #6f7680;
  --line: #d8dde3;
  --panel: #ffffff;
  --shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(8, 22, 18, .38), rgba(255,255,255,.08) 38%, rgba(255,255,255,.72) 58%, rgba(12, 26, 19, .22)),
    url("assets/login-courier-bg-v2.png") center center / cover no-repeat fixed;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  position: relative;
  overflow: hidden;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(66, 163, 71, .22), transparent 34%),
              linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.56));
  pointer-events: none;
}

.login-box {
  width: min(455px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: clamp(26px, 4vw, 42px);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(20, 33, 31, .28);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.brand {
  margin: 0 0 24px;
  text-align: center;
  font-size: clamp(25px, 4.2vw, 34px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
  color: #132018;
}

.brand br {
  display: none;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

label {
  display: block;
  margin: 15px 0 9px;
  font-size: 16px;
  text-transform: lowercase;
}

.login-box label {
  margin: 14px 0 7px;
  color: #4c5560;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.login-box input {
  height: 46px;
  padding: 10px 13px;
  border: 1px solid #d6dee5;
  border-radius: 10px;
  background: rgba(247, 250, 252, .94);
  font-size: 16px;
}

select {
  width: 100%;
  height: 38px;
}

textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  resize: vertical;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(66, 163, 71, .16);
}

.actions {
  display: grid;
  gap: 13px;
  justify-items: center;
  margin-top: 24px;
}

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

button,
.btn {
  display: inline-grid;
  place-items: center;
  width: 188px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--green);
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.login-box button,
.login-box .btn {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(52, 134, 58, .22);
}

.login-box .screen.active .actions.spaced button[type="submit"] {
  grid-column: 1 / -1;
  min-height: 52px;
  font-size: 16px;
}

.login-box .actions.spaced .btn {
  min-height: 58px;
  padding: 8px 6px;
  color: var(--green-dark);
  background: #eaf6ec;
  box-shadow: none;
  font-size: 12px;
}

.login-box .actions.spaced .btn:hover {
  color: #fff;
  background: var(--green);
}

button:hover,
.btn:hover {
  background: var(--green-dark);
  box-shadow: 0 8px 18px rgba(52, 134, 58, .24);
  transform: translateY(-1px);
}

.button-wide {
  width: 100%;
}

.icon {
  display: inline-block;
  width: 21px;
  font-weight: 700;
}

.login-box .icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.login-box .icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.hint {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.login-box .hint {
  margin-bottom: 18px;
}

.alert,
.tracking-card {
  margin: 0 0 18px;
  padding: 13px 14px;
  border-left: 4px solid var(--green);
  background: #f1f8f2;
  color: #2d612f;
  font-size: 14px;
  line-height: 1.42;
}

.alert.error {
  border-left-color: #c23a3a;
  background: #fff0f0;
  color: #8a2424;
}

.import-alert {
  margin: 0 0 14px;
  border-radius: 3px;
  border-left-width: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  font-size: 16px;
  font-weight: 700;
}

.floating-message-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(0, 0, 0, .46);
}

.floating-message-overlay.open {
  display: block;
}

.floating-message-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 81;
  display: none;
  width: min(520px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  transform: translate(-50%, -50%);
}

.floating-message-modal.open {
  display: block;
}

.floating-message-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
}

.floating-message-modal.error header {
  background: #c23a3a;
}

.floating-message-modal header button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.floating-message-body {
  padding: 24px 22px;
  color: #1c2b22;
  font-size: 18px;
  line-height: 1.45;
}

.floating-message-modal footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.floating-message-modal footer button {
  min-width: 116px;
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  font-size: 16px;
  cursor: pointer;
}

.tracking-card {
  display: grid;
  gap: 5px;
  margin: 18px 0 0;
}

.link-button {
  color: var(--green-dark);
  font-size: 14px;
}

.dashboard {
  min-height: 100vh;
  background: #f6f7f8;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  color: #fff;
  background: var(--green-dark);
}

.topbar a {
  color: #fff;
}

.dashboard-content {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.dashboard-content h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.module-grid article {
  padding: 20px;
  border: 1px solid #e1e5e8;
  border-radius: 8px;
  background: #fff;
}

.module-grid h2 {
  margin: 0 0 8px;
}

.module-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--green-dark);
  font-weight: 700;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 16px;
  color: #fff;
  background: #26313a;
}

.sidebar-brand {
  margin-bottom: 16px;
  font-size: 28px;
  font-weight: 700;
}

.sidebar a {
  padding: 11px 12px;
  border-radius: 6px;
  color: #dce3e8;
  text-decoration: none;
}

.sidebar a.active,
.sidebar a:hover {
  color: #fff;
  background: var(--green);
}

.workspace {
  padding: 28px;
}

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

.workspace-head h1 {
  margin: 0 0 5px;
  font-size: 30px;
}

.workspace-head p {
  margin: 0;
  color: var(--muted);
}

.small-action {
  padding: 9px 14px;
  border-radius: 5px;
  color: #fff;
  background: var(--green);
  text-decoration: none;
}

.small-action.secondary {
  color: var(--green-dark);
  background: #e7f4e8;
}

.work-panel {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid #e1e5e8;
  border-radius: 8px;
  background: #fff;
}

.work-panel h2 {
  margin: 0 0 16px;
}

.tabbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #dce2e6;
}

.tabbar a {
  padding: 11px 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  color: #53606c;
  text-decoration: none;
}

.tabbar a.active {
  color: var(--green-dark);
  border-color: #dce2e6;
  background: #fff;
  font-weight: 700;
}

.upload-panel {
  display: grid;
  gap: 14px;
}

.upload-panel input[type="file"] {
  height: auto;
  padding: 14px;
  border-style: dashed;
  background: #fbfcfd;
}

.upload-help {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: #f1f8f2;
  color: #2d612f;
  font-size: 14px;
}

.warehouse-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.warehouse-form label {
  margin: 0 0 -5px;
}

.warehouse-form textarea,
.form-actions {
  grid-column: span 4;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions button {
  width: 180px;
}

.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  color: #2d612f;
  background: #e7f4e8;
  font-size: 13px;
  white-space: nowrap;
}

.api-layout {
  min-height: 100vh;
  background: #f4f4f4;
}

.api-topbar {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  height: 77px;
  padding: 0 24px;
  color: #fff;
  background: #212121;
}

.api-menu {
  font-size: 30px;
  font-weight: 700;
  width: 38px;
  min-height: 38px;
  padding: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.api-logo {
  font-size: 40px;
  letter-spacing: 1px;
}

.api-user {
  font-size: 16px;
  font-weight: 700;
}

.api-breadcrumb {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 80px;
  padding: 0 15px;
  color: #fff;
  background: #ff4a1c;
  box-shadow: 0 3px 7px rgba(0, 0, 0, .22);
  font-size: 22px;
}

.api-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.api-content {
  padding: 16px 14px 26px;
}

.api-filters {
  display: grid;
  grid-template-columns: 145px 145px minmax(220px, 1fr) minmax(280px, 1fr) minmax(150px, .45fr);
  gap: 28px;
  align-items: end;
  background: #fff;
}

.api-filters label {
  margin: 0;
}

.api-filters span {
  display: block;
  margin-bottom: 6px;
  color: #9198a2;
  font-size: 14px;
  text-transform: none;
}

.api-filters input {
  height: 36px;
  border: 0;
  border-bottom: 1px solid #a8a8a8;
  border-radius: 0;
  color: #000;
  font-size: 20px;
}

.api-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(190px, 385px) 145px 185px 290px;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
}

.api-actions button,
.api-upload button,
.import-button {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-height: 45px;
  padding: 0 28px;
  border-radius: 3px;
  color: #fff;
  background: #ff4a1c;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  font-size: 18px;
  text-decoration: none;
}

.api-upload .import-button {
  border: 0;
  cursor: pointer;
}

.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.switch-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #9e9e9e;
  position: relative;
}

.switch::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.switch-label input:checked + .switch {
  background: #69b96e;
}

.switch-label input:checked + .switch::before {
  left: 13px;
  background: #fff;
}

.api-import-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.api-upload {
  display: flex;
  align-items: center;
  gap: 18px;
}

.api-upload input[type="file"] {
  width: 290px;
  height: auto;
  padding: 10px;
  border: 1px solid #ddd;
}

.disabled-action {
  display: inline-grid;
  place-items: center;
  min-height: 45px;
  padding: 0 38px;
  border-radius: 3px;
  color: #929ca2;
  background: #d9d9d9;
  text-decoration: none;
  font-size: 18px;
}

.record-total {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #000;
  font-size: 14px;
}

.record-total strong {
  min-width: 80px;
  padding: 12px 16px;
  border-radius: 3px;
  color: #fff;
  background: #23a79d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  font-size: 18px;
  text-align: center;
}

.api-summary {
  display: grid;
  grid-template-columns: 230px 380px 255px 255px;
  gap: 7px;
  margin-top: 12px;
}

.summary-card {
  min-height: 65px;
  padding: 8px;
  border: 6px solid #e6e6e6;
  background: #fff;
}

.summary-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.summary-card strong {
  display: block;
  font-size: 32px;
  text-align: center;
}

.summary-card.danger {
  border-color: #ff100c;
  background: #ffc0c0;
  color: #f20d0d;
}

.summary-card.warning {
  border-color: #ff9800;
  background: #fff0d4;
  color: #ff9800;
}

.summary-card.mini h2 {
  color: #000;
}

.summary-card.mini div {
  display: flex;
  gap: 8px;
}

.mini-danger,
.mini-warning {
  padding: 10px;
  border: 5px solid;
  font-size: 16px;
  font-weight: 700;
}

.mini-danger {
  border-color: #ff100c;
  color: #f20d0d;
}

.mini-warning {
  border-color: #ff9800;
  color: #ff9800;
}

.api-table-panel {
  margin-top: 12px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin: 8px 0;
}

.pager button {
  width: 54px;
  min-height: 45px;
  border-radius: 3px;
  background: #ff4a1c;
}

.pager button:disabled {
  color: #9aa0a6;
  background: #ddd;
}

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

.api-table {
  min-width: 1780px;
  background: #fff;
}

.api-table th {
  padding: 15px 8px;
  color: #fff;
  background: #626262;
  font-size: 14px;
  text-align: left;
}

.api-table td {
  padding: 20px 8px;
  border-bottom: 8px solid #fff;
  background: #f3f3f3;
  color: #000;
  font-size: 14px;
}

.api-table tr:nth-child(even) td {
  background: #fafafa;
}

.table-icon {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 24px;
  color: #3f332b;
  font-size: 12px;
  font-weight: 700;
}

.xml-download-link {
  text-decoration: none;
}

.xml-download-link:hover {
  color: #2f7d39;
}

.assign-client-button {
  position: relative;
  width: 34px;
  min-height: 28px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.assign-client-button span {
  position: absolute;
  bottom: 5px;
  width: 12px;
  height: 10px;
  border-radius: 8px 8px 2px 2px;
  background: #8c8c8c;
}

.assign-client-button span::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8c8c8c;
}

.assign-client-button span:first-child {
  left: 7px;
}

.assign-client-button span:last-child {
  right: 5px;
  opacity: .75;
}

.unassign-client-form {
  margin: 0;
}

.unassign-client-button {
  position: relative;
  width: 34px;
  min-height: 28px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.unassign-client-button span {
  position: absolute;
  left: 10px;
  bottom: 5px;
  width: 14px;
  height: 11px;
  border-radius: 8px 8px 2px 2px;
  background: #9c9c9c;
}

.unassign-client-button span::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9c9c9c;
}

.unassign-client-button::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 24px;
  height: 4px;
  background: #3f332b;
  transform: rotate(45deg);
}

.assign-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
}

.assign-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.assign-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 110;
  width: min(430px, calc(100vw - 32px));
  padding: 0 24px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  transform: translate(-50%, -45%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.assign-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.assign-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -24px 18px;
  padding: 16px 20px;
  color: #fff;
  background: var(--green);
  border-radius: 8px 8px 0 0;
}

.assign-modal h2 {
  margin: 0;
  font-size: 22px;
}

.assign-modal header button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 22px;
}

.assign-modal label {
  margin-top: 14px;
}

.assign-modal-large {
  top: 0;
  left: 4px;
  width: min(980px, calc(100vw - 8px));
  min-height: 306px;
  padding: 0;
  border: 1px solid #b8b8b8;
  border-radius: 4px;
  transform: none;
}

.assign-modal-large.open {
  transform: none;
}

.assign-modal-large header {
  height: 36px;
  margin: 0;
  padding: 0 14px;
  color: #222;
  background: linear-gradient(#f7f7f7, #dfdfdf);
  border-bottom: 1px solid #c9c9c9;
  border-radius: 4px 4px 0 0;
}

.assign-modal-large h2 {
  font-size: 16px;
}

.assign-modal-large header button {
  color: #333;
}

.assign-client-form {
  padding: 9px 14px 10px;
}

.assign-filters {
  display: grid;
  grid-template-columns: 332px 418px;
  gap: 30px;
  width: 778px;
  margin: 9px 0 24px 20px;
}

.assign-filters label,
.assign-search-label {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #8b8f96;
  font-size: 14px;
  font-weight: 700;
}

.assign-filters label:nth-child(2) {
  grid-template-columns: 96px 1fr;
}

.assign-filters select {
  height: 35px;
  border: 1px solid #b8b8b8;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

.assign-search-label {
  display: block;
  float: left;
  width: 145px;
  margin: 8px 0 0 0;
  text-align: right;
}

.assign-search {
  display: block;
  height: 58px;
  width: 100%;
  margin: 4px 0 10px;
  padding: 14px 7px 5px;
  border: 1px solid #20a69a;
  border-radius: 0;
  font-size: 20px;
}

.assign-results {
  width: calc(100% - 169px);
  min-height: 190px;
  max-height: 240px;
  overflow-y: auto;
  margin: 0 4px 0 165px;
  border: 1px solid #b8b8b8;
  background: #fff;
}

.assign-result {
  display: grid;
  width: 100%;
  min-height: 84px;
  padding: 8px 8px 5px;
  border: 0;
  border-bottom: 1px solid #cfcfcf;
  border-radius: 0;
  color: #111;
  background: #fff;
  box-shadow: none;
  text-align: left;
  justify-items: start;
  align-content: start;
  gap: 1px;
}

.assign-result[hidden] {
  display: none !important;
}

.assign-help {
  margin: 10px 0;
  padding: 0 8px;
  color: #111;
  font-size: 14px;
}

.assign-result strong {
  font-size: 16px;
}

.assign-result span {
  display: block;
  font-size: 16px;
  line-height: 1.42;
  text-align: left;
}

.assign-result.selected,
.assign-result:hover {
  color: #fff;
  background: #5b93ed;
}

.empty-assign-results {
  padding: 16px;
  margin: 0;
  color: #666;
}

.assign-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 12px 14px 0 0;
}

.assign-modal-actions button {
  width: auto;
  min-width: 90px;
  min-height: 32px;
  font-size: 14px;
}

.assign-modal-actions .secondary {
  color: var(--green-dark);
  background: #e7f4e8;
}

/* Green EER variant for the API import screen. */
.api-layout {
  background: #f6f7f8;
}

.api-topbar {
  background: #26313a;
}

.api-breadcrumb {
  background: var(--green);
}

.api-content {
  padding: 18px 18px 30px;
}

.api-filters,
.api-import-row {
  padding: 16px 18px 18px;
  border: 1px solid #e1e5e8;
  border-radius: 8px;
  background: #fff;
}

.api-filters input {
  border-bottom-color: #b8c0c7;
}

.api-filters input:focus {
  border-bottom-color: var(--green);
  box-shadow: 0 3px 0 rgba(66, 163, 71, .18);
}

.api-actions button,
.api-upload button,
.import-button,
.pager button {
  border-radius: 5px;
  background: var(--green);
}

.disabled-action {
  border-radius: 5px;
  color: var(--green-dark);
  background: #e7f4e8;
}

.record-total strong {
  border-radius: 5px;
  background: var(--green);
}

.summary-card {
  border: 1px solid #e1e5e8;
  border-left: 6px solid #e6e6e6;
  border-radius: 8px;
}

.summary-card.danger {
  border-color: #e55353;
  background: #fff2f2;
  color: #c73f3f;
}

.summary-card.warning {
  border-color: var(--green);
  background: #f1f8f2;
  color: var(--green-dark);
}

.mini-danger,
.mini-warning {
  border-width: 2px;
  border-radius: 5px;
}

.mini-danger {
  border-color: #e55353;
  color: #c73f3f;
}

.mini-warning {
  border-color: var(--green);
  color: var(--green-dark);
}

.api-table th {
  background: #4f5a55;
}

.api-table td {
  background: #f7f9f8;
}

.api-table tr:nth-child(even) td {
  background: #fff;
}

.create-wr-form {
  margin: 0;
}

.home-wr-link {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.home-wr-link::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 18px;
  height: 13px;
  background: #8c8c8c;
}

.home-wr-link::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-left: 5px solid #8c8c8c;
  border-top: 5px solid #8c8c8c;
  transform: rotate(45deg);
}

.home-wr-link.created::before {
  background: var(--green);
}

.home-wr-link.created::after {
  border-left-color: var(--green);
  border-top-color: var(--green);
}

/* Reference-scale layout: tighter rows and flatter controls. */
@media (min-width: 900px) {
  .api-topbar {
    height: 68px;
  }

  .api-logo {
    font-size: 40px;
  }

  .api-breadcrumb {
    height: 68px;
    font-size: 22px;
  }

  .api-content {
    padding: 10px 14px 0;
  }

  .api-filters {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    grid-template-columns: 145px 145px minmax(280px, 1fr) minmax(360px, 1.3fr) minmax(150px, .55fr);
    gap: 12px 28px;
  }

  .api-filters span {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .api-filters input {
    height: 34px;
    padding: 0 0 6px;
    background: transparent;
    font-size: 20px;
  }

  .api-actions {
    grid-template-columns: 385px 145px 185px 285px;
    gap: 18px;
    margin-top: 8px;
  }

  .api-actions button,
  .api-upload button,
  .import-button,
  .disabled-action {
    min-height: 45px;
    padding: 0 28px;
    border-radius: 3px;
    font-size: 18px;
  }

  .api-import-row {
    display: grid;
    grid-template-columns: minmax(1088px, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: -45px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    pointer-events: none;
  }

  .api-upload {
    justify-self: end;
    gap: 20px;
    pointer-events: auto;
  }

  .api-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .record-total {
    pointer-events: auto;
  }

  .record-total strong {
    min-width: 80px;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 18px;
  }

  .api-summary {
    grid-template-columns: 214px 380px 255px 255px;
    gap: 7px;
    margin-top: 10px;
  }

  .summary-card {
    min-height: 72px;
    padding: 6px 8px;
    border-radius: 0;
  }

  .summary-card h2 {
    margin-bottom: 4px;
    font-size: 18px;
    line-height: 1.15;
  }

  .summary-card strong {
    font-size: 30px;
  }

  .summary-card.mini div {
    gap: 8px;
  }

  .mini-danger,
  .mini-warning {
    padding: 7px 9px;
    border-radius: 0;
    font-size: 16px;
  }

  .pager {
    margin: -44px 0 24px;
    gap: 18px;
  }

  .pager button {
    width: 54px;
    min-height: 45px;
    border-radius: 3px;
  }

  .api-table {
    min-width: 1880px;
    margin-top: 0;
  }

  .api-table th {
    padding: 14px 8px;
    font-size: 14px;
  }

  .api-table td {
    padding: 18px 8px;
    border-bottom-width: 8px;
    font-size: 14px;
  }
}

/* Compact desktop sizing for API import screen. */
@media (min-width: 900px) {
  .api-topbar {
    height: 58px;
  }

  .api-logo {
    font-size: 32px;
  }

  .api-menu {
    font-size: 24px;
  }

  .api-breadcrumb {
    height: 58px;
    font-size: 18px;
  }

  .api-content {
    padding: 12px 18px 18px;
  }

  .api-filters,
  .api-import-row {
    padding: 12px 22px;
  }

  .api-filters {
    gap: 20px 34px;
    grid-template-columns: 180px 180px minmax(250px, 1fr) minmax(330px, 1.25fr) minmax(180px, .55fr);
  }

  .api-filters span {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .api-filters input {
    height: 32px;
    font-size: 18px;
  }

  .api-actions {
    grid-template-columns: minmax(220px, 480px) 180px 220px 360px;
    gap: 22px;
    margin-top: 18px;
  }

  .api-actions button,
  .api-upload button,
  .import-button,
  .disabled-action {
    min-height: 38px;
    padding: 0 24px;
    font-size: 16px;
  }

  .switch-label {
    font-size: 13px;
    line-height: 1.25;
  }

  .switch {
    width: 31px;
    height: 16px;
  }

  .switch::before {
    width: 22px;
    height: 22px;
  }

  .api-import-row {
    margin-top: 12px;
  }

  .api-upload {
    gap: 20px;
  }

  .api-upload input[type="file"] {
    width: 365px;
    padding: 7px;
  }

  .record-total strong {
    min-width: 70px;
    padding: 9px 14px;
    font-size: 18px;
  }

  .api-summary {
    grid-template-columns: 285px 475px 320px 320px;
    gap: 10px;
    margin-top: 14px;
  }

  .summary-card {
    min-height: 90px;
    padding: 10px 14px;
  }

  .summary-card h2 {
    margin-bottom: 6px;
    font-size: 20px;
    line-height: 1.15;
  }

  .summary-card strong {
    font-size: 34px;
  }

  .summary-card.mini div {
    gap: 10px;
  }

  .mini-danger,
  .mini-warning {
    padding: 9px 12px;
    font-size: 17px;
  }

  .pager {
    gap: 18px;
    margin: 10px 0 8px;
  }

  .pager button {
    width: 54px;
    min-height: 42px;
  }

  .api-table {
    min-width: 1680px;
  }

  .api-table th {
    padding: 11px 7px;
    font-size: 13px;
  }

  .api-table td {
    padding: 14px 7px;
    border-bottom-width: 6px;
    font-size: 13px;
  }
}

.admin-panel {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid #e1e5e8;
  border-radius: 8px;
  background: #fff;
}

.admin-panel h2 {
  margin: 0 0 8px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e1e5e8;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #4d5661;
  background: #f7f8f9;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 92px;
  gap: 8px;
  align-items: center;
}

.inline-form button {
  width: 92px;
  min-height: 38px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .login-box {
    min-height: auto;
    padding: 28px 22px;
  }

  .actions.spaced {
    gap: 10px;
  }

  .login-box button,
  .login-box .btn {
    width: 100%;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .workspace {
    padding: 18px;
  }

  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .warehouse-form textarea,
  .form-actions {
    grid-column: span 1;
  }
}

/* Final scale match for the reference screen. Keep this block last. */
@media (min-width: 900px) {
  .api-topbar {
    height: 74px;
  }

  .api-logo {
    font-size: 40px;
  }

.api-menu {
    font-size: 30px;
  }

  .api-breadcrumb {
    height: 80px;
    padding: 0 15px;
    font-size: 22px;
  }

  .api-content {
    padding: 16px 14px 0;
  }

  .api-filters {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    grid-template-columns: 145px 145px minmax(280px, 1fr) minmax(360px, 1.3fr) minmax(150px, .55fr);
    gap: 22px 28px;
  }

  .api-filters input {
    height: 34px;
    font-size: 20px;
  }

  .api-actions {
    grid-template-columns: 385px 145px 185px 290px;
    gap: 18px;
    margin-top: 16px;
  }

  .api-actions button,
  .api-upload button,
  .import-button,
  .disabled-action {
    min-height: 45px;
    padding: 0 28px;
    border-radius: 3px;
    font-size: 18px;
  }

  .api-import-row {
    display: grid;
    grid-template-columns: minmax(760px, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-top: -45px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    pointer-events: none;
  }

  .api-upload {
    justify-self: end;
    gap: 18px;
    pointer-events: auto;
  }

  .api-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .record-total {
    pointer-events: auto;
  }

  .record-total strong {
    min-width: 80px;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 18px;
  }

  .api-summary {
    grid-template-columns: 214px 380px 255px 255px;
    gap: 7px;
    margin-top: 12px;
  }

  .summary-card {
    min-height: 65px;
    padding: 8px;
    border-radius: 0;
  }

  .summary-card h2 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.15;
  }

  .summary-card strong {
    font-size: 32px;
  }

  .mini-danger,
  .mini-warning {
    padding: 8px 10px;
    border-radius: 0;
    font-size: 16px;
  }

  .pager {
    margin: -46px 0 42px;
    gap: 18px;
  }

  .pager button {
    width: 54px;
    min-height: 45px;
    border-radius: 3px;
  }

  .api-table {
    min-width: 1880px;
  }

  .api-table th {
    padding: 14px 8px;
    font-size: 14px;
  }

  .api-table td {
    padding: 18px 8px;
    border-bottom-width: 8px;
    font-size: 14px;
  }
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 375px;
  max-width: calc(100vw - 42px);
  min-height: 100vh;
  background: #fff;
  box-shadow: 4px 0 16px rgba(0, 0, 0, .25);
  transform: translateX(-105%);
  transition: transform .2s ease;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-section,
.drawer-list a {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 0 20px;
  color: #333;
  font-size: 18px;
  text-decoration: none;
}

.drawer-toggle {
  width: 100%;
  border: 0;
  border-radius: 0;
  justify-content: flex-start;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  text-align: left;
}

.drawer-toggle:hover {
  transform: none;
  box-shadow: none;
}

.drawer-section.muted {
  background: #f0f0f0;
}

.drawer-submenu {
  display: none;
}

.drawer-submenu.open {
  display: block;
}

.drawer-list {
  padding: 12px 0;
}

.drawer-list a {
  min-height: 60px;
  padding-left: 32px;
}

.drawer-section:hover,
.drawer-list a:hover {
  background: #eef7ef;
  color: var(--green-dark);
}

.stock-layout {
  min-height: 100vh;
  background: #fff;
}

.stock-title {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 3px 7px rgba(0, 0, 0, .22);
  font-size: 22px;
}

.stock-content {
  padding: 22px 12px;
}

.stock-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) 290px;
  gap: 28px 28px;
  align-items: end;
}

.stock-filters label {
  margin: 0;
}

.stock-filters span {
  display: block;
  margin-bottom: 8px;
  color: #939aa3;
  font-size: 14px;
  text-transform: none;
}

.stock-filters input,
.stock-filters select {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #9fa4a8;
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 20px;
}

.stock-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  grid-column: 1 / 3;
  margin-top: 12px;
}

.stock-actions button,
.download-result {
  display: inline-grid;
  place-items: center;
  min-height: 45px;
  padding: 0 20px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  font-size: 16px;
  text-decoration: none;
}

.download-result {
  grid-auto-flow: column;
  gap: 8px;
}

.download-result span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0;
  color: #fff;
  background: var(--green-dark);
  font-weight: 700;
}

.stock-total {
  display: grid;
  justify-items: end;
  align-self: center;
  gap: 6px;
  grid-column: 3;
}

.stock-total span {
  color: #000;
}

.stock-total strong {
  min-width: 50px;
  padding: 12px;
  border-radius: 3px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  font-size: 18px;
  text-align: center;
}

.stock-section-title {
  margin: 34px 0 8px 6px;
  font-size: 14px;
}

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

.stock-table {
  min-width: 1880px;
  width: 100%;
  border-collapse: collapse;
}

.stock-table th {
  padding: 10px 7px;
  color: #fff;
  background: #4f5a55;
  font-size: 14px;
  text-align: left;
}

.stock-table td {
  padding: 16px 7px;
  border-bottom: 8px solid #fff;
  background: #f7f7f7;
  color: #000;
  font-size: 14px;
}

.stock-table tr:nth-child(even) td {
  background: #fff;
}

.stock-table tr.row-complete td,
.stock-table tr.row-complete:nth-child(even) td {
  background: #ecf8ee;
}

.client-modal input[type="file"] {
  height: auto;
  padding: 9px;
  border: 1px dashed #b8c0c7;
  border-radius: 4px;
  background: #fbfcfd;
}

.client-admin-layout {
  min-height: 100vh;
  background: #fff;
}

.clients-content {
  padding: 14px 12px;
}

.clients-content h1 {
  margin: 6px 0 6px;
  border-bottom: 1px solid #9d7e2d;
  color: #5e160d;
  font-family: "Courier New", monospace;
  font-size: 24px;
  text-decoration: underline;
}

.client-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.client-toolbar select,
.client-toolbar input {
  height: 22px;
  font-size: 12px;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.clients-table th {
  padding: 8px 7px;
  color: #000;
  background: #ececec;
  text-align: left;
}

.clients-table td {
  padding: 10px 7px;
  border-bottom: 1px solid #d5d5d5;
}

.clients-table tbody tr:first-child td {
  background: #e9f8ec;
  color: #1f3f25;
}

.client-icon,
.client-action {
  width: auto;
  min-height: 24px;
  padding: 2px 6px;
  background: transparent;
  color: var(--green-dark);
  box-shadow: none;
  font-size: 12px;
}

.client-action {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 5px;
  border: 0;
  font-size: 18px;
  cursor: pointer;
}

.client-action.delete {
  color: #b3261e;
}

.delete-client-form {
  display: inline;
}

/* Tighten Ingresos desde API table typography. */
@media (min-width: 900px) {
  .api-table th {
    padding: 10px 6px;
    font-size: 12px;
    line-height: 1.18;
  }

  .api-table td {
    padding: 12px 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .api-table {
    min-width: 1740px;
  }
}

.new-client-button {
  width: auto;
  min-height: 30px;
  margin-top: 18px;
  padding: 0 12px;
  color: var(--green-dark);
  background: #e6e6e6;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.client-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
}

.client-edit-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.client-edit-modal {
  position: fixed;
  top: 182px;
  left: 50%;
  z-index: 130;
  width: 875px;
  min-height: 495px;
  background: #fff;
  border: 1px solid #777;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.client-edit-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.client-edit-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 10px;
  border-bottom: 1px solid #cfcfcf;
  background: linear-gradient(#f9f9f9, #dedede);
}

.client-edit-modal h2 {
  margin: 0;
  font-size: 16px;
}

.client-edit-modal header button {
  width: 24px;
  min-height: 24px;
  padding: 0;
  color: #777;
  background: transparent;
  box-shadow: none;
  font-size: 18px;
}

.legacy-client-form {
  display: grid;
  grid-template-columns: 200px 520px;
  gap: 3px 2px;
  align-items: center;
  width: 720px;
  margin: 72px 0 0 20px;
}

.legacy-client-form label {
  margin: 0;
  color: #666;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.legacy-client-form input,
.legacy-client-form select {
  height: 18px;
  padding: 0 4px;
  border: 1px solid #9dbbff;
  border-radius: 0;
  color: #001dff;
  font-size: 14px;
}

.legacy-save {
  width: auto;
  min-height: 30px;
  margin: 12px 0 0 20px;
  padding: 0 12px;
  color: var(--green-dark);
  background: #f3f3f3;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.identity-message {
  margin: 8px 0 0 220px;
  color: var(--green-dark);
  font-size: 13px;
}

.table-link {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.client-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: #f6f7f8;
}

.client-form-card {
  width: min(430px, 100%);
  padding: 30px 34px;
  border: 1px solid #e1e5e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.client-form-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.client-form-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.45;
}

.client-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.client-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.client-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 110;
  width: min(420px, calc(100vw - 32px));
  padding: 0 24px 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  transform: translate(-50%, -45%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.client-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.client-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -24px 18px;
  padding: 16px 20px;
  color: #fff;
  background: var(--green);
  border-radius: 8px 8px 0 0;
}

.client-modal h2 {
  margin: 0;
  font-size: 22px;
}

.client-modal header button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 22px;
}

.client-modal label {
  margin-top: 14px;
}

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

.modal-actions button {
  width: auto;
  min-width: 110px;
  min-height: 40px;
}

.modal-actions .secondary {
  color: var(--green-dark);
  background: #e7f4e8;
}

/* Compact action columns and cleaner icons for Ingresos desde API. */
@media (min-width: 900px) {
  .api-table {
    min-width: 1620px;
  }

  .api-table th:nth-child(13),
  .api-table th:nth-child(14),
  .api-table th:nth-child(15),
  .api-table th:nth-child(16),
  .api-table td:nth-child(13),
  .api-table td:nth-child(14),
  .api-table td:nth-child(15),
  .api-table td:nth-child(16) {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
    white-space: normal;
  }

  .api-table th:nth-child(14),
  .api-table td:nth-child(14) {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
  }

  .api-table th:nth-child(15),
  .api-table td:nth-child(15) {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
  }

  .table-icon {
    min-width: 24px;
    min-height: 22px;
    font-size: 12px;
  }

  .assign-client-button,
  .unassign-client-button,
  .home-wr-link {
    width: 28px;
    min-width: 28px;
    height: 26px;
    min-height: 26px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
  }

  .assign-client-button span {
    bottom: 4px;
    width: 11px;
    height: 9px;
    border-radius: 8px 8px 3px 3px;
    background: #8d8d8d;
  }

  .assign-client-button span::before {
    top: -8px;
    left: 2px;
    width: 8px;
    height: 8px;
    background: #8d8d8d;
  }

  .assign-client-button span:first-child {
    left: 5px;
    background: #777;
  }

  .assign-client-button span:first-child::before {
    background: #777;
  }

  .assign-client-button span:last-child {
    right: 4px;
  }

  .unassign-client-button span {
    left: 9px;
    bottom: 4px;
    width: 12px;
    height: 9px;
    border-radius: 8px 8px 3px 3px;
    background: #969696;
  }

  .unassign-client-button span::before {
    top: -8px;
    left: 2px;
    width: 8px;
    height: 8px;
    background: #969696;
  }

  .unassign-client-button::after {
    left: 5px;
    top: 5px;
    width: 23px;
    height: 4px;
    border-radius: 3px;
    background: #3f332b;
  }

  .home-wr-link::before {
    left: 6px;
    top: 11px;
    width: 16px;
    height: 13px;
    border-radius: 1px;
  }

  .home-wr-link::after {
    left: 5px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-left-width: 6px;
    border-top-width: 6px;
  }
}

/* Extra fit pass for 1366-1920px desktop widths. */
@media (min-width: 900px) {
  .api-actions {
    grid-template-columns: 300px 220px 330px;
    gap: 16px;
  }

  .api-actions button {
    min-height: 38px;
    font-size: 16px;
  }

  .api-import-row {
    grid-template-columns: minmax(910px, 1fr) auto;
    margin-top: -38px;
  }

  .api-upload {
    gap: 14px;
  }

  .api-upload button,
  .import-button,
  .disabled-action {
    min-height: 38px;
    padding: 0 22px;
    font-size: 16px;
  }

  .api-summary {
    grid-template-columns: 190px 340px 230px 230px;
    gap: 8px;
    margin-top: 18px;
  }

  .summary-card {
    min-height: 58px;
    padding: 6px 8px;
  }

  .summary-card h2 {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .summary-card strong {
    font-size: 28px;
  }

  .mini-danger,
  .mini-warning {
    padding: 6px 8px;
    font-size: 14px;
  }

  .pager {
    margin: -42px 0 34px;
  }
}

.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #000;
  font-size: 14px;
}

.pager-size select {
  min-width: 54px;
  height: 31px;
  padding: 0 22px 0 8px;
  border: 0;
  border-bottom: 1px solid #9e9e9e;
  background: transparent;
  color: #000;
  font: inherit;
  outline: none;
}

.group-layout {
  min-height: 100vh;
  background: #fff;
}

.group-breadcrumb {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 80px;
  padding: 0 12px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  font-size: 22px;
}

.group-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.group-breadcrumb strong {
  font-weight: 500;
}

.group-new {
  margin-left: auto;
  font-size: 18px;
}

.group-content {
  padding: 22px 11px;
}

.group-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px 28px;
  align-items: end;
}

.group-filters label {
  margin: 0;
}

.group-filters span {
  display: block;
  margin-bottom: 10px;
  color: #939aa3;
  font-size: 14px;
}

.group-filters input {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #9e9e9e;
  background: transparent;
  text-align: right;
  font-size: 20px;
  outline: none;
}

.group-filters label:nth-child(3) input {
  text-align: left;
}

.group-filters button {
  width: 108px;
  min-height: 45px;
  border-radius: 3px;
  background: var(--green);
  font-size: 16px;
}

.preboarding-layout {
  min-height: 100vh;
  background: #fff;
}

.preboarding-breadcrumb {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 80px;
  padding: 0 15px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  font-size: 22px;
}

.preboarding-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.preboarding-breadcrumb strong {
  font-weight: 500;
}

.preboarding-new {
  margin-left: auto;
  font-size: 18px;
}

.preboarding-content {
  padding: 22px 14px;
}

.preboarding-filters {
  display: grid;
  grid-template-columns: 290px 290px 1fr;
  gap: 26px 30px;
  align-items: end;
}

.preboarding-filters label {
  margin: 0;
}

.preboarding-filters span {
  display: block;
  margin-bottom: 10px;
  color: #939aa3;
  font-size: 14px;
}

.preboarding-filters input {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #9e9e9e;
  background: transparent;
  text-align: right;
  font-size: 20px;
  outline: none;
}

.preboarding-filters label:nth-child(3) input {
  text-align: left;
}

.preboarding-filters button {
  width: 108px;
  min-height: 45px;
  border-radius: 3px;
  background: var(--green);
  font-size: 16px;
}

.preboarding-total {
  display: grid;
  justify-items: end;
  grid-column: 3;
  margin-top: -56px;
  color: #000;
}

.preboarding-total strong {
  min-width: 50px;
  padding: 12px;
  border-radius: 3px;
  color: #fff;
  background: #26a69a;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}

.group-total {
  display: grid;
  justify-items: end;
  grid-column: 3;
  margin-top: -56px;
  color: #000;
}

.group-total strong {
  min-width: 50px;
  padding: 12px;
  border-radius: 3px;
  color: #fff;
  background: #26a69a;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}

.group-table-wrap {
  margin-top: 42px;
  overflow-x: auto;
}

.group-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.group-table th {
  padding: 20px 10px;
  color: #fff;
  background: #626262;
  font-size: 14px;
  text-align: center;
}

.group-table td {
  padding: 16px 10px;
  border-bottom: 8px solid #fff;
  background: #f7f7f7;
  color: #000;
  font-size: 14px;
}

@media (min-width: 900px) {
  .group-breadcrumb {
    height: 80px;
  }
}

/* Pre Embarque: same reference layout, using the project green. */
.preboarding-layout .api-topbar {
  height: 77px;
  padding: 0 24px;
  background: #212121;
}

.preboarding-layout .api-logo {
  font-size: 40px;
}

.preboarding-breadcrumb {
  height: 80px;
  padding: 0 15px;
  gap: 18px;
  background: var(--green);
  font-size: 22px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, .22);
}

.preboarding-new {
  margin-left: auto;
  padding-right: 2px;
}

.preboarding-content {
  padding: 22px 14px 0;
}

.preboarding-filters {
  position: relative;
  display: grid;
  grid-template-columns: 292px 292px minmax(520px, 1fr);
  gap: 26px 30px;
  align-items: end;
}

.preboarding-filters span {
  margin-bottom: 10px;
  color: #939aa3;
  font-size: 14px;
}

.preboarding-filters input {
  height: 38px;
  border: 0;
  border-bottom: 1px solid #9e9e9e;
  background: transparent;
  font-size: 20px;
  text-align: right;
}

.preboarding-filters label:nth-child(3) input {
  text-align: left;
}

.preboarding-filters button {
  grid-column: 1;
  grid-row: 2;
  width: 108px;
  min-height: 45px;
  margin-top: 0;
  border-radius: 3px;
  background: var(--green);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  font-size: 16px;
}

.preboarding-total {
  position: absolute;
  right: 0;
  top: 94px;
  display: grid;
  justify-items: end;
  margin: 0;
  color: #000;
}

.preboarding-total strong {
  min-width: 50px;
  padding: 12px;
  border-radius: 3px;
  background: #26a69a;
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
}

/* Mobile-only layout. Desktop/laptop rules start at 900px and remain unchanged. */
@media (max-width: 899px) {
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  .api-layout {
    min-width: 0;
  }

  .api-topbar {
    grid-template-columns: 48px 1fr auto;
    height: 64px;
    padding: 0 12px;
  }

  .api-menu {
    width: 44px;
    min-height: 44px;
    font-size: 28px;
  }

  .api-logo {
    font-size: 34px;
  }

  .api-user {
    max-width: 110px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .side-drawer {
    width: min(86vw, 340px);
  }

  .api-breadcrumb {
    height: auto;
    min-height: 58px;
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 18px;
  }

  .api-content {
    padding: 12px 10px 18px;
  }

  .api-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
    padding: 12px;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
    background: #fff;
  }

  .api-filters label,
  .api-filters label.wide {
    grid-column: auto;
    width: 100%;
  }

  .api-filters label.wide {
    grid-column: 1 / -1;
  }

  .api-filters span {
    margin-bottom: 4px;
    font-size: 13px;
  }

  .api-filters input {
    width: 100%;
    height: 36px;
    font-size: 16px;
  }

  .api-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .api-actions button {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .switch-label {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    min-height: 42px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e4e8e5;
    border-radius: 6px;
    background: #f8faf8;
    font-size: 14px;
  }

  .api-import-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
    background: #fff;
  }

  .api-upload {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .import-button,
  .disabled-action {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }

  .record-total {
    justify-content: space-between;
  }

  .record-total strong {
    min-width: 56px;
  }

  .api-summary {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .summary-card {
    min-height: 86px;
    padding: 10px 12px;
  }

  .summary-card h2 {
    font-size: 18px;
  }

  .summary-card strong {
    font-size: 30px;
  }

  .summary-card.mini {
    min-height: 86px;
  }

  .summary-card.mini div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .pager {
    display: grid;
    grid-template-columns: 56px auto 56px 1fr;
    gap: 8px;
    justify-content: stretch;
    align-items: center;
    margin: 14px 0 10px;
  }

  .pager button {
    width: 56px;
    min-height: 44px;
  }

  .pager-size {
    justify-self: end;
  }

  .api-table-wrap {
    margin: 0 -10px;
    padding: 0 10px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .api-table th {
    padding: 10px 6px;
    font-size: 11px;
    line-height: 1.15;
  }

  .api-table td {
    padding: 12px 6px;
    border-bottom-width: 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .assign-client-button,
  .unassign-client-button,
  .home-wr-link {
    min-width: 38px;
    min-height: 34px;
  }

  .assign-modal-overlay {
    z-index: 9980;
  }

  .assign-modal,
  .assign-modal-large {
    top: 12px;
    left: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    transform: none;
  }

  .assign-modal.open,
  .assign-modal-large.open {
    transform: none;
  }

  .assign-modal-large header {
    height: auto;
    min-height: 40px;
  }

  .assign-modal h2,
  .assign-modal-large h2 {
    font-size: 15px;
  }

  .assign-modal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .assign-search-label {
    margin-top: 12px;
  }

  .assign-results {
    max-height: 48vh;
  }

  .assign-search {
    min-height: 44px;
    font-size: 18px;
  }

  .assign-result {
    padding: 9px 8px;
    font-size: 13px;
  }

  .assign-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .assign-modal-actions button {
    min-height: 40px;
  }

  .floating-message-modal {
    width: calc(100vw - 28px);
  }

  .floating-message-body {
    padding: 18px 16px;
    font-size: 16px;
  }

  .floating-message-modal footer {
    padding: 0 14px 14px;
  }

  .floating-message-modal footer button {
    width: 100%;
  }

  .stock-content,
  .clients-content,
  .group-content,
  .preboarding-content {
    padding: 12px 10px 18px;
  }

  .stock-title,
  .group-breadcrumb,
  .preboarding-breadcrumb {
    height: auto;
    min-height: 58px;
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 18px;
  }

  .group-new,
  .preboarding-new {
    margin-left: 0;
    width: 100%;
    padding-right: 0;
    text-align: right;
  }

  .stock-filters,
  .group-filters,
  .preboarding-filters {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
    background: #fff;
  }

  .stock-filters label,
  .group-filters label,
  .preboarding-filters label {
    width: 100%;
    margin: 0;
  }

  .stock-filters input,
  .stock-filters select,
  .group-filters input,
  .preboarding-filters input {
    width: 100%;
    height: 36px;
    font-size: 16px;
    text-align: left;
  }

  .stock-actions,
  .group-filters button,
  .preboarding-filters button {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .stock-actions button,
  .download-result,
  .group-filters button,
  .preboarding-filters button {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .stock-total,
  .group-total,
  .preboarding-total {
    position: static;
    display: flex;
    grid-column: auto;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 0;
  }

  .stock-section-title {
    margin: 18px 0 8px;
  }

  .stock-table-wrap,
  .clients-table-wrap,
  .group-table-wrap {
    margin: 12px -10px 0;
    padding: 0 10px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .group-table {
    min-width: 980px;
  }

  .clients-table {
    min-width: 980px;
  }

  .stock-table th,
  .group-table th,
  .clients-table th {
    padding: 10px 6px;
    font-size: 11px;
    line-height: 1.15;
  }

  .stock-table td,
  .group-table td,
  .clients-table td {
    padding: 12px 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .client-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .client-toolbar > div,
  .client-toolbar label {
    width: 100%;
  }

  .client-toolbar select,
  .client-toolbar input {
    width: 100%;
    height: 38px;
    font-size: 16px;
  }

  .new-client-button {
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
  }

  .client-edit-modal,
  .client-modal {
    top: 12px;
    left: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    transform: none;
  }

  .client-edit-modal.open,
  .client-modal.open {
    transform: none;
  }

  .legacy-client-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .legacy-client-form input,
  .legacy-client-form select,
  .client-modal input,
  .client-modal textarea {
    min-height: 38px;
    font-size: 16px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .modal-actions button {
    width: 100%;
  }

  .clients-content h1 {
    margin: 8px 0 12px;
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .clients-table-wrap {
    border: 1px solid #e3e6e3;
    background: #fff;
  }

  .clients-table {
    min-width: 1120px;
  }

  .clients-table th,
  .clients-table td {
    white-space: nowrap;
  }

  .clients-table td:nth-child(2),
  .clients-table td:nth-child(5),
  .clients-table td:nth-child(7) {
    min-width: 190px;
    white-space: normal;
  }

  .clients-table td:last-child {
    min-width: 92px;
  }

  .client-action {
    width: 34px;
    height: 34px;
    margin-right: 4px;
    font-size: 18px;
  }

  .client-edit-modal {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
    min-height: 0;
    max-height: calc(100vh - 20px);
    overflow: hidden auto;
    transform: none;
  }

  .client-edit-modal header {
    position: sticky;
    top: 0;
    z-index: 2;
    height: auto;
    min-height: 44px;
    padding: 8px 12px;
  }

  .client-edit-modal h2 {
    font-size: 16px;
  }

  .client-edit-modal header button {
    width: 36px;
    min-height: 36px;
    font-size: 22px;
  }

  .client-edit-modal form {
    padding: 14px 12px 18px;
  }

  .legacy-client-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  .legacy-client-form label {
    margin-top: 6px;
    font-size: 13px;
    text-align: left;
  }

  .legacy-client-form input,
  .legacy-client-form select {
    width: 100%;
    height: 40px;
    min-height: 40px;
    font-size: 16px;
  }

  .legacy-save {
    width: 100%;
    min-height: 44px;
    margin: 14px 0 0;
    font-size: 16px;
  }

  .group-new-content,
  .pre-new-content,
  .order-content,
  .order-new-content {
    padding: 12px 10px 18px;
  }

  .group-new-breadcrumb,
  .pre-new-breadcrumb,
  .order-breadcrumb,
  .order-new-breadcrumb {
    height: auto;
    min-height: 58px;
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 18px;
  }

  .order-new,
  .shipment-type-actions,
  .group-generate,
  .pre-actions {
    width: 100%;
  }

  .group-new-filters,
  .pre-new-filters,
  .order-filters,
  .order-new-filters {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e1e5e8;
    border-radius: 6px;
    background: #fff;
  }

  .group-new-filters label,
  .pre-new-filters label,
  .order-filters label,
  .order-new-filters label {
    width: 100%;
    margin: 0;
  }

  .group-new-filters input,
  .pre-new-filters input,
  .order-filters input,
  .order-new-filters input {
    width: 100%;
    height: 38px;
    font-size: 16px;
    text-align: left;
  }

  .group-new-filters button,
  .pre-new-filters button,
  .order-filters button,
  .order-new-filters button {
    width: 100%;
    min-height: 44px;
    margin: 0;
    font-size: 16px;
  }

  .group-new-total,
  .pre-new-total,
  .order-total,
  .order-new-total {
    position: static;
    display: flex;
    grid-column: auto;
    justify-content: space-between;
    align-items: center;
    margin: 0;
  }

  .group-value,
  .pre-new-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
  }

  .group-new-table-wrap,
  .pre-new-table-wrap,
  .order-table-wrap,
  .preboarding-table-wrap {
    margin: 12px -10px 0;
    padding: 0 10px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .group-new-table,
  .pre-new-table,
  .order-table,
  .preboarding-table {
    min-width: 1080px;
  }

  .group-new-table th,
  .group-new-table td,
  .pre-new-table th,
  .pre-new-table td,
  .order-table th,
  .order-table td,
  .preboarding-table th,
  .preboarding-table td {
    padding: 10px 6px;
    font-size: 12px;
    line-height: 1.25;
  }

  .group-generate,
  .pre-actions,
  .shipment-type-actions {
    display: grid;
    justify-content: stretch;
    margin: 14px 0 0;
  }

  .group-generate button,
  .pre-generate-button,
  .shipment-type-button {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }

  .group-client-modal,
  .delivery-modal {
    top: 12px;
    left: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    overflow: hidden auto;
    transform: none;
  }

  .group-client-modal.open,
  .delivery-modal.open {
    transform: none;
  }

  .group-client-modal header,
  .group-client-picker-row,
  .group-client-actions,
  .delivery-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .group-client-search,
  .delivery-create,
  .group-client-actions button,
  .delivery-footer button {
    width: 100%;
    min-height: 42px;
  }

  .delivery-title {
    font-size: 26px;
  }

  .delivery-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .delivery-table {
    min-width: 880px;
  }

  .client-page,
  .dashboard,
  .page {
    padding: 12px;
  }

  .client-form-card,
  .login-box {
    width: 100%;
    max-width: none;
    padding: 22px 18px;
  }

  .client-form-card h1,
  .login-box .brand {
    font-size: 30px;
    line-height: 1.1;
  }

  .client-form-card input,
  .login-box input {
    min-height: 42px;
    font-size: 16px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .actions .button-wide,
  .actions .link-button {
    width: 100%;
    min-height: 44px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .dashboard-content {
    padding: 16px 0;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel table {
    min-width: 760px;
  }

  .admin-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Modern courier system skin */
body:has(.api-topbar),
body:has(.stock-layout),
body:has(.group-layout),
body:has(.group-new-layout),
body:has(.preboarding-layout),
body:has(.pre-new-layout),
body:has(.order-layout),
body:has(.order-new-layout) {
  background: #f4f7fb !important;
}

.api-layout,
.stock-layout,
.group-layout,
.group-new-layout,
.preboarding-layout,
.pre-new-layout,
.order-layout,
.order-new-layout {
  background: #f4f7fb !important;
}

.api-topbar,
.stock-layout .api-topbar,
.group-new-layout .api-topbar,
.preboarding-layout .api-topbar,
.pre-new-layout .api-topbar,
.order-layout .api-topbar,
.order-new-layout .api-topbar {
  height: 68px !important;
  padding: 0 18px !important;
  background: #0a2238 !important;
  box-shadow: 0 8px 24px rgba(13, 40, 64, .12);
}

.api-menu,
.stock-layout .api-menu,
.group-new-layout .api-menu,
.preboarding-layout .api-menu,
.pre-new-layout .api-menu,
.order-layout .api-menu,
.order-new-layout .api-menu {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 9px !important;
  background: #143b5d !important;
  color: #fff !important;
  font-size: 26px !important;
  line-height: 1 !important;
}

.api-menu:hover {
  background: var(--green) !important;
  transform: none;
  box-shadow: 0 8px 20px rgba(66, 163, 71, .2);
}

.api-logo,
.stock-layout .api-logo,
.group-new-layout .api-logo,
.preboarding-layout .api-logo,
.pre-new-layout .api-logo,
.order-layout .api-logo,
.order-new-layout .api-logo {
  color: #fff !important;
  font-size: 38px !important;
  font-weight: 500 !important;
}

.api-user,
.stock-layout .api-user,
.group-new-layout .api-user,
.preboarding-layout .api-user,
.pre-new-layout .api-user,
.order-layout .api-user,
.order-new-layout .api-user {
  color: #f2f7fb !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

.api-breadcrumb,
.group-breadcrumb,
.group-new-breadcrumb,
.preboarding-breadcrumb,
.pre-new-breadcrumb,
.order-breadcrumb,
.order-new-breadcrumb,
.stock-hero {
  min-height: 78px !important;
  height: auto !important;
  padding: 0 18px !important;
  background: var(--green) !important;
  box-shadow: 0 8px 22px rgba(13, 40, 64, .14) !important;
  color: #fff !important;
}

.api-breadcrumb a,
.group-breadcrumb a,
.group-new-breadcrumb a,
.preboarding-breadcrumb a,
.pre-new-breadcrumb a,
.order-breadcrumb a,
.order-new-breadcrumb a,
.stock-hero a {
  color: #fff !important;
  text-decoration: none !important;
}

.api-content,
.stock-content,
.group-content,
.group-new-content,
.preboarding-content,
.pre-new-content,
.order-content,
.order-new-content {
  padding: 22px 18px 32px !important;
  background: #f4f7fb !important;
}

.api-filters,
.stock-filters,
.group-filters,
.group-new-filters,
.preboarding-filters,
.pre-new-filters,
.order-filters,
.order-new-filters,
.api-import-row,
.stats-row,
.stock-actions,
.group-value-row,
.pre-value-row,
.shipment-modal,
.delivery-modal,
.client-modal {
  border: 1px solid #e5ebf1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(13, 40, 64, .06) !important;
}

.api-filters,
.stock-filters,
.group-filters,
.group-new-filters,
.preboarding-filters,
.pre-new-filters,
.order-filters,
.order-new-filters {
  padding: 18px !important;
}

.api-filters span,
.stock-filters span,
.group-filters span,
.group-new-filters span,
.preboarding-filters span,
.pre-new-filters span,
.order-filters span,
.order-new-filters span {
  color: #7d8792 !important;
  font-weight: 700 !important;
}

.api-filters input,
.stock-filters input,
.group-filters input,
.group-new-filters input,
.preboarding-filters input,
.pre-new-filters input,
.order-filters input,
.order-new-filters input,
.client-page input,
.client-page select,
.client-page textarea,
.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  border-color: #d9e2eb !important;
  background: #fbfdff !important;
}

.api-actions button,
.api-upload button,
.import-button,
.group-search-button,
.group-new-search,
.pre-search-button,
.pre-new-search,
.order-search-button,
.order-new-filters button,
.stock-search-button,
.stock-export-button,
.shipment-type-button,
.shipment-modal-submit,
.delivery-submit,
.client-submit,
.inline-form button,
.admin-panel button,
.btn {
  border-radius: 7px !important;
  background: var(--green) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(66, 163, 71, .18) !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.api-actions button:hover,
.api-upload button:hover,
.import-button:hover,
.group-search-button:hover,
.group-new-search:hover,
.pre-search-button:hover,
.pre-new-search:hover,
.order-search-button:hover,
.order-new-filters button:hover,
.stock-search-button:hover,
.stock-export-button:hover,
.shipment-type-button:hover,
.shipment-modal-submit:hover,
.delivery-submit:hover,
.client-submit:hover,
.inline-form button:hover,
.admin-panel button:hover,
.btn:hover {
  background: var(--green-dark) !important;
  transform: translateY(-1px);
}

.disabled-action,
.api-disabled,
button:disabled {
  border-radius: 7px !important;
  background: #e1e7ed !important;
  color: #83909c !important;
  box-shadow: none !important;
}

.record-total strong,
.stock-total strong,
.group-total strong,
.pre-total strong,
.order-total strong,
.order-new-total strong {
  border-radius: 7px !important;
  background: #21bfb7 !important;
  box-shadow: 0 8px 18px rgba(33, 191, 183, .22) !important;
}

.api-table,
.stock-table,
.clients-table,
.group-table,
.group-new-table,
.pre-table,
.pre-new-table,
.order-table,
.preboarding-table,
.delivery-table,
.dashboard-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 28px rgba(13, 40, 64, .05) !important;
}

.api-table th,
.stock-table th,
.clients-table th,
.group-table th,
.group-new-table th,
.pre-table th,
.pre-new-table th,
.order-table th,
.preboarding-table th,
.delivery-table th,
.dashboard-table th {
  background: #4e5d58 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.api-table td,
.stock-table td,
.clients-table td,
.group-table td,
.group-new-table td,
.pre-table td,
.pre-new-table td,
.order-table td,
.preboarding-table td,
.delivery-table td,
.dashboard-table td {
  border-bottom: 1px solid #edf1f5 !important;
}

.api-table tbody tr:nth-child(odd) td,
.stock-table tbody tr:nth-child(odd) td,
.clients-table tbody tr:nth-child(odd) td,
.group-table tbody tr:nth-child(odd) td,
.group-new-table tbody tr:nth-child(odd) td,
.pre-table tbody tr:nth-child(odd) td,
.pre-new-table tbody tr:nth-child(odd) td,
.order-table tbody tr:nth-child(odd) td,
.preboarding-table tbody tr:nth-child(odd) td,
.delivery-table tbody tr:nth-child(odd) td {
  background: #fbfcfd !important;
}

.side-drawer {
  width: 280px !important;
  background: #0d2840 !important;
  color: #d9e6f1 !important;
  box-shadow: 10px 0 32px rgba(0, 0, 0, .22) !important;
}

.side-drawer::before {
  content: "EER Courier";
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  background: #0a2238;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.drawer-section,
.side-drawer .drawer-toggle {
  min-height: 44px !important;
  padding: 0 20px !important;
  color: #d9e6f1 !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.drawer-section:hover,
.side-drawer .drawer-toggle:hover,
.drawer-list a:hover {
  background: #143b5d !important;
  color: #fff !important;
}

.drawer-section.muted,
.side-drawer .drawer-toggle.muted {
  background: rgba(255, 255, 255, .04) !important;
}

.drawer-list {
  padding: 6px 0 10px !important;
  background: transparent !important;
}

.drawer-list a {
  min-height: 38px !important;
  padding: 0 20px 0 38px !important;
  color: #c9d8e5 !important;
  font-size: 13px !important;
  text-decoration: none !important;
}

.drawer-overlay.open {
  background: rgba(6, 21, 34, .55) !important;
}

.stat-card,
.summary-card,
.group-stat,
.api-stat {
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(13, 40, 64, .06) !important;
}

.client-page,
.mail-page,
.reset-page {
  background: #f4f7fb !important;
}

.client-card,
.mail-card,
.reset-card,
.client-form-card,
.admin-panel,
.dashboard-panel {
  border: 1px solid #e5ebf1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(13, 40, 64, .06) !important;
}

@media (max-width: 760px) {
  .api-topbar,
  .stock-layout .api-topbar,
  .group-new-layout .api-topbar,
  .preboarding-layout .api-topbar,
  .pre-new-layout .api-topbar,
  .order-layout .api-topbar,
  .order-new-layout .api-topbar {
    height: 60px !important;
    padding: 0 12px !important;
  }

  .api-logo,
  .stock-layout .api-logo,
  .group-new-layout .api-logo,
  .preboarding-layout .api-logo,
  .pre-new-layout .api-logo,
  .order-layout .api-logo,
  .order-new-layout .api-logo {
    font-size: 32px !important;
  }

  .api-breadcrumb,
  .group-breadcrumb,
  .group-new-breadcrumb,
  .preboarding-breadcrumb,
  .pre-new-breadcrumb,
  .order-breadcrumb,
  .order-new-breadcrumb,
  .stock-hero {
    min-height: 60px !important;
    font-size: 18px !important;
    gap: 12px !important;
  }

  .side-drawer {
    width: min(82vw, 300px) !important;
  }
}

/* Assign modal: result must be clicked before assigning */
.assign-results {
  position: relative !important;
}

.assign-results .assign-search {
  position: relative !important;
  z-index: 1 !important;
}

.assign-results .assign-result {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  border: 2px solid transparent !important;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
}

.assign-results .assign-result:hover {
  border-color: rgba(33, 191, 183, .55) !important;
  transform: translateY(-1px) !important;
}

.assign-results .assign-result.selected {
  color: #fff !important;
  background: #21bfb7 !important;
  border-color: #0c817b !important;
  box-shadow: 0 8px 18px rgba(33, 191, 183, .24) !important;
}

.assign-results .assign-result.selected::after {
  content: "Seleccionado" !important;
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .22) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

@media (max-width: 760px) {
  .assign-results .assign-result.selected::after {
    position: static !important;
    display: inline-block !important;
    transform: none !important;
    margin-top: 6px !important;
  }
}
/* final-polish-menu-button-and-form-labels */
.api-menu,
.menu-button,
.hamburger,
.nav-toggle {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, var(--modern-accent), var(--modern-accent-2, var(--modern-accent))) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.22) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  font-size: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  position: relative !important;
}

.api-menu::before,
.menu-button::before,
.hamburger::before,
.nav-toggle::before {
  content: "" !important;
  width: 20px !important;
  height: 14px !important;
  display: block !important;
  margin: 0 !important;
  background: transparent !important;
  border-top: 3px solid currentColor !important;
  border-bottom: 3px solid currentColor !important;
  box-shadow: 0 5.5px 0 currentColor !important;
  border-radius: 1px !important;
  -webkit-mask: none !important;
  mask: none !important;
  transform: none !important;
}

.api-menu::after,
.menu-button::after,
.hamburger::after,
.nav-toggle::after {
  content: none !important;
}

.api-menu:hover,
.menu-button:hover,
.hamburger:hover,
.nav-toggle:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.04) !important;
}

.client-edit-modal label,
.delivery-create-form label {
  letter-spacing: 0 !important;
}
/* preferential-guide-page */
.guide-config-panel {
  max-width: 760px !important;
  margin: 0 auto !important;
}
.guide-config-panel h2 {
  margin: 0 0 12px !important;
  color: var(--modern-accent) !important;
}
.guide-help {
  margin: 0 0 18px !important;
  color: var(--modern-muted) !important;
  line-height: 1.45 !important;
}
.guide-prefix-form {
  display: grid !important;
  grid-template-columns: minmax(90px, 120px) minmax(100px, 160px) auto !important;
  gap: 12px !important;
  align-items: end !important;
}
.guide-prefix-form label {
  color: var(--modern-muted) !important;
  font-weight: 800 !important;
}
.guide-prefix-form input {
  text-transform: uppercase !important;
  text-align: center !important;
  letter-spacing: 3px !important;
  font-weight: 900 !important;
  font-size: 24px !important;
}
.guide-preview {
  margin-top: 18px !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.08) !important;
  color: var(--modern-text) !important;
}
@media (max-width: 640px) {
  .guide-prefix-form {
    grid-template-columns: 1fr !important;
  }
}

/* TEMA UNICO CELESTE */
:root {
  --green: #35c9bd !important;
  --green-dark: #249b92 !important;
  --ink: #0f2230 !important;
  --muted: #6f7f8c !important;
  --line: #dbe8ee !important;
  --panel: #ffffff !important;
}

[data-theme-select],
.theme-switcher,
.theme-selector,
.settings-theme,
.theme-control {
  display: none !important;
}
