/* Same styles as the original Vercel portal (gadget-product-portal.vercel.app/portal.css) + a few portal-plugin additions at the end */
:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #172827;
  background: #f2f6f5;
  --muted: #506561;
  --line: #d3dfdb;
  --green: #17624f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
a { color: var(--green); }
:focus-visible { outline: 3px solid #31856e; outline-offset: 3px; }
.shell { width: min(1100px, calc(100% - 48px)); margin: 0 auto; }
.top { background: #122b2a; color: #f2fffa; }
.top-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.brand small { display: block; color: #b8d8cb; font-size: .82rem; font-weight: 500; margin-top: 3px; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #dcf8eb; color: #174438; font-size: 1.25rem; }
.navigation { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 14px 0 32px; }
.navigation button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 14px 1px 11px; color: var(--muted); font-weight: 650; }
.navigation button[aria-current] { color: var(--green); border-bottom-color: var(--green); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.045em; }
h2 { font-size: 1.25rem; letter-spacing: -.015em; }
h3 { font-size: 1.15rem; }
p { line-height: 1.5; }
.muted { color: var(--muted); margin: 9px 0 0; }
.intro { margin: 0 0 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 25px; box-shadow: 0 2px 7px #17282706; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 20px; }
.fields { display: grid; gap: 16px; margin-top: 22px; }
label { display: block; font-weight: 650; font-size: .91rem; }
label span, h2 span { color: var(--green); }
input:not([type=file]), select, textarea { width: 100%; display: block; border: 1px solid #bccdc7; border-radius: 8px; background: #fcfefd; color: inherit; padding: 10px 12px; margin-top: 6px; min-height: 44px; font-size: 1rem; }
select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%2317624f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
textarea { resize: vertical; }
.price-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.drop { position: relative; background: #f1f9f5; border: 1px dashed #76a391; border-radius: 12px; padding: 23px 10px; text-align: center; margin-top: 18px; }
.drop.active, .drop:focus-within { background: #e1f4e9; border-color: var(--green); }
.upload-icon { display: grid; place-items: center; width: 36px; height: 36px; background: #dceee6; border-radius: 8px; margin: 0 auto 9px; color: var(--green); font-size: 1.5rem; }
.file-label { color: var(--green); }
.file-label input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.drop small { color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-list li img, .file-icon { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; background: #e2ede8; flex-shrink: 0; }
.file-icon { display: grid; place-items: center; font-size: .75rem; }
.file-name { flex: 1; overflow-wrap: anywhere; font-size: .88rem; }
.file-list button { border: 0; background: transparent; color: #8b312e; padding: 8px; }
.message { font-size: .94rem; margin: 0; color: var(--muted); white-space: pre-line; }
.message:empty { display: none; }
.message.error { color: #952d2b; }
#file-message { margin-top: 12px; }
.banner { background: #def1e8; border-radius: 9px; padding: 12px 15px; margin-bottom: 18px; color: #174b3c; }
.primary, .secondary { padding: 11px 17px; border-radius: 8px; font-weight: 650; min-height: 44px; }
.primary { background: var(--green); color: #fff; border: 1px solid var(--green); }
.primary:hover { background: #124e40; }
.secondary { background: #fff; color: var(--green); border: 1px solid #91afa5; }
.submit-row { display: flex; gap: 14px; align-items: center; justify-content: flex-end; margin: 16px 0 40px; }
.records { display: grid; gap: 14px; margin: 14px 0; }
.record summary { cursor: pointer; }
.record summary strong { font-size: 1.1rem; }
.record-meta { display: block; color: var(--muted); margin: 6px 0 0 16px; font-size: .9rem; }
.record dl { display: grid; grid-template-columns: minmax(115px, 160px) minmax(0, 1fr); gap: 8px 12px; }
.record dt { font-weight: 650; }
.record dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-actions, .history-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.history-actions { margin-bottom: 14px; }
.danger { color: #952d2b; border-color: #d5a5a3; }
#history-action-message { margin-bottom: 12px; }
.record-actions + .message { margin-top: 10px; }
.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.gallery a { display: block; overflow-wrap: anywhere; font-size: .87rem; width: 100%; text-align: left; background: #f6faf8; color: var(--green); border: 1px solid var(--line); border-radius: 9px; padding: 7px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: contain; background: #eef4f1; border-radius: 7px; margin-bottom: 5px; }
#more { margin-bottom: 32px; }
@media (max-width: 720px) {
  .shell { width: calc(100% - 28px); }
  .form-layout { grid-template-columns: 1fr; }
  .card { padding: 17px; }
  .navigation { gap: 18px; }
  .submit-row { align-items: stretch; flex-direction: column; }
}
/* plugin additions (same look) */
a.primary, a.secondary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.progress { position: relative; height: 40px; border-radius: 8px; background: #e1f4e9; overflow: hidden; margin-top: 16px; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: #b9e3cf; transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; line-height: 40px; font-weight: 650; color: #174b3c; }
.record-status { font-weight: 650; }
.record-status.ok { color: var(--green); } .record-status.bad { color: #952d2b; } .record-status.wait { color: #8a5a00; }
.file-list li.kept { opacity: .8; }
