:root {
  --brand: #3b82f6;
  --brand-600: #2563eb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --sidebar-bg: #f8fafc; /* light */
  --sidebar-fg: #0f172a; /* slate-900 */
  --sidebar-active-bg: #e2e8f0; /* slate-200 */
  --sidebar-active-fg: #0f172a;
  --nav-navy: #0b1f3a; /* dark navy */
  --nav-yellow: #ffd700; /* yellow */
  --ring: 0 0 0 3px rgba(59,130,246,.25);
}

html { font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji"; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-bottom: 1px solid #e5e7eb;
}

/* Nav layout */
.nav { width: 100%; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.nav a:hover { color: var(--brand); }
.nav a.active { color: var(--brand); position: relative; }
.nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--brand); border-radius: 2px; }

/* Brand */
.brand a { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--brand); color: white; font-size: .8rem; font-weight: 700; letter-spacing: .5px; }
.brand-name { color: var(--text); }

.page { max-width: 1100px; padding-block: 2rem; }

.card {
  background: var(--surface);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
}

h1,h2,h3 { color: var(--text); margin-top: .25rem; }
p { color: var(--muted); }

form { margin-block: 1rem; }
label { font-weight: 600; }

input[type=file] { width: 100%; }

textarea {
  width: 100%;
  min-height: 9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

button:not(.btn), [type=submit]:not(.btn) {
  background: var(--brand);
  border-color: var(--brand);
}
button:not(.btn):hover, [type=submit]:not(.btn):hover { background: var(--brand-600); border-color: var(--brand-600); }
button:not(.btn):focus, [type=submit]:not(.btn):focus { box-shadow: var(--ring); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .col-6 { grid-column: span 12; }
}

.footer { border-top: 1px solid #e5e7eb; padding: 1.25rem 0; background: var(--surface-alt); }

/* Container helper if Pico isn't present */
.container { margin-inline: auto; width: min(100% - 2rem, 1100px); }

@media (max-width: 720px) {
  .brand-name { display: none; }
}

.validation-summary-valid { display: none; }

/* --- Sidebar Layout --- */
.app-shell { min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #e5e7eb;
}
.sidebar .logo { background: var(--brand); }
.sidebar .sidebar-brand strong { color: var(--sidebar-fg); font-size: 0.95rem; }
.sidebar .nav-link { color: var(--sidebar-fg); border-radius: 8px; padding: .5rem .75rem; }
.sidebar .nav-link:hover { background: #eef2ff; color: #1f2937; }
.sidebar .nav-link.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-fg); }

.content { background: var(--surface-alt); }

/* Responsive: collapse sidebar on small screens */
@media (max-width: 992px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s ease; }
  html.sidebar-open .sidebar { transform: translateX(0); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
}

/* Feedback page print/layout tweaks */
@media print {
  @page { size: A4; margin: 15mm; }
  .no-print { display: none !important; }
  body { background: #fff; }
}
.report-header { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid #e5e7eb; padding-bottom: .75rem; margin-bottom: 1rem; }
.report-header img { width: 64px; height: 64px; object-fit: contain; }
.report-title { line-height: 1.2; }
.clickable { cursor: pointer; text-decoration: underline; }

/* Navbar sizing tweaks */
.navbar { --bs-navbar-padding-y: 0.75rem; min-height: 64px; }
.navbar .navbar-brand { line-height: 1; }
.navbar .navbar-brand img { height: 40px; width: auto; object-fit: contain; }
/* Dark navy navbar with yellow text */
.bg-navy { background-color: var(--nav-navy) !important; }
.bg-navy, .bg-navy .navbar-brand, .bg-navy .nav-link, .bg-navy .navbar-text { color: var(--nav-yellow) !important; }
.bg-navy .btn-outline-light { color: var(--nav-yellow); border-color: var(--nav-yellow); }
.bg-navy .btn-outline-light:hover { color: #0b1f3a; background-color: var(--nav-yellow); border-color: var(--nav-yellow); }

