/* WF Support technician console. Tokens and components follow wfsecurity.cloud:
   dark surfaces, the WF yellow accent and self-hosted IBM Plex (SIL OFL 1.1). */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"); }

/* --- Tokens ------------------------------------------------------------ */
:root {
    --wfs-yellow: #e5c738;
    --wfs-gold: #f4d03f;
    --wfs-ok: #00cc88;
    --wfs-danger: #ff3366;

    --bg-base: #0a0a0a;
    --bg-deep: #050505;
    --bg-surface: #141414;
    --bg-raised: #1a1a1a;
    --bg-overlay: rgba(10, 10, 10, 0.92);

    --text: #ffffff;
    --text-muted: #b8bcc8;
    --text-dim: #8a8a8a;
    --text-on-accent: #0a0a0a;

    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --line-accent: rgba(229, 199, 56, 0.38);
    --accent-wash: rgba(229, 199, 56, 0.06);
    --accent-wash-2: rgba(229, 199, 56, 0.12);
    --ok-wash: rgba(0, 204, 136, 0.10);
    --danger-wash: rgba(255, 51, 102, 0.10);

    --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;

    --fs-h1: clamp(1.95rem, 1.35rem + 2.4vw, 2.75rem);
    --fs-h2: 1.25rem;
    --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
    --fs-sm: 0.9375rem;
    --fs-xs: 0.8125rem;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-pill: 999px;
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);

    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --header-h: 68px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-muted);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--text); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); }
p { text-wrap: pretty; }
strong { color: var(--text); font-weight: 600; }
a { color: var(--wfs-yellow); text-underline-offset: 0.2em; transition: color 0.15s var(--ease); }
a:hover { color: var(--wfs-gold); }
svg { display: block; flex: none; }
button, input { font: inherit; color: inherit; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }

:focus-visible { outline: 2px solid var(--wfs-yellow); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--wfs-yellow); color: var(--text-on-accent); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
    position: absolute;
    top: 0;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    transform: translateY(-120%);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    background: var(--wfs-yellow);
    color: var(--text-on-accent);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--text-on-accent); }

/* --- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    background: transparent;
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--wfs-yellow); color: var(--text-on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--wfs-gold); color: var(--text-on-accent); }
.btn--secondary { border-color: var(--line-strong); color: var(--text); }
.btn--secondary:hover:not(:disabled) { border-color: var(--wfs-yellow); color: var(--wfs-yellow); }
.btn--danger { border-color: rgba(255, 51, 102, 0.4); color: #ff5c85; }
.btn--danger:hover:not(:disabled) { border-color: var(--wfs-danger); background: var(--danger-wash); color: #ff7a9b; }
.btn--ghost { padding-inline: 0.75rem; color: var(--text-muted); }
.btn--ghost:hover:not(:disabled) { color: var(--text); }
.btn--sm { padding: 0.5rem 1rem; font-size: var(--fs-xs); }
.btn--lg { padding: 0.9375rem 1.875rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn:disabled, .btn:disabled:hover { border-color: var(--line); background: transparent; color: rgba(255, 255, 255, 0.28); cursor: not-allowed; }

/* --- Header ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-overlay);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; color: var(--wfs-yellow); }
.brand__name { font-size: 1.0625rem; }
.brand__name span, .wordmark span { color: var(--wfs-yellow); }

.account { display: flex; align-items: center; gap: 1rem; font-size: var(--fs-xs); color: var(--text-dim); }
.account form { margin: 0; }
.account__email { overflow: hidden; max-width: 32ch; text-overflow: ellipsis; white-space: nowrap; }

/* --- Page head --------------------------------------------------------- */
.page-head {
    position: relative;
    padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse 70% 60% at 50% -10%, rgba(229, 199, 56, 0.10), transparent 70%),
        linear-gradient(180deg, var(--bg-deep), var(--bg-base));
}
.page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.page-head__text { max-width: 720px; }
.page-head__lead { margin-top: 1rem; font-size: var(--fs-lead); }
.page-head h1 { margin-top: 1.25rem; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0.35rem 0.6rem;
    border: 1px solid var(--line-accent);
    border-radius: var(--r-pill);
    background: var(--accent-wash);
    color: var(--wfs-yellow);
    font-size: var(--fs-xs);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.4;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wfs-ok); flex: none; }

