.p2-layout {
  --p2-green: #176b52;
  --p2-deep: #123d31;
  --p2-mint: #e8f3ed;
  --p2-paper: #f6f7f3;
  --p2-line: #e5e9e2;
  --p2-text: #1b3028;
  --p2-sub: #75817a;
  --p2-warn: #a86421;
  --p2-danger: #aa4c45;
  min-height: 100vh;
  background: var(--p2-paper);
  color: var(--p2-text);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  direction: rtl;
  font-family: inherit;
}
.p2-layout * {
  box-sizing: border-box;
}
.p2-sidebar {
  background: #123d31;
  color: #f4f8f4;
  min-height: 100vh;
  padding: 22px 15px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.p2-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  padding: 4px 9px 25px;
}
.p2-brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e9f1dc;
  color: #164535;
  font-size: 25px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #ffffff75;
}
.p2-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.p2-brand small {
  display: block;
  color: #b4c9bc;
  margin-top: 3px;
  font-size: 11px;
}
.p2-nav-label {
  padding: 7px 10px 11px;
  color: #a7c0b3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.p2-nav {
  display: grid;
  gap: 4px;
}
.p2-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 0 12px;
  border-radius: 11px;
  color: #d0ddd5;
  text-decoration: none;
  font-size: 13px;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
