/* =========================================================
   RK FARM ENTERPRISE — STOCK ALLOCATION
   ========================================================= */

.rk-sa-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.rk-sa-title {
  margin: 0 !important;
  font-size: 29px !important;
  font-weight: 850 !important;
  letter-spacing: -.7px;
  color: #093f31 !important;
}

.rk-sa-subtitle {
  margin: 7px 0 0;
  max-width: 800px;
  font-size: 14px;
  line-height: 1.6;
  color: #71847b;
}

.rk-sa-primary {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(
      135deg,
      #087455,
      #0b8964
    );
  box-shadow:
    0 9px 24px rgba(8,116,85,.18);
  font-size: 12px;
  font-weight: 850;
  color: #fff;
  cursor: pointer;
}

.rk-sa-primary:hover {
  transform: translateY(-1px);
}

.rk-sa-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}


/* KPI */

.rk-sa-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.rk-sa-kpi {
  position: relative;
  min-height: 138px;
  padding: 21px 22px;
  border: 1px solid #d8e5df;
  border-radius: 17px;
  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f8fcfa
    );
  box-shadow:
    0 13px 34px rgba(15,66,48,.065);
  overflow: hidden;
}

.rk-sa-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background:
    linear-gradient(
      180deg,
      #087455,
      #24a675
    );
}

.rk-sa-kpi-label {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: #6a8075;
}

.rk-sa-kpi-value {
  margin-top: 13px;
  font-size: 29px;
  line-height: 1;
  font-weight: 850;
  color: #093f31;
}

.rk-sa-kpi-note {
  margin-top: 10px;
  font-size: 11px;
  color: #829188;
}


/* HISTORY */

.rk-sa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.rk-sa-search {
  width: min(430px,100%);
  min-height: 45px;
  padding: 0 15px;
  border: 1px solid #cfddd6;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: #23483c;
}

.rk-sa-table-card {
  overflow: hidden;
  border: 1px solid #d8e5df;
  border-radius: 17px;
  background: #fff;
  box-shadow:
    0 14px 38px rgba(15,65,48,.07);
}

.rk-sa-table-wrap {
  overflow-x: auto;
}

.rk-sa-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
}

.rk-sa-table th {
  height: 58px;
  padding: 0 15px;
  border-bottom: 1px solid #dce7e1;
  background:
    linear-gradient(
      180deg,
      #f8fbf9,
      #f3f8f5
    );
  text-align: left;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .55px;
  text-transform: uppercase;
  color: #687b72;
  white-space: nowrap;
}

.rk-sa-table td {
  padding: 17px 15px;
  border-bottom: 1px solid #edf2ef;
  font-size: 12px;
  line-height: 1.45;
  color: #294a40;
  vertical-align: middle;
}

.rk-sa-table tbody tr:hover {
  background: #f9fcfa;
}

.rk-sa-table tbody tr:last-child td {
  border-bottom: 0;
}

.rk-sa-code {
  font-weight: 850;
  color: #087054;
}

.rk-sa-sub {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: #7e8f86;
}

.rk-sa-money {
  font-weight: 850;
  color: #075c45;
}

.rk-sa-qty {
  font-weight: 850;
  color: #173f33;
}

.rk-sa-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e6f7ee;
  font-size: 9px;
  font-weight: 850;
  color: #087251;
}

.rk-sa-empty {
  padding: 48px 20px !important;
  text-align: center;
  color: #788b81 !important;
}


/* MODAL */

.rk-sa-modal {
  width: min(1040px,96vw) !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  border-radius: 20px !important;
}

.rk-sa-modal-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #76887f;
}

.rk-sa-section {
  margin-bottom: 20px;
  padding: 21px;
  border: 1px solid #dce8e2;
  border-radius: 15px;
  background: #fbfdfc;
}

.rk-sa-section-title {
  margin: 0 0 17px;
  font-size: 15px;
  font-weight: 850;
  color: #0a4334;
}

.rk-sa-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 15px;
}

.rk-sa-field.full {
  grid-column: 1 / -1;
}

.rk-sa-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: #667a70;
}

.rk-sa-field input,
.rk-sa-field select,
.rk-sa-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #cfded7;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: #21463a;
}

.rk-sa-field textarea {
  min-height: 82px;
  padding-top: 11px;
  resize: vertical;
}

.rk-sa-info-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}

.rk-sa-info {
  padding: 15px;
  border: 1px solid #d9e6e0;
  border-radius: 12px;
  background: #fff;
}

.rk-sa-info span {
  display: block;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #74867d;
}

.rk-sa-info strong {
  display: block;
  margin-top: 7px;
  font-size: 16px;
  font-weight: 850;
  color: #093f31;
}

.rk-sa-preview {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}

.rk-sa-preview-card {
  padding: 17px;
  border: 1px solid #d9e6e0;
  border-radius: 13px;
  background: #fff;
}

.rk-sa-preview-card.highlight {
  border-color: #b9dccc;
  background:
    linear-gradient(
      145deg,
      #f1fbf6,
      #eaf8f1
    );
}

.rk-sa-preview-card span {
  display: block;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #71847a;
}

.rk-sa-preview-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 850;
  color: #093f31;
}

