/*
 * Admin pages, part B: VDAB (Vdab/*), the reseller company pages (Company/*), the Nubos company
 * admin (Admin/*), the failed messages (FailedMessages/*) and the login page (layout/login.twig).
 */

/* ---------- VDAB ---------- */
.vdab-ok, .vdab-fail { display: inline-flex; }
.vdab-ok svg, .vdab-fail svg { width: 16px; height: 16px; stroke-width: 2.25; }
.vdab-ok { color: var(--heading); }
.vdab-fail { color: var(--nubos-danger); }
.dark .vdab-fail { color: var(--danger-text); }
/* The VDAB report is one or more lines with <br> between them, straight from their XML. */
.vdab-report { font-size: 12.5px; }
.vdab-pager { padding: 16px; border-top: 1px solid var(--line); }
/* Was an inline style in Vdab/modal_result.twig. */
.link { cursor: pointer !important; }

/* The competence search (Vdab/search.twig): the lists are filled by its script. */
.searchbar { display: flex; align-items: stretch; gap: 8px; }
.searchbar .input { flex: 1 1 auto; min-width: 0; }
#competences ul, #activities ul {
    list-style-type: none;
    margin: 16px 0 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    overflow: hidden;
}
#competences ul:empty, #activities ul:empty { display: none; }
#competences li, #activities li {
    display: flex;
    gap: 20px;
    padding: 9px 15px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--fg-2);
}
#competences li:last-child, #activities li:last-child { border-bottom: 0; }
#competences li div:first-child, #activities li div:first-child { font-family: 'JetBrains Mono', monospace; color: var(--fg-1); }
#competences li { cursor: pointer; }
#competences li:hover { background: var(--surface-2); }

/* ---------- Reseller company form (Company/create.twig) ---------- */
/* Shown by saveCompany() through its inline display when the API refuses the company. */
.company-errors { display: none; }
.company-errors h4 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--fg-1); }
.company-errors ul {
    list-style-type: none;
    margin: 0;
    padding: 10px 14px 10px 18px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--nubos-danger);
    background: var(--danger-wash);
}
.company-errors li { color: var(--danger-text); font-size: 13px; }

/* ---------- Company admin (Admin/*) ---------- */
.admin-search { position: relative; }
.admin-search > svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.admin-search .input { padding-left: 36px; min-width: 14rem; }

/* A module switch with its name and a line under it. */
.module-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.module-row:last-child { margin-bottom: 0; }
.module-row .switch { margin-top: 1px; }
.module-row > label:last-child { font-size: 13.5px; color: var(--fg-1); cursor: pointer; }
.module-row strong { font-weight: 600; }
.module-row .hint { display: block; margin-top: 2px; }

/* The access token field with its show/hide button on the right. */
.input-group .input:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .token-toggle { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; padding: 0 14px; }

/* ---------- Failed messages ---------- */
.failed-pre {
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--fg-1);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
/* The global code chip style is for inline code, not for a whole block. */
.failed-pre code { background: none; color: inherit; padding: 0; border-radius: 0; font-size: inherit; }
.failed-pre-error { color: var(--danger-text); background: var(--danger-wash); }
/* The payload script shows these two with display: inline-block; keep them laid out as buttons. */
#saveBtn:not([style*="none"]), #cancelBtn:not([style*="none"]) { display: inline-flex !important; }

/* The outcome of a requeue, save or delete, written by showAlert(). */
.failed-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    margin-bottom: 16px;
    border-radius: var(--radius-md, 10px);
    background: var(--accent-soft);
    color: var(--fg-1);
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid var(--accent);
}
.failed-alert.tone-danger { background: var(--danger-wash); border-left-color: var(--nubos-danger); }
.failed-alert > span { flex: 1 1 auto; min-width: 0; }
.failed-alert-close { background: none; border: 0; padding: 0 4px; font-size: 18px; line-height: 1; color: var(--fg-3); cursor: pointer; }

/* ---------- Login (layout/login.twig, security/login.twig) ---------- */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .login-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.login-side { display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; background: var(--card); }
@media (min-width: 640px) { .login-side { padding: 48px 64px; } }
@media (min-width: 1024px) { .login-side { padding: 48px 96px; } }
.login-box { width: 100%; max-width: 380px; margin: 0 auto; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; }
.login-brand img { height: 32px; }
.login-brand-name { font-size: 16px; font-weight: 700; color: var(--fg-1); line-height: 1; }
.login-brand-by { font-size: 11px; font-weight: 500; color: var(--heading); letter-spacing: .04em; }
.login-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg-1); margin: 0 0 6px; }
.login-lead { font-size: 14px; color: var(--fg-2); margin: 0 0 28px; }
.login-oidc { width: 100%; padding: 13px; gap: 10px; }
.login-oidc img { height: 18px; }
/* On the green button the N reads dark, like the button text. */
.login-oidc img { filter: brightness(0); opacity: .85; }
.login-password { margin-top: 24px; }
.login-password > summary { cursor: pointer; font-size: 13px; color: var(--fg-2); }
.login-password > summary:hover { color: var(--fg-1); }
.login-foot { margin: 32px 0 0; font-size: 12.5px; color: var(--fg-3); }
.login-foot a { color: var(--heading); font-weight: 500; }

.login-panel { display: none; position: relative; overflow: hidden; padding: 64px; background: var(--nubos-navy, #091A2E); }
@media (min-width: 1024px) { .login-panel { display: flex; flex-direction: column; justify-content: space-between; } }
.login-orb { position: absolute; border-radius: 999px; }
.login-orb-top { width: 520px; height: 520px; background: rgba(0, 246, 184, .06); right: -160px; top: -120px; }
.login-orb-bottom { width: 320px; height: 320px; background: rgba(0, 246, 184, .05); left: -100px; bottom: -80px; }
.login-panel-logo { position: relative; height: 30px; width: auto; align-self: flex-start; }
.login-panel-body { position: relative; }
.login-panel-eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--nubos-green); margin-bottom: 20px; }
.login-panel-title { font-size: 42px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: #fff; margin: 0; max-width: 460px; }
.login-panel-text { font-size: 16px; color: #C8D3E0; margin: 20px 0 0; max-width: 420px; line-height: 1.55; }
.login-panel-foot { position: relative; font-size: 12.5px; color: #7E93AC; }
