/* QA Support Portal — shared styles on top of BLACK RUSSIA tokens */

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }

a { color: var(--br-white); text-decoration: none; }
a:hover { color: var(--br-red); }

:root {
  /* server visual code (из референса ЗБТ-форм) */
  --srv-cbt1: #9B5DE5;   /* CBT1 — фиолетовый */
  --srv-cbt1-15: rgba(155, 93, 229, 0.15);
  --srv-cbt2: #2EC4B6;   /* CBT2 — бирюзовый */
  --srv-cbt2-15: rgba(46, 196, 182, 0.15);

  /* единая семантика статусов репорта */
  --st-review:   var(--br-aqua);     /* SUBMITTED / ANALYZING */
  --st-pending:  var(--br-orange);   /* PENDING_REVIEW / APPEALED */
  --st-info:     var(--br-bronze);   /* NEEDS_INFO — нужно действие тестера */
  --st-ok:       #2BA84A;            /* APPROVED / REWARDED (читаемый на тёмном) */
  --st-bad:      var(--br-red);      /* AUTO_REJECTED / REJECTED */
  --st-muted:    var(--br-dark-gray);/* DRAFT / MERGED */
  --coin:        var(--br-bronze);
}

.pp-page { min-height: 100vh; display: flex; flex-direction: column; }
.pp-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 24px 80px; }

