/*
  OpsSutra launchpad. The accent colour is set from config.json at runtime, so
  the palette follows branding/<realm>.yaml like the login page does.
*/

:root {
  --ops-accent: #0F5F5B;
  --ops-ink: #14181C;
  --ops-ink-soft: #55606A;
  --ops-muted: #7A848C;
  --ops-page: #F4F2EE;
  --ops-card: #FFFFFF;
  --ops-line: #E2E6E4;
  --ops-tint: #E7F0EF;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ops-ink);
  background: var(--ops-page);
}

[hidden] { display: none !important; }

a { color: var(--ops-accent); }

/* --- loading and failure ------------------------------------------------ */

.ops-loading,
.ops-failure {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--ops-ink);
  color: #E4E9EC;
}

.ops-loading__text { font-size: 15px; }

.ops-failure__card {
  max-width: 460px;
  padding: 32px;
  background: var(--ops-card);
  border-radius: 18px;
  color: var(--ops-ink);
  text-align: center;
}

.ops-failure__title {
  margin: 0 0 10px;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 24px;
}

.ops-failure__text { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--ops-ink-soft); }

.ops-failure__retry {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--ops-accent);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}

/* --- app shell ---------------------------------------------------------- */

.ops-app { min-height: 100vh; display: flex; flex-direction: column; }

.ops-bar {
  min-height: 68px;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--ops-ink);
}

.ops-bar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.ops-bar__logo { height: 30px; width: auto; color: var(--ops-accent); }

.ops-bar__wordmark {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 600;
  color: #FFFFFF;
}

.ops-bar__env {
  margin-left: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(244, 242, 238, 0.28);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #C8D0D6;
}

.ops-bar__user { display: flex; align-items: center; gap: 14px; }

.ops-avatar {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ops-accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
}

.ops-bar__identity { display: flex; flex-direction: column; }
.ops-bar__name { font-size: 13.5px; font-weight: 500; color: #FFFFFF; }
.ops-bar__persona { font-size: 12px; color: #AEB8C0; }

.ops-bar__signout {
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  color: #E4E9EC;
  background: transparent;
  border: 1px solid rgba(244, 242, 238, 0.28);
  border-radius: 9px;
  cursor: pointer;
}

.ops-bar__signout:hover { background: rgba(244, 242, 238, 0.08); }

/* --- main --------------------------------------------------------------- */

.ops-main {
  flex-grow: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 40px 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.ops-intro { display: flex; flex-direction: column; gap: 8px; }

.ops-intro__title {
  margin: 0;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 600;
}

.ops-intro__sub { margin: 0; font-size: 15px; color: var(--ops-ink-soft); }

.ops-tiles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.ops-tile {
  height: 100%;
  min-height: 216px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  background: var(--ops-card);
  border: 1px solid var(--ops-line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
}

.ops-tile:hover { border-color: var(--ops-accent); }

.ops-tile:focus-visible {
  outline: 2px solid var(--ops-accent);
  outline-offset: 2px;
}

.ops-tile__icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--ops-tint);
  color: var(--ops-accent);
}

.ops-tile__icon svg { width: 23px; height: 23px; }

.ops-tile__text { display: flex; flex-direction: column; gap: 6px; }
.ops-tile__name { font-size: 17px; font-weight: 600; }
.ops-tile__blurb { font-size: 13.5px; line-height: 1.5; color: var(--ops-ink-soft); }
.ops-tile__host { margin-top: 4px; font-size: 12.5px; color: var(--ops-muted); }

/* --- phase 2 ------------------------------------------------------------ */

.ops-phase2 {
  padding: 24px;
  background: var(--ops-card);
  border: 1px dashed #C9D2D6;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ops-phase2__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.ops-phase2__title { margin: 0; font-size: 17px; font-weight: 600; }

.ops-chip {
  padding: 5px 11px;
  background: #F0EDE6;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6B6255;
}

.ops-phase2__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ops-skeleton {
  height: 92px;
  padding: 16px;
  background: #F7F8F8;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ops-skeleton__bar { width: 132px; height: 11px; background: #E2E6E4; border-radius: 4px; }
.ops-skeleton__bar--short { width: 88px; background: #ECEFEE; }
.ops-skeleton__label { margin-top: auto; font-size: 12px; color: #8A939A; }
.ops-phase2__note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ops-ink-soft); }

/* --- footer -------------------------------------------------------------- */

.ops-foot {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ops-ink-soft);
}

.ops-foot strong { color: #2C343B; }
.ops-foot__links { display: flex; align-items: center; gap: 14px; }
.ops-foot__dot { color: #B9C2C9; }
.ops-foot a { text-decoration: none; }
.ops-foot a:hover { text-decoration: underline; }

/* --- small screens -------------------------------------------------------- */

@media (max-width: 1080px) {
  .ops-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-phase2__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ops-bar { padding: 12px 20px; }
  .ops-main { padding: 28px 20px 0; }
  .ops-foot { padding: 20px; }
  .ops-tiles { grid-template-columns: 1fr; }
  .ops-tile { min-height: 0; }
  .ops-intro__title { font-size: 26px; }
}