@media (max-width: 1000px) {
  .rk-sa-kpis,
  .rk-sa-info-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 700px) {
  .rk-sa-header,
  .rk-sa-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .rk-sa-kpis,
  .rk-sa-form-grid,
  .rk-sa-info-grid,
  .rk-sa-preview {
    grid-template-columns: 1fr;
  }
}

/* Stock Allocation Manage */

.rk-sa-edit-button {
  min-height: 32px;
  padding: 5px 11px;

  border: 1px solid #bdd6ca;
  border-radius: 8px;

  background: #fff;

  font-size: 10px;
  font-weight: 850;

  color: #087052;

  cursor: pointer;
}

.rk-sa-edit-button:hover {
  background: #edf8f3;
}

.rk-sa-edit-modal {
  width: min(900px, 95vw) !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  border-radius: 20px !important;
}

.rk-sa-lock-note {
  margin-bottom: 20px;
  padding: 14px 16px;

  border: 1px solid #e6dfc8;
  border-left: 4px solid #b28a31;
  border-radius: 10px;

  background: #fffaf0;

  font-size: 12px;
  line-height: 1.6;

  color: #6f6040;
}

.rk-sa-edit-info {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}

.rk-sa-edit-info > div {
  min-width: 0;

  padding: 15px;

  border: 1px solid #dae6e0;
  border-radius: 12px;

  background: #fff;
}

.rk-sa-edit-info span {
  display: block;

  font-size: 9px;
  font-weight: 850;
  letter-spacing: .45px;
  text-transform: uppercase;

  color: #74877d;
}

.rk-sa-edit-info strong {
  display: block;

  margin-top: 7px;

  overflow-wrap: anywhere;

  font-size: 13px;
  font-weight: 850;

  color: #093f31;
}

@media (max-width: 720px) {
  .rk-sa-edit-info {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   STOCK ALLOCATION — ENTERPRISE TYPOGRAPHY UPGRADE
   ========================================================= */

/* Page description */
.rk-sa-subtitle {
  font-size: 15px !important;
  line-height: 1.7 !important;
}

/* KPI cards */
.rk-sa-kpi-label {
  font-size: 12px !important;
  letter-spacing: .65px !important;
}

.rk-sa-kpi-value {
  font-size: 34px !important;
  line-height: 1.05 !important;
}

.rk-sa-kpi-note {
  margin-top: 11px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

/* Search */
.rk-sa-search {
  min-height: 50px !important;
  padding-left: 17px !important;
  padding-right: 17px !important;
  font-size: 14px !important;
}

/* Refresh button */
.rk-sa-toolbar .rk-ci-refresh {
  min-height: 48px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
}

/* Main allocation table */
.rk-sa-table th {
  height: 62px !important;

  padding-left: 16px !important;
  padding-right: 16px !important;

  font-size: 11.5px !important;
  line-height: 1.35 !important;

  letter-spacing: .45px !important;
}

.rk-sa-table td {
  padding: 19px 16px !important;

  font-size: 13.5px !important;
  line-height: 1.55 !important;
}

/* Main strong values */
.rk-sa-code {
  font-size: 13.5px !important;
  line-height: 1.4 !important;
}

.rk-sa-table td strong {
  font-size: 13.5px !important;
  line-height: 1.45 !important;
}

/* Secondary row text */
.rk-sa-sub {
  margin-top: 5px !important;

  font-size: 11.5px !important;
  line-height: 1.4 !important;
}

/* Quantity and money */
.rk-sa-qty,
.rk-sa-money {
  font-size: 14px !important;
  font-weight: 850 !important;
}

/* Manage button */
.rk-sa-edit-button {
  min-height: 36px !important;
  padding: 6px 12px !important;

  font-size: 11.5px !important;
}

/* Allocate Stock button */
.rk-sa-primary {
  min-height: 48px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;

  font-size: 13px !important;
}

/* Allocation modal titles */
.rk-sa-section-title {
  font-size: 17px !important;
}

.rk-sa-modal-subtitle {
  font-size: 13px !important;
}

/* Allocation form labels */
.rk-sa-field label {
  margin-bottom: 7px !important;

  font-size: 11.5px !important;
  letter-spacing: .3px !important;
}

/* Allocation form controls */
.rk-sa-field input,
.rk-sa-field select,
.rk-sa-field textarea {
  min-height: 49px !important;

  padding-left: 13px !important;
  padding-right: 13px !important;

  font-size: 14px !important;
}

/* Information cards in allocation modal */
.rk-sa-info span,
.rk-sa-preview-card span {
  font-size: 10.5px !important;
}

.rk-sa-info strong {
  font-size: 18px !important;
}

.rk-sa-preview-card strong {
  font-size: 22px !important;
}

/* Manage allocation modal */
.rk-sa-edit-info span {
  font-size: 10.5px !important;
}

.rk-sa-edit-info strong {
  margin-top: 8px !important;

  font-size: 14px !important;
  line-height: 1.5 !important;
}

.rk-sa-lock-note {
  font-size: 13px !important;
  line-height: 1.65 !important;
}


/* Desktop table gets a little more breathing room */
@media (min-width: 1200px) {

  .rk-sa-table {
    min-width: 1250px !important;
  }

}


/* Mobile / tablet */
@media (max-width: 700px) {

  .rk-sa-kpi-value {
    font-size: 30px !important;
  }

  .rk-sa-table td {
    font-size: 13px !important;
  }

}
