/* Public whistleblower channel. Builds on ninatrans-hris-theme.css tokens. */

body.wb { background: hsl(var(--muted) / .55); color: hsl(var(--foreground)); min-height: 100vh; display: flex; flex-direction: column; font-size: .92rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

/* ---- Top bar: same shell as the HRIS top-nav ----------------------------- */
.wb-top { position: sticky; top: 0; z-index: 10; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1.5rem; background: #fff; border-bottom: 1px solid hsl(var(--card-border)); box-shadow: var(--shadow-card); }
.wb-brand { display: flex; align-items: center; gap: .9rem; text-decoration: none !important; }
.wb-brand img { height: 34px; width: auto; }
.wb-brand-label { padding-left: .9rem; border-left: 1px solid hsl(var(--border)); font-weight: 600; color: hsl(var(--foreground)); font-size: .9rem; white-space: nowrap; }
.wb-nav { display: flex; gap: .25rem; }
.wb-nav a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: var(--radius); border: 1px solid transparent;
  color: hsl(var(--muted-foreground)); font-weight: 500; text-decoration: none; white-space: nowrap; }
.wb-nav a:hover { color: hsl(var(--foreground)); background: hsl(var(--muted)); text-decoration: none; }
.wb-nav a.active { color: hsl(var(--primary)); background: hsl(var(--primary) / .1); border-color: hsl(var(--primary) / .2); font-weight: 600; }
.wb-nav i { font-size: .8rem; }
@media (max-width: 640px) {
  .wb-top { padding: 0 1rem; }
  .wb-brand-label { display: none; }
  .wb-nav span { display: none; }
  .wb-nav a { padding: .5rem .7rem; }
}

/* ---- Page ---------------------------------------------------------------- */
.wb-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.wb-main.narrow { max-width: 560px; }
.wb-main.medium { max-width: 760px; }
@media (max-width: 640px) { .wb-main { padding: 1.25rem 1rem 2rem; } }
.wb-head { margin-bottom: 1.5rem; }
.wb-head .page-title { margin: .35rem 0 .25rem; }
.wb-head .page-subtitle { margin: 0; max-width: 62ch; }
.wb-eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: hsl(var(--primary)); background: hsl(var(--primary) / .08); border-radius: 999px; padding: .2rem .65rem; }

.wb-card { background: #fff; border: 1px solid hsl(var(--card-border)); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.wb-card + .wb-card { margin-top: 1rem; }
.wb-card-body { padding: 1.5rem; }
@media (max-width: 640px) { .wb-card-body { padding: 1.1rem; } }

/* ---- Report page: form + side panel ------------------------------------- */
.wb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.wb-layout aside { position: sticky; top: 88px; }
@media (max-width: 960px) { .wb-layout { grid-template-columns: minmax(0, 1fr); } .wb-layout aside { position: static; order: -1; } }

.wb-section { padding: 1.5rem; border-top: 1px solid hsl(var(--border)); }
.wb-section:first-child { border-top: 0; }
@media (max-width: 640px) { .wb-section { padding: 1.1rem; } }
.wb-section-title { display: flex; align-items: center; gap: .65rem; font-size: .95rem; font-weight: 600; margin: 0 0 1rem; }
.wb-step { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; flex-shrink: 0;
  background: hsl(var(--primary) / .1); color: hsl(var(--primary)); font-size: .75rem; font-weight: 700; }

.wb label.wb-label { display: block; font-size: 12px; font-weight: 600; color: hsl(var(--muted-foreground)); margin-bottom: 5px; }
.wb .req { color: hsl(var(--primary)); }
.wb .form-control { font-size: .9rem; }
.wb textarea.form-control { min-height: 150px; }
.wb .form-text { font-size: .78rem; color: hsl(var(--muted-foreground)); }
.wb input[type=checkbox], .wb input[type=radio] { accent-color: hsl(var(--primary)); }

.wb-check { display: flex; gap: .65rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  cursor: pointer; margin-bottom: .6rem; background: #fff; }
.wb-check input { margin-top: .2rem; width: 16px; height: 16px; flex-shrink: 0; }
.wb-check strong { display: block; font-weight: 600; font-size: .88rem; }
.wb-check span { color: hsl(var(--muted-foreground)); font-size: .82rem; }
.wb-check:has(input:checked) { border-color: hsl(var(--primary) / .45); background: hsl(var(--primary) / .04); }

.wb-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .wb-choice { grid-template-columns: 1fr; } }
.wb-choice .wb-check { margin: 0; }

.wb-sub { background: hsl(var(--muted) / .6); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 1rem; margin-bottom: .6rem; }
.wb-file { border: 1px dashed hsl(var(--input)); border-radius: var(--radius); padding: .85rem; background: hsl(var(--muted) / .4); }
.wb-file input { font-size: .85rem; width: 100%; }

.wb-actions { padding: 1.25rem 1.5rem; border-top: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .35);
  border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-end; }