/* --- Facts ------------------------------------------------------------- */
.factlist {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: clamp(2rem, 4vw, 2.75rem) 0 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--line);
}
.fact { margin: 0; padding: 1.25rem 1.5rem; background: var(--bg-surface); }
.fact dt { font-size: var(--fs-xs); color: var(--text-dim); }
.fact dd { margin: 0.25rem 0 0; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; color: var(--wfs-yellow); }
.fact--quiet dd { color: var(--text); }

/* --- Directory --------------------------------------------------------- */
.directory { display: grid; gap: 1.25rem; padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }

.card { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-lg); }

.customer-form { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(200px, 320px) auto; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; }
.customer-form__text h2 { font-size: 1.0625rem; }
.customer-form__text p { font-size: var(--fs-xs); color: var(--text-dim); }

.customer { overflow: hidden; }
.customer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 1.5rem; }
.customer__title { display: flex; align-items: center; gap: 0.875rem; min-width: 0; }
.customer__title h2 { overflow-wrap: anywhere; }
.customer__icon, .icon-chip {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    background: var(--accent-wash-2);
    color: var(--wfs-yellow);
    flex: none;
}
.customer__icon svg, .icon-chip svg { width: 20px; height: 20px; }
.customer__meta { display: block; margin-top: 0.125rem; font-size: var(--fs-xs); color: var(--text-dim); }
.customer__empty { padding: 1.125rem 1.5rem 1.375rem; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-dim); }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; font-size: var(--fs-sm); text-align: left; }
.table th:nth-child(1) { width: 26%; }
.table th:nth-child(2) { width: 18%; }
.table th:nth-child(3) { width: 20%; }
.table th:nth-child(4) { width: 36%; }
.table th, .table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 1.5rem; }
.table thead th { background: var(--bg-raised); color: var(--text-dim); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color 0.15s var(--ease); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.device__name { display: block; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.device__meta { display: block; margin-top: 0.125rem; font-size: var(--fs-xs); color: var(--text-dim); }
.seen { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.seen--none { font-family: var(--font-sans); color: var(--text-dim); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* --- Badges ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    color: var(--text-dim);
    font-size: var(--fs-xs);
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}
.badge .dot { background: currentColor; }
.badge--ok { border-color: rgba(0, 204, 136, 0.35); background: var(--ok-wash); color: var(--wfs-ok); }
.badge--accent { border-color: var(--line-accent); background: var(--accent-wash-2); color: var(--wfs-yellow); }
.badge--danger { border-color: rgba(255, 51, 102, 0.38); background: var(--danger-wash); color: #ff5c85; }
.badge--accent .dot { animation: pulse 1.6s var(--ease) infinite; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 199, 56, 0.55); }
    60% { box-shadow: 0 0 0 5px rgba(229, 199, 56, 0); }
}

/* --- Forms ------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.125rem; }
.field { display: grid; gap: 0.5rem; }
.field label, .label { color: var(--text-muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.input {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--bg-base);
    color: var(--text);
    font-size: var(--fs-sm);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input::placeholder { color: var(--text-dim); }
.input:hover { border-color: rgba(255, 255, 255, 0.24); }
.input:focus { border-color: var(--wfs-yellow); outline: none; box-shadow: 0 0 0 3px var(--accent-wash-2); }
.input--code { font-family: var(--font-mono); letter-spacing: 0.32em; }

/* --- Notices ----------------------------------------------------------- */
.notice {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--wfs-yellow);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    background: var(--bg-surface);
    color: var(--text);
    font-size: var(--fs-sm);
}
.notice.error { border-left-color: var(--wfs-danger); background: linear-gradient(90deg, var(--danger-wash), transparent 70%), var(--bg-surface); }
#notice { scroll-margin-top: calc(var(--header-h) + 1rem); }
#notice:empty { display: none; }

.empty { padding: clamp(2rem, 5vw, 3.25rem); text-align: center; }
.empty .icon-chip { margin: 0 auto 1.25rem; width: 48px; height: 48px; }
.empty p { max-width: 52ch; margin: 0.75rem auto 0; font-size: var(--fs-sm); }

.footnote { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-dim); }
.footnote svg { width: 14px; height: 14px; color: var(--wfs-yellow); }
.footnote .mono { color: var(--text-muted); }

