/* EAPRO One - public dashboard
   Theme from eapro.in: black header, yellow accent, light grey canvas, Open Sans. */
:root {
  --black: #000000;
  --ink: #141414;
  --yellow: #FFC300;
  --yellow-dark: #D3A100;
  --yellow-soft: #FFF6D6;
  --bg: #F7F7F7;
  --surface: #FFFFFF;
  --text: #212529;
  --text-2: #5C5F62;
  --text-3: #8A8D90;
  --border: #E2E2E2;
  --up: #13A10E;
  --slow: #F7A400;
  --down: #D13438;
  --radius: 8px;
  --shadow: 0 2px 6px rgba(0,0,0,.08), 0 0 1px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.topbar :focus-visible { outline-color: var(--yellow); }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 60px;
  background: var(--black);
  color: #fff;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border-bottom: 3px solid var(--yellow);
}
.topbar-left { display: flex; align-items: center; min-width: 0; height: 100%; padding-left: 4px; }
.icon-btn {
  width: 52px; height: 57px;
  display: inline-grid; place-items: center;
  background: transparent; border: 0; cursor: pointer; color: #fff;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: rgba(255,255,255,.12); color: var(--yellow); }
.brand { display: flex; align-items: flex-start; gap: 8px; padding: 0 6px 0 10px; text-decoration: none; }
.icon-btn + .brand { padding-left: 4px; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-one {
  font-size: 25px; font-weight: 700; line-height: 1;
  color: var(--yellow); letter-spacing: .01em;
  margin-top: 7px;
}
.tagline {
  margin-left: 14px; padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.3);
  font-size: 13px; color: rgba(255,255,255,.8); white-space: nowrap;
}
.search-wrap { display: flex; justify-content: center; padding: 0 16px; min-width: 0; }
.search {
  width: 100%; max-width: 400px; height: 36px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--text-2);
  border-radius: 18px; padding: 0 14px;
  border: 2px solid transparent;
}
.search:focus-within { border-color: var(--yellow); }
.search svg.i { width: 17px; height: 17px; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search kbd {
  font: 600 11px/1 inherit; color: var(--text-3);
  border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px;
}
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; padding-right: 6px; }
.net-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 14px; margin-right: 6px;
  background: transparent; border: 1px solid rgba(255,195,0,.6);
  border-radius: 16px; color: #fff; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.net-pill:hover { background: rgba(255,195,0,.14); }
.net-pill svg.i { width: 16px; height: 16px; color: var(--yellow); }

/* ---------- Flyouts ---------- */
.flyout {
  position: absolute; z-index: 40;
  background: var(--surface); color: var(--text);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-lg);
  width: 320px; padding: 16px;
  border-top: 3px solid var(--yellow);
}
.flyout h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.flyout p { margin: 0 0 8px; color: var(--text-2); }
.flyout ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.flyout li { margin-bottom: 6px; }
#recentFlyout { top: 57px; left: 0; }
#helpFlyout { top: 57px; right: 8px; }
.recent-list { display: grid; gap: 2px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: 6px; text-decoration: none;
}
.recent-item:hover { background: var(--bg); }
.recent-item .app-icon { width: 34px; height: 34px; border-radius: 7px; }
.recent-item .app-icon svg.i { width: 18px; height: 18px; }
.recent-item small { display: block; color: var(--text-3); font-size: 12px; }

/* ---------- Tabs ---------- */
.tabs-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none;
  height: 48px; padding: 0 14px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-2); font-size: 14.5px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--black); }
.tab:hover::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; background: var(--border); }
.tab[aria-selected="true"] { color: var(--black); font-weight: 700; }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--yellow);
}
.tab svg.i { width: 16px; height: 16px; }

/* ---------- Content ---------- */
main { flex: 1; padding: 22px 0 44px; }
.announce {
  display: flex; align-items: center; gap: 12px;
  background: var(--yellow-soft); border-left: 4px solid var(--yellow);
  border-radius: 6px; padding: 10px 8px 10px 14px; margin-bottom: 12px;
  color: var(--text);
}
.announce:last-of-type { margin-bottom: 22px; }
.announce .msg { flex: 1; }
.announce a { color: var(--black); font-weight: 700; text-decoration: underline; text-decoration-color: var(--yellow-dark); text-underline-offset: 3px; }
.announce a:hover { text-decoration-thickness: 2px; }
.announce .close { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; border-radius: 4px; display: grid; place-items: center; color: var(--text-2); }
.announce .close:hover { background: rgba(0,0,0,.06); }
.announce .close svg.i { width: 16px; height: 16px; }