/* ---- Portal header ---- */
.pp-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(23, 23, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--br-border-subtle);
}
.pp-header-in {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.pp-header-spacer { flex: 1; }
.pp-nav { display: flex; align-items: center; gap: 8px; }
.pp-nav a {
  display: flex; align-items: center;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em;
  color: var(--br-white-80); padding: 9px 14px; border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.pp-nav a:hover { background: var(--br-white-10); color: var(--br-white); }
.pp-nav a.active { background: var(--br-white-10); color: var(--br-white); }

.pp-coin {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #F0B355 0%, var(--br-bronze) 60%, #8A5A14 100%);
  color: #171717; font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pp-coin.lg { width: 34px; height: 34px; font-size: 13px; }

.pp-iconbtn {
  position: relative;
  width: 40px; height: 40px; border-radius: 8px; border: none; cursor: pointer;
  background: var(--br-white-5); color: var(--br-white);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.pp-iconbtn:hover { background: var(--br-white-15); }
.pp-iconbtn .dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--br-red); border: 2px solid #171717;
}
.pp-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--br-black); border: 1px solid var(--br-border-strong);
  color: var(--br-white); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* burger + mobile nav (hidden on desktop) */
.pp-burger { display: none; }
.pp-mobilenav { display: none; }
@media (max-width: 760px) {
  .pp-nav { display: none; }
  .pp-burger { display: flex; }
  .pp-mobilenav {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 16px 14px;
    border-top: 1px solid var(--br-border-subtle);
  }
  .pp-mobilenav a {
    font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em;
    color: var(--br-white-80); padding: 13px 14px; border-radius: 10px;
    transition: background 0.2s, color 0.2s;
  }
  .pp-mobilenav a:hover, .pp-mobilenav a.active { background: var(--br-white-10); color: var(--br-white); }
}
@media (max-width: 520px) {
  .pp-brand img[src*="wordmark"] { display: none !important; }
}

/* notifications dropdown */
.pp-notif {
  position: absolute; right: 0; top: 48px; width: 360px; max-width: 88vw;
  background: var(--surface-modal); border: 1px solid var(--br-border-strong);
  border-radius: 20px; padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}
.pp-notif-item {
  display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer;
}
.pp-notif-item:hover { background: var(--br-white-5); }
.pp-notif-item .nt { font-size: 13px; font-weight: 600; line-height: 1.4; }
.pp-notif-item .nd { font-size: 11px; color: var(--br-dark-gray); margin-top: 3px; }

/* ---- Status pill ---- */
.st-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: 100px;
  background: color-mix(in srgb, var(--st, #737373) 14%, transparent);
  color: var(--st, #737373);
  border: 1px solid color-mix(in srgb, var(--st, #737373) 35%, transparent);
  white-space: nowrap;
}
.st-pill::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--st, #737373); flex-shrink: 0;
}
.st-pill.pulse::before { animation: st-pulse 1.6s ease infinite; }
@keyframes st-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---- Server chip ---- */
.srv-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 11px; border-radius: 100px;
  border: 1px solid var(--br-border-strong); color: var(--br-light-gray);
}
.srv-chip::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--sc, #737373); }
.srv-chip.cbt1 { --sc: var(--srv-cbt1); }
.srv-chip.cbt2 { --sc: var(--srv-cbt2); }

/* ---- Headings ---- */
.pp-h1 {
  font-size: 34px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em;
  margin: 0;
}
.pp-h1 .red { color: var(--br-red); }
.pp-sub { color: var(--br-gray); font-size: 14px; font-weight: 500; margin-top: 8px; line-height: 1.55; }

/* ---- Filter chips ---- */
.pp-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-filter {
  border: 1px solid var(--br-border-strong); background: var(--br-white-5);
  color: var(--br-white-80); font-family: inherit;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
  padding: 8px 16px; border-radius: 100px; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.pp-filter:hover { background: var(--br-white-15); }
.pp-filter.active { background: var(--br-white); color: var(--text-on-light); border-color: var(--br-white); }
.pp-filter .cnt { font-size: 10px; opacity: 0.6; font-weight: 700; }

/* ---- Report card row ---- */
.rep-card {
  display: block; background: var(--surface-card-wiki);
  border: 1px solid var(--br-border-subtle); border-radius: 12px;
  padding: 18px 20px; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.rep-card:hover { border-color: var(--br-border-hover); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.rep-card .rc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-card .rc-id { font-size: 12px; font-weight: 700; color: var(--br-dark-gray); letter-spacing: 0.04em; }
.rep-card .rc-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 10px 0 0; color: var(--br-white); }
.rep-card .rc-meta { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.rep-card .rc-meta .m { font-size: 12px; color: var(--br-dark-gray); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.rep-card .rc-reward { color: var(--coin); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---- Forms ---- */
.f-label {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--br-gray); margin: 0 0 10px;
}
.f-label .req { color: var(--br-red); }
.f-hint { font-size: 12px; color: var(--br-dark-gray); margin-top: 8px; line-height: 1.5; }

.f-textarea {
  width: 100%; min-height: 96px; resize: vertical;
  background: var(--br-surface); color: var(--br-white);
  border: 1px solid var(--br-border-strong); border-radius: 20px;
  padding: 14px 18px; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.5;
  outline: none; transition: border-color 0.2s;
}
.f-textarea::placeholder { color: var(--br-dark-gray); }
.f-textarea:focus { border-color: var(--br-red); }

.f-text {
  width: 100%; background: var(--br-surface); color: var(--br-white);
  border: 1px solid var(--br-border-strong); border-radius: 100px;
  padding: 13px 20px; font-family: inherit; font-size: 14px; font-weight: 500;
  outline: none; transition: border-color 0.2s;
}
.f-text::placeholder { color: var(--br-dark-gray); }
.f-text:focus { border-color: var(--br-red); }

.f-select {
  appearance: none; -webkit-appearance: none;
  width: 100%; background: var(--br-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23AAAAAA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center;
  color: var(--br-white);
  border: 1px solid var(--br-border-strong); border-radius: 100px;
  padding: 13px 44px 13px 20px; font-family: inherit; font-size: 14px; font-weight: 500;
  outline: none; cursor: pointer; transition: border-color 0.2s;
}
.f-select:focus { border-color: var(--br-red); }

/* radio-card (server, platform, reproducibility, severity) */
.rc-group { display: flex; gap: 10px; flex-wrap: wrap; }
.rc-opt {
  flex: 1; min-width: 140px;
  background: var(--br-white-5); border: 1px solid var(--br-border-strong);
  border-radius: 10px; padding: 14px 16px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit; color: var(--br-white); text-align: left;
}
.rc-opt:hover { background: var(--br-white-10); }
.rc-opt.sel { border-color: var(--ac, var(--br-white)); background: var(--acbg, var(--br-white-10)); }
.rc-opt .ro-t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.rc-opt .ro-d { font-size: 11px; color: var(--br-gray); margin-top: 5px; line-height: 1.45; font-weight: 500; }
.rc-opt .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--sw, transparent); flex-shrink: 0; }

/* ---- Wizard chrome ---- */
.wz-steps { display: flex; gap: 6px; margin: 26px 0 6px; }
.wz-step { flex: 1; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; text-align: left; }
.wz-step .bar { height: 4px; border-radius: 2px; background: var(--br-white-10); transition: background 0.25s; }
.wz-step.done .bar, .wz-step.cur .bar { background: var(--br-red); }
.wz-step .lb {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--br-dark-gray); margin-top: 8px; transition: color 0.25s;
}
.wz-step.cur .lb { color: var(--br-white); }
.wz-step.done .lb { color: var(--br-gray); }

.wz-panel {
  background: var(--surface-card-wiki); border: 1px solid var(--br-border-subtle);
  border-radius: 12px; padding: 28px; margin-top: 22px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.wz-title { font-size: 20px; font-weight: 700; text-transform: uppercase; margin: 0 0 4px; }
.wz-desc { font-size: 13px; color: var(--br-gray); margin: 0 0 26px; line-height: 1.5; }
.wz-row { margin-bottom: 26px; }
.wz-row:last-child { margin-bottom: 0; }
.wz-foot { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.wz-autosave { font-size: 12px; color: var(--br-dark-gray); display: inline-flex; align-items: center; gap: 7px; }

/* dynamic steps list */
.steps-list { display: flex; flex-direction: column; gap: 10px; }
.steps-item { display: flex; align-items: center; gap: 10px; }
.steps-item .num {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--br-white-10); color: var(--br-white);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps-item .grip { color: var(--br-darker-gray); cursor: grab; flex-shrink: 0; display: flex; }
.steps-item .del {
  background: none; border: none; color: var(--br-darker-gray); cursor: pointer;
  padding: 6px; border-radius: 8px; display: flex; flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}
.steps-item .del:hover { color: var(--br-red); background: var(--br-white-5); }

/* dropzone */
.dropzone {
  border: 2px dashed var(--br-border-strong); border-radius: 20px;
  padding: 36px 24px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover { border-color: var(--br-white-40); background: var(--br-white-5); }
.dz-t { font-size: 14px; font-weight: 600; margin-top: 14px; }
.dz-d { font-size: 12px; color: var(--br-dark-gray); margin-top: 6px; line-height: 1.5; }

.file-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--br-white-5); border: 1px solid var(--br-border-subtle);
  border-radius: 12px; padding: 11px 14px;
}
.file-row .fi { color: var(--br-gray); display: flex; flex-shrink: 0; }
.file-row .fn { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fs { font-size: 11px; color: var(--br-dark-gray); margin-top: 2px; }
.file-row .fbar { height: 3px; border-radius: 2px; background: var(--br-white-10); margin-top: 7px; overflow: hidden; }
.file-row .fbar i { display: block; height: 100%; background: var(--br-aqua); border-radius: 2px; }
.file-row .fdel { margin-left: auto; background: none; border: none; color: var(--br-darker-gray); cursor: pointer; padding: 6px; display: flex; }
.file-row .fdel:hover { color: var(--br-red); }

/* ---- Timeline ---- */
.tl { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 24px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: 7px; top: 20px; bottom: 2px;
  width: 2px; background: var(--br-white-10);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  background: color-mix(in srgb, var(--st, #737373) 20%, #171717);
  border: 2px solid var(--st, #737373);
}
.tl-body .tt { font-size: 13px; font-weight: 700; }
.tl-body .td { font-size: 12px; color: var(--br-dark-gray); margin-top: 3px; }
.tl-body .tc { font-size: 13px; color: var(--br-light-gray); margin-top: 8px; line-height: 1.55; background: var(--br-white-5); border-radius: 12px; padding: 12px 14px; }

/* ---- Detail blocks ---- */
.dt-block {
  background: var(--surface-card-wiki); border: 1px solid var(--br-border-subtle);
  border-radius: 12px; padding: 24px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.dt-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--br-gray); margin: 0 0 14px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; font-size: 13px; }
.kv .k { color: var(--br-dark-gray); font-weight: 600; }
.kv .v { color: var(--br-light-gray); font-weight: 500; }

/* callouts */
.callout { border-radius: 12px; padding: 18px 20px; border: 1px solid; }
.callout.red { background: rgba(226, 49, 12, 0.08); border-color: rgba(226, 49, 12, 0.35); }
.callout.bronze { background: rgba(220, 148, 41, 0.08); border-color: rgba(220, 148, 41, 0.35); }
.callout.aqua { background: rgba(62, 162, 255, 0.08); border-color: rgba(62, 162, 255, 0.3); }
.callout .co-t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; display: flex; align-items: center; gap: 9px; }
.callout .co-b { font-size: 13px; color: var(--br-light-gray); line-height: 1.6; margin-top: 9px; font-weight: 500; }

/* toast */
.pp-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--surface-modal); border: 1px solid var(--br-border-strong);
  border-radius: 100px; padding: 13px 24px;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); z-index: 100;
  animation: toast-in 0.3s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* mockup variant switcher (chrome, not product UI) */
.mock-switch {
  position: fixed; top: 76px; right: 20px; z-index: 90;
  background: var(--surface-modal); border: 1px solid var(--br-border-strong);
  border-radius: 12px; padding: 10px; width: 220px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.mock-switch .ms-t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--br-dark-gray); margin: 2px 4px 8px; }
.mock-switch button {
  display: block; width: 100%; text-align: left; font-family: inherit;
  background: none; border: none; color: var(--br-white-80); cursor: pointer;
  font-size: 12px; font-weight: 600; padding: 8px 10px; border-radius: 8px;
}
.mock-switch button:hover { background: var(--br-white-5); }
.mock-switch button.on { background: var(--br-white-10); color: var(--br-white); }

/* footer */
.pp-footer { border-top: 1px solid var(--br-border-subtle); margin-top: 60px; }
.pp-footer-in {
  max-width: 1180px; margin: 0 auto; padding: 26px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 11px; color: var(--br-dark-gray); font-weight: 500; letter-spacing: 0.02em;
}

/* responsive */
@media (max-width: 640px) {
  .pp-main { padding: 24px 16px 60px; }
  .pp-h1 { font-size: 24px; }
  .pp-header-in { padding: 12px 16px; gap: 10px; }
  .wz-panel { padding: 20px 16px; }
  .wz-step .lb { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv .k { margin-top: 10px; }
  .mock-switch { display: none; }
}
