:root {
  --brand: #0f766e;
  --brand-dark: #0b5b54;
  --bg: #f6f7f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --ok: #16a34a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

header.top {
  background: var(--brand);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.top h1 {
  font-size: 17px;
  margin: 0;
}

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

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 10px 0 6px;
}

input[type=text], input[type=email], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}

textarea { min-height: 80px; resize: vertical; }

button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--brand-dark); }
button.secondary { background: #e5e7eb; color: var(--text); }
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.closed { background: #e5e7eb; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }

.qblock { border-left: 3px solid var(--brand); padding-left: 12px; margin-bottom: 20px; }
.qtext { font-weight: 700; white-space: pre-wrap; margin-bottom: 8px; }

.ans-item { background: #f9fafb; border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.ans-name { font-weight: 600; font-size: 13px; color: var(--brand-dark); margin-bottom: 4px; }
.ans-lang { font-size: 14px; margin: 2px 0; }
.ans-lang.lo { color: #4b5563; font-style: italic; }
.ans-img { max-width: 140px; border-radius: 6px; margin: 6px 6px 0 0; }

.opinion { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.opinion .score { float: right; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.opinion .who { font-size: 12px; color: var(--muted); margin-top: 6px; }

.link-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.link-item code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 12px; word-break: break-all; }

.toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; z-index: 50;
}

.lang-toggle { display: flex; gap: 6px; }
.lang-toggle button { padding: 5px 12px; font-size: 13px; border-radius: 999px; }
.lang-toggle button.active { background: #fff; color: var(--brand); }
.lang-toggle button:not(.active) { background: rgba(255,255,255,.2); color: #fff; }
