/* Import view reference styling: visual only, preserves existing IDs and behavior. */
body[data-active-view="import"] .view.active {
  padding: 0 26px 22px;
}

body[data-active-view="import"] .origin-warning {
  margin: 0 26px 8px;
}

#import {
  display: none;
}

#import.view.active {
  display: grid;
  gap: 24px;
}

#import .panel {
  border: 1px solid #e3e8f3;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(7, 26, 68, 0.08);
}

#import .import-upload-panel {
  height: 328px;
  min-height: 328px;
  padding: 18px 20px 14px;
  position: relative;
  overflow: hidden;
}

#import .panel-heading {
  margin: 0 0 14px;
  align-items: center;
}

#import .panel-heading h2,
#import .summary-title {
  color: #071a44;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
}

#templateBtn {
  height: 36px;
  min-height: 36px;
  padding: 0 16px 0 42px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  color: #0057d9;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 800;
  position: relative;
}

#templateBtn::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 9px;
  width: 16px;
  height: 16px;
  background: #0057d9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#import #dropZone {
  box-sizing: border-box;
  height: 154px;
  min-height: 154px;
  border: 1px dashed #9fc1ff;
  border-radius: 8px;
  background: #ffffff;
  display: block;
  padding: 22px;
  overflow: hidden;
}

#import #dropZone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 16px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8f0ff 0%, #dbe8ff 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 87, 217, 0.04);
  -webkit-mask: none;
  mask: none;
  transform: translateX(-50%);
}

#import #dropZone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 32px;
  width: 28px;
  height: 28px;
  background: #0b6eea;
  transform: translateX(-50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3'/%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3'/%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#import #dropZone > span {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 20px;
  top: 92px;
  margin: 0;
  text-align: center;
}

#import #dropZone strong {
  color: #071a44;
  font-size: 16px;
  font-weight: 800;
}

#import #dropZone span span {
  color: #536487;
  font-size: 13px;
  font-weight: 500;
}

#import .import-bottom-row {
  display: block;
  margin: 0;
  min-height: 0;
}

#import .import-actions {
  position: absolute;
  right: 30px;
  bottom: 40px;
  z-index: 3;
  margin: 0;
  padding-right: 0;
  justify-content: flex-end;
}

#loadStockBtn {
  min-width: 185px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  background: #ef1736;
  box-shadow: 0 8px 16px rgba(239, 23, 54, 0.22);
  font-size: 15px;
  font-weight: 900;
}

#loadStockBtn:disabled {
  opacity: 1;
  border-color: #ef1736;
  background: #ef1736;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(239, 23, 54, 0.22);
  cursor: pointer;
}

#loadStockBtn span {
  width: 20px;
  height: 20px;
  display: inline-block;
  position: relative;
  color: #ffffff;
}

#loadStockBtn span::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#loadStockBtn span::after {
  content: none;
}

#import #attachedFiles {
  position: absolute;
  left: 30px;
  right: 245px;
  bottom: 40px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding-right: 0;
  z-index: 2;
  min-width: 0;
}

#import #attachedFiles:empty {
  display: none;
}

#import .attached-file-card {
  min-height: 44px;
  max-height: 50px;
  padding: 8px 12px;
  border: 1px solid #b7d3f2;
  border-radius: 0;
  background: #f5fbff;
  box-shadow: none;
  overflow: hidden;
}

#import .attached-file-card strong {
  color: #071a44;
  font-size: 13px;
}

#import .attached-file-card span {
  color: #536487;
  font-size: 12px;
}

#import .remove-file-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid #9fc1e8;
  border-radius: 8px;
  background: #ffffff;
  color: #d0021b;
  font-weight: 900;
}

#import .import-last-panel {
  padding: 24px 20px 20px;
}

#import .import-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 0 0 26px;
}

#import .summary-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

#import .location-summary-card {
  position: relative;
  min-height: 106px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 8px;
  background: #ffffff;
}

#import .location-summary-card:nth-of-type(1) {
  border: 1px solid #8db5ff;
}

#import .location-summary-card:nth-of-type(2) {
  border: 1px solid #22c55e;
}

#import .location-summary-card:nth-of-type(3) {
  border: 1px solid #b792ff;
}

#import .location-summary-card::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 14px;
  grid-row: 1 / span 2;
  background: #e8f0ff;
}

#import .location-summary-card::after {
  content: "";
  position: absolute;
  left: 37px;
  top: 39px;
  width: 26px;
  height: 26px;
  background: #0b6eea;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h6l2 2h8v10H4z'/%3E%3Cpath d='M4 7V5h6l2 2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h6l2 2h8v10H4z'/%3E%3Cpath d='M4 7V5h6l2 2'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#import .location-summary-card:nth-of-type(2)::after {
  background: #ffffff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9-5-9 5 9 5 9-5Z'/%3E%3Cpath d='M3 8v8l9 5 9-5V8'/%3E%3Cpath d='M12 13v8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9-5-9 5 9 5 9-5Z'/%3E%3Cpath d='M3 8v8l9 5 9-5V8'/%3E%3Cpath d='M12 13v8'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#import .location-summary-card:nth-of-type(3)::after {
  background: #7c3aed;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 15h6'/%3E%3Cpath d='M9 18h6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 15h6'/%3E%3Cpath d='M9 18h6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

#import .location-summary-card:nth-of-type(1)::before {
  background: #e8f0ff;
}

#import .location-summary-card:nth-of-type(2)::before {
  background: #22c55e;
}

#import .location-summary-card:nth-of-type(3)::before {
  background: #e9ddff;
}

#import .location-summary-card span,
#import .location-summary-card strong {
  grid-column: 2;
}

#import .location-summary-card span {
  color: #536487;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

#import .location-summary-card strong {
  color: #071a44;
  font-size: 26px;
  font-weight: 900;
  margin-top: 2px;
}

#import #importResult {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0 18px 0 54px;
  border: 0;
  border-radius: 8px;
  background: #eef5ff;
  color: #0a3d91;
  font-size: 14px;
  font-weight: 600;
  position: relative;
}

#import #importResult::before {
  content: "i";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #1767d8;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  font-family: Georgia, serif;
}

body[data-active-view="import"] .main > .notice.origin-warning,
body[data-active-view="import"] .origin-warning {
  margin: 0 26px 8px;
}

/* Compact import spacing: keep the upload and latest-inventory panels visually connected. */
#import.view.active {
  gap: 12px;
  align-content: start;
  grid-auto-rows: auto;
}

#import .import-last-panel {
  padding-top: 20px;
}
