/* Publika sidor: support, case, approve. Tenant-brandas via --brand. */

:root {
  --brand: #2b6ff2;
  --brand-dark: #201f1e;
  --bg: #faf9f8;
  --panel: #ffffff;
  --text: #323130;
  --heading: #201f1e;
  --muted: #605e5c;
  --line: #edebe9;
  --line-strong: #d2d0ce;
  --danger: #d13438;
  --success: #107c10;
  --warn-bg: #fff4ce;
  --warn: #8a6116;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
[hidden] { display: none !important; }
h1, h2, h3 { color: var(--heading); font-weight: 600; }
a { color: var(--brand); }

.page { max-width: 640px; margin: 0 auto; padding: 24px 16px 48px; }
.embed .page { padding: 8px 12px 24px; max-width: none; }

.brand-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 4px 0 18px; flex-wrap: wrap;
}
#brandArea { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 8px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px;
}
.brand-logo { max-height: 44px; max-width: 180px; }
.brand-name { font-weight: 600; font-size: 17px; color: var(--heading); }
.brand-sub { color: var(--muted); font-size: 13px; }
#contactArea { font-size: 13px; color: var(--muted); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1.6px 3.6px rgba(0,0,0,.08); padding: 24px; margin-bottom: 14px;
}
.embed .card { box-shadow: none; }
.card h1 { font-size: 21px; margin: 0 0 6px; }
.card h2 { font-size: 16px; margin: 0 0 12px; }
.intro { color: var(--muted); margin: 0 0 4px; }

fieldset {
  border: 0; padding: 0; margin: 0 0 22px;
}
fieldset legend {
  font-weight: 600; color: var(--heading); font-size: 15px;
  padding: 0; margin-bottom: 10px; border-bottom: 1px solid var(--line);
  width: 100%; padding-bottom: 6px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
label small { font-weight: 400; color: var(--muted); }
.wide { grid-column: 1 / -1; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; border-radius: 6px;
  padding: 9px 11px; outline: none; color: var(--text); font: inherit; min-height: 40px;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.choice input { width: auto; min-height: auto; accent-color: var(--brand); margin: 0; }
.choice.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); }

.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check-line input { width: auto; min-height: auto; margin-top: 3px; accent-color: var(--brand); }

.btn {
  border-radius: 6px; padding: 11px 22px; cursor: pointer; border: 1px solid var(--line-strong);
  font: inherit; font-weight: 600; min-height: 44px; background: #fff; color: var(--text);
}
.btn.primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 82%, #7cc4ff), var(--brand));
  color: #fff; border-color: transparent;
}
.btn.primary:hover { filter: brightness(.92); }
.btn.danger-ghost { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.form-error {
  color: var(--danger); background: #fde7e9; border: 1px solid #f3c1c5;
  border-radius: 6px; padding: 10px 13px; font-weight: 600; margin-bottom: 14px;
}
.success-banner {
  background: #dff6dd; border: 1px solid #b6dfb2; color: var(--success);
  border-radius: 6px; padding: 12px 14px; font-weight: 600; margin-bottom: 14px;
}
.notice {
  background: var(--warn-bg); border: 1px solid #e6d18a; color: var(--warn);
  border-radius: 6px; padding: 12px 14px; margin-bottom: 14px;
}

.status-pill {
  display: inline-flex; border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand);
}
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span:first-child { color: var(--muted); }

.timeline { display: grid; gap: 10px; margin-top: 6px; }
.msg { border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; }
.msg.customer { background: color-mix(in srgb, var(--brand) 6%, #fff); border-color: color-mix(in srgb, var(--brand) 25%, #fff); }
.msg.system { background: var(--bg); color: var(--muted); font-size: 13.5px; }
.msg-head { font-size: 12px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }

.file-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 14px; margin-bottom: 6px;
}

.report-box { border: 1px solid var(--line); border-radius: 8px; padding: 4px 18px 12px; background: #fffefb; }
.report-box h2, .report-box h3 { color: var(--brand); font-size: 15px; }

.loading { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); padding: 40px; }
.spin {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  animation: pspin .8s linear infinite;
}
@keyframes pspin { to { transform: rotate(360deg); } }

.footer-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
}
