.po-portal-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef2f8 0%, #f8fafc 100%);
}

.po-home-shell {
  width: min(1860px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 26px;
  display: grid;
  gap: 16px;
}

.po-home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.po-home-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 30px;
}

.po-home-header p {
  margin: 8px 0 0;
  color: #475569;
}

.po-home-header-actions {
  display: flex;
  gap: 8px;
}

.po-home-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
  padding: 18px;
}

.po-home-panel h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
}

.po-home-main-panel {
  padding-bottom: 12px;
}

.po-home-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.po-home-orders-panel,
.po-home-actions-panel {
  min-width: 0;
}

.po-home-table-wrap {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: #fff;
}

.po-home-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  background: #fff;
}
.po-home-table thead {
  background: #fff;
}
.po-home-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(37, 99, 235, 0.08);
  color: #1e293b;
  font-size: 12px;
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.po-home-table tbody td {
  font-size: 12px;
  color: #0f172a;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
}

.po-home-table tbody tr:last-child td {
  border-bottom: none;
}

.po-home-table tbody tr {
  cursor: pointer;
}

.po-home-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.06);
}

.po-home-orders-list {
  max-height: 60vh;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.po-home-order-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.po-home-order-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.09);
}

.po-home-order-card-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.po-home-order-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.po-home-order-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 12px;
}

.po-home-order-meta-line span {
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 8px;
}

.po-home-order-desc {
  color: #64748b;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.po-home-order-total {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.po-home-modal[hidden] {
  display: none;
}

.po-home-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.48);
  padding: 16px;
}

.po-home-modal-content {
  position: relative;
  width: min(980px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.po-home-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  width: auto;
}

.po-home-modal-content h2 {
  margin: 0 36px 14px 0;
}

.po-home-order-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: #475569;
}

.po-home-order-meta strong {
  color: #0f172a;
}

.po-home-modal-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
}

.po-home-modal-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.po-home-modal-table th,
.po-home-modal-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.po-home-modal-table th {
  background: rgba(37, 99, 235, 0.08);
  color: #1e293b;
  font-size: 12px;
}

.po-home-modal-number {
  text-align: center !important;
  white-space: nowrap;
}

.po-home-modal-size {
  min-width: 38px;
}

.po-home-modal-empty {
  text-align: center !important;
  color: #64748b;
}

.po-home-modal-totals {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: #0f172a;
}

.po-home-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.po-home-item-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.po-home-item-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.po-home-item-meta {
  color: #475569;
  font-size: 12px;
}

.po-home-item-stock {
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
}

.po-home-action-grid {
  display: grid;
  gap: 12px;
}

.po-home-action-tile {
  min-height: 132px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  text-decoration: none;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.po-home-action-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
}

.po-portal-shell {
  max-width: 1760px;
  margin: 0 auto;
  padding: 72px 14px 30px;
}

.po-portal-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.po-portal-back {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 14px));
  left: max(14px, env(safe-area-inset-left, 14px));
  z-index: 30;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}

.po-portal-back:hover {
  border-color: rgba(37, 99, 235, 0.42);
  color: #1d4ed8;
  background: #eff6ff;
}

.po-portal-header h1 {
  margin: 0;
  font-size: 28px;
}

.po-portal-header p {
  margin: 6px 0 0;
  color: #5f6c82;
}

.po-portal-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.po-portal-shell .print-order-page {
  padding: 0;
}

.po-portal-layout {
  grid-template-columns: minmax(980px, 1fr) minmax(460px, 560px);
}

.po-portal-layout .print-order-cards-area {
  min-height: 760px;
}

.po-portal-layout .po-cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.po-warehouse-panel {
  top: 8px;
}

