/* The host directory and authentication pages own this stylesheet. Hosted app frames do not. */
.aech-host-dashboard {
  color-scheme: light;
  --directory-bg: #fafafa;
  --directory-panel: #ffffff;
  --directory-text: #1d2528;
  --directory-muted: #677173;
  --directory-border: #e1e5e5;
  --directory-accent: #0f7f77;
  margin: 0;
  min-height: 100dvh;
  background: var(--directory-bg);
  color: var(--directory-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.aech-host-dashboard * { box-sizing: border-box; }
.aech-host-dashboard > main {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 48px 40px 40px;
}
.dashboard-heading h1 { margin: 0; font-size: 36px; line-height: 1.15; letter-spacing: -1.1px; font-weight: 650; }
.dashboard-heading p { margin: 12px 0 0; color: var(--directory-muted); font-size: 16px; line-height: 1.5; }
.dashboard-toolbar { display: flex; align-items: center; gap: 16px; padding: 30px 0 20px; margin-bottom: 24px; border-bottom: 1px solid var(--directory-border); }
.dashboard-search { display: flex; align-items: center; gap: 12px; width: min(380px, 100%); min-width: 0; padding: 0 14px; background: white; border: 1px solid #cbd1cd; border-radius: 6px; }
.dashboard-search svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--directory-muted); stroke-width: 1.5; }
.dashboard-search input { width: 100%; min-width: 0; height: 46px; border: 0; outline: 0; padding: 0; background: transparent; color: var(--directory-text); font: inherit; font-size: 15px; }
.dashboard-search:focus-within { outline: 2px solid var(--directory-accent); outline-offset: 2px; }
.dashboard-count { margin: 0 0 0 auto; color: var(--directory-muted); font-size: 14px; white-space: nowrap; }
/* The directory is the agents a person can use: each row is an agent, its Pages, and its apps. */
.agent-list { display: grid; gap: 12px; }
.agent-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "mark head pages" ". apps apps"; align-items: center; gap: 0 16px; padding: 18px 20px; border: 1px solid var(--directory-border); border-radius: 10px; background: var(--directory-panel); }
.agent-mark { grid-area: mark; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.agent-mark.tone-0 { background: #e1f5ee; color: #085041; }
.agent-mark.tone-1 { background: #eeedfe; color: #3c3489; }
.agent-mark.tone-2 { background: #faece7; color: #712b13; }
.agent-mark.tone-3 { background: #fbeaf0; color: #72243e; }
.agent-mark.tone-4 { background: #e6f1fb; color: #0c447c; }
.agent-mark.tone-5 { background: #faeeda; color: #633806; }
.agent-row-head { grid-area: head; min-width: 0; }
.agent-row h2 { margin: 0; color: var(--directory-text); font-size: 18px; line-height: 1.3; font-weight: 620; letter-spacing: -.25px; overflow-wrap: anywhere; }
.agent-row-summary { margin: 3px 0 0; color: var(--directory-muted); font-size: 13px; line-height: 1.4; }
.agent-pages { grid-area: pages; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid #cbd1cd; border-radius: 8px; background: white; color: var(--directory-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.agent-row-latest { display: block; margin: 3px 0 0; color: var(--directory-muted); font-size: 13px; line-height: 1.4; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-row-latest:hover { color: var(--directory-accent); text-decoration: underline; }
.agent-pages-new { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: #e1f5ee; color: #085041; font-size: 11.5px; font-weight: 650; }
.agent-pages:hover { border-color: color-mix(in srgb, var(--directory-accent) 45%, white); color: var(--directory-accent); }
.agent-pages svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.agent-apps { grid-area: apps; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.agent-app { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 6px; border-radius: 8px; background: #f2f3ef; color: var(--directory-text); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.agent-app:hover { background: color-mix(in srgb, var(--directory-accent) 9%, white); color: var(--directory-accent); }
.agent-app-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: white; color: var(--directory-muted); font-size: 10px; font-weight: 650; }
.dashboard-footnote { margin: 34px 0 0; color: var(--directory-muted); font-size: 12px; line-height: 1.5; text-align: center; }
.dashboard-empty { padding: 40px 0; max-width: 540px; }
.dashboard-empty h2,
.dashboard-loading h2 { margin: 0 0 10px; font-size: 20px; font-weight: 600; line-height: 1.35; }
.dashboard-empty p,
.dashboard-loading p { margin: 0; color: var(--directory-muted); font-size: 15px; line-height: 1.5; }
.dashboard-loading { margin: 32px 0 24px; }
.dashboard-loading h2 { font-size: 17px; }
.dashboard-skeleton { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-height: 96px; padding: 24px; background: var(--directory-panel); border: 1px solid var(--directory-border); border-radius: 8px; }
.dashboard-skeleton span { display: block; width: 75%; height: 14px; background: #eeefea; border-radius: 3px; }
.dashboard-skeleton span:first-child { width: 46px; height: 46px; margin-bottom: 6px; border-radius: 8px; }
.dashboard-skeleton span:last-child { width: 45%; }
.dashboard-secondary { min-height: 44px; margin-top: 20px; padding: 10px 16px; border: 1px solid var(--directory-border); border-radius: 6px; background: white; color: var(--directory-accent); font: inherit; font-size: 14px; cursor: pointer; }
.dashboard-secondary:disabled { cursor: wait; opacity: .6; }
.dashboard-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.aech-host-dashboard [hidden] { display: none !important; }
.aech-host-dashboard :focus-visible { outline: 2px solid var(--directory-accent); outline-offset: 3px; }
.ms-icon { display: grid; width: 20px; height: 20px; grid-template-columns: repeat(2, 1fr); gap: 2px; flex: none; }
.ms-icon span:nth-child(1) { background: #f25022; }
.ms-icon span:nth-child(2) { background: #7fba00; }
.ms-icon span:nth-child(3) { background: #00a4ef; }
.ms-icon span:nth-child(4) { background: #ffb900; }
@media (max-width: 900px) {
  .aech-host-dashboard > main { padding: 36px 24px; }
}
@media (max-width: 600px) {
  .aech-host-dashboard > main { padding: 28px 20px 32px; }
  .dashboard-heading h1 { font-size: 30px; letter-spacing: -.8px; }
  .dashboard-heading p { font-size: 14px; margin-top: 9px; }
  .dashboard-toolbar { flex-wrap: wrap; gap: 14px; padding: 22px 0 16px; margin-bottom: 0; }
  .dashboard-search { width: 100%; }
  .dashboard-search input { font-size: 16px; }
  .dashboard-count { font-size: 12px; }
  .agent-row { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "mark head" "pages pages" "apps apps"; padding: 16px; }
  .agent-mark { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
  .agent-pages { margin-top: 14px; }
  .dashboard-footnote { text-align: left; margin-top: 28px; }
  .dashboard-skeletons { gap: 12px; }
  .dashboard-skeleton { min-height: 106px; }
}

/* Sign-in pages look like Harness Manager's: the brand above one centred card on a soft wash with a
   faint glow of the instance's primary colour, Powered by Agent Aech below. Light, as Harness
   Manager's sign-in and the rest of the App Host are. */
.aech-host-signin {
  color-scheme: light;
  --signin-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --signin-bg: #f7f8f8;
  --signin-wash: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(247, 248, 248, .96));
  --signin-glow: 12%;
  --signin-card: rgba(255, 255, 255, .96);
  --signin-card-border: rgba(228, 228, 231, .8);
  --signin-card-shadow: 0 24px 70px -42px rgba(24, 24, 27, .42);
  --signin-title: #09090b;
  --signin-text: #52525b;
  --signin-label: #27272a;
  --signin-help: #71717a;
  --signin-rule: #e4e4e7;
  --signin-or: #a1a1aa;
  --signin-input-border: #d4d4d8;
  --signin-input-bg: #ffffff;
  --signin-button: #24292f;
  --signin-button-hover: #1f2328;
  --signin-button-text: #ffffff;
  --signin-outline-border: #dfddd5;
  --signin-outline-bg: #f6f5f2;
  --signin-outline-hover: #ebe9e3;
  --signin-outline-text: #18181b;
  --signin-ok-bg: #f0fdfa;
  --signin-ok-text: #134e4a;
  --signin-bad-bg: #fef2f2;
  --signin-bad-text: #7f1d1d;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  margin: 0;
  padding: 40px 16px;
  overflow-x: hidden;
  background: var(--signin-bg);
  color: var(--signin-title);
  font-family: var(--signin-body, var(--signin-sans));
  -webkit-font-smoothing: antialiased;
}
.aech-host-signin::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: var(--signin-wash), radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--signin-primary, #16171b) var(--signin-glow), transparent), transparent 34%);
}
.aech-host-signin * { box-sizing: border-box; }
.aech-host-signin [hidden] { display: none !important; }
.aech-host-signin :focus-visible { outline: 2px solid var(--signin-primary, #16171b); outline-offset: 3px; }
.signin-shell { position: relative; width: 100%; max-width: 420px; }
.signin-brand { display: flex; justify-content: center; margin-bottom: 28px; }
.signin-mark { display: block; width: auto; height: auto; max-width: 252px; max-height: 160px; object-fit: contain; }
.signin-mark-name { font-family: var(--signin-heading, var(--signin-sans)); font-size: 36px; font-weight: 700; }
.signin-card {
  padding: 32px;
  border: 1px solid var(--signin-card-border);
  border-radius: 28px;
  background: var(--signin-card);
  box-shadow: var(--signin-card-shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  text-align: center;
}
.signin-eyebrow { margin: 0 0 8px; color: var(--signin-help); font-size: 13px; font-weight: 500; line-height: 20px; }
.signin-card h1 {
  margin: 0;
  color: var(--signin-title);
  font-family: var(--signin-heading, var(--signin-sans));
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.signin-intro { margin: 12px 0 0; color: var(--signin-text); font-size: 14px; line-height: 24px; }
.signin-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 48px;
  margin-top: 32px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--signin-button);
  color: var(--signin-button-text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 34px -24px rgba(24, 24, 27, .82);
  transition: background-color .3s ease-out;
}
.signin-microsoft:hover { background: var(--signin-button-hover); }
.signin-microsoft:active { transform: translateY(1px); }
.signin-or { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--signin-or); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.signin-or::before,
.signin-or::after { content: ""; flex: 1; height: 1px; background: var(--signin-rule); }
.aech-host-signin form.dashboard-email-form,
.aech-host-signin form.email-panel { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.aech-host-signin label { display: block; color: var(--signin-label); font-size: 14px; font-weight: 500; line-height: 20px; }
.aech-host-signin input:not([type="hidden"]) {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--signin-input-border);
  border-radius: 12px;
  background: var(--signin-input-bg);
  color: var(--signin-title);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.aech-host-signin input:not([type="hidden"])::placeholder { color: #9ca3af; }
.aech-host-signin input:not([type="hidden"]):focus { border-color: var(--signin-primary, #16171b); box-shadow: 0 0 0 2px color-mix(in srgb, var(--signin-primary, #16171b) 20%, transparent); }
.aech-host-signin form button:not(.signin-microsoft) {
  width: 100%;
  height: 48px;
  border: 1px solid var(--signin-outline-border);
  border-radius: 12px;
  background: var(--signin-outline-bg);
  color: var(--signin-outline-text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.aech-host-signin form button:not(.signin-microsoft):hover { background: var(--signin-outline-hover); }
.aech-host-signin .dashboard-email-help { margin: 0; color: var(--signin-help); font-size: 12px; line-height: 18px; }
.aech-host-signin .dashboard-notice,
.aech-host-signin .dashboard-error { margin: 16px 0 0; padding: 12px 16px; border: 0; border-radius: 12px; text-align: left; font-size: 14px; line-height: 20px; }
.aech-host-signin .dashboard-notice { background: var(--signin-ok-bg); color: var(--signin-ok-text); }
.aech-host-signin .dashboard-error { background: var(--signin-bad-bg); color: var(--signin-bad-text); }
.signin-foot { display: flex; justify-content: center; margin-top: 24px; }
.signin-powered { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: fit-content; color: var(--signin-title); opacity: .8; text-decoration: none; transition: opacity .2s; }
.signin-powered:hover { opacity: 1; }
.signin-powered span { font-size: 10px; line-height: 1; white-space: nowrap; }
.signin-powered img { display: block; width: 112px; height: auto; }
@media (max-width: 480px) {
  .signin-card { padding: 28px 24px; border-radius: 24px; }
}
