:root {
  --mcd-red: #DA291C;
  --mcd-red-dark: #b82015;
  --mcd-gold: #FFC72C;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2430;
  margin: 0;
  padding: 0 0 40px;
}

.brandbar {
  background: #fff;
  border-bottom: 4px solid var(--mcd-gold);
}
.brandbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.brandbar-logo { height: 64px; width: auto; display: block; }
.brandbar-text { display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.brandbar-family {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--mcd-red);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
}
.brandbar-title {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--mcd-red);
  font-size: 26px;
  font-weight: 800;
}

.topnav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 32px;
}
.topnav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.topnav a { text-decoration: none; font-size: 14px; color: #374151; font-weight: 500; position: relative; transition: color .15s ease; }
.topnav a::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: currentColor; transition: width .2s ease; }
.topnav a:hover::after { width: 100%; }
.topnav a:hover { color: var(--mcd-red); }
.topnav-spacer { flex: 1; }
.topnav a.signed-in-as { color: #000; font-weight: 700; }
.topnav a.signed-in-as:hover { color: #374151; }
.topnav a.sign-out { color: var(--mcd-red); font-weight: 700; }
.topnav a.sign-out:hover { color: var(--mcd-red-dark); }

.wrap {
  max-width: 1140px;
  margin: 40px auto 0;
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.brandbar ~ .wrap { margin-top: 32px; }
.topnav ~ .wrap { margin-top: 0; }
.wrap.narrow { max-width: 480px; }
h1 { font-size: 20px; margin: 0 0 16px; }
label {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}
input[type=text], input[type=email], input[type=password], input[type=number], select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d0d3da;
  border-radius: 6px;
  font-size: 14px;
  font-weight: normal;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--mcd-red);
  box-shadow: 0 0 0 3px rgba(218,41,28,0.12);
}
.inline { display: flex; align-items: center; gap: 8px; }
.inline input { flex: 1; }
button {
  background: var(--mcd-red);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--mcd-red-dark); }
.muted { color: #6b7280; font-size: 14px; }
.small { font-size: 12px; }
.flash {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.flash.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}
a { color: var(--mcd-red); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef0f3; }
th { color: #6b7280; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
.actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.actions form { display: inline; }
.btn-small {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d0d3da;
  background: #fff;
  color: #1f2430;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-small:hover { background: #f4f5f7; }
.btn-danger {
  background: var(--mcd-red);
  color: #fff;
  border-color: var(--mcd-red);
  font-weight: 700;
}
.btn-danger:hover { background: var(--mcd-red-dark); border-color: var(--mcd-red-dark); }
.btn-primary {
  background: #15803d;
  color: #fff;
  border-color: #15803d;
  font-weight: 600;
}
.btn-primary:hover { background: #116430; border-color: #116430; }
.btn-edit {
  background: #000;
  color: #fff;
  border-color: #000;
  font-weight: 700;
}
.btn-edit:hover { background: #262626; border-color: #262626; }
.btn-suspend {
  background: #ff4d00;
  color: #fff;
  border-color: #ff4d00;
  font-weight: 700;
}
.btn-suspend:hover { background: #cc3d00; border-color: #cc3d00; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--mcd-red); }
.sort-arrow { font-size: 9px; margin-left: 3px; color: var(--mcd-red); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge.ok { background: #ecfdf5; color: #065f46; }
.badge.warn { background: #fef2f2; color: #991b1b; }
.top-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.progress-track { background: #eef0f3; border-radius: 999px; height: 6px; width: 100px; overflow: hidden; }
.progress-fill { background: var(--mcd-gold); height: 100%; }
.progress-fill.warn { background: var(--mcd-red); }
.report-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.report-card {
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  background: #fafafa;
}
.report-card.warn { border-color: #fecaca; background: #fef2f2; }
.report-card-num { font-size: 28px; font-weight: 800; color: #1f2430; }
.report-card.warn .report-card-num { color: var(--mcd-red); }
.report-card-label { font-size: 12px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin-top: 4px; }

@media print {
  .brandbar, .topnav, .top-actions { display: none; }
  body { background: #fff; }
  .wrap { box-shadow: none; padding: 0; margin: 0; max-width: 100%; }
  .report-card, table { break-inside: avoid; }
}
