@import './theme.css';

/* The Newfield team portal (NFTP-CCR-001).
 *
 * Layout from the ILM Team Portal launcher (contractor-portal CCR-009: an
 * intro, a track rule, one tile per tool, "Open →"); colours, logo and the red
 * rule under blue from the Newfield tools' own header (the drawing tool and the
 * Job Start Dashboard share theme.css, copied here unchanged). No literal
 * colour below except --logo-ground, which is sampled from the logo PNG, as in
 * the tools.
 */
:root {
  --bg: var(--stone-20);
  --card: white;
  --border: var(--stone);
  --text: var(--anthracite);
  --muted: color-mix(in srgb, var(--anthracite) 70%, white);
  --on-dark: white;
  --on-dark-soft: color-mix(in srgb, white 80%, var(--blue));
  --logo-ground: #163259;   /* the logo asset's baked-in background; see the tools' styles.css */

  --font: 'Bio Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --width: 1120px;
  --gutter: 24px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: 100%; max-width: calc(var(--width) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Header: the tools' header, so moving from the portal into a tool looks continuous. */
.site-header { background: var(--logo-ground); color: var(--on-dark); border-bottom: 4px solid var(--red); }
.site-header .wrap { min-height: 56px; display: flex; align-items: center; gap: 16px; }
.site-header .logo { height: 26px; width: auto; display: block; }
.site-header .spacer { flex: 1; }
.site-header .who { color: var(--on-dark-soft); font-size: 13px; }
.site-header .signout { margin: 0; }
.site-header .signout button {
  background: none; border: 1px solid color-mix(in srgb, white 35%, transparent); color: var(--on-dark);
  font: inherit; font-size: 13px; padding: 4px 12px; border-radius: var(--radius); cursor: pointer;
}
.site-header .product {
  padding-left: 16px; border-left: 1px solid color-mix(in srgb, white 28%, transparent);
  color: var(--on-dark-soft); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}

/* Launcher */
.launcher { flex: 1; padding-top: 64px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 36px; }
.intro { display: flex; flex-direction: column; gap: 10px; padding-bottom: 28px; border-bottom: 2px solid var(--blue); }
.eyebrow { margin: 0; color: var(--red); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.intro h1 { margin: 0; color: var(--blue); font-size: 44px; line-height: 1.1; font-weight: 600; }
.lead { margin: 0; color: var(--muted); font-size: 17px; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.tiles li { display: flex; }
.tiles li[hidden] { display: none; }
.tile {
  flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 28px;
  background: var(--card); color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-top: 4px solid var(--blue); border-radius: var(--radius);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tile:hover, .tile:focus-visible {
  border-top-color: var(--red); transform: translateY(-2px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--blue) 12%, transparent);
}
.tile:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--blue-20); border-radius: var(--radius); }
.icon svg { width: 30px; height: 30px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.text { display: flex; flex-direction: column; gap: 6px; }
.name { color: var(--blue); font-size: 22px; font-weight: 600; line-height: 1.3; }
.desc { color: var(--muted); }
.foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--stone-40);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--anthracite-40); }
.tile[data-state='up'] .dot { background: var(--cyan); }
.tile[data-state='down'] .dot { background: var(--red); }
.tile[data-state='holding'] .dot { background: var(--yellow); }
.tile[data-tool='admin'] { border-top-color: var(--red); }
.tile[data-tool='admin'] .dot { background: var(--blue); }
.open { color: var(--red); font-weight: 700; }

/* The holding page a tool's name shows until that tool is on the server. */
.holding { flex: 1; padding-top: 64px; padding-bottom: 80px; }
.holding .card { max-width: 640px; padding: 32px; background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--yellow); }
.holding h1 { margin: 0 0 12px; color: var(--blue); font-size: 28px; }
.holding p { margin: 0 0 12px; }
.holding a { color: var(--red); font-weight: 700; }

.site-footer { border-top: 1px solid var(--border); background: var(--card); color: var(--muted); font-size: 13px; }
.site-footer .wrap { min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }

@media (max-width: 600px) {
  .launcher { padding-top: 40px; }
  .intro h1 { font-size: 34px; }
  .site-header .spacer { flex: 1; }
.site-header .who { color: var(--on-dark-soft); font-size: 13px; }
.site-header .signout { margin: 0; }
.site-header .signout button {
  background: none; border: 1px solid color-mix(in srgb, white 35%, transparent); color: var(--on-dark);
  font: inherit; font-size: 13px; padding: 4px 12px; border-radius: var(--radius); cursor: pointer;
}
.site-header .product { display: none; }
}
