/* Ximport - portal clienti (ximport.eu/client). Fara framework: un singur fisier, culorile in :root. */
@view-transition { navigation: auto; }

:root {
  --navy: #0a1f44;
  --navy-2: #13306b;
  --blue: #2563c9;
  --blue-soft: #eaf1fd;
  --red: #e0262d;
  --red-soft: #fdeeee;
  --green: #22a447;
  --green-d: #17803a;
  --green-soft: #e8f7ec;
  --amber: #c27c0e;
  --amber-soft: #fdf5e6;
  --ink: #111a2e;
  --muted: #667089;
  --line: #e4e8f0;
  --bg: #f3f5f9;
  --card: #ffffff;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(10, 31, 68, .05), 0 4px 16px rgba(10, 31, 68, .05);
  --shadow-h: 0 2px 4px rgba(10, 31, 68, .06), 0 12px 28px rgba(10, 31, 68, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
  view-transition-name: topbar;
}
.topbar-in { max-width: 1280px; margin: 0 auto; height: 100%; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.brand img { height: 34px; width: auto; display: block; }
.topbar .grow { flex: 1; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: #fff; }
.lang a { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 10px; border-radius: 999px; transition: background .2s, color .2s; }
.lang a:hover { text-decoration: none; color: var(--navy); }
.lang a.on { background: var(--navy); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; font-weight: 600; font-size: 13px;
}
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; color: var(--navy); }
.menu-btn svg { width: 20px; height: 20px; }

/* ---------- layout ---------- */
.shell { max-width: 1280px; margin: 0 auto; padding: 28px 20px 60px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: 92px; view-transition-name: side; }
.nav { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink);
  font-weight: 500; font-size: 14px; position: relative; transition: background .2s var(--ease), color .2s, transform .2s var(--ease);
}
.nav a svg { width: 18px; height: 18px; color: var(--muted); flex: none; transition: color .2s, transform .3s var(--ease); }
.nav a:hover { background: var(--bg); text-decoration: none; transform: translateX(2px); }
.nav a:hover svg { color: var(--navy); }
.nav a.on { background: var(--navy); color: #fff; }
.nav a.on svg { color: #fff; }
.nav a.cta { margin: 6px 0; background: var(--green); color: #fff; justify-content: center; font-weight: 600; box-shadow: 0 6px 16px rgba(34, 164, 71, .25); }
.nav a.cta svg { color: #fff; }
.nav a.cta:hover { background: var(--green-d); transform: translateY(-1px); }
.nav hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.nav button.link {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .2s, color .2s;
}
.nav button.link svg { width: 18px; height: 18px; color: var(--muted); }
.nav button.link:hover { background: var(--red-soft); color: var(--red); }
.nav button.link:hover svg { color: var(--red); }
.side-help { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #dfe6f5; font-size: 13px; }
.side-help b { color: #fff; display: block; margin-bottom: 2px; }
.side-help a { color: #fff; font-weight: 600; }

main { min-width: 0; view-transition-name: main; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card { margin-top: 18px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h a { font-size: 13px; font-weight: 600; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack > * + * { margin-top: 18px; }

/* entrance: cards rise in one after another */
.rise > * { animation: rise .55s var(--ease) both; }
.rise > *:nth-child(2) { animation-delay: .05s; }
.rise > *:nth-child(3) { animation-delay: .10s; }
.rise > *:nth-child(4) { animation-delay: .15s; }
.rise > *:nth-child(5) { animation-delay: .20s; }
.rise > *:nth-child(6) { animation-delay: .25s; }
.rise > *:nth-child(n+7) { animation-delay: .30s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* stats */
.stat { position: relative; overflow: hidden; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; line-height: 1.1; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat .ico { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.stat .ico svg { width: 20px; height: 20px; }
.ico.blue { background: var(--blue-soft); color: var(--blue); }
.ico.green { background: var(--green-soft); color: var(--green); }
.ico.amber { background: var(--amber-soft); color: var(--amber); }
.ico.red { background: var(--red-soft); color: var(--red); }
.hero {
  background: radial-gradient(1200px 300px at 100% 0, rgba(37, 99, 201, .35), transparent 60%), linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; border: 0; position: relative; overflow: hidden;
}
.hero h1 { font-size: 24px; }
.hero p { color: #c9d4ec; margin: 6px 0 0; }
.hero .btn { margin-top: 16px; }
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, .05); animation: float 9s ease-in-out infinite;
}
@keyframes float { 50% { transform: translate(-14px, -10px) scale(1.04); } }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 11px;
  border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none !important;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(10, 31, 68, .18); }
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 8px 22px rgba(10, 31, 68, .25); transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(34, 164, 71, .25); }
.btn-green:hover { background: var(--green-d); transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-light:hover { border-color: #c9d1e0; background: #fafbfd; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c7c9; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .7; pointer-events: none; }
.btn.loading::after { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; height: 44px; border: 1px solid #d5dbe6; border-radius: 11px; background: #fff; padding: 0 14px;
  font: inherit; font-size: 14.5px; color: var(--ink); transition: border-color .2s, box-shadow .2s; appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667089' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 201, .12); }
.input[readonly] { background: var(--bg); color: var(--muted); }
.field.err .input { border-color: var(--red); }
.field .error { color: var(--red); font-size: 12.5px; margin-top: 5px; font-weight: 500; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.pw { position: relative; }
.pw .input { padding-right: 46px; }
.pw button { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw button:hover { background: var(--bg); color: var(--navy); }
.pw button svg { width: 18px; height: 18px; }
.meter { height: 5px; border-radius: 5px; background: var(--line); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--red); transition: width .35s var(--ease), background .35s; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; border: 1px solid; animation: rise .45s var(--ease) both; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-ok { background: var(--green-soft); border-color: #bfe6ca; color: #135c2a; }
.alert-warn { background: var(--amber-soft); border-color: #f1d9a8; color: #7a4d06; }
.alert-err { background: var(--red-soft); border-color: #f3c5c7; color: #8f1c20; }
.alert-info { background: var(--blue-soft); border-color: #c8d9f6; color: #1d427f; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #eef1f6; color: #3b4458; white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.green { background: var(--green-soft); color: var(--green-d); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.live i { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 50% { box-shadow: 0 0 0 4px transparent; opacity: .6; } }

/* ---------- orders list ---------- */
.orders { display: grid; gap: 14px; }
.order-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 18px 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
a.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); border-color: #cfd7e6; text-decoration: none; }
.order-card .num { font-weight: 700; font-size: 16px; }
.order-card .date { color: var(--muted); font-size: 13px; }
.order-card .prods { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.prod-tag { font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #36405a; }
.order-card .foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.order-card .foot b { color: var(--ink); }
.order-card .right { text-align: right; }
.bar { height: 6px; border-radius: 6px; background: #edf0f5; overflow: hidden; margin-top: 10px; grid-column: 1 / -1; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green), #48c26a); transform-origin: left; animation: grow 1s var(--ease) both .15s; }
@keyframes grow { from { transform: scaleX(0); } }
.tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.tabs a { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.tabs a.on { background: var(--navy); color: #fff; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pager a, .pager span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); }
.pager span.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: #c3cbdb; margin-bottom: 10px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 16px; }
.request { border-left: 4px solid var(--amber); }
.request.rejected { border-left-color: #b7bfcc; opacity: .8; }
.request pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13px; color: #36405a; margin: 6px 0 0; max-height: 4.5em; overflow: hidden; }

/* ---------- order details ---------- */
.od { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.od-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 26px 0 6px; }
.step { text-align: center; position: relative; padding: 0 3px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 21px); right: calc(-50% + 21px); height: 3px; border-radius: 3px; background: var(--line); }
.step.done:not(:last-child)::before {
  content: ""; position: absolute; top: 17px; left: calc(50% + 21px); right: calc(-50% + 21px); height: 3px; border-radius: 3px; z-index: 1;
  background: var(--green); transform-origin: left; animation: grow .6s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 150ms);
}
.dot {
  width: 36px; height: 36px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: #eef1f6; color: #9aa3b5; position: relative; z-index: 2;
  animation: pop .45s var(--ease) both; animation-delay: calc(var(--i) * 90ms);
}
.dot svg { width: 17px; height: 17px; }
.step.done .dot { background: var(--green); color: #fff; }
.step.cur .dot { background: var(--green); color: #fff; box-shadow: 0 0 0 5px rgba(34, 164, 71, .18); }
.step.cur .dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--green); animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: scale(.9); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } to { transform: none; opacity: 1; } }
.step b { display: block; font-size: 12px; line-height: 1.25; margin-top: 8px; font-weight: 600; color: var(--muted); }
.step.done b, .step.cur b { color: var(--ink); }
.step small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mstep { display: none; font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }
.mstep b { color: var(--ink); }
.note { margin-top: 16px; background: #f6faf7; border: 1px solid #d5ecdb; border-radius: 12px; padding: 11px 14px; display: flex; gap: 10px; font-size: 14px; }
.note svg { width: 18px; height: 18px; color: var(--green-d); flex: none; margin-top: 2px; }
.note.warn { background: var(--red-soft); border-color: #f3c5c7; color: #8f1c20; font-weight: 500; }
.note.warn svg { color: var(--red); }
.prod { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.prod:first-child { border-top: 0; }
.prod .pi { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #eef2f9, #e1e7f2); display: grid; place-items: center; color: #8a93a8; flex: none; }
.prod .pi svg { width: 18px; height: 18px; }
.prod .pt { flex: 1; min-width: 0; }
.prod .pt b, .prod .pt a { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod .pt span { font-size: 12.5px; color: var(--muted); }
.prod.warn .pt b { color: var(--red); white-space: normal; }
.parcel + .parcel { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.parcel-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 13px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 8px 0; border-top: 1px dashed var(--line); }
.kv:first-of-type { border-top: 0; }
.kv span { color: var(--muted); }
.kv b { text-align: right; }
.kv.total b { font-size: 18px; }
.kv.due b { color: var(--red); }
.awb { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 16px; letter-spacing: .04em; background: var(--bg); border-radius: 10px; padding: 9px 12px; text-align: center; margin: 8px 0 10px; word-break: break-all; }
.pay { font-size: 28px; font-weight: 700; color: var(--red); letter-spacing: -.02em; }
.ship + .ship { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.addr { font-size: 14px; line-height: 1.55; }

/* ---------- addresses ---------- */
.addr-card { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: #fff; transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease); }
.addr-card:hover { border-color: #cfd7e6; box-shadow: var(--shadow-h); transform: translateY(-2px); }
.addr-card .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.addr-card .actions { display: flex; gap: 6px; margin-top: 12px; }
.addr-card.new { display: grid; place-items: center; border-style: dashed; color: var(--muted); min-height: 150px; font-weight: 600; }
.addr-card.new:hover { color: var(--navy); text-decoration: none; border-color: var(--navy); }
.addr-card.new svg { width: 26px; height: 26px; display: block; margin: 0 auto 6px; }

/* radio cards (place order) */
.pick { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick label { display: block; position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px 14px 44px; cursor: pointer; font-size: 13.5px; transition: border-color .2s, background .2s, box-shadow .2s; }
.pick label:hover { border-color: #c4cddd; }
.pick input { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
.pick label:has(input:checked) { border-color: var(--navy); background: #f6f8fc; box-shadow: 0 0 0 4px rgba(10, 31, 68, .06); }
.pick b { display: block; font-size: 14px; }
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.reveal > div { overflow: hidden; }
.reveal.open { grid-template-rows: 1fr; }
.steps-mini { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; }
.steps-mini li { flex: 1 1 180px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); counter-increment: s; }
.steps-mini li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: 12px; }
.steps-mini b { display: block; color: var(--ink); font-size: 13.5px; }

/* calculator */
.calc-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.calc-out div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.calc-out span { display: block; font-size: 12px; color: var(--muted); }
.calc-out b { font-size: 18px; letter-spacing: -.01em; transition: color .3s; }
.calc-out b.flash { animation: flash .6s var(--ease); }
@keyframes flash { 30% { color: var(--green); transform: scale(1.04); } }

/* bank */
.bank-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px dashed var(--line); }
.bank-row:first-child { border-top: 0; }
.bank-row span { color: var(--muted); font-size: 13px; }
.bank-row b { font-size: 15px; text-align: right; }
.copy { border: 1px solid var(--line); background: #fff; border-radius: 8px; height: 30px; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 600; color: var(--navy); cursor: pointer; margin-left: 8px; transition: background .2s; }
.copy:hover { background: var(--bg); }
.copy.ok { background: var(--green-soft); color: var(--green-d); border-color: #bfe6ca; }

/* ---------- guest pages (login, register...) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 400px at 0 100%, rgba(224, 38, 45, .28), transparent 60%), radial-gradient(800px 500px at 100% 0, rgba(37, 99, 201, .45), transparent 60%), var(--navy);
}
.auth-side .logo { background: #fff; border-radius: 14px; padding: 10px 14px; display: inline-block; width: max-content; }
.auth-side .logo img { height: 34px; display: block; }
.auth-side h2 { font-size: 30px; font-weight: 700; line-height: 1.2; max-width: 460px; }
.auth-side p { color: #c9d4ec; max-width: 440px; margin-top: 12px; }
.auth-side ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth-side li { display: flex; gap: 10px; align-items: center; color: #e5ebf8; font-size: 14px; animation: rise .6s var(--ease) both; }
.auth-side li:nth-child(2) { animation-delay: .1s; }
.auth-side li:nth-child(3) { animation-delay: .2s; }
.auth-side li svg { width: 20px; height: 20px; color: #7fe39b; flex: none; }
.auth-side .plane { position: absolute; right: -40px; top: 32%; width: 340px; opacity: .08; animation: fly 14s ease-in-out infinite; }
@keyframes fly { 50% { transform: translate(-30px, -18px) rotate(-4deg); } }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-box { width: 100%; max-width: 420px; animation: rise .55s var(--ease) both; }
.auth-box .card { padding: 30px; }
.auth-box h1 { font-size: 24px; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.auth-top .back { font-size: 13px; color: var(--muted); }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-alt a { font-weight: 600; }
.turnstile { margin: 4px 0 14px; min-height: 65px; }
.mobile-logo { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .od { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-top: 18px; }
  .menu-btn { display: grid; place-items: center; }
  .side { position: fixed; inset: 64px 0 auto 0; top: 64px; z-index: 25; padding: 12px 16px; background: rgba(243, 245, 249, .97); backdrop-filter: blur(8px);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); max-height: calc(100vh - 64px); overflow: auto; }
  body.menu-open .side { transform: none; opacity: 1; pointer-events: auto; }
  .who .name { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .mobile-logo { display: block; margin: 0 auto 18px; height: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar-in, .shell { padding-left: 16px; padding-right: 16px; }
  .g2, .g3, .g4, .row2, .row3, .pick, .calc-out { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .card { padding: 16px; }
  .steps { gap: 0; }
  .step b, .step small { display: none; }
  .dot { width: 28px; height: 28px; }
  .dot svg { width: 14px; height: 14px; }
  .step:not(:last-child)::after, .step.done:not(:last-child)::before { top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); }
  .mstep { display: block; }
  .order-card { grid-template-columns: minmax(0, 1fr); }
  .order-card .right { text-align: left; }
  .auth-box .card { padding: 22px; }
  .lang a { padding: 3px 8px; }
}


/* no inline styles (CSP): stagger and progress widths as classes */
.step:nth-child(1) { --i: 0; }
.step:nth-child(2) { --i: 1; }
.step:nth-child(3) { --i: 2; }
.step:nth-child(4) { --i: 3; }
.step:nth-child(5) { --i: 4; }
.step:nth-child(6) { --i: 5; }
.step:nth-child(7) { --i: 6; }
.bar i.p0 { width: 0.0%; }
.bar i.p1 { width: 14.29%; }
.bar i.p2 { width: 28.57%; }
.bar i.p3 { width: 42.86%; }
.bar i.p4 { width: 57.14%; }
.bar i.p5 { width: 71.43%; }
.bar i.p6 { width: 85.71%; }
.bar i.p7 { width: 100.0%; }
.bar i.p0 { width: 3%; background: #c3cbdb; }

/* motion off for people who ask for it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
.form-actions.spread { justify-content: space-between; margin: -2px 0 14px; }
.calc-ron { margin: 10px 0 2px; font-size: 15px; }
.gap { height: 10px; }
.gap-t { margin-top: 10px; }
.mb { margin-bottom: 12px; }
.thanks { text-align: center; padding: 44px 24px; max-width: 620px; margin: 20px auto 0; }
.thanks h1 { margin: 16px 0 6px; }
.thanks .tick { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 0 0 10px var(--green-soft); animation: pop .6s var(--ease) both .1s; }
.thanks .tick svg { width: 34px; height: 34px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s var(--ease) forwards .5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-actions.center { justify-content: center; margin-top: 18px; }
.steps-mini.vertical { flex-direction: column; }
.steps-mini.vertical li { flex: none; }
.pick .chip.gap-t { margin-top: 6px; }
.card-h > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.btn svg { flex: none; }
.grid { align-items: start; }
@media (max-width: 640px) {
  .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat .v { font-size: 22px; }
  .stat .ico { width: 32px; height: 32px; right: 12px; top: 12px; }
  .stat .ico svg { width: 16px; height: 16px; }
  .stat .k { padding-right: 34px; }
}
.error-page { max-width: 520px; margin: 12vh auto; padding: 0 20px; text-align: center; }
.error-page .code { font-size: 64px; font-weight: 700; color: var(--navy); letter-spacing: -.03em; line-height: 1; }
.error-page h1 { margin: 12px 0 8px; }
.error-page p { color: var(--muted); }
.error-page .btn { margin-top: 12px; }
.error-page .brand-img { height: 34px; margin-bottom: 28px; }

/* payment page: Revolut */
.revolut-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.revolut-head h2 { margin: 0 0 2px; }
.revolut-head p { margin: 0; font-size: 14px; }
.revolut-mark { flex: none; width: 40px; height: 40px; border-radius: 12px; background: #0b0b0f; color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; letter-spacing: -.02em; box-shadow: 0 6px 16px rgba(11, 11, 15, .18); }
.revolut-body { display: flex; gap: 18px; align-items: center; }
.revolut-info { flex: 1; min-width: 0; }
.revolut-info .bank-row { border-top: 0; }
.revolut-info .small { margin: 8px 0 0; }
.btn-revolut { display: inline-flex; align-items: center; justify-content: center; width: 100%; background: #0b0b0f; color: #fff; border-radius: 12px;
  padding: 11px 16px; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease; }
.btn-revolut:hover { color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(11, 11, 15, .22); }
.revolut-qr { margin: 0; flex: none; text-align: center; }
.revolut-qr img { display: block; width: 132px; height: 132px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: #fff; }
.revolut-qr figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 560px) {
  .revolut-body { flex-direction: column; align-items: stretch; }
  .revolut-qr { align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .btn-revolut { transition: none; } }
.revolut-info .note.revolut-ron { margin-top: 4px; }

/* order status badge, same colours as the admin (ximport2) */
.st-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; color: #fff; background: #6b7686; white-space: nowrap; }
.st-badge.st-new { background: #d92d20; }
.st-badge.st-placed { background: #7c4dde; }
.st-badge.st-shipped_external_warehouse, .st-badge.st-delivered_external_warehouse { background: #5563c9; }
.st-badge.st-shipped_internal_warehouse, .st-badge.st-delivered_internal_warehouse { background: #1592b0; }
.st-badge.st-shipped_client, .st-badge.st-delivered_client { background: #0e9f86; }

/* saved addresses: compact on all screens */
.addr-grid { gap: 12px; }
.addr-card { padding: 12px 14px; border-radius: 12px; }
.addr-card .top { margin-bottom: 4px; }
.addr-card .addr { font-size: 13.5px; line-height: 1.45; }
.addr-card .addr-flag { float: right; margin: 0 0 4px 8px; }
.addr-card .actions { margin-top: 8px; }
.addr-card .actions .btn { padding: 5px 10px; font-size: 12.5px; }
.addr-card.new { min-height: 0; padding: 14px; display: flex; align-items: center; justify-content: center; }
.addr-card.new span { display: inline-flex; align-items: center; gap: 6px; }
.addr-card.new svg { width: 18px; height: 18px; margin: 0; }
@media (max-width: 640px) { .addr-card .addr { font-size: 13px; } }
@media (max-width: 640px) { .addr-grid { gap: 10px; } }

/* place an order: compact address choices, "last used" badge on the right of the first line */
.pick { align-items: start; gap: 8px; }
.pick label { padding: 10px 14px 10px 40px; border-radius: 12px; line-height: 1.45; }
.pick input { left: 14px; top: 12px; }
.pick .pick-last { float: right; margin: 0 0 2px 8px; font-size: 11px; padding: 2px 8px; }
@media (max-width: 640px) {
  .pick label { padding: 9px 12px 9px 38px; font-size: 13px; }
  .pick input { left: 12px; top: 11px; }
}

/* order page: a long product link must not push the main column under the right column */
.od > * { min-width: 0; }
.prod .pt a { overflow-wrap: anywhere; }

/* place an order: "new address" option in blue, to stand out from saved addresses */
.pick .pick-new b { color: var(--blue); }

/* Fix 7: order cards - status badge top right, weight / total / advance / balance boxes */
.order-card.oc { display: block; padding: 16px 18px; }
.oc .oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.oc .prods { margin-top: 10px; }
.oc .bar { margin-top: 12px; }
.oc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.oc-stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; line-height: 1.3; }
.oc-stat span { display: block; font-size: 11.5px; color: var(--muted); }
.oc-stat b { font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.oc-stat.is-due { background: var(--amber-soft); border-color: transparent; }
.oc-stat.is-due b { color: var(--amber); }
.oc-stat.is-paid { background: var(--green-soft); border-color: transparent; }
.oc-stat.is-paid b { color: var(--green-d); }
@media (max-width: 640px) {
  .oc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oc .oc-head .st-badge { font-size: 11px; padding: 3px 8px; }
}

/* Fix 7: saved addresses look like the choices in "Place an order" */
.addr-list { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.addr-card.addr-line { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 13.5px; line-height: 1.45; transform: none; box-shadow: none; }
.addr-card.addr-line:hover { transform: none; box-shadow: none; border-color: #c4cddd; }
.addr-card.addr-line.is-last { border-color: var(--navy); background: #f6f8fc; box-shadow: 0 0 0 4px rgba(10, 31, 68, .06); }
.addr-line .al-text { flex: 1; min-width: 0; }
.addr-line .al-text b { display: block; font-size: 14px; }
.addr-line .al-side { display: flex; align-items: center; gap: 4px; flex: none; }
.addr-line .al-side form { margin: 0; }
.addr-line .pick-last { font-size: 11px; padding: 2px 8px; margin-right: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; padding: 0; transition: border-color .2s, background .2s, color .2s; }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { border-color: var(--navy); text-decoration: none; }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover { border-color: var(--red); background: var(--red-soft); }
.addr-card.addr-add { display: block; border-style: dashed; color: inherit; }
.addr-card.addr-add b { display: block; color: var(--blue); font-size: 14px; }
.addr-card.addr-add:hover { text-decoration: none; border-color: var(--blue); }
@media (max-width: 640px) {
  .addr-list { grid-template-columns: minmax(0, 1fr); }
  .addr-card.addr-line { font-size: 13px; }
}

/* Fix 8: payment page - bank transfer on the left, "How to pay" + Revolut on the right; on phones the order stays bank, Revolut, how to pay */
.bank-grid { align-items: start; grid-template-areas: "bank how" "bank rev"; grid-template-rows: auto 1fr; }
.bank-grid .bank-transfer { grid-area: bank; }
.bank-grid .bank-how { grid-area: how; }
.bank-grid .bank-revolut { grid-area: rev; }
.bank-grid > .card { margin: 0; }
@media (max-width: 640px) {
  .bank-grid { grid-template-areas: none; grid-template-rows: none; }
  .bank-grid .bank-transfer, .bank-grid .bank-how, .bank-grid .bank-revolut { grid-area: auto; }
}

/* Fix 9: payment confirmation on the order page */
.proof-card h2 { margin-bottom: 4px; }
.proof-sub { margin: 0 0 12px; }
.proof-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.proof-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.proof-list li > a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; max-width: 100%; }
.proof-list li > a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proof-list li > a svg { width: 16px; height: 16px; flex: none; }
.proof-list .chip { margin-left: auto; font-size: 11px; padding: 2px 8px; }
.proof-list .proof-note { flex-basis: 100%; }
.proof-form { display: grid; gap: 8px; }
.proof-drop { position: relative; display: grid; justify-items: center; gap: 2px; text-align: center; padding: 16px 12px; border: 1.5px dashed #c4cddd; border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.proof-drop:hover, .proof-drop:focus-within { border-color: var(--blue); background: var(--blue-soft); }
.proof-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.proof-drop svg { width: 22px; height: 22px; color: var(--blue); }
.proof-drop b { font-size: 14px; color: var(--blue); word-break: break-all; }
.proof-form.has-file .proof-drop { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.proof-form.has-file .proof-drop b { color: var(--green-d); }
.proof-btn { justify-content: center; width: 100%; }
.proof-btn:disabled { opacity: .6; cursor: progress; }

/* Fix 10: order still New - advance to pay highlighted */
.kv.kv-topay { background: var(--amber-soft); border-radius: 8px; padding-left: 10px; padding-right: 10px; border-top-color: transparent; }
.kv.kv-topay span, .kv.kv-topay b { color: var(--amber); font-weight: 700; }

/* Fix 13: cards inside a grid are spaced by the grid gap, not by ".card + .card" (dashboard cards were misaligned) */
.grid > .card + .card { margin-top: 0; }
/* Fix 13: long file names of payment confirmations stay inside the card */
.proof-list li { min-width: 0; }
.proof-list li > a { flex: 1 1 auto; min-width: 0; overflow: hidden; }
/* Fix 13: order steps - phones show only the current status; tapping a dot shows what that step is */
.step-tip { display: none; }
.step { outline: none; }
.mstep-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) {
  .mstep b { font-size: 14px; }
  .step { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .step-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5; width: max-content; max-width: 150px;
    background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 6px 9px; border-radius: 8px; text-align: center;
    box-shadow: 0 6px 16px rgba(10, 31, 68, .22); pointer-events: none; }
  .step-tip small { display: inline; font-weight: 500; opacity: .8; font-size: 11px; color: #fff; margin: 0; }
  .step-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--navy); }
  .step:first-child .step-tip { left: 0; transform: none; }
  .step:first-child .step-tip::after { left: 14px; }
  .step:last-child .step-tip { left: auto; right: 0; transform: none; }
  .step:last-child .step-tip::after { left: auto; right: 9px; }
  .step:hover .step-tip, .step:focus .step-tip, .step:focus-within .step-tip { display: block; }
  .step:focus .dot { box-shadow: 0 0 0 3px rgba(37, 99, 201, .35); }
}

/* Portal Fix 14: traseul coletului in SUA (17TRACK) */
.ust-hint { margin: 4px 0 14px; }
.ust-parcel + .ust-parcel { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.ust-label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.ust-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.ust-list { list-style: none; margin: 0; padding: 0 0 0 4px; }
.ust-list li { position: relative; padding: 0 0 14px 22px; min-width: 0; }
.ust-list li::before { content: ""; position: absolute; left: 0; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.ust-list li::after { content: ""; position: absolute; left: 4px; top: 17px; bottom: -3px; width: 2px; background: var(--line); }
.ust-list li:last-child { padding-bottom: 2px; }
.ust-list li:last-child::after { display: none; }
.ust-list li.now::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.ust-list b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ust-list li:not(.now) b { font-weight: 500; color: #3a4459; }
.ust-list small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ust-more { margin-top: 6px; }
.ust-more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 10px; list-style: none; }
.ust-more summary::-webkit-details-marker { display: none; }
.ust-more[open] summary { margin-bottom: 12px; }

/* Fix 15: „Date și adrese” - adresele în coloana din dreapta, una sub alta */
.addr-list.addr-list-1 { grid-template-columns: minmax(0, 1fr); }

/* Fix 16: avans achitat (verde) + notificare de plată pe prima pagină */
.kv.kv-paid { background: var(--green-soft); border-radius: 8px; padding-left: 10px; padding-right: 10px; border-top-color: transparent; }
.kv.kv-paid span, .kv.kv-paid b { color: var(--green-d); font-weight: 700; }
.pay-notice { align-items: center; margin-bottom: 0; }
.pay-notice .grow { flex: 1; min-width: 0; }
.pay-notice .pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .pay-notice { flex-wrap: wrap; align-items: flex-start; }
  .pay-notice .grow { flex-basis: calc(100% - 30px); }
  .pay-notice .pay-actions { width: 100%; }
}

/* Fix 16: diferența de greutate (linia din admin) arătată separat, nu ca produs */
.kv.kv-diff { background: var(--blue-soft); border-radius: 8px; padding-left: 10px; padding-right: 10px; border-top-color: transparent; }
.kv.kv-diff span, .kv.kv-diff b { color: #1d427f; font-weight: 700; }
.oc-stat.is-diff { background: var(--blue-soft); border-color: transparent; }
.oc-stat.is-diff b { color: #1d427f; }

/* Fix 18: diferența de greutate pe lățime întreagă în cardul de comandă */
.oc-diff { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--blue-soft); color: #1d427f; font-size: 13.5px; }
.oc-diff span { font-weight: 600; }
.oc-diff b { white-space: nowrap; }

/* Fix 21: livrarea (curier + AWB) în cardul de status */
.shipx { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.shipx-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shipx-logo { height: 34px; width: auto; max-width: 120px; object-fit: contain; }
.shipx-name { color: #fff; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.shipx-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; }
.shipx-ico svg { width: 20px; height: 20px; }
.shipx-awb { line-height: 1.25; }
.shipx-awb span, .shipx-pay span { display: block; font-size: 11.5px; color: var(--muted); }
.shipx-awb b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .04em; word-break: break-all; }
.shipx-pay { margin-left: auto; text-align: right; line-height: 1.25; }
.shipx-pay b { font-size: 16px; color: var(--amber); }
.shipx-pay small { display: block; font-size: 11px; color: var(--muted); }
.shipx-btn { margin-top: 10px; }
.shipx-btn svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .shipx-pay { margin-left: 0; text-align: left; width: 100%; }
  .shipx-btn { width: 100%; justify-content: center; }
}
.shipx-name { background: #0b1f44; }
.shipx-name.cx-cargus { background: #f26722; }
.shipx-name.cx-fan { background: #0055a5; }
.shipx-name.cx-sameday { background: #e3051b; }

/* ---------- Fix 22: temă întunecată (comutator lună/soare în bara de sus; implicit urmează setarea telefonului/PC-ului) ---------- */
.theme-btn { border: 1px solid var(--line); background: var(--card); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--ink); display: inline-grid; place-items: center; padding: 0; transition: border-color .2s, background .2s; }
.theme-btn:hover { border-color: var(--muted); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: block; }
html[data-theme="dark"] .theme-btn .i-moon { display: none; }

html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #2a4f9a;
  --navy-2: #1b3672;
  --blue: #6b9bf2;
  --blue-soft: #16243f;
  --red: #f26369;
  --red-soft: #2c1619;
  --green: #2fb457;
  --green-d: #5fd283;
  --green-soft: #13291b;
  --amber: #e9ac45;
  --amber-soft: #2b2213;
  --ink: #e7ebf3;
  --muted: #95a0b6;
  --line: #263147;
  --bg: #0b101b;
  --card: #131a29;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-h: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] .topbar { background: rgba(14, 20, 33, .92); }
html[data-theme="dark"] .brand img { background: #fff; border-radius: 8px; padding: 3px 6px; }
html[data-theme="dark"] .lang,
html[data-theme="dark"] .menu-btn,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-danger,
html[data-theme="dark"] .input,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .pager a,
html[data-theme="dark"] .pager span,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .addr-card,
html[data-theme="dark"] .copy,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .shipx { background-color: var(--card); }
html[data-theme="dark"] .input { border-color: #2f3b55; color: var(--ink); }
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .menu-btn,
html[data-theme="dark"] .copy,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .lang a:hover,
html[data-theme="dark"] .tabs a:hover,
html[data-theme="dark"] .nav a:hover svg,
html[data-theme="dark"] .error-page .code,
html[data-theme="dark"] .addr-card.new:hover { color: var(--ink); }
html[data-theme="dark"] .btn-light:hover { background: #1a2335; border-color: #34405a; }
html[data-theme="dark"] .btn-danger { border-color: #5a2a2e; }
html[data-theme="dark"] .icon-btn.danger { color: var(--red); }
html[data-theme="dark"] .btn-white { background: #fff; color: #0a1f44; }
html[data-theme="dark"] a.order-card:hover,
html[data-theme="dark"] .addr-card:hover,
html[data-theme="dark"] .addr-card.addr-line:hover,
html[data-theme="dark"] .pick label:hover { border-color: #3a4763; }
html[data-theme="dark"] .pick label:has(input:checked),
html[data-theme="dark"] .addr-card.addr-line.is-last { background: #18223a; border-color: var(--blue); box-shadow: none; }
html[data-theme="dark"] .alert-ok { border-color: #1f4a2c; color: #8fe0a8; }
html[data-theme="dark"] .alert-warn { border-color: #4d3a17; color: #f0c77a; }
html[data-theme="dark"] .alert-err,
html[data-theme="dark"] .note.warn { border-color: #5a2a2e; color: #f5a3a7; }
html[data-theme="dark"] .alert-info { border-color: #26406e; color: #a9c4f5; }
html[data-theme="dark"] .note { background: #122019; border-color: #1f3d29; }
html[data-theme="dark"] .chip:not(.green):not(.amber):not(.blue):not(.red) { background: #1d2638; color: #c3cad8; }
html[data-theme="dark"] .prod-tag,
html[data-theme="dark"] .request pre,
html[data-theme="dark"] .ust-list li:not(.now) b { color: #c3cad8; }
html[data-theme="dark"] .step .dot { background: #1d2638; color: #6f7a90; }
html[data-theme="dark"] .step.done .dot,
html[data-theme="dark"] .step.cur .dot { background: var(--green); color: #fff; }
html[data-theme="dark"] .prod .pi { background: linear-gradient(135deg, #1d2638, #18202f); color: #8a93a8; }
html[data-theme="dark"] .empty svg { color: #3a4560; }
html[data-theme="dark"] .kv.kv-diff span, html[data-theme="dark"] .kv.kv-diff b,
html[data-theme="dark"] .oc-stat.is-diff b, html[data-theme="dark"] .oc-diff { color: #a9c4f5; }
html[data-theme="dark"] .side-help { background: linear-gradient(135deg, #1b3672, #13306b); }
html[data-theme="dark"] .st-badge { filter: brightness(.95); }

/* Fix 23: logo curier într-un chenar alb cu colțuri rotunjite (se vede bine și pe tema întunecată) */
.shipx-logo-box { display: inline-grid; place-items: center; height: 46px; min-width: 64px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; flex: none; }
.shipx-logo-box .shipx-logo { height: 32px; max-width: 110px; }
html[data-theme="dark"] .shipx-logo-box { border-color: transparent; }

/* Portal Fix 27: cererea cu oferta de preț */
.req-prods pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14px; color: #36405a; margin: 0; }
html[data-theme="dark"] .req-prods pre { color: inherit; }
.req-sums { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: #5b6478; }
.req-sums b { color: #1c2333; }
.req-sums .is-due { background: var(--amber-soft); color: var(--amber); border-radius: 6px; padding: 1px 8px; }
.req-sums .is-due b { color: var(--amber); }
html[data-theme="dark"] .req-sums { color: inherit; }
html[data-theme="dark"] .req-sums b { color: #fff; }
.order-card.request .num a { color: inherit; text-decoration: none; }
.order-card.request .num a:hover { text-decoration: underline; }

/* Portal Fix 28: linkul produsului + mențiunea în dreapta */
.prod .pdesc { flex: none; max-width: 38%; font-weight: 700; font-size: 13.5px; color: #1c2333; text-align: right; overflow-wrap: anywhere; }
html[data-theme="dark"] .prod .pdesc { color: #fff; }
@media (max-width: 560px) { .prod { flex-wrap: wrap; } .prod .pdesc { max-width: none; flex-basis: 100%; text-align: left; padding-left: 52px; } }
/* Portal Fix 30: text lines (without link) on the request page */
.prod .pt b.req-text { white-space: normal; font-weight: 500; }
