@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
.mono { font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace; }

/* ============================================================
   NAVI THEME — signup, privacy/terms, superadmin, 404
   (class name is historical: the platform used to be "Enyo")
   Dark green-blue. EVERY colour of these pages is defined in this
   one block — to match exact brand colours, change the values here
   and nothing else.
   ============================================================ */

body.enyo-theme {
  --bg: #05161b;              /* page base: deep blue-green */
  --panel: #0a262d80;
  --panel-solid: #0a262d;     /* cards */
  --input-bg: #061d23;        /* inputs, small buttons */
  --line: #1b4650;            /* borders, dividers */
  --text: #e8f5f4;
  --text-soft: #94b8bd;
  --accent: #2dd4bf;          /* teal */
  --accent-2: #38bdf8;        /* sky blue — the other end of the green-blue gradient */
  --accent-grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --accent-soft: #2dd4bf22;
  --on-accent: #03181d;       /* text on top of the accent colour */
  --ok: #4ade80;
  --err: #ff6b6b;
  /* soft green glow top-left, blue glow top-right, over the base colour */
  background:
    radial-gradient(1100px 560px at 12% -8%, #0f766e40, transparent 62%),
    radial-gradient(900px 520px at 100% 0%, #0369a133, transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}

body.enyo-theme .topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px; border-bottom: 1px solid var(--line);
}
body.enyo-theme .topbar .brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
body.enyo-theme .topbar .brand span { color: var(--accent); }
body.enyo-theme .topbar a.pill {
  font-size: 13px; color: var(--text-soft); text-decoration: none;
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px;
}

body.enyo-theme main { flex: 1; display: flex; justify-content: center; padding: 48px 20px 80px; }
body.enyo-theme .card {
  width: 100%; max-width: 620px; background: var(--panel-solid);
  border: 1px solid var(--line); border-radius: 12px; padding: 40px;
}
body.enyo-theme h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }
body.enyo-theme .hero-hm-logo { height: 40px; width: auto; display: block; margin-bottom: 18px; }
body.enyo-theme .lede { color: var(--text-soft); font-size: 14.5px; line-height: 1.6; margin: 0 0 30px; max-width: 60ch; }

body.enyo-theme form { display: flex; flex-direction: column; gap: 18px; }
body.enyo-theme .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
body.enyo-theme .field { display: flex; flex-direction: column; gap: 7px; }
body.enyo-theme .field label { font-size: 13px; font-weight: 500; color: var(--text); }
body.enyo-theme .field .hint { font-size: 12px; color: var(--text-soft); }

body.enyo-theme input[type="text"],
body.enyo-theme input[type="email"],
body.enyo-theme input[type="password"],
body.enyo-theme select,
body.enyo-theme textarea {
  font-family: inherit; font-size: 14.5px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--input-bg); color: var(--text); outline: none;
  transition: border-color .15s ease; width: 100%;
}
body.enyo-theme input:focus, body.enyo-theme select:focus, body.enyo-theme textarea:focus { border-color: var(--accent); }
body.enyo-theme textarea { resize: vertical; min-height: 80px; }

body.enyo-theme .divider { border-top: 1px solid var(--line); margin: 6px 0; }
body.enyo-theme .section-label { font-size: 12.5px; color: var(--text-soft); margin: -4px 0 -6px; }

body.enyo-theme .captcha-row { display: flex; align-items: center; gap: 12px; }
body.enyo-theme .captcha-row img, body.enyo-theme .captcha-svg-wrap { border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
body.enyo-theme .captcha-svg-wrap svg { display: block; }
body.enyo-theme button.icon-btn {
  background: var(--input-bg); border: 1px solid var(--line); color: var(--text-soft);
  border-radius: 6px; width: 38px; height: 38px; cursor: pointer; font-size: 15px;
}

body.enyo-theme button.primary {
  background: var(--accent-grad); color: var(--on-accent); border: none; border-radius: 8px;
  padding: 13px 18px; font-weight: 600; font-size: 14.5px; cursor: pointer;
  transition: opacity .15s ease;
}
body.enyo-theme button.primary:disabled { opacity: .45; cursor: not-allowed; }
body.enyo-theme button.primary:not(:disabled):hover { opacity: .88; }

body.enyo-theme button.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 9px 14px; font-size: 13.5px; cursor: pointer;
}
body.enyo-theme button.ghost:hover { border-color: var(--accent); }