.result-line { margin: 0 0 12px 4px; color: var(--text-2); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.tile {
  --ring: var(--bg);
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 10px 16px;
  border-radius: var(--radius);
  text-decoration: none; text-align: center;
  transition: background .12s, box-shadow .12s, transform .12s;
}
.tile::after {
  content: ""; position: absolute; left: 30%; right: 30%; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--yellow);
  opacity: 0; transition: opacity .12s, left .15s, right .15s;
}
.tile:hover, .tile:focus-within { --ring: var(--surface); background: var(--surface); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile:hover::after, .tile:focus-within::after { opacity: 1; left: 18%; right: 18%; }
.tile-link { position: absolute; inset: 0; border-radius: var(--radius); z-index: 1; }
.app-icon {
  position: relative;
  width: 64px; height: 64px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--yellow);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.app-icon svg.i { width: 30px; height: 30px; stroke-width: 1.8; }
.tile.is-maintenance .app-icon { opacity: .7; }
.dot {
  position: absolute; right: -4px; bottom: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  box-shadow: 0 0 0 2.5px var(--ring);
}
.dot.up { background: var(--up); }
.dot.slow { background: var(--slow); }
.dot.down { background: var(--down); }
.tile-name {
  font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-badges { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; min-height: 18px; margin-top: -4px; }
.badge {
  font-size: 10.5px; line-height: 18px; padding: 0 8px; border-radius: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.badge.beta { background: #E9E9E9; color: #3A3A3A; }
.badge.new { background: var(--yellow); color: var(--black); }
.badge.maint { background: #FFE3CC; color: #8A4300; }
.fav-btn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--text-3);
  opacity: 0; transition: opacity .12s;
}
.fav-btn svg.i { width: 18px; height: 18px; }
.fav-btn:hover { background: var(--bg); color: var(--black); }
.tile:hover .fav-btn, .tile:focus-within .fav-btn, .fav-btn:focus-visible { opacity: 1; }
.fav-btn[aria-pressed="true"] { opacity: 1; color: var(--yellow-dark); }
.fav-btn[aria-pressed="true"] svg.i { fill: var(--yellow); }

.empty {
  grid-column: 1 / -1;
  text-align: center; color: var(--text-2);
  padding: 56px 16px;
}
.empty svg.i { width: 40px; height: 40px; color: var(--yellow-dark); margin-bottom: 8px; }
.empty strong { display: block; color: var(--text); font-size: 16px; font-weight: 700; margin-bottom: 4px; }

/* ---------- Message pages (/go, errors) ---------- */
.message-card {
  max-width: 520px; margin: 40px auto; padding: 36px 32px 30px;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow);
  text-align: center; border-top: 4px solid var(--yellow);
}
.message-card.tone-warning { border-top-color: #F7A400; }
.message-card.tone-error { border-top-color: var(--down); }
.message-card .app-icon { margin: 0 auto 16px; }
.message-card .status-code { font-size: 52px; font-weight: 700; line-height: 1; color: var(--yellow-dark); margin-bottom: 8px; }
.message-card h1 { font-size: 20px; margin: 0 0 10px; }
.message-card p { color: var(--text-2); margin: 0 0 24px; font-size: 15px; line-height: 1.55; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 20px;
  font-weight: 700; text-decoration: none; border: 2px solid var(--black); cursor: pointer;
}
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--black); }
.btn-primary:hover { background: #FFCF33; }
.btn-secondary { background: transparent; color: var(--black); }
.btn-secondary:hover { background: var(--black); color: #fff; }

footer {
  background: var(--black); color: rgba(255,255,255,.7);
  padding: 14px 0; font-size: 12px;
}
footer .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
footer strong { color: #fff; }
footer .accent { color: var(--yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .tagline { display: none; }
}
@media (max-width: 640px) {
  .topbar { height: auto; grid-template-columns: 1fr auto; }
  .topbar-left { height: 56px; }
  .icon-btn { height: 56px; width: 46px; }
  .brand-logo { height: 34px; }
  .brand-one { font-size: 21px; margin-top: 6px; }
  .search-wrap { grid-column: 1 / -1; grid-row: 2; padding: 0 14px 12px; }
  .search-wrap:empty { display: none; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .net-label { display: none; }
  .net-pill { padding: 0 9px; margin-right: 2px; }
  #recentFlyout, #helpFlyout { top: 56px; left: 8px; right: 8px; width: auto; border-radius: var(--radius); }
  .container { padding: 0 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
  .tile { padding: 16px 6px 12px; }
  .app-icon { width: 56px; height: 56px; border-radius: 11px; }
  .app-icon svg.i { width: 26px; height: 26px; }
  .tile-name { font-size: 12.5px; }
  .fav-btn { opacity: 1; }
  .message-card { margin: 20px 0; padding: 28px 20px 24px; }
}
