/* Pentamarket GBox Admin V2 - premium dark UI */
.gbox-v2 {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #f4f4f5;
  max-width: 100%;
  overflow-x: hidden;
}
.gbox-v2 * { box-sizing: border-box; }
.gbox-v2 .rounded-2xl,
.gbox-v2 .rounded-xl {
  box-shadow: none !important;
}
.gbox-v2 .rounded-2xl {
  background: #111111 !important;
  border-color: #27272a !important;
}
.gbox-v2 input,
.gbox-v2 textarea,
.gbox-v2 select {
  background: #18181b !important;
  border-color: #3f3f46 !important;
  color: #fafafa !important;
  box-shadow: none !important;
}
.gbox-v2 input:focus,
.gbox-v2 textarea:focus,
.gbox-v2 select:focus {
  border-color: #BE24DC !important;
  outline: none !important;
}
.gbox-v2 input::placeholder,
.gbox-v2 textarea::placeholder { color: #71717a !important; }
.gbox-v2 button {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, opacity .18s ease;
  box-shadow: none !important;
}
.gbox-v2 button:active { transform: translateY(1px); }
.gbox-v2 button[class*="bg-violet"] { background: #BE24DC !important; }
.gbox-v2 button[class*="bg-violet"]:hover { background: #a91fc5 !important; }
.gbox-v2 button[class*="bg-emerald"] { background: #22c55e !important; }
.gbox-v2 button[class*="bg-emerald"]:hover { background: #16a34a !important; }
.gbox-v2 button[class*="bg-red"] { background: #dc2626 !important; }
.gbox-v2 button[class*="bg-blue"] { background: #27272a !important; border: 1px solid #3f3f46; }
.gbox-v2 button[class*="bg-blue"]:hover { background: #3f3f46 !important; }
.gbox-v2 label:has(input[type="checkbox"]) {
  background: #18181b !important;
  border-color: #27272a !important;
}
.gbox-v2 input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 42px !important;
  height: 24px !important;
  min-width: 42px !important;
  border-radius: 999px !important;
  background: #27272a !important;
  border: 1px solid #3f3f46 !important;
  position: relative;
  cursor: pointer;
  padding: 0 !important;
}
.gbox-v2 input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: #a1a1aa;
  transition: transform .18s ease, background-color .18s ease;
}
.gbox-v2 input[type="checkbox"]:checked {
  background: #BE24DC !important;
  border-color: #BE24DC !important;
}
.gbox-v2 input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: #fff;
}
.gbox-v2 table { border-collapse: collapse; }
.gbox-v2 thead { background: #18181b !important; }
.gbox-v2 tbody { background: #111111; }
.gbox-v2 th,
.gbox-v2 td { border-color: #27272a !important; }
.gbox-v2-mini-stock { display: flex; flex-wrap: wrap; gap: 6px; }
.gbox-v2-mini-stock span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #3f3f46;
  background: #18181b;
  color: #d4d4d8;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.gbox-v2-mini-stock .is-available { color: #86efac; border-color: rgba(34,197,94,.35); }
.gbox-v2-mini-stock .is-used { color: #fca5a5; border-color: rgba(239,68,68,.35); }

.gbox-v2-stock-manager {
  margin-top: 20px;
  background: #111111;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 16px;
  overflow: hidden;
}
.gbox-v2-stock-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.gbox-v2-eyebrow {
  display: inline-flex;
  color: #e879f9;
  border: 1px solid rgba(190,36,220,.35);
  background: rgba(190,36,220,.08);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.gbox-v2-stock-header h3 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  color: #fafafa;
}
.gbox-v2-stock-header p {
  margin: 5px 0 0;
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.55;
  max-width: 720px;
}
.gbox-v2-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3f3f46;
  background: #18181b;
  color: #f4f4f5;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.gbox-v2-refresh:hover { background: #27272a; }
.gbox-v2-refresh:disabled { opacity: .45; cursor: not-allowed; }
.gbox-v2-stock-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin-top: 16px;
}
.gbox-v2-stock-summary article {
  border: 1px solid #27272a;
  background: #18181b;
  border-radius: 12px;
  padding: 12px;
}
.gbox-v2-stock-summary article span {
  display: block;
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.gbox-v2-stock-summary article strong {
  display: block;
  margin-top: 5px;
  font-size: 21px;
  line-height: 1;
  color: #fafafa;
}
.gbox-v2-stock-summary article.available strong { color: #4ade80; }
.gbox-v2-stock-summary article.used strong { color: #f87171; }
.gbox-v2-stock-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.gbox-v2-segments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #27272a;
  background: #0a0a0a;
  border-radius: 12px;
}
.gbox-v2-segments button {
  border: 0;
  background: transparent;
  color: #a1a1aa;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
}
.gbox-v2-segments button:hover { color: #fafafa; background: #18181b; }
.gbox-v2-segments button.active { color: #fff; background: #BE24DC; }
.gbox-v2-segments button.active.available { background: #15803d; }
.gbox-v2-segments button.active.used { background: #b91c1c; }
.gbox-v2-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  justify-content: flex-end;
}
.gbox-v2-search input {
  width: min(100%, 330px);
  height: 38px;
  border: 1px solid #3f3f46 !important;
  border-radius: 10px !important;
  padding: 0 11px !important;
  font-size: 11px !important;
}
.gbox-v2-search button {
  height: 38px;
  border: 1px solid #BE24DC;
  background: #BE24DC;
  color: #fff;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 800;
}
.gbox-v2-code-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
}
.gbox-v2-code-row {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) auto minmax(230px,.8fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #27272a;
  background: #18181b;
  border-radius: 12px;
  padding: 10px 11px;
  min-width: 0;
}
.gbox-v2-code-primary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gbox-v2-code-primary code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fafafa;
  font-size: 12px;
  background: #0a0a0a;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 8px 9px;
}
.gbox-v2-code-primary button {
  flex: 0 0 auto;
  border: 1px solid #3f3f46;
  background: #27272a;
  color: #fafafa;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800;
}
.gbox-v2-code-primary button:hover { background: #3f3f46; }
.gbox-v2-code-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  white-space: nowrap;
}
.gbox-v2-code-status.available { color: #86efac; background: rgba(34,197,94,.09); border: 1px solid rgba(34,197,94,.35); }
.gbox-v2-code-status.used { color: #fca5a5; background: rgba(239,68,68,.09); border: 1px solid rgba(239,68,68,.35); }
.gbox-v2-code-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #a1a1aa;
  font-size: 9.5px;
  line-height: 1.45;
}
.gbox-v2-code-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gbox-v2-empty {
  margin-top: 14px;
  border: 1px dashed #3f3f46;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  color: #71717a;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .gbox-v2-stock-header { flex-direction: column; }
  .gbox-v2-refresh { width: 100%; justify-content: center; }
  .gbox-v2-stock-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .gbox-v2-stock-summary article { padding: 10px 8px; }
  .gbox-v2-stock-summary article span { font-size: 8px; }
  .gbox-v2-stock-summary article strong { font-size: 17px; }
  .gbox-v2-stock-toolbar { align-items: stretch; flex-direction: column; }
  .gbox-v2-segments { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
  .gbox-v2-segments button { padding: 8px 5px; }
  .gbox-v2-search { width: 100%; }
  .gbox-v2-search input { width: 100%; }
  .gbox-v2-code-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    padding: 9px;
  }
  .gbox-v2-code-primary { grid-column: 1 / -1; }
  .gbox-v2-code-meta { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .gbox-v2-code-status { grid-column: 1; }
}
.gbox-v2-warning {
  color: #fdba74 !important;
  font-weight: 800;
}
.gbox-v2-picker {
  position: relative;
  margin-bottom: 12px;
}
.gbox-v2-picker-button {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 10px 38px 10px 12px;
  border: 1px solid #3f3f46;
  background: #18181b;
  color: #fafafa;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  position: relative;
}
.gbox-v2-picker-button::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #a1a1aa;
  border-bottom: 2px solid #a1a1aa;
  transform: translateY(-65%) rotate(45deg);
}
.gbox-v2-picker-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: #111111;
  border: 1px solid #3f3f46;
  border-radius: 12px;
}
.gbox-v2-picker-menu > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #fafafa;
  border-radius: 9px;
  padding: 9px 10px;
}
.gbox-v2-picker-menu > button:hover,
.gbox-v2-picker-menu > button.active {
  background: #18181b;
  border-color: #27272a;
}
.gbox-v2-picker-menu strong { font-size: 11px; }
.gbox-v2-picker-menu span { color: #a1a1aa; font-size: 9px; white-space: nowrap; }
.gbox-v2-picker-empty { padding: 14px; color: #71717a; text-align: center; font-size: 11px; }
