:root {
  --red: #d7352f;
  --green: #2f7f3f;
  --orange: #d89b2b;
  --ink: #1f2a33;
  --muted: #64717d;
  --line: #e3e8df;
  --paper: #f7f8f3;
  --white: #fff;
  --blue: #244f69;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 500px) 1fr;
  background: var(--white);
}
.loginPanel {
  padding: 56px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.loginPanel h1 {
  font-size: 34px;
  margin: 44px 0 10px;
  letter-spacing: 0;
}
.loginPanel p {
  color: var(--muted);
  line-height: 1.55;
}
.loginPanel label,
.field label,
.userForm label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 14px 0 7px;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  padding: 12px 13px;
  outline: none;
}
textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 127, 63, .13);
}
.primary, .secondary, .ghost, .danger {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 900;
}
.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--red), #a92925);
}
.secondary {
  color: var(--white);
  background: var(--green);
}
.ghost {
  background: #f5f7f1;
  border: 1px solid var(--line);
  color: var(--ink);
}
.danger {
  background: #fff0ee;
  color: #a92925;
  border: 1px solid #ffd0cb;
}
.loginPanel .primary { margin-top: 16px; width: 100%; }
.support {
  margin-top: 18px;
  font-size: 13px;
}
.error {
  margin-top: 12px;
  background: #fff0ee;
  color: #9b1f1a;
  border: 1px solid #ffd0cb;
  padding: 11px 12px;
  border-radius: 6px;
  font-weight: 800;
}

.stage {
  position: relative;
  overflow: hidden;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(20,30,38,.98), rgba(31,42,51,.86), rgba(31,42,51,.60)),
    linear-gradient(135deg, #233a31, #83672d);
}
.stage:before {
  content: "";
  position: absolute;
  left: 14%;
  right: -8%;
  bottom: -18%;
  height: 48%;
  background: linear-gradient(120deg, rgba(47,127,63,.94), rgba(88,145,73,.88));
  border-radius: 60% 60% 0 0;
}
.stage:after {
  content: "";
  position: absolute;
  right: -110px;
  top: -130px;
  width: 410px;
  height: 410px;
  border-radius: 50%;
  background: rgba(216,155,43,.58);
}
.stage > * { position: relative; z-index: 1; }
.eyebrow {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.stage .eyebrow { color: #ff6d66; }
.stage h2 {
  max-width: 760px;
  margin: 12px 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}
.stage p {
  max-width: 680px;
  color: rgba(255,255,255,.86);
  font-size: 19px;
  line-height: 1.5;
}
.stageCards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
}
.stageCards div {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 16px;
  backdrop-filter: blur(8px);
}
.stageCards b { display: block; margin-bottom: 5px; }
.stageCards span { color: rgba(255,255,255,.76); font-size: 13px; line-height: 1.35; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.session {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}
.page {
  width: min(1240px, calc(100% - 36px));
  margin: 24px auto 46px;
}
.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  align-items: start;
}
.panel, .question, .guide {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(31,42,51,.07);
}
.panel { padding: 22px; margin-bottom: 18px; }
.panel h1 {
  margin: 8px 0;
  font-size: 34px;
}
.muted { color: var(--muted); line-height: 1.5; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcf8;
}
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 800; }

.guide {
  position: sticky;
  top: 100px;
  padding: 18px;
}
.agent {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.agentIcon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), #183949);
  font-weight: 900;
}
.agent p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}
.progressBox { margin-top: 16px; }
.progressTop {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 7px;
}
.bar {
  height: 12px;
  background: #e9efe4;
  border-radius: 99px;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--orange), var(--red));
}

.category {
  margin: 24px 0 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.category mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--red);
  font-weight: 900;
}
.category h2 { margin: 0; font-size: 21px; }
.category small { color: var(--muted); font-weight: 700; }

.question {
  padding: 22px;
  margin-bottom: 14px;
}
.questionHeader {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}
.qnum {
  color: var(--red);
  font-weight: 900;
  min-width: 56px;
}
.question h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.questionText {
  margin: 0;
  color: var(--ink);
  line-height: 1.48;
  font-size: 16px;
}
details {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}
summary {
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}
details ul {
  margin: 10px 0 0;
  padding-left: 20px;
  line-height: 1.45;
}
.options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fbfcf8;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.option input { width: auto; margin: 0; }
.field { margin-top: 12px; }
.actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.success {
  max-width: 860px;
  text-align: center;
}
.ticket {
  max-width: 650px;
  margin: 24px auto;
  text-align: left;
  background: #edf7e9;
  border: 1px dashed var(--green);
  border-radius: 8px;
  padding: 18px;
}

.adminGrid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}
.reportBtn {
  width: 100%;
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  font-weight: 900;
}
.reportBtn small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 700;
}
.userForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.userForm .wide { grid-column: 1 / -1; }
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}
.table td, .table th {
  border-bottom: 1px solid var(--line);
  padding: 11px;
  text-align: left;
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.answerBlock {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 10px 0;
  background: var(--white);
}
.answerBlock p { color: var(--muted); line-height: 1.45; }
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  border-radius: 999px;
  background: #eef5eb;
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .login, .layout, .adminGrid { grid-template-columns: 1fr; }
  .stage { min-height: 520px; }
  .guide { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .loginPanel, .stage { padding: 24px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .page { width: calc(100% - 22px); margin-top: 14px; }
  .stageCards, .stats, .userForm { grid-template-columns: 1fr; }
  .panel h1, .stage h2 { font-size: 30px; }
}