.site-footer { padding-block: 1.75rem; border-top: 1px solid var(--line); background: var(--bg-deep); font-size: var(--fs-xs); color: var(--text-dim); }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* --- Sign-in and error pages ------------------------------------------ */
.auth {
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    background:
        radial-gradient(ellipse 60% 45% at 50% 0%, rgba(229, 199, 56, 0.09), transparent 70%),
        radial-gradient(ellipse 80% 60% at 50% 110%, rgba(229, 199, 56, 0.04), transparent 70%),
        var(--bg-deep);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: clamp(1.75rem, 5vw, 2.5rem);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(229, 199, 56, 0.05);
}
.auth-card__brand { display: grid; justify-items: center; gap: 0.75rem; margin-bottom: 1.75rem; text-align: center; }
.auth-card__brand .brand__mark { width: 52px; height: 52px; }
.wordmark { color: var(--text); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.wordmark__by { margin-top: 0.25rem; color: var(--text-dim); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.auth-card h1 { font-size: 1.625rem; text-align: center; }
.auth-card__lead { margin: 0.5rem 0 1.75rem; text-align: center; font-size: var(--fs-sm); }
.auth-card .notice { margin-bottom: 1.25rem; }
.auth-card .btn--block { margin-top: 0.5rem; }
.auth-card__note { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-dim); text-align: center; }
.auth-card__note svg { width: 14px; height: 14px; color: var(--wfs-yellow); }

.error-code { font-family: var(--font-mono); font-size: 3.25rem; font-weight: 500; line-height: 1; letter-spacing: -0.03em; color: var(--wfs-yellow); text-align: center; }
.error-card h1 { margin-top: 1rem; }
.error-card .auth-card__lead { margin-bottom: 1.5rem; }

/* --- Installation links and unassigned computers ------------------------ */
.install-link { display: grid; gap: 0.75rem; padding: 1.125rem 1.5rem 1.375rem; border-top: 1px solid var(--line); background: var(--accent-wash); }
.install-link p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.install-link__row { display: flex; gap: 0.5rem; }
.install-link__row .input { flex: 1; color: var(--wfs-yellow); font-family: var(--font-mono); }
.unassigned { border-color: var(--line-accent); }
.pairing { color: var(--wfs-yellow); font-size: 1rem; letter-spacing: 0.12em; white-space: nowrap; }
.input--sm { width: auto; min-width: 11rem; padding: 0.4rem 0.6rem; }
.install-card h1 { margin-top: 0.25rem; }
.install-card .auth-card__lead { margin-bottom: 0.5rem; font-size: var(--fs-lead); }

/* --- Small screens ----------------------------------------------------- */
@media (max-width: 860px) {
    .factlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-form { grid-template-columns: auto minmax(0, 1fr); }
    .customer-form .input { grid-column: 1 / -1; }
    .customer-form .btn { grid-column: 1 / -1; justify-self: start; }
}
/* Each computer becomes its own block; the column names move into the cells. */
@media (max-width: 760px) {
    .table { min-width: 0; table-layout: auto; }
    .table thead { display: none; }
    .table tbody, .table tr, .table td { display: block; }
    .table tr { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
    .table tbody tr:last-child { border-bottom: 0; }
    .table td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: 0.75rem; padding: 0.375rem 0; border: 0; }
    .table td::before { content: attr(data-label); color: var(--text-dim); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
    .table td:first-child { display: block; padding-bottom: 0.625rem; }
    .table td:first-child::before { content: none; }
    .table td:last-child { grid-template-columns: 1fr; }
    .table td:last-child::before { content: none; }
}
@media (max-width: 620px) {
    .account__email { display: none; }
    .page-head__row { align-items: flex-start; }
    .customer__head { padding: 1.125rem 1.25rem; }
    .customer__head .btn { width: 100%; }
    .fact { padding: 1rem 1.125rem; }
    .fact dd { font-size: 1.35rem; }
}