.wb .btn { font-weight: 600; padding: .55rem 1.1rem; }
.wb .btn i { margin-right: .4rem; }
@media (max-width: 640px) { .wb-actions .btn { width: 100%; } }

/* Side panel: how it works */
.wb-aside-title { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin: 0 0 .9rem; }
.wb-facts { list-style: none; margin: 0; padding: 0; }
.wb-facts li { display: flex; gap: .75rem; padding: .6rem 0; border-top: 1px solid hsl(var(--border)); font-size: .84rem; line-height: 1.45; }
.wb-facts li:first-child { border-top: 0; padding-top: 0; }
.wb-facts i { width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius);
  background: hsl(var(--primary) / .08); color: hsl(var(--primary)); font-size: .8rem; }
.wb-facts strong { display: block; font-weight: 600; }
.wb-facts span { color: hsl(var(--muted-foreground)); }
.wb-link-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 600; text-decoration: none !important; }
.wb-link-row span { color: hsl(var(--muted-foreground)); font-weight: 400; font-size: .82rem; display: block; }

/* ---- Confirmation -------------------------------------------------------- */
.wb-done { text-align: center; }
.wb-done-icon { width: 56px; height: 56px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--success-light)); color: hsl(142 71% 30%); font-size: 1.5rem; margin-bottom: .75rem; }
.wb-codes { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.5rem 0 1rem; text-align: left; }
@media (max-width: 640px) { .wb-codes { grid-template-columns: 1fr; } }
.wb-code { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: .75rem .9rem; background: hsl(var(--muted) / .5); }
.wb-code small { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.wb-code-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .25rem; }
.wb-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; color: hsl(var(--foreground));
  letter-spacing: .04em; word-break: break-all; background: none; padding: 0; }
.wb-copy { border: 1px solid hsl(var(--border)); background: #fff; border-radius: calc(var(--radius) - 2px); padding: .2rem .5rem; font-size: .75rem;
  color: hsl(var(--muted-foreground)); cursor: pointer; white-space: nowrap; }
.wb-copy:hover { color: hsl(var(--primary)); border-color: hsl(var(--primary) / .4); }
.wb-done .btn + .btn { margin-left: .5rem; }

/* ---- Status -------------------------------------------------------------- */
.wb-case-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.wb-case-head h2 { font-size: 1.05rem; font-weight: 700; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wb-timeline { list-style: none; margin: 0; padding: 0; }
.wb-timeline li { position: relative; padding: 0 0 1.1rem 1.6rem; }
.wb-timeline li:last-child { padding-bottom: 0; }
.wb-timeline li::before { content: ''; position: absolute; left: 5px; top: 18px; bottom: -2px; width: 2px; background: hsl(var(--border)); }
.wb-timeline li:last-child::before { display: none; }
.wb-timeline li::after { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 999px;
  background: #fff; border: 2px solid hsl(var(--primary)); }
.wb-timeline li.current::after { background: hsl(var(--primary)); box-shadow: 0 0 0 4px hsl(var(--primary) / .15); }
.wb-timeline strong { display: block; font-weight: 600; }
.wb-timeline span { color: hsl(var(--muted-foreground)); font-size: .82rem; }
.wb-question { border: 1px solid hsl(var(--warning) / .45); background: hsl(var(--warning-light) / .45); border-radius: var(--radius); padding: 1.1rem; }
.wb-question h3 { font-size: .92rem; font-weight: 600; margin: 0 0 .5rem; }
.wb-question blockquote { margin: 0 0 1rem; padding: .65rem .85rem; background: #fff; border-left: 3px solid hsl(var(--warning)); border-radius: 4px; white-space: pre-line; }

/* ---- Footer -------------------------------------------------------------- */
.wb-footer { display: flex; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; padding: 1rem 1.5rem; border-top: 1px solid hsl(var(--border));
  background: #fff; color: hsl(var(--muted-foreground)); font-size: .78rem; }
.wb-footer i { color: hsl(var(--primary)); margin-right: .25rem; }

@media print {
  .wb-top, .wb-footer, .wb-noprint { display: none !important; }
  body.wb { background: #fff; }
  .wb-card { box-shadow: none; }
}
