@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700&display=swap');

:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --ink: #2f3444;
  --muted: #7e8594;
  --line: #e7e9ef;
  --brand: #f3bc21;
  --brand-dark: #d39d08;
  --navy: #384259;
  --success: #2d8a5d;
  --danger: #b2372b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", sans-serif;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.brand h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1;
  letter-spacing: 0.5px;
  color: #0f121b;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
}

.menu {
  display: flex;
  gap: 10px;
}

.menu button {
  border: none;
  background: transparent;
  color: #4b5567;
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}

.menu button.active {
  color: var(--brand-dark);
  background: #fff4d3;
}

.menu button:hover {
  background: #eef2f8;
}

[data-view] { display: none; }
[data-view].active { display: block; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-family: "Baloo 2", cursive;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1;
}

input,
select,
button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: "Nunito", sans-serif;
}

button {
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  border: none;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.08);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #657084;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}

th[data-sort] {
  cursor: pointer;
  user-select: none;
}

th[data-sort]:hover {
  color: var(--brand-dark);
}

.actions {
  display: flex;
  gap: 6px;
}

.actions button.delete {
  background: var(--danger);
}

.result-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

#settings-status,
#test-run-status,
#target-status {
  color: var(--muted);
  min-height: 18px;
}

@media (max-width: 1300px) {
  .section-head h2 { font-size: clamp(24px, 2.7vw, 40px); }
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 12px;
  }
}