.po-item-row {
  border: 1px solid var(--po-border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.po-item-row--view {
  gap: 6px;
}

.po-item-row-title {
  font-size: 14px;
  font-weight: 700;
}

.po-item-row-sub {
  color: var(--po-text-soft);
  font-size: 12px;
}

.po-item-row-stock {
  color: var(--po-text);
  font-size: 13px;
  font-weight: 700;
}

.po-item-row-controls {
  display: grid;
  grid-template-columns: 88px 98px 1fr;
  gap: 8px;
}

.po-item-row-controls input {
  border: 1px solid var(--po-border);
  border-radius: 8px;
  padding: 8px;
}

.po-item-row-controls button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.po-card.is-active {
  border-color: var(--po-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.po-card-lg .po-card-preview {
  height: 180px;
}

.po-card-lg .po-card-title {
  font-size: 15px;
}

.po-select-print-btn {
  border: 1px solid var(--po-border);
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px;
  cursor: pointer;
}

.po-select-print-btn:hover {
  border-color: var(--po-primary);
  background: #eff6ff;
}

.po-portal-cart-footer {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.po-portal-cart-footer .red_btn {
  width: 100%;
}

.po-portal-cart-footer .po-upload-field {
  display: grid;
  gap: 4px;
}

.po-portal-cart-footer .po-upload-field input {
  padding: 6px 10px;
  border: 1px solid var(--po-border);
  border-radius: 4px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.po-required {
  color: #c0392b;
}

.po-upload-order-comment {
  margin-bottom: 16px;
}

.po-portal-login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, calc(env(safe-area-inset-top, 0px) + 12px))
           max(20px, calc(env(safe-area-inset-right, 0px) + 12px))
           max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px))
           max(20px, calc(env(safe-area-inset-left, 0px) + 12px));
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    76deg,
    rgba(218, 231, 240, 1) 0%,
    rgba(100, 167, 250, 1) 49%,
    rgba(152, 163, 179, 1) 100%
  );
  background-size: 400%;
  animation: po-login-bg-flow 8s ease infinite;
}

@keyframes po-login-bg-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.po-portal-login-card {
  width: min(420px, 100%);
  border: 1px solid var(--po-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--po-shadow-md);
  padding: 22px;
  display: grid;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.po-portal-login-card h1 {
  margin: 0;
  font-size: 26px;
}

.po-portal-login-card p {
  margin: 0 0 6px;
  color: var(--po-text-soft);
}

.po-portal-login-card label {
  color: var(--po-text-soft);
  font-weight: 700;
  font-size: 13px;
}

.po-portal-login-card input {
  width: 100%;
  border: 1px solid var(--po-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.po-password-field {
  position: relative;
}

.po-password-field input {
  padding-right: 48px;
}

.po-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--po-primary);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.po-password-toggle:hover,
.po-password-toggle:focus-visible {
  background: #dbeafe;
  outline: none;
}


@media (prefers-reduced-motion: reduce) {
  .po-portal-login-wrap {
    animation: none;
  }
}

.po-checkout-shell {
  max-width: 980px;
}

.po-checkout-card {
  border: 1px solid var(--po-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--po-shadow-md);
  padding: 16px;
}

.po-checkout-totals {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  color: var(--po-text-soft);
  font-weight: 700;
}

.po-checkout-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.po-checkout-form label {
  color: var(--po-text-soft);
  font-weight: 700;
}

.po-upload-shell {
  max-width: 1560px;
}

.po-upload-main-card,
.po-upload-side-card {
  border: 1px solid var(--po-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--po-shadow-md);
  backdrop-filter: blur(16px);
  padding: 18px;
}

.po-upload-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.po-upload-card-head h2,
.po-upload-side-card h2 {
  margin: 0;
  font-size: 24px;
}

.po-upload-card-head p,
.po-upload-side-card p {
  margin: 8px 0 0;
  color: var(--po-text-soft);
}

.po-upload-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--po-primary-soft);
  color: var(--po-primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.po-upload-form,
.po-upload-rows,
.po-upload-side-list {
  display: grid;
  gap: 12px;
}

.po-upload-row {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-left: 4px solid rgba(37, 99, 235, 0.55);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  padding: 16px 16px 16px 14px;
}

.po-upload-row-head {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.po-upload-row-head h3 {
  margin: 0;
  font-size: 18px;
  color: #1e40af;
}

.po-upload-remove-btn {
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 10px;
  background: #fff5f5;
  color: #b91c1c;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.po-upload-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #1f7a4d;
  border-radius: 6px;
  background: #e9f7ef;
  color: #14613c;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.po-upload-add-btn:hover {
  border-color: #14613c;
  background: #d8f0e3;
  color: #0f4d30;
}

.po-upload-remove-btn:hover {
  background: #fee2e2;
}

.po-upload-row-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.po-upload-fields {
  display: grid;
  gap: 12px;
}

.po-upload-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.po-upload-field > span {
  color: var(--po-text-soft);
  font-size: 13px;
  font-weight: 700;
}

.po-upload-field input[type="text"],
.po-upload-field input[type="file"],
.po-upload-field textarea,
.po-upload-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--po-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: inherit;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.po-upload-field input[type="text"],
.po-upload-field select {
  height: 45px;
}

.po-upload-field input[type="text"]:focus,
.po-upload-field textarea:focus,
.po-upload-field select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.po-upload-field input[type="file"] {
  padding: 9px 12px;
  overflow: hidden;
  cursor: pointer;
  color: #475569;
}

.po-upload-field textarea {
  min-height: 68px;
  resize: vertical;
  line-height: 1.5;
}

.po-upload-field select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

.po-upload-field select option[value=""] {
  color: #94a3b8;
}

[data-upload-file-row] {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-rows: auto auto auto;
  gap: 6px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: #f8fbff;
  cursor: default;
}

[data-upload-file-row] > span {
  grid-column: 1 / -1;
}

[data-upload-file-row] [data-upload-file-note] {
  grid-column: 1 / -1;
  color: var(--po-text-muted);
  font-size: 12px;
  margin-top: -2px;
}

[data-upload-file-row] [data-upload-remove-file] {
  grid-column: 1 / -1;
  justify-self: end;
}

.po-upload-files {
  display: grid;
  gap: 8px;
}

.po-upload-file-note {
  color: var(--po-text-muted);
  font-size: 12px;
}

.po-upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.po-upload-add-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.po-upload-add-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 12px;
  line-height: 1.55;
  padding: 9px 12px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  z-index: 20;
  pointer-events: none;
}

.po-upload-add-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 18px;
  border: 6px solid transparent;
  border-top-color: #1e293b;
}

.po-upload-add-wrap:hover .po-upload-add-tooltip {
  display: block;
}

.po-upload-feedback {
  margin-top: 4px;
  border: 1px solid var(--po-border);
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.po-upload-feedback strong {
  font-size: 14px;
}

.po-upload-feedback p {
  margin: 0;
  color: var(--po-text-soft);
  font-size: 13px;
}

.po-upload-feedback ul {
  margin: 0;
  padding-left: 18px;
  color: #1e293b;
  font-size: 13px;
  display: grid;
  gap: 3px;
}

.po-upload-feedback--loading {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eef4ff;
}

.po-upload-feedback--success {
  border-color: rgba(5, 150, 105, 0.3);
  background: #ecfdf5;
}

.po-upload-feedback--error {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fef2f2;
}

.po-upload-side-item {
  border: 1px solid var(--po-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
  display: grid;
  gap: 6px;
}

.po-upload-side-item strong {
  font-size: 15px;
}

.po-upload-side-item span {
  color: var(--po-text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.po-portal-body .po-modal-content {
  width: min(680px, calc(100vw - 24px));
}

#po-checkout-desc {
  border: 1px solid var(--po-border);
  border-radius: 10px;
  background: #fff;
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

@media (max-width: 1260px) {
  .po-portal-layout {
    grid-template-columns: 1fr;
  }

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

  .po-warehouse-panel,
  .po-portal-shell .print-order-cart-area {
    position: static;
    max-height: none;
  }

  .po-portal-layout .po-cards-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .po-home-main-grid {
    grid-template-columns: 1fr;
  }

  .po-home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .po-home-shell {
    width: calc(100vw - 20px);
  }

  .po-home-header {
    padding: 16px;
  }

  .po-home-header h1 {
    font-size: 24px;
  }

  .po-home-action-grid {
    grid-template-columns: 1fr;
  }

  .po-home-action-tile {
    min-height: 96px;
    font-size: 22px;
  }

  .po-portal-header h1 {
    font-size: 24px;
  }

  .po-portal-layout .po-cards-grid {
    grid-template-columns: 1fr;
  }

  .po-upload-card-head,
  .po-upload-row-head,
  .po-upload-fields {
    grid-template-columns: 1fr;
  }

  .po-upload-card-head,
  .po-upload-row-head {
    display: grid;
  }

  .po-upload-actions .red_btn {
    width: 100%;
  }

  .po-item-row-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .po-portal-shell {
    padding: 60px max(10px, env(safe-area-inset-left, 10px)) 20px;
  }

  .po-home-shell {
    width: calc(100vw - 16px);
    padding: 12px 0 20px;
  }

  .po-home-header {
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }

  .po-home-header h1 {
    font-size: 20px;
  }

  .po-home-header p {
    font-size: 13px;
  }

  .po-home-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .po-home-panel h2 {
    font-size: 18px;
  }

  .po-home-order-card {
    padding: 10px;
    border-radius: 10px;
  }

  .po-home-order-title {
    font-size: 14px;
  }

  .po-home-action-tile {
    min-height: 68px;
    font-size: 18px;
    border-radius: 12px;
  }

  .po-home-modal-content {
    padding: 14px;
    border-radius: 12px;
  }

  .po-home-modal-content h2 {
    font-size: 18px;
  }

  .po-upload-card-head h2,
  .po-upload-side-card h2 {
    font-size: 20px;
  }

  .po-upload-row {
    padding: 12px 12px 12px 10px;
  }

  .po-upload-row-head h3 {
    font-size: 16px;
  }

  [data-upload-file-row] {
    grid-template-columns: 1fr;
  }

  .po-upload-badge {
    align-self: start;
  }

  .po-checkout-card {
    border-radius: 12px;
    padding: 12px;
  }

  .po-portal-header h1 {
    font-size: 20px;
  }

  .po-portal-login-card {
    padding: 16px;
    gap: 12px;
    border-radius: 14px;
  }

  .po-portal-login-card h1 {
    font-size: 22px;
  }

  .po-portal-login-card input {
    padding: 11px 12px;
    min-height: 44px;
    font-size: 16px;
  }

  .po-password-field input {
    padding-right: 52px;
  }

  .po-password-toggle {
    width: 44px;
    height: 44px;
    right: 4px;
  }
}

/* ---- Toast notifications ---- */
.po-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.po-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
  animation: poToastIn 0.22s ease;
}

.po-toast.is-closing {
  animation: poToastOut 0.2s ease forwards;
}

.po-toast-bar {
  flex-shrink: 0;
  width: 4px;
  border-radius: 4px;
  align-self: stretch;
  min-height: 18px;
}

.po-toast--info .po-toast-bar    { background: #64748b; }
.po-toast--success .po-toast-bar { background: #059669; }
.po-toast--error .po-toast-bar   { background: #dc2626; }
.po-toast--warning .po-toast-bar { background: #f59e0b; }

.po-toast-body {
  flex: 1;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.5;
  word-break: break-word;
}

.po-toast-close {
  flex-shrink: 0;
  display: inline-flex;
  width: 26px;
  height: 26px;
  min-height: auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.po-toast-close:hover {
  background: #f1f5f9;
  transform: none;
  box-shadow: none;
}

@keyframes poToastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes poToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}