.p2-nav-item svg {
  color: #9cb9a7;
  flex: 0 0 auto;
}
.p2-nav-item:hover {
  background: #ffffff13;
  color: white;
  transform: translateX(-2px);
}
.p2-nav-item.active {
  background: #e8f3ed;
  color: #14523d;
  font-weight: 750;
  box-shadow: 0 3px 10px #092b231c;
}
.p2-nav-item.active svg {
  color: #176b52;
}
.p2-side-foot {
  margin-top: auto;
  padding: 15px 10px 5px;
  border-top: 1px solid #ffffff24;
  color: #d5e3da;
  font-size: 11px;
  line-height: 1.8;
}
.p2-side-foot span {
  color: #9eb9a9;
}
.p2-main {
  min-width: 0;
}
.p2-topbar {
  min-height: 79px;
  padding: 13px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid var(--p2-line);
  background: #fbfcf9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.p2-crumb {
  font-size: 11px;
  color: var(--p2-sub);
  margin-bottom: 4px;
}
.p2-crumb span {
  padding: 0 5px;
  color: #afbab2;
}
.p2-topbar > div:first-child > strong {
  font-size: 16px;
}
.p2-top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}
.p2-online {
  font-size: 11px;
  color: #64746b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.p2-online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3c9c70;
  display: inline-block;
}
.p2-admin-link {
  font-size: 12px;
  color: var(--p2-green);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.p2-content {
  max-width: 1460px;
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 40px) 34px;
}
.p2-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 22px;
}
.p2-page-head h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: #1c3329;
}
.p2-page-head p {
  margin: 7px 0 0;
  color: var(--p2-sub);
  font-size: 13px;
}
.p2-kicker {
  color: var(--p2-green);
  font-size: 11px;
  font-weight: 750;
}
.p2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 41px;
  padding: 0 15px;
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    background 0.16s;
  color: inherit;
  white-space: nowrap;
}
.p2-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px #183c2e15;
}
.p2-btn svg {
  width: 16px;
  height: 16px;
}
.p2-btn-primary {
  background: var(--p2-green);
  color: white;
  box-shadow: 0 3px 8px #176b522b;
}
.p2-btn-primary:hover {
  background: #12543f;
}
.p2-btn-soft {
  background: #e9f3ed;
  color: #175b43;
  border-color: #d9e9df;
}
.p2-btn-quiet {
  background: white;
  color: #4c6257;
  border-color: #e4e9e3;
}
.p2-btn-danger-soft {
  background: #fff0ee;
  color: #93453d;
  border-color: #f0d4ce;
}
.p2-btn-small {
  min-height: 33px;
  padding: 0 10px;
  font-size: 11px;
}
.p2-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.p2-stat-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.p2-stat {
  background: #fff;
  border: 1px solid var(--p2-line);
  border-radius: 15px;
  padding: 17px 18px;
  min-width: 0;
  box-shadow: 0 5px 17px #2f513809;
}
.p2-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7971;
  font-size: 12px;
}
.p2-stat-icon {
  color: #378163;
  background: #e9f3ed;
  border-radius: 10px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
}
.p2-stat > strong {
  display: block;
  margin-top: 13px;
  font-size: 23px;
  line-height: 1.2;
  color: #153e30;
  letter-spacing: -0.4px;
}
.p2-stat > small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: #89958e;
}
.p2-stat-warn {
  border-color: #efdfc7;
  background: #fffdfa;
}
.p2-stat-warn .p2-stat-icon {
  background: #fff2df;
  color: #b4732d;
}
.p2-welcome {
  border-radius: 17px;
  background: linear-gradient(110deg, #164d3c, #237456);
  color: white;
  min-height: 155px;
  padding: 25px 28px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.p2-welcome:after {
  content: "";
  position: absolute;
  left: 27%;
  top: -80px;
  width: 260px;
  height: 260px;
  border: 1px solid #ffffff25;
  border-radius: 50%;
  box-shadow:
    0 0 0 28px #ffffff09,
    0 0 0 57px #ffffff06;
}
.p2-welcome > div:first-child {
  position: relative;
  z-index: 1;
}
.p2-welcome > div:first-child > span {
  display: inline-block;
  color: #d2e6d7;
  font-size: 11px;
  background: #ffffff18;
  border: 1px solid #ffffff29;
  border-radius: 20px;
  padding: 5px 10px;
}
.p2-welcome h2 {
  font-size: 22px;
  margin: 11px 0 5px;
  letter-spacing: -0.3px;
}
.p2-welcome p {
  font-size: 12px;
  color: #d1e3d7;
  margin: 0;
}
.p2-welcome-mark {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 23px;
  background: #ffffff15;
  color: #dcf0e3;
  border: 1px solid #ffffff2d;
}
.p2-welcome-mark svg {
  width: 38px;
  height: 38px;
}
.p2-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin: 17px 0;
}
.p2-card {
  background: white;
  border: 1px solid var(--p2-line);
  border-radius: 15px;
  padding: 19px 20px;
  margin-bottom: 16px;
  box-shadow: 0 5px 17px #2f513807;
  min-width: 0;
}
.p2-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}
.p2-card-head h2 {
  margin: 0;
  font-size: 16px;
  color: #244438;
}
.p2-card-head p {
  margin: 5px 0 0;
  color: #829087;
  font-size: 11px;
  line-height: 1.65;
}
.p2-card-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 23px 0 10px;
}
.p2-card-subhead h3 {
  font-size: 13px;
  margin: 0;
}
.p2-text-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--p2-green);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.p2-text-link svg {
  width: 14px;
  height: 14px;
}
.p2-low-list {
  display: grid;
  gap: 2px;
}
.p2-low-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2ef;
}
.p2-low-row:last-child {
  border-bottom: 0;
}
.p2-low-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cb8b3c;
}
.p2-low-row strong {
  display: block;
  font-size: 12px;
}
.p2-low-row small {
  display: block;
  margin-top: 3px;
  color: #8b968f;
  font-size: 10px;
}
.p2-low-row > b {
  font-size: 12px;
  color: #8b612d;
}
.p2-empty-inline {
  padding: 22px 10px;
  text-align: center;
  color: #89958e;
  font-size: 12px;
}
.p2-shortcuts {
  display: grid;
}
.p2-shortcuts a {
  display: grid;
  grid-template-columns: 23px 1fr 17px;
  align-items: center;
  gap: 8px;
  padding: 13px 5px;
  border-bottom: 1px solid #eff1ed;
  color: #315244;
  text-decoration: none;
  font-size: 12px;
}
.p2-shortcuts a:last-child {
  border: 0;
}
.p2-shortcuts a > svg:first-child {
  color: #398566;
}
.p2-shortcuts a > svg:last-child {
  width: 14px;
  height: 14px;
  color: #aab4ad;
}
.p2-scope-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #f4f8f4;
  border-color: #e0ebe2;
}
.p2-scope-card > div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.p2-scope-card > div > svg {
  color: #338161;
  flex: 0 0 auto;
  margin-top: 2px;
}
.p2-scope-card strong {
  font-size: 12px;
}
.p2-scope-card p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: #75827a;
}
.p2-footer {
  padding: 22px 4px 6px;
  color: #9aa49e;
  font-size: 10px;
  line-height: 1.7;
}
.p2-alert-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff5e8;
  border: 1px solid #f0dfc6;
  color: #986426;
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 11px;
  margin: -2px 0 15px;
}
.p2-alert-strip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.p2-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.p2-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fbfcfa;
  border: 1px solid #e3e8e2;
  border-radius: 10px;
  min-width: min(380px, 100%);
  height: 40px;
  padding: 0 11px;
  color: #8a9990;
}
.p2-search-box svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.p2-search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  color: #243d31;
}
.p2-search-box input::placeholder {
  color: #9da9a1;
}
.p2-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.p2-count {
  font-size: 11px;
  color: #88948d;
  white-space: nowrap;
}
.p2-sample-actions {
  display: flex;
  gap: 6px;
}
.p2-table-scroll {
  width: 100%;
  overflow-x: auto;
}
.p2-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 11px;
}
.p2-table th {
  white-space: nowrap;
  background: #f8faf7;
  color: #77847c;
  font-size: 10px;
  font-weight: 700;
  padding: 11px 10px;
  border-bottom: 1px solid #e9ede8;
}
.p2-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #eff1ed;
  vertical-align: middle;
  color: #52645a;
}
.p2-table tbody tr:last-child td {
  border-bottom: 0;
}
.p2-table-empty {
  text-align: center !important;
  padding: 30px 12px !important;
  color: #88948c !important;
}
.p2-cell-main {
  font-size: 11px;
  font-weight: 750;
  color: #2c4639;
}
.p2-cell-sub {
  font-size: 9px;
  color: #98a29b;
  margin-top: 4px;
}
.p2-code {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.3px;
  color: #566b5d;
  direction: ltr;
  display: inline-block;
}
.p2-stock-value {
  font-weight: 750;
  color: #315c47;
  white-space: nowrap;
}
.p2-stock-value.low {
  color: #a8692b;
}
.p2-low-tag {
  display: inline-block;
  margin-inline-start: 5px;
  border-radius: 8px;
  background: #fff2df;
  color: #ac6c2b;
  padding: 3px 6px;
  font-size: 9px;
}
.p2-row-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.p2-icon-action {
  border: 0;
  background: #eef5ef;
  color: #1d674a;
  border-radius: 7px;
  min-height: 29px;
  padding: 0 8px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.p2-delete-action {
  color: #a24f46;
  background: #fff1ee;
}
.p2-note,
.p2-inline-warning {
  font-size: 11px;
  line-height: 1.8;
  color: #7d6a4a;
  background: #fff9ee;
  border: 1px solid #f0e5ce;
  border-radius: 10px;
  padding: 11px 14px;
  margin: 13px 0;
}
.p2-inline-warning a {
  color: #176b52;
  font-weight: 700;
}
.p2-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: #e8f3ed;
  color: #1a674a;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.p2-badge svg {
  width: 14px;
  height: 14px;
}
.p2-badge-neutral {
  background: #f1f4f0;
  color: #68776e;
}
.p2-badge-cash {
  background: #eaf4ed;
  color: #1b674a;
}
.p2-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 15px;
}
.p2-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.p2-field label {
  font-size: 11px;
  font-weight: 700;
  color: #52665b;
}
.p2-field input,
.p2-field select,
.p2-purchase-line input,
.p2-purchase-line select {
  width: 100%;
  height: 39px;
  border: 1px solid #dfe6df;
  background: #fff;
  border-radius: 9px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  color: #203c2e;
  outline: none;
}
.p2-field input:focus,
.p2-field select:focus,
.p2-purchase-line input:focus,
.p2-purchase-line select:focus {
  border-color: #67a586;
  box-shadow: 0 0 0 3px #21825717;
}
.p2-field input[readonly] {
  background: #f5f7f4;
  color: #77847b;
}
.p2-field small,
.p2-helper {
  color: #8c9891;
  font-size: 9px;
  line-height: 1.65;
}
.p2-span-all {
  grid-column: 1/-1;
}
.p2-input-action {
  display: flex;
  gap: 8px;
}
.p2-input-action input {
  flex: 1;
  min-width: 0;
}
.p2-conversion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.p2-field > p.p2-helper {
  margin: 0 0 3px;
}
.p2-barcode-preview {
  min-height: 50px;
  padding: 7px 12px;
  border: 1px dashed #dbe4dc;
  background: #fbfcfa;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p2-barcode-svg {
  width: 210px;
  max-width: 100%;
  height: auto;
}
.p2-form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 17px;
}
.p2-form-error {
  color: #a1483d;
  font-size: 11px;
  min-height: 0;
  margin-top: 9px;
}
.p2-form-error:not(:empty) {
  border-radius: 8px;
  background: #fff0ee;
  padding: 8px 11px;
}
.p2-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #13251fd1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(3px);
}
.p2-modal {
  width: min(690px, 100%);
  max-height: min(90vh, 850px);
  overflow: auto;
  background: #fff;
  border-radius: 17px;
  padding: 21px 22px;
  box-shadow: 0 23px 65px #071b154f;
}
.p2-product-modal {
  width: min(840px, 100%);
}
.p2-ledger-modal {
  width: min(820px, 100%);
}
.p2-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}
.p2-modal-head h2 {
  font-size: 19px;
  margin: 4px 0;
  color: #1d3b2c;
}
.p2-modal-head p {
  margin: 4px 0;
  color: #77857c;
  font-size: 11px;
}
.p2-modal-x {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #f1f5f1;
  color: #68776f;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.p2-modal-x svg {
  width: 17px;
  height: 17px;
}
.p2-modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #edf0ec;
  padding-top: 15px;
  margin-top: 20px;
}
.p2-modal-balance {
  font-weight: 700 !important;
  color: #176b52 !important;
}
.p2-table .p2-positive {
  color: #277b57;
}
.p2-table .p2-negative {
  color: #a54c43;
}
.p2-positive {
  color: #277b57;
}
.p2-negative {
  color: #a54c43;
}
.p2-empty-state {
  text-align: center;
  padding: 38px 16px;
}
.p2-empty-state h2 {
  font-size: 16px;
  margin: 12px 0 4px;
}
.p2-empty-state p {
  font-size: 11px;
  color: #829087;
  margin: 0 0 15px;
}
.p2-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #e8f3ed;
  color: #277958;
  margin: auto;
  display: grid;
  place-items: center;
}
.p2-empty-icon svg {
  width: 26px;
  height: 26px;
}
.p2-count-input {
  width: 110px;
  height: 35px;
  border: 1px solid #dfe5de;
  border-radius: 8px;
  padding: 0 9px;
  font: inherit;
  font-size: 11px;
}
.p2-diff {
  font-weight: 750;
  color: #85918a;
  direction: ltr;
  display: inline-block;
}
.p2-diff.positive {
  color: #22794f;
}
.p2-diff.negative {
  color: #b35d43;
}
.p2-purchase-lines {
  overflow: auto;
}
.p2-purchase-line {
  display: grid;
  grid-template-columns:
    minmax(190px, 2fr) minmax(135px, 1.2fr) minmax(84px, 0.7fr)
    minmax(100px, 0.8fr) minmax(82px, 0.7fr) 30px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 760px;
}
.p2-line-header {
  font-size: 9px;
  color: #859189;
  padding: 0 4px;
  margin-top: 2px;
}
.p2-line-total {
  font-size: 11px;
  font-weight: 750;
  color: #2f5844;
  text-align: center;
}
.p2-line-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #fff0ee;
  color: #a14d45;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.p2-line-remove svg {
  width: 14px;
  height: 14px;
}
.p2-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e9eee8;
  margin-top: 12px;
  padding-top: 14px;
  font-size: 12px;
}
.p2-total-row strong {
  font-size: 16px;
  color: #184734;
}
.p2-limit-alert {
  color: #aa5f33;
  font-weight: 800;
}
.p2-policy-field {
  max-width: 460px;
}
.p2-actions-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.p2-mobile-nav {
  display: none;
}
.p2-product-row[hidden] {
  display: none;
}
@media (max-width: 1100px) {
  .p2-layout {
    grid-template-columns: 218px minmax(0, 1fr);
  }
  .p2-sidebar {
    padding-inline: 11px;
  }
  .p2-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .p2-table th,
  .p2-table td {
    padding: 10px 7px;
    font-size: 10px;
  }
  .p2-content {
    padding-inline: 22px;
  }
  .p2-purchase-line {
    grid-template-columns:
      minmax(165px, 2fr) minmax(125px, 1.2fr) minmax(74px, 0.7fr)
      minmax(90px, 0.8fr) minmax(72px, 0.7fr) 26px;
  }
}
@media (max-width: 760px) {
  .p2-layout {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(67px + env(safe-area-inset-bottom));
  }
  .p2-sidebar {
    display: none;
  }
  .p2-main {
    min-height: 100dvh;
  }
  .p2-topbar {
    min-height: 64px;
    padding: 10px 15px;
  }
  .p2-topbar > div:first-child > strong {
    font-size: 14px;
  }
  .p2-top-actions {
    gap: 9px;
  }
  .p2-top-actions .p2-online {
    display: none;
  }
  .p2-top-actions .p2-btn {
    min-height: 32px;
    padding: 0 8px;
    font-size: 10px;
  }
  .p2-top-actions .p2-btn svg {
    width: 14px;
  }
  .p2-admin-link {
    font-size: 10px;
  }
  .p2-content {
    padding: 20px 14px 28px;
  }
  .p2-page-head {
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .p2-page-head h1 {
    font-size: 22px;
  }
  .p2-page-head p {
    font-size: 11px;
    line-height: 1.6;
  }
  .p2-page-head > .p2-btn,
  .p2-page-head > .p2-badge {
    margin-top: 3px;
  }
  .p2-stat-grid,
  .p2-stat-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
  }
  .p2-stat {
    padding: 13px 13px;
    border-radius: 12px;
  }
  .p2-stat-head {
    font-size: 10px;
  }
  .p2-stat-icon {
    width: 27px;
    height: 27px;
  }
  .p2-stat-icon svg {
    width: 15px;
    height: 15px;
  }
  .p2-stat > strong {
    font-size: 18px;
    margin-top: 10px;
  }
  .p2-stat > small {
    font-size: 9px;
  }
  .p2-welcome {
    min-height: 135px;
    padding: 19px 18px;
    border-radius: 14px;
    margin-bottom: 12px;
  }
  .p2-welcome h2 {
    font-size: 18px;
    max-width: 280px;
  }
  .p2-welcome p {
    font-size: 10px;
    max-width: 300px;
    line-height: 1.6;
  }
  .p2-welcome-mark {
    width: 55px;
    height: 55px;
    border-radius: 17px;
  }
  .p2-welcome-mark svg {
    width: 28px;
  }
  .p2-content-grid {
    grid-template-columns: 1fr;
    gap: 1px;
    margin: 12px 0;
  }
  .p2-card {
    padding: 15px 13px;
    border-radius: 13px;
    margin-bottom: 12px;
  }
  .p2-card-head {
    margin-bottom: 12px;
  }
  .p2-card-head h2 {
    font-size: 14px;
  }
  .p2-card-head p {
    font-size: 10px;
  }
  .p2-scope-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .p2-scope-card .p2-btn {
    min-height: 34px;
  }
  .p2-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .p2-search-box {
    min-width: 0;
    width: 100%;
  }
  .p2-toolbar-actions {
    justify-content: space-between;
  }
  .p2-table-scroll {
    overflow: visible;
  }
  .p2-table,
  .p2-table tbody {
    display: block;
    width: 100%;
  }
  .p2-table thead {
    display: none;
  }
  .p2-table tbody {
    display: grid;
    gap: 9px;
  }
  .p2-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    padding: 9px 11px;
    border: 1px solid #e8ede7;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 3px 11px #274a3508;
  }
  .p2-table tbody tr[hidden] {
    display: none;
  }
  .p2-table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 8px 2px;
    border-bottom: 1px dashed #eff2ee;
    font-size: 10px;
    overflow-wrap: anywhere;
  }
  .p2-table td:before {
    content: attr(data-label);
    font-size: 9px;
    color: #929d96;
    font-weight: 600;
  }
  .p2-table td:last-child,
  .p2-table td:nth-last-child(2) {
    border-bottom: 0;
  }
  .p2-table td.p2-table-empty {
    display: block;
    text-align: center !important;
    grid-column: 1/-1;
  }
  .p2-row-actions {
    flex-wrap: wrap;
  }
  .p2-icon-action {
    min-height: 27px;
  }
  .p2-count-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .p2-count-input {
    width: 100%;
    max-width: 135px;
  }
  .p2-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .p2-span-all {
    grid-column: auto;
  }
  .p2-conversion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .p2-modal-backdrop {
    padding: 9px;
    align-items: flex-end;
  }
  .p2-modal {
    max-height: 91dvh;
    border-radius: 17px 17px 12px 12px;
    padding: 18px 14px;
  }
  .p2-modal-head h2 {
    font-size: 17px;
  }
  .p2-modal-foot {
    position: sticky;
    bottom: -18px;
    background: white;
    padding: 11px 0 4px;
  }
  .p2-form-actions {
    position: sticky;
    bottom: -14px;
    background: #fff;
    padding: 10px 0 3px;
  }
  .p2-purchase-lines {
    overflow-x: auto;
    margin-inline: -3px;
    padding-inline: 3px;
  }
  .p2-purchase-line {
    min-width: 700px;
  }
  .p2-card-subhead {
    margin-top: 18px;
  }
  .p2-badge {
    font-size: 9px;
    padding: 6px 8px;
  }
  .p2-note,
  .p2-inline-warning {
    font-size: 10px;
  }
  .p2-footer {
    font-size: 9px;
    padding: 16px 2px;
  }
  .p2-mobile-nav {
    position: fixed;
    z-index: 50;
    bottom: 0;
    inset-inline: 0;
    height: calc(61px + env(safe-area-inset-bottom));
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e3e9e2;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    box-shadow: 0 -5px 18px #163d2e0d;
  }
  .p2-mobile-item {
    flex: 0 0 73px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #829087;
    border-radius: 9px;
    font-size: 8px;
    white-space: nowrap;
  }
  .p2-mobile-item svg {
    width: 17px;
    height: 17px;
  }
  .p2-mobile-item.active {
    color: #176b52;
    background: #edf5ef;
    font-weight: 750;
  }
  .p2-online {
    display: none;
  }
  .p2-welcome:after {
    left: 10%;
    width: 170px;
    height: 170px;
    top: -45px;
  }
}
@media (max-width: 390px) {
  .p2-content {
    padding-inline: 10px;
  }
  .p2-topbar {
    padding-inline: 10px;
  }
  .p2-top-actions {
    gap: 6px;
  }
  .p2-top-actions .p2-btn {
    padding: 0 6px;
  }
  .p2-page-head h1 {
    font-size: 20px;
  }
  .p2-stat {
    padding: 12px 10px;
  }
  .p2-stat > strong {
    font-size: 16px;
  }
  .p2-mobile-item {
    flex-basis: 66px;
  }
  .p2-table tbody tr {
    padding-inline: 8px;
  }
  .p2-row-actions {
    gap: 3px;
  }
  .p2-icon-action {
    font-size: 9px;
    padding: 0 6px;
  }
}
@media print {
  body > * {
    display: none !important;
  }
  .p2-modal-backdrop,
  .p2-modal-backdrop * {
    visibility: visible;
  }
  .p2-modal-backdrop {
    display: block !important;
    position: absolute;
    inset: 0;
    background: #fff;
    padding: 0;
  }
  .p2-modal {
    max-height: none;
    overflow: visible;
    box-shadow: none;
    width: 100%;
    border: 0;
  }
  .p2-modal-x,
  .p2-modal-foot {
    display: none !important;
  }
}

.p2-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .p2-layout * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
