@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&family=Poppins:wght@400;500;600&display=swap");

:root {
  --bg-start: #0a1c46;
  --bg-end: #050c1f;
  --panel: rgba(255, 255, 255, 0.96);
  --line: #d9e1eb;
  --text: #101725;
  --muted: #4f5d73;
  --accent: #1f7ed0;
  --accent-2: #4ab6ff;
  --heading: #ffffff;
  --good: #1d7f52;
  --warn: #9c6d10;
  --bad: #ae2f3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(68, 170, 255, 0.28), transparent 35%),
    radial-gradient(circle at 80% 15%, rgba(111, 80, 255, 0.22), transparent 40%),
    linear-gradient(145deg, var(--bg-start), var(--bg-end));
  background-attachment: fixed;
  color: #eaf1ff;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  display: grid;
  gap: 1rem;
}

.top h1 {
  margin: 0;
  font-family: "Montserrat", "Poppins", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.02em;
  color: var(--heading);
}

.sub {
  margin: 0.25rem 0 0;
  color: #c3d5f8;
  font-size: 0.95rem;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(2, 8, 27, 0.28);
  padding: 0.95rem;
  color: var(--text);
}

.meta,
.actions,
.summary {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: end;
}

.meta label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
textarea,
button,
.btn {
  border: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  font: inherit;
  color: var(--text);
  background: #fff;
  border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 126, 208, 0.14);
}

button,
.btn {
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
}

button:hover,
.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 126, 208, 0.14);
}

.actions button,
.actions .btn {
  background: linear-gradient(180deg, #2e8ada, #1e6cb3);
  border-color: #1d5a92;
  color: #fff;
}

.actions button:hover,
.actions .btn:hover {
  border-color: #194e7d;
}

.summary article {
  min-width: 170px;
}

.summary h2 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-family: "Montserrat", "Poppins", sans-serif;
}

.metric {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: "Montserrat", "Poppins", sans-serif;
}

.questions {
  display: grid;
  gap: 0.75rem;
  color: var(--text);
}

.function-group,
.control-group,
.question {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  color: var(--text);
}

.function-group > header,
.control-group > header {
  padding: 0.6rem 0.75rem;
  background: linear-gradient(90deg, #f3f8ff, #eef5ff);
  border-bottom: 1px solid var(--line);
}

.function-group > header h2,
.control-group > header h3 {
  margin: 0;
  font-size: 1rem;
  font-family: "Montserrat", "Poppins", sans-serif;
  color: #11315c;
}

.function-group > header {
  background: linear-gradient(90deg, #1c4f87, #173865);
  border-bottom: 1px solid #123053;
  padding: 0.75rem 0.9rem;
}

.function-group > header h2 {
  color: #ffffff;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.control-questions {
  display: grid;
}

.question {
  padding: 0.6rem 0.75rem;
  border-width: 0 0 1px 0;
}

.question:last-child {
  border-bottom-width: 0;
}

.q-head {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: baseline;
}

.q-id {
  color: #3b4b64;
  font-size: 0.84rem;
}

.q-text {
  margin: 0.25rem 0;
  color: #0f1a2d;
  font-weight: 500;
}

.row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid #326fbf;
  color: #245ea8;
  background: #eef5ff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.old-text {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: #405571;
}

textarea {
  width: min(100%, 640px);
  min-height: 56px;
}

.bars {
  display: grid;
  gap: 0.6rem;
}

.gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.gauge-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.gauge-title {
  color: #173865;
  font-family: "Montserrat", "Poppins", sans-serif;
  font-size: 0.92rem;
}

.gauge {
  --score: 0;
  position: relative;
  width: 170px;
  height: 92px;
  overflow: hidden;
}

.gauge-arc {
  position: absolute;
  left: 0;
  top: 0;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: conic-gradient(
    from 270deg,
    #c9464e 0deg 60deg,
    #c99924 60deg 120deg,
    #2d9564 120deg 180deg,
    #e7edf5 180deg 360deg
  );
}

.gauge-arc::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 19px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: #fff;
}

.gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3px;
  height: 76px;
  background: #112949;
  border-radius: 999px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(calc(-90deg + (var(--score) * 1.8deg)));
}

.gauge-hub {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #112949;
  background: #fff;
  transform: translateX(-50%);
}

.gauge-value {
  font-size: 1rem;
  font-weight: 700;
  font-family: "Montserrat", "Poppins", sans-serif;
}

.bar {
  display: grid;
  gap: 0.2rem;
}

.bar-track {
  height: 16px;
  background: #e9eef5;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
}

th {
  background: #f2f7ff;
  color: #173865;
  font-family: "Montserrat", "Poppins", sans-serif;
}

.bad { color: var(--bad); }
.warn { color: var(--warn); }
.good { color: var(--good); }

@media (max-width: 720px) {
  .metric {
    font-size: 1.1rem;
  }

  .q-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