body.enyo-theme .msg { font-size: 13.5px; padding: 12px 14px; border-radius: 8px; display: none; }
body.enyo-theme .msg.show { display: block; }
body.enyo-theme .msg.error { background: #ff6b6b1a; border: 1px solid #ff6b6b44; color: #ffb3b3; }
body.enyo-theme .msg.info { background: var(--accent-soft); border: 1px solid #2dd4bf55; color: #a7f3e8; }

body.enyo-theme footer.site-footer {
  text-align: center; font-size: 12px; color: var(--text-soft);
  padding: 22px 20px; border-top: 1px solid var(--line);
}

body.enyo-theme table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
body.enyo-theme th, body.enyo-theme td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
body.enyo-theme th { font-size: 11.5px; color: var(--text-soft); font-weight: 600; }
body.enyo-theme .table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; }

body.enyo-theme .badge { display: inline-flex; font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
body.enyo-theme .badge.active { background: #4ade8022; color: var(--ok); }
body.enyo-theme .badge.pending, body.enyo-theme .badge.pending_payment { background: #f5c04222; color: #f5c042; } /* pending_payment was never matched before: status string is the class name */
body.enyo-theme .badge.past_due { background: #ff6b6b22; color: var(--err); }
body.enyo-theme .badge.cancelled { background: #94b8bd22; color: var(--text-soft); }

/* Prose pages (privacy/terms) */
body.enyo-theme .prose { max-width: 720px; }
body.enyo-theme .prose h2 { font-size: 18px; margin-top: 30px; }
body.enyo-theme .prose p, body.enyo-theme .prose li { color: var(--text-soft); font-size: 14.5px; line-height: 1.7; }

/* ============================================================
   PORTAL THEME — tenant-facing return form + tenant admin
   Neutral light, brand-agnostic (works reasonably for any
   retailer). Custom CSS becomes a later add-on.
   ============================================================ */

body.portal-theme {
  --bg: #f4f4f2;
  --paper: #ffffff;
  --ink: #1c1e22;
  --ink-soft: #676c76;
  --line: #dcdcd8;
  --line-strong: #b7b8b3;
  --accent: #3a4a63;
  --ok: #2f6d4f;
  --err: #b3261e;
  background: var(--bg);
  color: var(--ink);
}

body.portal-theme .brandbar {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 26px 20px; border-bottom: 1px solid var(--line); background: var(--paper);
}
body.portal-theme .brandbar .mark.hm { font-weight: 700; font-size: 19px; color: #e2001a; }
body.portal-theme .brandbar .hm-logo-img { height: 40px; width: auto; display: block; image-rendering: -webkit-optimize-contrast; }
body.portal-theme .brandbar .divider { width: 1px; height: 20px; background: var(--line-strong); }
body.portal-theme .brandbar .mark.tenant { font-weight: 600; font-size: 19px; }

body.portal-theme main { flex: 1; display: flex; justify-content: center; padding: 44px 20px 80px; }
body.portal-theme .sheet { width: 100%; max-width: 540px; }
body.portal-theme h1 { font-size: 26px; margin: 0 0 10px; }
body.portal-theme .lede { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; margin: 0 0 30px; }

body.portal-theme .note {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 15px 17px; font-size: 13.3px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 20px;
}
body.portal-theme .note strong { color: var(--ink); }
body.portal-theme .note code { font-family: 'IBM Plex Mono', monospace; background: var(--bg); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

body.portal-theme form { display: flex; flex-direction: column; gap: 18px; }
body.portal-theme .field { display: flex; flex-direction: column; gap: 7px; }
body.portal-theme .field label { font-size: 13px; font-weight: 500; }
body.portal-theme input[type="text"], body.portal-theme input[type="password"], body.portal-theme input[type="date"], body.portal-theme textarea, body.portal-theme select {
  font-family: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--paper); color: var(--ink); outline: none; width: 100%;
}
body.portal-theme select { appearance: auto; cursor: pointer; }
body.portal-theme textarea { resize: vertical; min-height: 90px; }
body.portal-theme input:focus, body.portal-theme textarea:focus { border-color: var(--accent); }
/* read-only, auto-filled values (e.g. Antal): visibly not an input to type in */
body.portal-theme input[readonly] { background: var(--bg); cursor: default; }
body.portal-theme input[readonly]:focus { border-color: var(--line-strong); }

body.portal-theme .order-row { position: relative; display: flex; align-items: center; }
body.portal-theme .order-row input { padding-right: 40px; font-family: 'IBM Plex Mono', monospace; }
body.portal-theme .order-status { position: absolute; right: 12px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
body.portal-theme .order-status svg { width: 18px; height: 18px; display: none; }
body.portal-theme .order-status.checking::after {
  content: ""; width: 13px; height: 13px; border: 2px solid var(--line-strong);
  border-top-color: var(--ink-soft); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
body.portal-theme .order-status.valid svg.check { display: block; color: var(--ok); }
body.portal-theme .order-status.invalid svg.cross { display: block; color: var(--err); }
body.portal-theme .order-feedback { font-size: 12.3px; min-height: 15px; }
body.portal-theme .order-feedback.valid { color: var(--ok); }
body.portal-theme .order-feedback.invalid { color: var(--err); }
body.portal-theme .order-feedback.neutral { color: var(--ink-soft); }

body.portal-theme button.submit {
  background: var(--ink); color: #fff; border: none; border-radius: 6px;
  padding: 13px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
}
body.portal-theme button.submit:disabled { opacity: .4; cursor: not-allowed; }
body.portal-theme button.submit:not(:disabled):hover { opacity: .9; }

body.portal-theme .form-error { font-size: 13px; color: var(--err); background: #fbeceb; border: 1px solid #f0c9c6; border-radius: 6px; padding: 11px 13px; display: none; }
body.portal-theme .form-error.show { display: block; }

body.portal-theme .confirmation { display: none; }
body.portal-theme .confirmation.show { display: block; }
body.portal-theme .check-badge { width: 42px; height: 42px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
body.portal-theme .check-badge svg { width: 20px; height: 20px; }
body.portal-theme .ref { margin-top: 20px; padding: 13px 15px; background: var(--paper); border: 1px solid var(--line); font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

body.portal-theme footer.site-footer { text-align: center; font-size: 12px; color: var(--ink-soft); padding: 20px; border-top: 1px solid var(--line); background: var(--paper); }

body.portal-theme .gate { max-width: 380px; margin: 90px auto 60px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 38px 32px; }
body.portal-theme .gate .lock-icon { width: 32px; height: 32px; color: var(--ink-soft); margin: 0 auto 18px; display: block; }
body.portal-theme .gate h1 { font-size: 22px; margin-bottom: 8px; }
body.portal-theme .gate .sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 24px; }
body.portal-theme .gate .field { text-align: left; }

body.portal-theme .admin-shell { max-width: 1020px; margin: 0 auto; width: 100%; padding: 36px 20px 80px; }
body.portal-theme .admin-shell h1 { font-size: 24px; margin: 0 0 4px; }
body.portal-theme .admin-shell .sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 24px; }
body.portal-theme .toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
body.portal-theme .toolbar .count { font-size: 13px; color: var(--ink-soft); }
body.portal-theme button.ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); padding: 8px 13px; border-radius: 6px; font-size: 13px; cursor: pointer; }
body.portal-theme button.ghost:hover { border-color: var(--ink); }
body.portal-theme .table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); border-radius: 6px; }
body.portal-theme table { width: 100%; border-collapse: collapse; font-size: 13.3px; }
body.portal-theme th, body.portal-theme td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
body.portal-theme th { font-weight: 600; font-size: 11.5px; color: var(--ink-soft); background: var(--bg); white-space: nowrap; }
body.portal-theme tr:last-child td { border-bottom: none; }
body.portal-theme .badge { display: inline-flex; font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 500; }
body.portal-theme .badge.ok { background: #e6f2ec; color: var(--ok); }
body.portal-theme .badge.no { background: #fbeceb; color: var(--err); }
body.portal-theme .muted { color: var(--ink-soft); }
body.portal-theme .empty-state { text-align: center; padding: 50px 20px; color: var(--ink-soft); }
body.portal-theme .reason-cell { max-width: 240px; white-space: pre-wrap; }
body.portal-theme .addr-cell { max-width: 210px; }
body.portal-theme button.link-btn { background: none; border: none; color: var(--err); cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }
body.portal-theme button.link-btn.resend-btn { color: var(--accent); margin-right: 4px; }

body.portal-theme .banner { padding: 12px 16px; border-radius: 6px; font-size: 13.5px; margin-bottom: 18px; }
body.portal-theme .banner.warn { background: #fff6e5; border: 1px solid #f2dca0; color: #8a6415; }

/* ---------- Excel export bar (Internal returns tab) ---------- */
body.portal-theme .export-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 14px; margin-bottom: 16px; font-size: 13px;
}
body.portal-theme .export-bar .export-title { font-size: 13px; }
body.portal-theme .export-bar label { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); }
body.portal-theme .export-bar input[type="date"] { width: auto; padding: 7px 9px; font-size: 13px; }
body.portal-theme .export-bar .export-msg { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- Admin tabs ---------- */
body.portal-theme .tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
body.portal-theme .tab-btn {
  background: none; border: none; padding: 10px 16px; font-size: 13.5px; font-weight: 500;
  color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
body.portal-theme .tab-btn.active { color: var(--ink); border-bottom-color: var(--ink); }
body.portal-theme .tab-btn:hover:not(.active) { color: var(--ink); }

/* ---------- Expandable detail row ---------- */
body.portal-theme tr.detail-row td { background: var(--bg); padding: 14px 16px; }
/* Two rows on a 12-column grid: [postal | e-mail | address] then [label | damaged | kommet retur].
   The e-mail gets a wide column (they're long, e.g. xxxxxxxx.hnbshrwc4@notification.mirakl.net),
   and anything still too long wraps inside its own cell instead of running over its neighbour. */
body.portal-theme .detail-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 18px; font-size: 13px; }
body.portal-theme .detail-grid > div { min-width: 0; overflow-wrap: anywhere; }
body.portal-theme .detail-grid .dg-postal { grid-column: span 2; }
body.portal-theme .detail-grid .dg-email,
body.portal-theme .detail-grid .dg-address { grid-column: span 5; }
body.portal-theme .detail-grid .dg-third { grid-column: span 4; }
body.portal-theme .detail-grid .dg-items { grid-column: span 8; }
/* compact per-item table inside a return's details. The longer selector is needed: the main
   table's own th/td rules (tall padding, full width, row borders) would otherwise win. */
body.portal-theme .detail-row .mini-table { width: auto; border-collapse: collapse; margin-top: 4px; font-size: 12.5px; }
body.portal-theme .detail-row .mini-table th { padding: 2px 28px 4px 0; background: transparent; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
body.portal-theme .detail-row .mini-table td { padding: 4px 28px 4px 0; background: transparent; border-bottom: none; }
body.portal-theme .detail-grid .mono { font-size: 12px; }
@media (max-width: 760px) {
  body.portal-theme .detail-grid { grid-template-columns: minmax(0, 1fr); }
  body.portal-theme .detail-grid > div { grid-column: auto !important; }
}
body.portal-theme .detail-grid .muted { font-size: 11px; display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.02em; }
body.portal-theme .expand-btn { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
/* needs the extra specificity: the generic red "Delete" link style (button.link-btn) was winning and turning the arrows red */
body.portal-theme button.link-btn.expand-btn { color: var(--ink-soft); text-decoration: none; font-size: 13px; padding: 0; }
body.portal-theme td.date-cell { white-space: nowrap; }

/* ---------- Item rows (internal return / refund flow) ---------- */
body.portal-theme .item-row {
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; background: var(--paper);
}
body.portal-theme .item-row-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
body.portal-theme .item-title { font-size: 14px; font-weight: 500; }
body.portal-theme .credit-toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; cursor: pointer; }
body.portal-theme .credit-toggle input { width: 16px; height: 16px; cursor: pointer; }
body.portal-theme .item-reason-row { margin-top: 10px; }
/* per-item reason + damage choice + auto-filled Antal */
body.portal-theme .item-fields { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
body.portal-theme .item-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-soft); }
body.portal-theme .item-fields select { min-width: 220px; }
body.portal-theme .item-fields .item-return-reason { min-width: 260px; }
body.portal-theme .item-fields .item-antal { width: 90px; }
body.portal-theme .item-refund-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
/* button rows in the entry panel */
body.portal-theme .panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
body.portal-theme .item-reason-row select { max-width: 320px; }

/* ---------- Refund confirmation dialog ---------- */
body.portal-theme .confirm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 20px;
}
body.portal-theme .confirm-box {
  background: var(--paper); border-radius: 8px; padding: 26px; max-width: 440px; width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
body.portal-theme .confirm-box h2 { font-size: 18px; margin: 0 0 12px; }
body.portal-theme .confirm-box p { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

@media (max-width: 640px) {
  body.enyo-theme .row2 { grid-template-columns: 1fr; }
  body.enyo-theme .card { padding: 26px; }
  body.portal-theme .item-row-main { flex-direction: column; align-items: flex-start; }
}

/* "Not returned" items (V44) */
body.portal-theme .item-toggles { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
body.portal-theme .item-row.skipped .item-fields,
body.portal-theme .item-row.skipped .item-refund-note,
body.portal-theme .item-row.skipped .item-reason-row { display: none; }
body.portal-theme .item-row.skipped .item-title,
body.portal-theme .item-row.skipped .muted { opacity: .5; text-decoration: line-through; }
