/* AI-strategiintervju. Neutral, ljus palett så att kundens logga kan bära varumärket. */
:root {
  --bg: #f6f5f2; --surface: #ffffff; --surface-muted: #efede8;
  --text: #1f2330; --muted: #5f6472; --line: #e2e0da; --line-strong: #c9c6bd;
  --accent: #2f4f7f; --accent-strong: #233c62; --accent-soft: #e6ecf5;
  --danger: #b23a48; --warning: #b7791f; --success: #2e7d5b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Poppins', Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh; font-size: 16px; }
h1, h2 { font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; letter-spacing: -0.8px; line-height: 1.05; color: var(--text); }
h3, h4 { font-family: 'Poppins', sans-serif; }
h3, h4 { font-weight: 600; color: var(--text); line-height: 1.3; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
[hidden] { display: none !important; }
button { font-family: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

header.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.top-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1100px; margin: 0 auto; padding: 12px 20px; min-height: 64px; }
.top-logo img { height: 26px; width: auto; display: block; }
.top-client { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-client img { height: 36px; max-width: 180px; width: auto; object-fit: contain; }
.top-client span { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-nav { display: flex; gap: 14px; align-items: center; font-size: 14px; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text); max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 500; font-size: 15px; text-decoration: none; padding: 12px 22px; border-radius: 8px; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; line-height: 1.2; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-danger { color: var(--danger); background: var(--surface); border-color: rgba(178,58,72,0.4); }
.btn-danger:hover { background: rgba(178,58,72,0.08); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

input[type="text"], input[type="email"], input[type="password"], textarea, select { width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); font-family: inherit; font-size: 16px; padding: 12px 14px; transition: border-color 0.2s, box-shadow 0.2s; }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6472' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
label.field { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin: 14px 0 6px; }
.field-help { font-size: 14px; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.card + .card { margin-top: 16px; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card-label { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.msg { color: var(--muted); font-size: 14px; margin-top: 12px; min-height: 20px; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--success); }

.badge { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 3px 10px; border-radius: 100px; border: 1px solid var(--line-strong); color: var(--text); background: var(--surface); white-space: nowrap; }
.badge-done { border-color: rgba(46,125,91,0.4); color: var(--success); background: rgba(46,125,91,0.06); }
.badge-progress { border-color: rgba(183,121,31,0.4); color: var(--warning); background: rgba(183,121,31,0.06); }
.badge-fail { border-color: rgba(178,58,72,0.4); color: var(--danger); background: rgba(178,58,72,0.06); }
.badge-test { color: var(--muted); }

/* Deltagarsidan */
.hero { padding: 56px 0 24px; }
.hero h1 { font-size: clamp(44px, 8vw, 72px); margin-bottom: 20px; }
.who { display: inline-block; margin: 8px 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; }
.who strong { display: block; font-size: 17px; font-weight: 600; }
.who span { font-size: 14px; color: var(--muted); }
.hero p + p { margin-top: 12px; }
.mode-list { list-style: none; margin: 22px 0 6px; display: grid; gap: 10px; }
.mode-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); }
.mode-list svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }

.progress-wrap { position: sticky; top: 64px; z-index: 50; background: var(--bg); padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.progress-label { font-size: 13px; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 8px; }
.area-title { font-size: 15px; font-weight: 600; color: var(--text); margin: -4px 0 8px; }
.progress-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s; width: 0; }

.chat { padding: 24px 0 190px; }
.section-label { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.bubble { max-width: 88%; padding: 14px 18px; border-radius: 14px; font-size: 16px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; margin-bottom: 12px; animation: fadeUp 0.3s ease both; }
.bubble.assistant { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.bubble.user { background: var(--accent-soft); margin-left: auto; border-top-right-radius: 4px; }
.bubble.user .voice-mark { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--accent); margin-top: 8px; }
.bubble.user .voice-mark svg { width: 13px; height: 13px; }
.bubble-tools { display: flex; gap: 8px; margin: -4px 0 14px; }
.link-btn { background: none; border: none; color: var(--accent); font-size: 14px; cursor: pointer; padding: 2px 0; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { color: var(--accent-strong); }
.link-btn svg { width: 15px; height: 15px; }
.typing { display: inline-flex; gap: 5px; padding: 14px 18px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; } .typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.composer { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 0 max(12px, env(safe-area-inset-bottom)); z-index: 60; }
.composer textarea { min-height: 64px; max-height: 40vh; background: var(--bg); }
.composer-row { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.mic-status { font-size: 14px; color: var(--muted); min-height: 20px; flex: 1; }
.mic-status.active { color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }

.mic { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; flex: 0 0 auto; }
.mic svg { width: 24px; height: 24px; }
.mic:hover { background: var(--accent-soft); }
.mic.recording { background: var(--danger); color: #fff; border-color: var(--danger); animation: micPulse 1.4s ease-in-out infinite; }
.mic.busy { opacity: 0.5; cursor: wait; animation: none; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(178,58,72,0.4); } 50% { box-shadow: 0 0 0 14px rgba(178,58,72,0); } }
.send { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: background 0.2s; }
.send svg { width: 22px; height: 22px; }
.send:hover { background: var(--accent-strong); }
.send[disabled] { opacity: 0.35; cursor: not-allowed; }

.done { padding: 80px 0; }
.done h1 { font-size: clamp(44px, 8vw, 72px); margin-bottom: 18px; }

/* Admin */
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 32px 0 20px; }
.admin-head h1 { font-size: clamp(36px, 5vw, 50px); }
.admin-head h2 { font-size: clamp(28px, 4vw, 34px); }
.crumb { font-size: 14px; margin-bottom: 10px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text); }
tr:last-child td { border-bottom: none; }
tr.row-link { cursor: pointer; } tr.row-link:hover td { background: var(--bg); }
td .sub { display: block; font-size: 13px; color: var(--muted); }
.ws-card { display: block; color: inherit; }
.ws-card:hover { border-color: var(--accent); color: inherit; }
.ws-card .meta { font-size: 14px; color: var(--muted); margin-top: 6px; }
.ws-logo { height: 36px; max-width: 150px; object-fit: contain; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0; }
.tab { background: none; border: none; color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.report-section { margin-top: 22px; }
.report-section h3 { font-size: 13px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.report-section p { font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.report-section ul { padding-left: 0; list-style: none; }
.report-section li { padding: 6px 0 6px 14px; border-left: 2px solid var(--line-strong); margin-bottom: 6px; font-size: 15.5px; line-height: 1.5; }
.scores { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .scores { grid-template-columns: 1fr; } }
.score { font-size: 14px; }
.score .bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.score .bar i { display: block; height: 100%; background: var(--accent); }
.score b { float: right; font-weight: 600; }
.transcript .bubble { max-width: 100%; }
.transcript .q { font-size: 13px; color: var(--muted); margin: 18px 0 6px; letter-spacing: 0.8px; text-transform: uppercase; font-weight: 600; }

.login-box { max-width: 400px; margin: 80px auto; }
.login-box h1 { font-size: 48px; margin-bottom: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,0.2); }

@media print {
  body { background: #fff; font-size: 12pt; }
  header.top, .actions, .tabs, .no-print, .btn { display: none !important; }
  .card, .tbl-wrap { border-color: #ccc; }
  .bubble.user { background: #eef1f6; }
}
