/* Legend brand stylesheet — Black + Orange, Source Sans Pro.
   Per Legend Brand Guidelines: Legend Black #262324, Legend Orange #FD4F00,
   Legend Gray #4B5054. Source Sans Pro (Arial fallback). The three-bar "E"
   mark + "Legend <Service>" lockup per the Service Branding page. */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg: #161314; --panel: #201c1d; --panel2: #2a2526; --line: #393233;
  --text: #f4f1ef; --muted: #9c9491; --accent: #FD4F00; --accent2: #ff7d3c;
  --black: #262324; --gray: #4B5054;
  --ok: #6cc04a; --warn: #f0a93c; --bad: #e5484d;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(1200px 600px at 50% -10%, #2a2122, var(--bg));
  color: var(--text);
  font-family: "Source Sans 3", "Source Sans Pro", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}
h1, h2, h3 { font-weight: 300; letter-spacing: .2px; }

.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--black); }

/* Brand lockup: three orange bars + "Legend <Service>" */
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.legend-mark { display: inline-flex; flex-direction: column; gap: 3px; width: 26px; }
.legend-mark i { display: block; height: 4px; border-radius: 1px; background: var(--accent); }
.legend-word { font-weight: 300; letter-spacing: .32em; color: var(--accent); text-transform: uppercase; }
.legend-svc { font-weight: 600; color: var(--text); }
.brand .mark { color: var(--accent); }
.brand .muted, .muted { color: var(--muted); }
.staff-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.staff-link:hover { color: var(--accent); }

.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.hero h1 { font-size: 32px; margin: 18px 0 6px; }
.hero .sub { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 16px 0; }
.identify label { display: block; font-size: 14px; margin-bottom: 8px; }
.identify input { width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-size: 15px; }
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.gauge { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 10px; text-align: center; }
.g-val { font-size: 34px; font-weight: 700; color: var(--accent); min-height: 40px; }
.g-lbl { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.3; }
.run-row { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.btn-primary { background: var(--accent);
  color: #1a1011; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 26px;
  font-size: 16px; cursor: pointer; transition: background .15s; }
.btn-primary:hover { background: var(--accent2); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.phase { color: var(--muted); font-size: 14px; }
.bar { height: 6px; background: var(--panel2); border-radius: 6px; margin-top: 14px; overflow: hidden; }
.barfill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }
.result .verdict { font-size: 20px; font-weight: 600; padding: 10px 0; }
.verdict.ok { color: var(--ok); } .verdict.warn { color: var(--warn); } .verdict.bad { color: var(--bad); }
.compliance { color: var(--text); margin-bottom: 12px; font-size: 16px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
.metrics .m { background: var(--panel2); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.metrics .m span { display: block; color: var(--muted); margin-bottom: 4px; }
.diagnosis { border-top: 1px solid var(--line); padding-top: 14px; }
.d-bottleneck { display: flex; justify-content: space-between; align-items: center; }
.d-bottleneck span { color: var(--muted); }
.d-action { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.d-action.ok { background: rgba(108,192,74,.14); color: var(--ok); }
.d-action.warn { background: rgba(240,169,60,.14); color: var(--warn); }
.d-action.bad { background: rgba(229,72,77,.14); color: var(--bad); }
.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 24px; }
.hidden { display: none; }

/* Staff / console */
.staff-wrap { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; }
.login-card { max-width: 380px; margin: 60px auto; }
.login-card input { width: 100%; padding: 12px 14px; margin-bottom: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); }
.search-row { display: flex; gap: 12px; margin-bottom: 18px; }
.search-row input { flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
tr.clickable:hover { background: var(--panel2); cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv span { color: var(--muted); }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: rgba(108,192,74,.16); color: var(--ok); }
.pill.warn { background: rgba(240,169,60,.16); color: var(--warn); }
.pill.bad { background: rgba(229,72,77,.16); color: var(--bad); }
.err { color: var(--bad); font-size: 14px; }
@media (max-width: 620px) { .gauges { grid-template-columns: repeat(2, 1fr); } .grid2 { grid-template-columns: 1fr; } .metrics { grid-template-columns: repeat(2,1fr);} }
