/* ============================================================
   MWC OS — launcher shell.
   One visual system across the four platforms, each keeping its own accent.
   ============================================================ */
:root {
  --ink: #0f1520;
  --ink-2: #1b2433;
  --surface: #ffffff;
  --line: #e3e8ef;
  --text: #16202e;
  --text-2: #5a6779;
  --muted: #8b98aa;
  --accent: #b91c1c;
  --radius: 14px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: #f4f6fa;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #1e2b3f 0%, var(--ink) 55%);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: var(--radius); padding: 34px 30px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .mark {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 15px;
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
  display: grid; place-items: center; color: #fff; font-size: 26px;
  box-shadow: 0 8px 20px rgba(185,28,28,.32);
}
.login-brand h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.login-brand p { margin: 5px 0 0; font-size: 13px; color: var(--text-2); }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 6px; color: var(--text-2); }
.field input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 14px; font-family: inherit; background: #fbfcfe;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.btn {
  width: 100%; padding: 12px; border: none; border-radius: 9px; cursor: pointer;
  font-size: 14.5px; font-weight: 650; font-family: inherit;
  background: var(--accent); color: #fff;
}
.btn:hover:not(:disabled) { background: #a11818; }
.btn:disabled { opacity: .6; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.alert {
  display: none; margin-bottom: 14px; padding: 10px 13px; border-radius: 9px;
  font-size: 13px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
}
.alert.show { display: block; }

/* ---------- Launcher ---------- */
.topbar {
  height: 62px; background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 16px; padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #b91c1c, #7f1d1d); font-size: 15px;
}
.topbar .title { font-weight: 700; letter-spacing: -.015em; font-size: 15.5px; }
.topbar .spacer { flex: 1; }

.os-search { position: relative; flex: 0 1 420px; }
.os-search input {
  width: 100%; padding: 9px 13px 9px 34px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08);
  color: #fff; font-size: 13.5px; font-family: inherit;
}
.os-search input::placeholder { color: rgba(255,255,255,.5); }
.os-search input:focus { outline: none; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.13); }
.os-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.5); font-size: 12.5px; }

.who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.who .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #334155;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
}
.linkbtn {
  background: none; border: none; color: rgba(255,255,255,.72); cursor: pointer;
  font-size: 12.5px; font-family: inherit; padding: 6px 8px; border-radius: 6px;
}
.linkbtn:hover { color: #fff; background: rgba(255,255,255,.1); }

.shell { max-width: 1120px; margin: 0 auto; padding: 34px 22px 70px; }
.greeting h2 { margin: 0 0 4px; font-size: 25px; letter-spacing: -.022em; }
.greeting p { margin: 0 0 26px; color: var(--text-2); font-size: 14px; }

/* Platform tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,21,32,.10); }
.tile-head {
  padding: 20px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.tile-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile-icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-size: 21px; flex-shrink: 0;
}
.tile-name { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.tile-tag { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.tile-role {
  display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 4px; background: #eef2f7; color: var(--text-2);
}
.tile-tools { border-top: 1px solid var(--line); padding: 9px; display: flex; flex-direction: column; gap: 2px; }
.tool {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 8px;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  font-size: 13px; font-family: inherit; color: var(--text);
}
.tool:hover { background: #f2f5f9; }
.tool:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tool i { width: 17px; text-align: center; font-size: 12.5px; }
.tool .t-tag { color: var(--muted); font-size: 11.5px; margin-left: auto; }

.empty {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 44px 26px; text-align: center; color: var(--text-2);
}

/* Search results */
.results { margin-top: 22px; }
.result-group {
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 15px; margin-bottom: 9px;
}
.result-name { font-weight: 650; font-size: 14.5px; }
.result-meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.appearances { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.appearance {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); background: #f8fafc;
}
.appearance:hover { border-color: var(--muted); }
.appearance .dot { width: 7px; height: 7px; border-radius: 50%; }
.mirror-note {
  font-size: 11.5px; color: #b45309; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 6px; padding: 4px 8px; margin-top: 8px; display: inline-block;
}

@media (max-width: 720px) {
  .os-search { display: none; }
  .shell { padding: 24px 16px 50px; }
  .tiles { grid-template-columns: 1fr; }
}
