/* ============================================================
   TERPYZ — B2B-Portal  ·  "Facebook-Profil"-Struktur, dark/RGB
   ============================================================ */

/* ---------- COVER ---------- */
.b2b-cover {
  position: relative; height: clamp(200px, 30vw, 340px); overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.b2b-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.b2b-cover::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 80% 0%, rgba(139,92,246,.32), transparent 55%),
    radial-gradient(60% 80% at 12% 100%, rgba(69,214,245,.22), transparent 60%),
    linear-gradient(180deg, rgba(6,6,7,.25), rgba(6,6,7,.85));
}
.b2b-cover__edit {
  position: absolute; right: 18px; bottom: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 999px; color: var(--ink);
  background: rgba(0,0,0,.5); backdrop-filter: blur(8px); border: 1px solid var(--line-2);
}
.b2b-cover__edit svg { width: 14px; height: 14px; }

/* ---------- PROFILE HEADER ---------- */
.b2b-head { position: relative; z-index: 3; }
.b2b-idrow {
  display: flex; align-items: flex-end; gap: 24px;
  margin-top: -64px; flex-wrap: wrap;
}
.b2b-avatar {
  width: 150px; height: 150px; flex-shrink: 0; border-radius: 50%;
  border: 4px solid var(--bg); position: relative; overflow: hidden;
  --accent: var(--violet); --accent-2: var(--cyan);
  background:
    radial-gradient(75% 75% at 35% 30%, color-mix(in srgb, var(--accent-2) 50%, transparent), transparent 60%),
    radial-gradient(80% 80% at 70% 75%, color-mix(in srgb, var(--accent) 85%, #000), color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: 0 0 50px -8px var(--accent);
  display: grid; place-items: center;
}
.b2b-avatar span { font-family: var(--display); font-weight: 900; font-size: 52px; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.b2b-idmain { flex: 1; min-width: 240px; padding-bottom: 8px; }
.b2b-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.b2b-name h1 { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.02em; text-transform: none; line-height: 1; }
.b2b-badge {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--cyan); color: #04121a; box-shadow: 0 0 14px rgba(69,214,245,.6);
}
.b2b-badge svg { width: 15px; height: 15px; stroke-width: 3; }
.b2b-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em; }
.b2b-sub .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4); }
.b2b-tierchip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
}
.b2b-tierchip svg { width: 13px; height: 13px; }
.b2b-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; }
.b2b-actions .btn { font-size: 12.5px; padding: 12px 18px; }

/* ---------- TABS ---------- */
.b2b-tabs {
  display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.b2b-tabs::-webkit-scrollbar { display: none; }
.b2b-tab {
  position: relative; font-family: var(--display); font-weight: 700; font-size: 13.5px;
  letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3);
  padding: 16px 18px; background: none; border: none; white-space: nowrap; transition: color .2s var(--ease);
}
.b2b-tab::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--violet); transform: scaleX(0); transition: transform .25s var(--ease); }
.b2b-tab:hover { color: var(--ink-2); }
.b2b-tab.active { color: var(--ink); }
.b2b-tab.active::after { transform: scaleX(1); }

/* ---------- LAYOUT ---------- */
.b2b-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; padding: 28px 0 90px; }
.b2b-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 86px; }
.b2b-feed { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- CARDS ---------- */
.b2b-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.b2b-card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.b2b-card__h h3 { font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .01em; }
.b2b-card__h .sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.b2b-card__b { padding: 16px 20px 20px; }

/* intro rows */
.b2b-rows { display: grid; gap: 0; }
.b2b-rowline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.b2b-rowline:last-child { border-bottom: none; }
.b2b-rowline dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.b2b-rowline dd { font-size: 14px; font-weight: 600; text-align: right; }

/* tier progress */
.b2b-tier { padding: 18px 20px 20px; }
.b2b-tier__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.b2b-tier__badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; }
.b2b-tier__badge svg { width: 20px; height: 20px; color: var(--amber); }
.b2b-tier__ytd { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.b2b-bar { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.b2b-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--violet)); border-radius: 999px; box-shadow: 0 0 12px var(--amber); }
.b2b-tier__next { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); letter-spacing: .02em; }
.b2b-tier__next b { color: var(--ink); }

/* manager card */
.b2b-mgr { display: flex; align-items: center; gap: 14px; }
.b2b-mono { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 17px; color: #fff;
  --accent: var(--violet);
  background: radial-gradient(70% 70% at 35% 30%, rgba(255,255,255,.35), transparent 60%), color-mix(in srgb, var(--accent) 75%, #000);
  box-shadow: 0 0 22px -6px var(--accent); }
.b2b-mgr__name { font-family: var(--display); font-weight: 700; font-size: 15px; }
.b2b-mgr__role { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* service list */
.b2b-svc { display: grid; gap: 8px; }
.b2b-svc a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); transition: all .2s var(--ease); }
.b2b-svc a:hover { border-color: var(--line-2); transform: translateX(3px); }
.b2b-svc .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); --accent: var(--neon); }
.b2b-svc .ic svg { width: 17px; height: 17px; }
.b2b-svc .t { font-size: 13.5px; font-weight: 600; }
.b2b-svc .m { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }
.b2b-svc .go { margin-left: auto; color: var(--ink-4); }
.b2b-svc .go svg { width: 16px; height: 16px; }

/* downloads */
.b2b-dl { display: grid; gap: 8px; }
.b2b-dl a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-1); font-size: 13.5px; transition: all .2s; }
.b2b-dl a:hover { border-color: var(--violet); color: var(--ink); }
.b2b-dl a svg.f { width: 18px; height: 18px; color: var(--violet); flex-shrink: 0; }
.b2b-dl a .dl { margin-left: auto; color: var(--ink-4); }
.b2b-dl a .dl svg { width: 15px; height: 15px; }

