/* AssetCool Corey palette; fonts and logo are served from this application. */
/* Preload branded fonts, but keep visible fallback text stable on a slow connection. */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: optional;
}
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/OpenSans.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: optional;
}
:root {
  color-scheme: dark;
  font-family: "Open Sans", system-ui, sans-serif;
  font-size: 15px;
  --background: #001620;
  --panel: #071f2a;
  --border: #14485f;
  --text: #eaf6ff;
  --muted: #a9c4d3;
  --teal: #10a0c0;
  --cyan: #20b0d0;
  --sidebar-width: 264px;
  color: var(--text);
  background: var(--background);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 800px at 20% -10%, #10a0c01f, transparent 55%),
    linear-gradient(180deg, #0020408c, #00162040), var(--background);
}
h1, h2, h3 { line-height: 1.25; }
h1, h2, h3, button, .button, .brand { font-family: "Montserrat", system-ui, sans-serif; }
a { color: #80d6e7; text-underline-offset: .2em; }
button, .button {
  display: inline-block;
  border: 1px solid var(--teal);
  border-radius: 12px;
  padding: .8rem 1rem;
  background: #003040;
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: #07465a; border-color: var(--cyan); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #ffcc66;
  outline-offset: 3px;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 2; background: var(--panel); padding: 1rem; }
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 30px 19px;
  overflow-y: auto;
  background: #001620d9;
  border-right: 1px solid #0d2f3f;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .2px;
}
.brand-logo { display: block; width: 162px; height: 162px; object-fit: contain; flex: 0 0 162px; }
.brand .cool { color: #23b7cf; }
.brand small { font-size: 12px; font-weight: 400; margin-top: 4px; }
.nav-label { margin: 36px 12px 14px; font-size: 11px; letter-spacing: 1.7px; color: var(--muted); }
.nav { display: block; padding: 14px 12px; border-radius: 12px; text-decoration: none; font-size: 14px; }
.nav.active { background: #10a0c01f; border-left: 3px solid var(--teal); color: var(--text); }
.sidebar-note { margin-top: 3rem; color: var(--muted); font-size: 12px; text-align: center; }
main { margin-left: var(--sidebar-width); padding: 26px 30px 40px; max-width: 1700px; min-width: 0; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; }
.environment { padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 12px; background: #10a0c014; color: #80d6e7; font-size: 13px; white-space: nowrap; }
.page-content { min-width: 0; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -.6px; margin: 30px 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 20px; margin: 0 0 1rem; }
h3 { font-size: 16px; }
p { line-height: 1.65; max-width: 65rem; }
small { display: block; margin-top: .5rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.6; }
.subtitle { color: var(--muted); margin: 0 0 26px; }
code { overflow-wrap: anywhere; }
form { margin: 1rem 0; }
label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
input:not([type=hidden]), select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff08;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
input::placeholder { color: var(--muted); }
select option { background: var(--panel); color: var(--text); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; }
.panel { min-width: 0; background: linear-gradient(180deg, #071f2aeb, #061a23e6); border: 1px solid var(--border); border-radius: 14px; padding: 23px; box-shadow: 0 10px 30px #00000026; }
.panel p:first-of-type { margin-top: 0; }
.summary { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.summary form { margin-bottom: 0; }
.summary button { width: 100%; margin-top: .5rem; }
.summary small { font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 1rem .6rem; border-bottom: 1px solid #0d2f3f; overflow-wrap: anywhere; }
th { color: var(--muted); font-size: 12px; font-weight: 600; background: #000c144d; }
table[aria-label="Deployment operations"] { min-width: 48rem; }
.operation-status { display: block; font-weight: 600; }
.operation-progress { min-width: 15rem; max-width: 25rem; margin-top: .7rem; padding-left: .7rem; border-left: 3px solid var(--teal); line-height: 1.6; }
.operation-progress small { font-size: 12px; }
.progress-stale { color: #ffcc66; }
.phase-history, .phase-plan { margin-top: .8rem; max-width: 25rem; line-height: 1.6; }
.phase-history summary, .phase-plan summary { cursor: pointer; color: #80d6e7; }
.phase-history summary:focus-visible, .phase-plan summary:focus-visible { outline: 3px solid #ffcc66; outline-offset: 3px; }
.phase-history ol, .phase-plan ul { padding-left: 1.3rem; margin: .6rem 0; }
.phase-history li, .phase-plan li { margin: .4rem 0; }
.phase-history small, .phase-plan small { font-size: 12px; }
.access { display: inline-block; font-size: 12px; padding: .35rem .5rem; border-radius: 8px; color: #7de1ab; background: #35d07f1a; }
.recipe { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 22px; }
.recipe strong { overflow-wrap: anywhere; }
.history { margin-top: 26px; }
.history ul { padding-left: 1.3rem; }
.history li { margin: .8rem 0; line-height: 1.6; overflow-wrap: anywhere; }
@media (min-width: 851px) and (max-width: 1150px) {
  :root { --sidebar-width: 212px; }
  main { padding-inline: 20px; }
  .brand { font-size: 20px; }
  .brand-logo { width: 117px; height: 117px; flex-basis: 117px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 280px; gap: 15px; }
  .panel { padding: 18px; }
}
@media (max-width: 850px) {
  .sidebar { position: static; width: 100%; padding: 18px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { flex-direction: row; justify-content: center; text-align: left; font-size: 23px; }
  .brand-logo { width: 162px; height: 162px; flex-basis: 162px; }
  .nav-label, .sidebar-note { display: none; }
  .nav { margin-top: 14px; text-align: center; }
  main { margin-left: 0; padding: 22px 18px; }
  .page-header { flex-wrap: wrap; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; max-height: none; overflow: visible; }
  .panel { padding: 18px; }
  h1 { font-size: 28px; }
  th, td { padding-inline: .35rem; }
}

.update-spinner, .operation-spinner { display: inline-block; width: .85em; height: .85em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; margin-inline: .4em; vertical-align: middle; visibility: hidden; }
#job-update[aria-busy="true"] .update-spinner, tr[data-status="running"] .operation-spinner { visibility: visible; animation: job-spin .8s linear infinite; }
#job-update { min-height: 1.6em; color: var(--muted, #a0becb); }
[hidden] { display: none !important; }
@keyframes job-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .update-spinner, .operation-spinner { animation: none !important; } }

/* Account identity is request-bound; group details clarify scoped permissions. */
.page-header { flex-wrap: wrap; }
.header-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 1rem; min-width: 0; max-width: 100%; }
.operator-account { display: flex; flex-direction: column; gap: .2rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); min-width: 0; max-width: 34rem; overflow-wrap: anywhere; }
.account-label { font-size: .8rem; color: var(--muted); }
.account-name { font-size: 1rem; }
.account-email { font-size: .9rem; color: var(--muted); }
.account-role { color: #80d6e7; font-weight: 600; }
.account-scopes { margin-top: .3rem; font-size: .85rem; }
.account-scopes summary { cursor: pointer; color: var(--muted); }
.account-scopes summary:focus-visible { outline: 3px solid #ffcc66; outline-offset: 3px; }
.account-scopes p { margin: .5rem 0; }
.account-scopes ul { margin: .5rem 0 0; padding-left: 1.2rem; }
@media (max-width: 850px) {
  .header-tools { width: 100%; justify-content: flex-start; }
  .operator-account { width: 100%; max-width: none; }
}

/* Bounded inventory cards keep long exact object identities readable on narrow screens. */
.software-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 1rem; margin-block: 1rem; }
.software-cards .panel { min-width: 0; overflow-wrap: anywhere; }
.software-version dl { margin: 1rem 0; }
.software-version dt { color: var(--muted); margin-top: .7rem; }
.software-version dd { margin-left: 0; overflow-wrap: anywhere; }
.software-form { display: grid; gap: 1rem; max-width: 46rem; margin-block: 1rem; }
.software-form label { display: grid; gap: .35rem; min-width: 0; }
.software-form input, .software-form select { width: 100%; min-width: 0; }
.software-form input[type="checkbox"] { width: auto; justify-self: start; }

/* Bundle controls retain the shared operator shell on desktop and narrow screens. */
.software-form fieldset { display: grid; gap: 1rem; min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.software-form legend { font-weight: 600; padding-inline: .4rem; }
.software-cards pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.software-cards dl dd { margin-left: 0; overflow-wrap: anywhere; }

/* Deployment journey: distinct actions, grouped fields and touch-sized controls. */
.primary { background: #10a0c0; color: #001620; border-color: #20b0d0; }
.primary:hover { background: #54c8df; color: #001620; }
.workflow-steps { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 1rem 1rem 1rem 2.5rem; border-block: 1px solid var(--border); margin-top: 2rem; }
.workflow-steps li { padding: .3rem; color: var(--muted); }
.workflow-steps [aria-current] { color: var(--text); font-weight: 700; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem; }
.workflow-link { display: inline-flex; align-items: center; min-height: 44px; }
.scope-switcher { max-width: 28rem; margin-bottom: 2rem; }
.approval-panel { margin-block: 1.5rem 2rem; border: 2px solid var(--teal); }
.approval-panel .software-form { margin-top: 1.25rem; }
.workflow-error { padding: 1rem; border: 1px solid #ffcc66; border-radius: 12px; margin-block: 1rem; }
.software-form button, .software-form input:not([type="hidden"]), .software-form select, .button { min-height: 44px; }
.software-form > label + input, .software-form > label + select { margin-top: -.5rem; }
.software-form [data-schedule-fields] { display: grid; gap: 1rem; }
.software-form [data-schedule-fields] p { margin: 0; color: var(--muted); }
.page-content > .panel, .page-content > details { margin-block: 1.5rem; }
.page-content > details > summary { min-height: 44px; padding-block: .75rem; cursor: pointer; }
.page-content > h2 { margin-top: 2rem; }
.page-content > section pre { white-space: pre-wrap; overflow-wrap: anywhere; }

.software-form textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 18rem; font: .875rem/1.5 monospace; resize: vertical; }

.sidebar > .brand, .sidebar > nav, .sidebar > .sidebar-note { flex-shrink: 0; }
.sidebar .operator-account { margin-top: auto; flex-shrink: 0; width: 100%; max-width: none; padding: .75rem; }
.sidebar .account-scopes summary { min-height: 44px; display: flex; align-items: center; }
@media (max-width: 850px) {
  .sidebar .operator-account { margin-top: 1rem; }
}

.software-profile { min-width: 0; overflow-wrap: anywhere; }

.software-profile > details > summary { min-height: 44px; padding-block: .75rem; cursor: pointer; }
.software-profile .profile-navigation { display: grid; gap: .75rem; margin-block: 1rem; }
.software-profile .profile-navigation a { display: flex; align-items: center; min-height: 44px; padding-block: .5rem; }

/* Equal-height software cards keep variable descriptions above their actions. */
.software-cards > .panel { display: flex; flex-direction: column; padding: 1.25rem; }
.software-cards > .panel > .software-form:last-child { margin-top: auto; margin-bottom: 0; padding-top: 1rem; }
.software-cards > .panel > p:last-child:has(.button) { margin-top: auto; margin-bottom: 0; padding-top: 1rem; }
.profile-save-error { border: 2px solid #ffc266; background: #3b2c1d; color: #fff4df; border-radius: .75rem; padding: 1rem; margin-block: 1rem; scroll-margin-block: 1rem; }
.profile-save-error h3 { margin-top: 0; }
.profile-save-error:focus { outline: 3px solid #ffd995; outline-offset: 3px; }
.workflow-notice { border: 2px solid #53c6a3; padding: 1rem; border-radius: .75rem; margin-block: 1rem; }

.deployment-outcome, .component-outcome { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; margin-block: .8rem; }
.deployment-outcome strong { font-size: 1.25rem; }
.component-outcome > span { display: block; margin-top: .5rem; }
.deployment-outcome.success, .component-outcome.success { border-color: #4ed59b; color: #8cf0bc; }
.deployment-outcome.failure, .component-outcome.failure { border-color: #ff6b78; color: #ffa4ab; }
.deployment-outcome.uncertain, .component-outcome.uncertain { border-color: #ffc66b; color: #ffda9a; }

.bot-checklist { display:flex; flex-wrap:wrap; gap:.75rem 1.25rem; margin:1rem 0; max-height:20rem; overflow:auto; align-content:flex-start; }
.bot-checklist label { display:flex; align-items:center; gap:.4rem; overflow-wrap:anywhere; }
.bot-checklist input { width:auto; }
[data-selection-message] { overflow-wrap:anywhere; }

.identity-profile { overflow-wrap:anywhere; margin:.75rem 0; }

.active-jobs { list-style:none; padding:0; }
.active-jobs > li { padding:1rem 0; border-bottom:1px solid var(--border); }