/* team avatars */
.b2b-team { display: flex; gap: 10px; }
.b2b-team .b2b-mono { width: 44px; height: 44px; font-size: 15px; }

/* ---------- FEED: quick order ---------- */
.b2b-quick__bar { display: flex; gap: 10px; }
.b2b-quick__input { flex: 1; position: relative; }
.b2b-quick__input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); }
.b2b-quick__input input { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 13px 16px 13px 42px; color: var(--ink); font-size: 14px; }
.b2b-quick__input input:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: transparent; }
.b2b-quick__res { margin-top: 10px; display: grid; gap: 6px; }
.b2b-quick__opt { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-1); cursor: pointer; transition: all .15s; }
.b2b-quick__opt:hover { border-color: var(--violet); }
.b2b-quick__opt .nm { font-weight: 600; font-size: 13.5px; }
.b2b-quick__opt .pr { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.b2b-quick__opt .add { color: var(--neon); }
.b2b-quick__opt .add svg { width: 18px; height: 18px; }
.b2b-quick__hint { font-family: var(--mono); font-size: 11px; color: var(--ink-4); margin-top: 10px; letter-spacing: .02em; }

/* ---------- FEED: staffel table ---------- */
.b2b-staffel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.b2b-stier { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 14px; text-align: center; background: var(--bg-1); position: relative; overflow: hidden; }
.b2b-stier::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--cyan)); opacity: .5; }
.b2b-stier__q { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.b2b-stier__d { font-family: var(--display); font-weight: 900; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; margin: 8px 0 4px; }
.b2b-stier__d em { font-style: normal; color: var(--neon); }
.b2b-stier__l { font-family: var(--mono); font-size: 10px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- FEED: wishlist ---------- */
.b2b-wish { display: grid; gap: 12px; }
.b2b-wline { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); transition: border-color .2s; }
.b2b-wline:hover { border-color: var(--line-2); }
.b2b-wthumb { width: 70px; height: 70px; border-radius: 12px; overflow: hidden; position: relative; background: #050506; --accent: var(--violet); }
.b2b-wthumb .specimen__bud { width: 64%; height: 64%; }
.b2b-wmid { min-width: 0; }
.b2b-wname { font-family: var(--display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.1; }
.b2b-wmeta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.b2b-wmeta .strike { text-decoration: line-through; opacity: .6; }
.b2b-wmeta .disc { color: var(--neon); }
.b2b-wctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.b2b-wprice { font-family: var(--display); font-weight: 800; font-size: 17px; }
.b2b-wprice small { font-family: var(--mono); font-size: 10px; font-weight: 400; color: var(--ink-3); display: block; text-align: right; margin-top: 2px; letter-spacing: .04em; }
.b2b-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; }
.b2b-qty button { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: none; color: var(--ink-2); }
.b2b-qty button:hover { color: var(--ink); }
.b2b-qty button svg { width: 14px; height: 14px; }
.b2b-qty input { width: 42px; text-align: center; background: none; border: none; color: var(--ink); font-family: var(--mono); font-size: 13px; -moz-appearance: textfield; }
.b2b-qty input::-webkit-outer-spin-button, .b2b-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.b2b-wrm { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); background: none; border: none; }
.b2b-wrm:hover { color: var(--rose); }

/* ---------- FEED: order summary ---------- */
.b2b-sum__rows { display: grid; gap: 10px; }
.b2b-sum__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.b2b-sum__row span { color: var(--ink-2); }
.b2b-sum__row b { font-family: var(--mono); font-weight: 700; }
.b2b-sum__row.save span, .b2b-sum__row.save b { color: var(--neon); }
.b2b-sum__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.b2b-sum__total span { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.b2b-sum__total b { font-family: var(--display); font-weight: 900; font-size: 28px; letter-spacing: -.02em; }
.b2b-sum__vat { font-family: var(--mono); font-size: 10px; color: var(--ink-4); text-align: right; margin-top: 2px; }

/* ---------- FEED: orders ---------- */
.b2b-orders { display: grid; gap: 10px; }
.b2b-oline { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); }
.b2b-ostat { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.b2b-ostat .d { width: 6px; height: 6px; border-radius: 50%; }
.b2b-ostat.delivered { color: var(--neon); background: color-mix(in srgb, var(--neon) 12%, transparent); } .b2b-ostat.delivered .d { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.b2b-ostat.transit { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); } .b2b-ostat.transit .d { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.b2b-ostat.open { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); } .b2b-ostat.open .d { background: var(--amber); }
.b2b-ono { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.b2b-odate { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.b2b-ototal { font-family: var(--display); font-weight: 800; font-size: 16px; }
.b2b-oitems { font-family: var(--mono); font-size: 10px; color: var(--ink-3); text-align: right; margin-top: 2px; }
.b2b-reorder { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; background: none; transition: all .2s; white-space: nowrap; }
.b2b-reorder:hover { border-color: var(--violet); color: var(--ink); }

.b2b-panel[hidden] { display: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .b2b-layout { grid-template-columns: 1fr; }
  .b2b-aside { position: static; }
  .b2b-staffel { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .b2b-idrow { margin-top: -54px; }
  .b2b-avatar { width: 110px; height: 110px; } .b2b-avatar span { font-size: 38px; }
  .b2b-actions { width: 100%; }
  .b2b-actions .btn { flex: 1; }
  .b2b-wline { grid-template-columns: 56px 1fr; }
  .b2b-wctrl { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .b2b-oline { grid-template-columns: 1fr auto; gap: 10px; }
  .b2b-reorder { grid-column: 1 / -1; }
}
