@charset "UTF-8";

/*
 * WebADM WebApps - Techno Theme (dark)
 *
 * All colors and metrics are exposed as CSS variables below, so a theme can be
 * re-branded from the WebADM 'custom_css' setting by overriding :root values only.
 * Base form elements are declared inside :where() (zero specificity) so that any
 * application stylesheet (wwwcss) always takes precedence over the theme.
 * The theme is application agnostic: it only styles the markup produced by the
 * frameworks (render_frm, webapp_frm, widget_frm) and generic HTML elements.
 * Metrics are the same as the modern theme, only colors and decorations differ.
 * Action icons keep their colors on a backlit dark plate; the monochrome application icons of
 * the portal are shown as light silhouettes.
 */

:root {
        color-scheme: dark;

        /* typography */
        --wa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
        --wa-font-title: montserrat, var(--wa-font);
        --wa-font-size: 13px;
        --wa-line-height: 1.55;

        /* surfaces (the background image can be replaced from custom_css, or set to none) */
        --wa-bg: #060a13;
        --wa-bg-image: url('images/background.svg?v=2');
        --wa-surface: #0d1422;
        --wa-surface-2: #121b2d;
        --wa-surface-3: #172238;
        --wa-border: #1c2638;
        --wa-border-strong: #2a3850;
        --wa-border-hover: #3d5170;

        /* text */
        --wa-text: #e6edf7;
        --wa-text-2: #b4c0d3;
        --wa-muted: #8593ab;

        /* brand & states */
        --wa-primary: #22d3ee;
        --wa-primary-hover: #67e8f9;
        --wa-primary-soft: color-mix(in srgb, var(--wa-primary) 12%, transparent);
        --wa-accent: #fb923c;
        --wa-accent-hover: #fdba74;
        --wa-success: #34d399;
        --wa-success-hover: #6ee7b7;
        --wa-success-soft: color-mix(in srgb, var(--wa-success) 12%, transparent);
        --wa-danger: #f87171;
        --wa-danger-hover: #fca5a5;
        --wa-danger-soft: color-mix(in srgb, var(--wa-danger) 12%, transparent);
        --wa-warning: #fbbf24;
        --wa-warning-hover: #fcd34d;
        --wa-warning-soft: color-mix(in srgb, var(--wa-warning) 12%, transparent);
        --wa-switch-on: var(--wa-primary);

        /* form fields (webapp_field sizes) */
        --wa-field-width: 200px;
        --wa-field-short: 100px;
        --wa-field-wide: 300px;

        /* shapes */
        --wa-radius: 6px;
        --wa-radius-lg: 10px;
        --wa-ring: 0 0 0 3px color-mix(in srgb, var(--wa-primary) 22%, transparent), 0 0 14px -2px color-mix(in srgb, var(--wa-primary) 45%, transparent);
        --wa-focus: 0 0 0 2px var(--wa-surface), 0 0 0 4px var(--wa-primary), 0 0 14px 2px color-mix(in srgb, var(--wa-primary) 35%, transparent);
        --wa-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
        --wa-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 24px 60px -18px rgba(0, 0, 0, 0.85);

        /* theme-private */
        --tc-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
        --tc-violet: #a78bfa;
        --tc-field: #080e1a;
        --tc-on-color: #04121a;
        --tc-knob: #8193ad;
        --tc-track: #1a2437;
        --tc-popup: #111a2c;
        --tc-plate: radial-gradient(circle at 50% 42%, #34455f, #151f32 62%);
        --tc-plate-edge: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 22%, transparent);
        --tc-edge: color-mix(in srgb, var(--wa-primary) 16%, var(--wa-border));
        --tc-glow: 0 0 18px -3px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}

/* ---------------------------------------------------------------- reset */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
        margin: 0;
        padding: 0;
        border: 0;
        font-family: inherit;
        font-size: inherit;
}
* {
        box-sizing: border-box;
}

/* ------------------------------------------------------------ utilities */

.red { color: var(--wa-danger); }
.blue { color: var(--wa-primary); }
.grey { color: var(--wa-muted); }
.green { color: var(--wa-success); }
.b { font-weight: 600; }
.big { font-size: 14px; }
.center { text-align: center; }
.nobr { white-space: nowrap; }

font[color="red"] { color: var(--wa-danger); }
font[color="green"] { color: var(--wa-success); }
font[color="blue"] { color: var(--wa-primary); }

/* --------------------------------------------------------- base elements */

html {
        scrollbar-color: var(--wa-border-strong) var(--wa-bg);
}
html, body {
        font-family: var(--wa-font);
        color: var(--wa-text-2);
        height: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
}
body.boxed {
        background-color: var(--wa-bg);
        line-height: var(--wa-line-height);
        font-size: var(--wa-font-size);
}
/* the background image is painted on a fixed layer behind the page instead of with
   'background-attachment: fixed', which Safari composites unreliably (the page background
   intermittently turns black, e.g. after switching tabs) */
body.boxed::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: var(--wa-bg) var(--wa-bg-image) center / cover no-repeat;
        pointer-events: none;
}
body.fullpage {
        background-color: var(--wa-surface);
        line-height: var(--wa-line-height);
        font-size: var(--wa-font-size);
}
::selection {
        color: var(--wa-text);
        background: color-mix(in srgb, var(--wa-primary) 35%, transparent);
}

th, td {
        vertical-align: middle;
        padding: 2px;
}
p {
        text-align: left;
}
ul, ol {
        padding: 5px;
        margin-left: 10px;
}
ul li, ol li {
        padding: 2px;
        margin-left: 10px;
}
small {
        font-size: 11px;
}
big {
        font-size: 14px;
}
:where(hr) {
        border: 0;
        border-top: 1px solid var(--wa-border);
}
a {
        text-decoration: none;
        color: var(--wa-primary);
        transition: color 0.15s;
}
a:hover, a:active, a:focus {
        color: var(--wa-primary-hover);
        text-decoration: underline;
}
a:focus-visible {
        outline: 2px solid var(--wa-primary);
        outline-offset: 2px;
        border-radius: 3px;
}

/* ----------------------------------------------------------- form inputs */

:where(input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
       input[type="number"], input[type="search"], input[type="url"], input[type="date"],
       input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea) {
        font-family: inherit;
        font-size: var(--wa-font-size);
        font-weight: normal;
        line-height: 1.35;
        color: var(--wa-text);
        caret-color: var(--wa-primary);
        min-height: 34px;
        padding: 7px 10px;
        margin: 2px 0;
        vertical-align: middle;
        background-color: var(--tc-field);
        border: 1px solid var(--wa-border-strong);
        border-radius: var(--wa-radius);
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
        outline: none;
        transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
:where(input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
       input[type="number"], input[type="search"], input[type="url"], input[type="date"],
       input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea):hover {
        border-color: var(--wa-border-hover);
}
:where(input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
       input[type="number"], input[type="search"], input[type="url"], input[type="date"],
       input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea):focus {
        outline: 2px solid transparent;
        border-color: var(--wa-primary);
        box-shadow: var(--wa-ring);
}
:where(input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
       input[type="number"], input[type="search"], input[type="url"], input[type="date"],
       input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea):disabled {
        color: var(--wa-muted);
        background-color: var(--wa-surface-2);
        border-color: var(--wa-border);
        box-shadow: none;
        cursor: not-allowed;
}
:where(input[readonly], textarea[readonly]) {
        background-color: var(--wa-surface-2);
}
::placeholder {
        color: #71819b;
        opacity: 1;
}
:where(textarea) {
        resize: vertical;
        min-height: 72px;
}

:where(select) {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
        padding-right: 32px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="%2394a3b8" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 8l4 4 4-4"/></svg>');
        background-repeat: no-repeat;
        background-position: right 9px center;
        background-size: 16px;
}
:where(select[multiple], select[size]:not([size="1"])) {
        padding-right: 10px;
        background-image: none;
}

:where(input[type="file"]) {
        font-family: inherit;
        font-size: var(--wa-font-size);
        color: var(--wa-text-2);
}
:where(input[type="file"])::file-selector-button {
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        color: var(--wa-text);
        margin-right: 10px;
        padding: 6px 12px;
        cursor: pointer;
        background: var(--wa-surface-2);
        border: 1px solid var(--wa-border-strong);
        border-radius: var(--wa-radius);
        transition: background-color 0.15s, border-color 0.15s;
}
:where(input[type="file"])::file-selector-button:hover {
        background: var(--wa-surface-3);
        border-color: var(--wa-border-hover);
}

/* radios & checkboxes (drawn without pseudo-elements for broad support) */
:where(input[type="radio"], input[type="checkbox"]) {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        width: 17px;
        height: 17px;
        margin: 0 5px 0 0;
        vertical-align: -4px;
        cursor: pointer;
        background-color: var(--tc-field);
        background-repeat: no-repeat;
        background-position: center;
        border: 1.5px solid var(--wa-border-hover);
        box-shadow: none;
        transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
:where(input[type="radio"]) {
        border-radius: 50%;
}
:where(input[type="checkbox"]) {
        border-radius: 4px;
}
:where(input[type="radio"], input[type="checkbox"]):hover {
        border-color: var(--wa-primary);
}
:where(input[type="radio"]):checked {
        border-color: var(--wa-primary);
        box-shadow: inset 0 0 0 4px var(--wa-primary), 0 0 8px -1px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}
:where(input[type="checkbox"]):checked {
        border-color: var(--wa-primary);
        background-color: var(--wa-primary);
        background-size: 11px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 10" fill="none" stroke="%2304121a" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 5.2l3.2 3L11 1.5"/></svg>');
        box-shadow: 0 0 8px -1px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}
:where(input[type="radio"], input[type="checkbox"]):focus-visible {
        outline: 2px solid transparent;
        border-color: var(--wa-primary);
        box-shadow: var(--wa-focus);
}
:where(input[type="radio"]):checked:focus-visible {
        box-shadow: inset 0 0 0 4px var(--wa-primary), var(--wa-focus);
}
:where(input[type="radio"], input[type="checkbox"]):disabled {
        opacity: 0.45;
        cursor: not-allowed;
}

/* native checkbox switch: <input type="checkbox" class="switch"> or role="switch" */
:where(input[type="checkbox"].switch, input[type="checkbox"][role="switch"]) {
        width: 36px;
        height: 20px;
        border: 0;
        border-radius: 999px;
        vertical-align: -5px;
        background-color: var(--tc-track);
        background-size: 20px 20px;
        background-position: left center;
        background-image: radial-gradient(circle, var(--tc-knob) 0 7px, transparent 7.5px);
        box-shadow: inset 0 0 0 1px var(--wa-border-strong);
        transition: background-color 0.2s, background-position 0.2s;
}
:where(input[type="checkbox"].switch, input[type="checkbox"][role="switch"]):checked {
        background-color: var(--wa-switch-on);
        background-size: 20px 20px;
        background-position: right center;
        background-image: radial-gradient(circle, var(--tc-on-color) 0 7px, transparent 7.5px);
        box-shadow: var(--tc-glow);
}

/* default look for unclassed buttons */
:where(button:not([class]), input[type="submit"]:not([class]), input[type="button"]:not([class]), input[type="reset"]:not([class])) {
        font-family: inherit;
        font-size: var(--wa-font-size);
        font-weight: 600;
        color: var(--wa-text);
        padding: 7px 14px;
        margin: 2px;
        min-height: 34px;
        cursor: pointer;
        background: var(--wa-surface-2);
        border: 1px solid var(--wa-border-strong);
        border-radius: var(--wa-radius);
        box-shadow: var(--wa-shadow-sm);
        transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
:where(button:not([class]), input[type="submit"]:not([class]), input[type="button"]:not([class]), input[type="reset"]:not([class])):hover {
        background: var(--wa-surface-3);
        border-color: var(--wa-border-hover);
}

/* ------------------------------------------------------ framework widgets */
/* markup produced by widget_frm.php (webapp_*); webapps/jstheme.js upgrades legacy markup to the same structure */

/* switch: webapp_switch() */
.widget_switch {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        vertical-align: middle;
        margin-right: 6px;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
}
.widget_switch input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
}
.widget_switch input[type="radio"] {
        display: none;
}
.widget_switch_slider {
        position: relative;
        flex: none;
        width: 38px;
        height: 22px;
        border-radius: 999px;
        background: var(--tc-track);
        box-shadow: inset 0 0 0 1px var(--wa-border-strong);
        transition: background-color 0.2s, box-shadow 0.2s;
}
.widget_switch_slider::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--tc-knob);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}
.widget_switch input:checked + .widget_switch_slider {
        background: var(--wa-switch-on);
        box-shadow: var(--tc-glow);
}
.widget_switch input:checked + .widget_switch_slider::after {
        background: var(--tc-on-color);
        transform: translateX(16px);
}
.widget_switch:hover input:not(:disabled) + .widget_switch_slider {
        box-shadow: inset 0 0 0 1px var(--wa-border-hover), 0 0 0 4px rgba(255, 255, 255, 0.04);
}
.widget_switch:hover input:not(:disabled):checked + .widget_switch_slider {
        box-shadow: var(--tc-glow), 0 0 0 4px color-mix(in srgb, var(--wa-primary) 12%, transparent);
}
.widget_switch input:focus-visible + .widget_switch_slider {
        box-shadow: var(--wa-focus);
}
.widget_switch.disabled {
        cursor: not-allowed;
        opacity: 0.5;
}
.widget_switch_title {
        font-weight: 500;
        color: var(--wa-text-2);
}
.widget_switch .widget_switch_state {
        display: none;
}
.widget_switch .widget_switch_state:is(.selected, :has(> input:checked)) {
        display: inline;
}

/* radio group: webapp_radios(), inline segmented control or 'list' of option cards */
.widget_radios {
        display: inline-flex;
        flex-wrap: wrap;
        min-height: 34px;
        gap: 2px;
        padding: 3px;
        margin: 2px 6px 2px 0;
        vertical-align: middle;
        background: var(--tc-field);
        border-radius: 8px;
        box-shadow: inset 0 0 0 1px var(--wa-border-strong);
}
.widget_radio {
        display: inline-flex;
        align-items: center;
        padding: 5px 12px;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
        color: var(--wa-text-2);
        cursor: pointer;
        border-radius: 5px;
        transition: background-color 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
        user-select: none;
        -webkit-user-select: none;
}
.widget_radios:not(.widget_radios_list) .widget_radio input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
}
.widget_radio:hover {
        color: var(--wa-text);
        background: rgba(255, 255, 255, 0.05);
}
.widget_radio:is(.selected, :has(> input:checked)) {
        color: var(--wa-primary);
        font-weight: 600;
        background: var(--wa-primary-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 45%, transparent), 0 0 12px -4px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}
.widget_radio.focused {
        box-shadow: var(--wa-focus);
}
.widget_radio:is(.disabled, :has(> input:disabled)) {
        cursor: not-allowed;
        opacity: 0.5;
}
.widget_radio:is(.disabled, :has(> input:disabled)):hover {
        background: none;
}
.widget_radio:is(.disabled, :has(> input:disabled)):is(.selected, :has(> input:checked)):hover {
        background: var(--wa-primary-soft);
}
.widget_radios_list {
        display: flex;
        flex-direction: column;
        min-height: 0;
        gap: 6px;
        padding: 0;
        margin: 2px 0;
        background: none;
        border-radius: 0;
        box-shadow: none;
}
.widget_radios_list .widget_radio {
        display: flex;
        gap: 4px;
        padding: 9px 12px;
        font-weight: 400;
        white-space: normal;
        background: var(--wa-surface-2);
        border: 1px solid var(--wa-border);
        border-radius: 8px;
}
.widget_radios_list .widget_radio input {
        flex: none;
        margin: 0 6px 0 0;
        vertical-align: 0;
}
.widget_radios_list .widget_radio:hover {
        color: var(--wa-text-2);
        border-color: var(--wa-border-hover);
        background: var(--wa-surface-3);
}
.widget_radios_list .widget_radio:is(.disabled, :has(> input:disabled)):hover {
        border-color: var(--wa-border);
        background: var(--wa-surface-2);
}
.widget_radios_list .widget_radio:is(.selected, :has(> input:checked)) {
        color: var(--wa-text);
        font-weight: 400;
        border-color: var(--wa-primary);
        background: var(--wa-primary-soft);
        box-shadow: inset 0 0 0 1px var(--wa-primary), 0 0 16px -6px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}
.widget_radios_list .widget_radio.focused {
        box-shadow: inset 0 0 0 1px var(--wa-primary), var(--wa-focus);
}

/* form fields: webapp_field() sizes */
.widget_field {
        width: var(--wa-field-width);
}
.widget_field_short {
        width: var(--wa-field-short);
}
.widget_field_wide {
        width: var(--wa-field-wide);
}
.widget_field_full {
        width: 100%;
}
.widget_field_auto {
        width: auto;
}

/* form rows: webapp_row() and webapp_section() in a widget_form table */
td.widget_label {
        padding-right: 16px;
        color: var(--wa-text-2);
        white-space: nowrap;
}
td.widget_section {
        font-size: 14px;
        font-weight: 600;
        color: var(--wa-text);
        padding: 10px 0 4px 0;
}
tr:first-child > td.widget_section {
        padding-top: 2px;
}

/* action tiles: webapp_actions() */
.widget_actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 4px 0;
}
.widget_action {
        position: relative;
        display: flex;
        width: 120px;
        background: var(--wa-surface-2);
        border: 1px solid var(--wa-border);
        border-radius: var(--wa-radius-lg);
        box-shadow: var(--wa-shadow-sm);
        transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.widget_action_link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 14px 6px 12px;
        text-align: center;
        line-height: 1.3;
        color: var(--wa-text);
        cursor: pointer;
}
a.widget_action_link:hover, a.widget_action_link:focus {
        text-decoration: none;
}
a.widget_action_link:focus-visible {
        outline: 2px solid transparent;
        border-radius: var(--wa-radius-lg);
        box-shadow: var(--wa-focus);
}
.widget_action:hover {
        background: var(--wa-surface-3);
        border-color: color-mix(in srgb, var(--wa-primary) 55%, transparent);
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--wa-primary) 20%, transparent), 0 8px 24px -8px color-mix(in srgb, var(--wa-primary) 40%, transparent);
}
/* backlit plate */
.widget_action_icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 10px;
        background: var(--tc-plate);
        box-shadow: var(--tc-plate-edge);
        transition: box-shadow 0.15s;
}
.widget_action:hover .widget_action_icon {
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 60%, transparent), var(--tc-glow);
}
.widget_action_icon a {
        display: flex;
}
.widget_action_icon img {
        min-width: 24px;
        max-width: 34px;
        max-height: 34px;
}
.widget_action_title, .widget_action_title a {
        font-weight: 500;
        color: var(--wa-text);
}
.widget_action_title a:hover {
        text-decoration: none;
}
.widget_action:hover .widget_action_title, .widget_action:hover .widget_action_title a {
        color: var(--wa-primary);
}
.widget_action > .widget_help {
        position: absolute;
        top: 6px;
        right: 6px;
        margin: 0;
}
.widget_action.disabled {
        background: transparent;
        border-style: dashed;
        box-shadow: none;
}
.widget_action.disabled .widget_action_link {
        cursor: default;
}
.widget_action.disabled:hover {
        border-color: var(--wa-border);
        box-shadow: none;
}
.widget_action.disabled .widget_action_icon, .widget_action.disabled:hover .widget_action_icon {
        opacity: 0.3;
        box-shadow: none;
}
.widget_action.disabled .widget_action_title, .widget_action.disabled .widget_action_title span {
        color: var(--wa-muted);
        font-weight: 400;
}

/* status: webapp_status(); legacy bold red/green texts alone in a cell get the same look (the
   color rules of the legacy guess have the specificity of the .red/.green utility classes) */
.widget_status, :where(td.body td > span.b:is(.red, .green):only-child, .widget_table td > span.b:is(.red, .green)):not(.widget_plain *) {
        display: inline-block;
        padding: 2px 9px;
        font-family: var(--tc-mono);
        font-size: 11.5px;
        font-weight: 600;
        line-height: 1.55;
        letter-spacing: 0.02em;
        border-radius: 4px;
}
.widget_status {
        color: var(--wa-text-2);
        background: var(--wa-surface-3);
        box-shadow: inset 0 0 0 1px var(--wa-border-strong);
}
.widget_status_success, :where(td.body td > span.b.green:only-child, .widget_table td > span.b.green):not(.widget_plain *) {
        color: var(--wa-success-hover);
        background: var(--wa-success-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-success) 35%, transparent);
}
.widget_status_error, :where(td.body td > span.b.red:only-child, .widget_table td > span.b.red):not(.widget_plain *) {
        color: var(--wa-danger-hover);
        background: var(--wa-danger-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-danger) 35%, transparent);
}
.widget_status_warning {
        color: var(--wa-warning-hover);
        background: var(--wa-warning-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-warning) 35%, transparent);
}
.widget_status_info {
        color: var(--wa-primary-hover);
        background: var(--wa-primary-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 35%, transparent);
}

/* a help icon and the content just before it, kept on one line by webapps/jstheme.js */
.widget_nowrap {
        white-space: nowrap;
}
:where(.widget_nowrap > *) {
        white-space: normal;
}

/* help icon: webapp_help(), a button with a tooltip */
.widget_help {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        margin: 0 0 0 2px;
        padding: 0;
        vertical-align: middle;
        font: inherit;
        color: inherit;
        background: none;
        border: 0;
        border-radius: 50%;
        cursor: help;
        -webkit-appearance: none;
        appearance: none;
}
.widget_help img {
        width: 15px;
        height: 15px;
        opacity: 0.75;
        transition: opacity 0.15s, filter 0.15s;
}
.widget_help:hover img, .widget_help:focus-visible img {
        opacity: 1;
        filter: drop-shadow(0 0 4px color-mix(in srgb, var(--wa-primary) 80%, transparent));
}
.widget_help:focus-visible {
        outline: 2px solid transparent;
        box-shadow: var(--wa-focus);
}

/* text with a tooltip: webapp_popup() */
.widget_popup {
        margin: 0;
        padding: 0;
        font: inherit;
        color: inherit;
        text-align: inherit;
        background: none;
        border: 0;
        border-bottom: 1px dotted currentColor;
        cursor: help;
        -webkit-appearance: none;
        appearance: none;
}
.widget_popup:focus-visible {
        outline: 2px solid transparent;
        border-radius: 2px;
        box-shadow: var(--wa-focus);
}

/* result boxes: render_success() and render_error() (__render_webapp_page), the theme draws the
   icons in the state colors (the framework error image is hidden) */
div.widget_result {
        text-align: center;
}
.widget_result_error, .widget_result_success {
        width: 320px;
        display: inline-block;
        padding: 26px 22px 22px 22px;
        color: var(--wa-text);
        text-align: center;
        word-wrap: break-word;
        line-height: 1.55;
}
.widget_result_icon {
        width: 64px;
        height: 64px;
        margin: 0 auto 16px;
        border-radius: 50%;
        animation: wa-result-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
.widget_result_icon img {
        display: none;
}
.widget_result_icon::before {
        content: "";
        display: block;
        width: 100%;
        height: 100%;
        background-color: currentColor;
}
.widget_result_error .widget_result_icon {
        color: var(--wa-danger);
        background-color: var(--wa-danger-soft);
        box-shadow: 0 0 28px -6px color-mix(in srgb, var(--wa-danger) 70%, transparent);
}
.widget_result_error .widget_result_icon::before {
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><circle cx="21" cy="21" r="19.5" fill="none" stroke="black" stroke-width="2.5"/><rect x="19" y="10" width="4" height="14" rx="2"/><circle cx="21" cy="30.5" r="2.6"/></svg>') center / 42px no-repeat;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><circle cx="21" cy="21" r="19.5" fill="none" stroke="black" stroke-width="2.5"/><rect x="19" y="10" width="4" height="14" rx="2"/><circle cx="21" cy="30.5" r="2.6"/></svg>') center / 42px no-repeat;
}
.widget_result_success .widget_result_icon {
        color: var(--wa-success);
        background-color: var(--wa-success-soft);
        box-shadow: 0 0 28px -6px color-mix(in srgb, var(--wa-success) 70%, transparent);
}
.widget_result_success .widget_result_icon::before {
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42" fill="none" stroke="black"><circle cx="21" cy="21" r="19.5" stroke-width="2.5"/><path d="M13 21.5l5.5 5.5L29.5 16" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / 42px no-repeat;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42" fill="none" stroke="black"><circle cx="21" cy="21" r="19.5" stroke-width="2.5"/><path d="M13 21.5l5.5 5.5L29.5 16" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / 42px no-repeat;
}
.widget_result_buttons {
        margin-top: 16px;
}
@keyframes wa-result-in {
        from {
                opacity: 0;
                transform: scale(0.6);
        }
}

/* ------------------------------------------------ password show/hide button (jstheme.js) */

.widget_password {
        position: relative;
        display: inline-block;
        vertical-align: middle;
}
.widget_password input {
        padding-right: 34px;
}
.widget_password_toggle {
        position: absolute;
        top: 50%;
        right: 4px;
        width: 28px;
        height: 26px;
        margin-top: -13px;
        padding: 0;
        font-size: 14px;
        line-height: 26px;
        color: var(--wa-muted);
        cursor: pointer;
        background: none;
        border: 0;
        border-radius: 4px;
        transition: color 0.15s, background-color 0.15s;
}
.widget_password_toggle:hover {
        color: var(--wa-primary);
        background: var(--wa-surface-3);
}
.widget_password_toggle:focus-visible {
        outline: 2px solid transparent;
        box-shadow: var(--wa-focus);
}

/* --------------------------------------------------------- page layout */

table.middle {
        width: 100%;
        height: 75%;
        padding: 20px;
}

table.content {
        padding: 0;
        margin: 0 auto;
        background-color: var(--wa-surface);
}
/* card: glowing top line and a faint top light */
table.content_default {
        overflow: hidden;
        border-radius: var(--wa-radius-lg);
        background-image: linear-gradient(90deg, transparent, var(--wa-primary) 22%, var(--tc-violet) 78%, transparent),
                          linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 140px);
        background-size: 100% 2px, 100% 100%;
        background-repeat: no-repeat;
        box-shadow: var(--wa-shadow), 0 0 0 1px var(--tc-edge), 0 0 60px -20px color-mix(in srgb, var(--wa-primary) 30%, transparent);
}
table.content_fullpage {
        width: 100%;
        height: 100%;
        vertical-align: top;
}
table.content td.body {
        padding: 22px 26px 24px 26px;
        margin: 0;
        color: var(--wa-text-2);
}
table.content_fullpage td.body {
        vertical-align: top;
        height: 100%;
        padding: 18px 16px;
}
table.content td.header {
        font-family: var(--wa-font-title);
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--wa-text);
        padding: 16px 40px 14px 26px;
        text-align: left;
        white-space: nowrap;
        border-bottom: 1px solid var(--wa-border);
}
/* status light */
table.content td.header::before {
        content: "";
        display: inline-block;
        width: 7px;
        height: 7px;
        margin: 0 11px 2px 0;
        vertical-align: middle;
        border-radius: 50%;
        background: var(--wa-primary);
        box-shadow: 0 0 8px 1px color-mix(in srgb, var(--wa-primary) 70%, transparent);
        animation: wa-pulse 2.8s ease-in-out infinite;
}
/* the application icon replaces the status light */
table.content td.header:has(.widget_app_icon)::before {
        display: none;
}
@keyframes wa-pulse {
        50% {
                opacity: 0.45;
                box-shadow: 0 0 2px 0 color-mix(in srgb, var(--wa-primary) 70%, transparent);
        }
}
/* application icon: the monochrome icon of the application (--wa-app-icon, webapp_frm.php) drawn
   in the primary color */
.widget_app_icon {
        display: inline-block;
        width: 18px;
        height: 18px;
        margin: 0 10px 0 0;
        vertical-align: -3px;
        background-color: var(--wa-primary);
        -webkit-mask: var(--wa-app-icon) center / contain no-repeat;
        mask: var(--wa-app-icon) center / contain no-repeat;
}
table.content td.logo {
        border-bottom: 1px solid var(--wa-border);
        width: 100px;
        height: 56px;
        padding: 8px 22px 6px 0;
        text-align: right;
        vertical-align: middle;
}
table.content td.logo img {
        display: inline-block;
        vertical-align: middle;
}

/* content blocks */
:where(td.body td) {
        padding: 3px 5px;
}
:where(td.body table:not([class]) > tbody > tr > td:first-child:nth-last-child(2):not(.widget_plain *)) {
        padding-right: 16px;
        color: var(--wa-text-2);
        white-space: nowrap;
}
/* form rows (webapp_row() and legacy label / value rows) get more space between them
   (td:where() for the legacy rows: same specificity as the td reset at the top, still below the app CSS) */
td.widget_label, td.widget_value,
td:where(td.body table:not([class]) > tbody > tr > td:first-child:nth-last-child(2):not(.widget_plain *),
         td.body table:not([class]) > tbody > tr > td:first-child:nth-last-child(2):not(.widget_plain *) + td) {
        padding-top: 4px;
        padding-bottom: 4px;
}
td:where(td.body table:not([class]) > tbody > tr > td:first-child:nth-last-child(2):not(.widget_plain *)) {
        padding-right: 16px;
}
/* the main field of a form cell (alone, or followed by buttons and help) gets the standard width */
:where(td.body td > :is(input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input:not([type]), select):not(.widget_field, [style*="width"], [size], .widget_plain *):first-child:only-of-type,
       td.body td > .widget_password:first-child > input:not(.widget_field, [style*="width"], [size], .widget_plain *)) {
        min-width: var(--wa-field-width);
}
:where(td.body h1:not(.widget_plain *)) {
        font-size: 14px;
        font-weight: 600;
        color: var(--wa-text);
        padding: 6px 0 2px 0;
}
:where(td.body td[colspan] > h1:only-child:not(.widget_plain *)) {
        padding: 10px 0 4px 0;
}
:where(td.body tr:first-child > td[colspan] > h1:only-child:not(.widget_plain *)) {
        padding-top: 2px;
}
:where(td.body h1:not(:only-child, .widget_plain *)) {
        padding: 0;
        margin-right: 6px;
}
:where(td.body h2, td.body h3) {
        font-size: 14px;
        font-weight: 600;
        color: var(--wa-text);
}
:where(td.body p) {
        line-height: 1.6;
}
:where(td.body i.variable, td.body span.variable) {
        color: var(--wa-text);
}
/* section marker: webapp_section() and legacy section titles (h1 alone in a full-width cell) */
td.widget_section::before, :where(td.body td[colspan] > h1:only-child:not(.widget_plain *))::before {
        content: "";
        display: inline-block;
        width: 3px;
        height: 12px;
        margin: 0 9px 2px 0;
        vertical-align: middle;
        border-radius: 2px;
        background: var(--wa-primary);
        box-shadow: 0 0 8px color-mix(in srgb, var(--wa-primary) 70%, transparent);
}

/* footer */
table.content td.footer {
        font-family: var(--tc-mono);
        font-size: 11.5px;
        font-weight: 400;
        color: var(--wa-muted);
        background-color: color-mix(in srgb, var(--wa-bg) 55%, var(--wa-surface));
        border-top: 1px solid var(--wa-border);
        white-space: nowrap;
        vertical-align: middle;
}

/* footer language menu (webapp_frm.php __webapp_close()), opened and placed by webapps/jstheme.js */
.widget_lang {
        float: left;
        display: flex;
        align-items: center;
        height: 39px;
        padding: 0 8px 0 12px;
}
.widget_lang_button {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 24px;
        padding: 0 8px 0 7px;
        font-family: inherit;
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: 0.03em;
        color: var(--wa-text-2);
        cursor: pointer;
        background: var(--wa-surface-2);
        border: 1px solid var(--wa-border-strong);
        border-radius: 999px;
        transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
/* optical centering: the text box of the button is trimmed to the capital letters */
.widget_lang_code {
        text-box: trim-both cap alphabetic;
}
/* chevron in the text color (menu opening upwards) */
.widget_lang_button::after {
        content: "";
        flex: none;
        width: 10px;
        height: 10px;
        background-color: currentColor;
        opacity: 0.7;
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6.25L5 3.75l2.5 2.5"/></svg>') center / 10px no-repeat;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6.25L5 3.75l2.5 2.5"/></svg>') center / 10px no-repeat;
        transition: transform 0.15s;
}
.widget_lang_button:hover, .widget_lang.open .widget_lang_button {
        color: var(--wa-primary);
        border-color: color-mix(in srgb, var(--wa-primary) 45%, transparent);
        box-shadow: 0 0 12px -4px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}
.widget_lang.open .widget_lang_button::after {
        transform: rotate(180deg);
}
.widget_lang_button:focus-visible {
        outline: 2px solid transparent;
        box-shadow: var(--wa-focus);
}
.widget_lang_button img, .widget_lang_list img {
        flex: none;
        width: 18px;
        height: 13.5px;
        border-radius: 2px;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.widget_lang_button img {
        width: 16px;
        height: 12px;
}
.widget_lang_list {
        max-height: calc(100vh - 16px);
        overflow-y: auto;
        margin: 0;
        padding: 5px;
        list-style: none;
        background: var(--tc-popup);
        border: 1px solid color-mix(in srgb, var(--wa-primary) 40%, transparent);
        border-radius: var(--wa-radius);
        box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.8), 0 0 20px -6px color-mix(in srgb, var(--wa-primary) 40%, transparent);
        z-index: 9999;
        animation: wa-lang-in 0.14s ease-out;
}
.widget_lang_list li {
        margin: 0;
        padding: 0;
        list-style: none;
}
.widget_lang_list a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 7px 10px;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.3;
        color: var(--wa-text);
        text-decoration: none;
        border-radius: 4px;
}
.widget_lang_list a:hover, .widget_lang_list a:focus {
        color: var(--wa-text);
        text-decoration: none;
        background: rgba(255, 255, 255, 0.05);
}
.widget_lang_list a:focus-visible {
        outline: 2px solid transparent;
        box-shadow: inset 0 0 0 2px var(--wa-primary);
}
.widget_lang_list a.selected {
        color: var(--wa-primary);
        font-weight: 600;
        background: var(--wa-primary-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 45%, transparent);
}
/* check mark in the text color */
.widget_lang_list a.selected::after {
        content: "";
        flex: none;
        width: 14px;
        height: 14px;
        margin-left: auto;
        background-color: currentColor;
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7.4l2.6 2.5L11 4.2"/></svg>') center / 14px no-repeat;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7.4l2.6 2.5L11 4.2"/></svg>') center / 14px no-repeat;
}
/* the theme menu on the right of the footer (webapp_frm.php __webapp_close()) */
.widget_lang.widget_theme {
        float: right;
        padding: 0 12px 0 8px;
}
.widget_theme .widget_lang_button .fa {
        font-size: 11px;
        opacity: 0.8;
}
@keyframes wa-lang-in {
        from {
                opacity: 0;
                transform: translateY(4px);
        }
}

/* result boxes before the page layout */
div.frame {
        border: 1px solid var(--tc-edge);
        background-color: var(--wa-surface);
        background-image: linear-gradient(90deg, transparent, var(--wa-primary) 22%, var(--tc-violet) 78%, transparent);
        background-size: 100% 2px;
        background-repeat: no-repeat;
        border-radius: var(--wa-radius-lg);
        box-shadow: var(--wa-shadow);
}
body.boxed div.frame {
        font-size: var(--wa-font-size);
}

/* tooltips: webapp_help() and webapp_popup() (shown and placed by webapps/jstheme.js), and the
   popups of jspopup.js */
.help_popup {
        max-width: calc(100vw - 16px);
        padding: 8px 11px;
        z-index: 9999;
        position: absolute;
        visibility: hidden;
        font-family: var(--wa-font);
        font-size: 12px;
        font-weight: normal;
        line-height: 1.5;
        letter-spacing: normal;
        text-transform: none;
        text-align: left;
        white-space: normal;
        color: var(--wa-text);
        background-color: var(--tc-popup);
        border: 1px solid color-mix(in srgb, var(--wa-primary) 40%, transparent);
        border-radius: var(--wa-radius);
        box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.8), 0 0 20px -6px color-mix(in srgb, var(--wa-primary) 40%, transparent);
}
.help_popup_text, .help_popup p {
        display: block;
        max-width: 240px;
}

div.ajax_popup {
        padding: 8px;
        z-index: 9999;
        position: absolute;
        visibility: hidden;
        color: var(--wa-text-2);
        border: 1px solid var(--wa-border-strong);
        background-color: var(--wa-surface-2);
        border-radius: var(--wa-radius);
        box-shadow: var(--wa-shadow);
}

/* ------------------------------------------------------------ widgets */

.widget_button {
        font-family: inherit;
        font-weight: 600;
        font-style: normal;
        font-size: var(--wa-font-size);
        line-height: 1.35;
        letter-spacing: 0.02em;
        display: inline-block;
        min-width: 84px;
        min-height: 34px;
        padding: 7px 16px;
        margin: 2px;
        text-align: center;
        vertical-align: middle;
        cursor: pointer;
        color: var(--wa-text);
        text-shadow: none;
        background-color: var(--wa-surface-2);
        border: 1px solid var(--wa-border-strong);
        border-radius: var(--wa-radius);
        box-shadow: var(--wa-shadow-sm);
        -webkit-appearance: none;
        appearance: none;
        transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.widget_button:hover {
        color: var(--wa-primary-hover);
        background-color: var(--wa-surface-3);
        border-color: color-mix(in srgb, var(--wa-primary) 55%, transparent);
}
.widget_button:active {
        background-color: var(--wa-surface);
}
.widget_button:focus-visible {
        outline: 2px solid transparent;
        box-shadow: var(--wa-focus);
}
.widget_button:disabled, .widget_button:disabled:hover {
        cursor: not-allowed;
        opacity: 0.45;
        color: var(--wa-text);
        background-color: var(--wa-surface-2);
        border-color: var(--wa-border-strong);
        box-shadow: none;
}

/* colored buttons: dark text on bright neon colors */
.widget_button_blue, .widget_button_blue:disabled, .widget_button_blue:disabled:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-primary);
        border-color: var(--wa-primary);
        box-shadow: 0 0 14px -4px color-mix(in srgb, var(--wa-primary) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_blue:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-primary-hover);
        border-color: var(--wa-primary-hover);
        box-shadow: 0 0 20px -2px color-mix(in srgb, var(--wa-primary) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_green, .widget_button_green:disabled, .widget_button_green:disabled:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-success);
        border-color: var(--wa-success);
        box-shadow: 0 0 14px -4px color-mix(in srgb, var(--wa-success) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_green:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-success-hover);
        border-color: var(--wa-success-hover);
        box-shadow: 0 0 20px -2px color-mix(in srgb, var(--wa-success) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_red, .widget_button_red:disabled, .widget_button_red:disabled:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-danger);
        border-color: var(--wa-danger);
        box-shadow: 0 0 14px -4px color-mix(in srgb, var(--wa-danger) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_red:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-danger-hover);
        border-color: var(--wa-danger-hover);
        box-shadow: 0 0 20px -2px color-mix(in srgb, var(--wa-danger) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_orange, .widget_button_orange:disabled, .widget_button_orange:disabled:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-accent);
        border-color: var(--wa-accent);
        box-shadow: 0 0 14px -4px color-mix(in srgb, var(--wa-accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_orange:hover {
        color: var(--tc-on-color);
        background-color: var(--wa-accent-hover);
        border-color: var(--wa-accent-hover);
        box-shadow: 0 0 20px -2px color-mix(in srgb, var(--wa-accent) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.widget_button_blue:focus-visible, .widget_button_green:focus-visible,
.widget_button_red:focus-visible, .widget_button_orange:focus-visible {
        box-shadow: var(--wa-focus);
}
.widget_button_small {
        min-width: 0;
        padding: 7px 11px;
}
.widget_button_large {
        min-height: 42px;
        padding: 11px 24px;
        font-size: 14px;
}

.widget_menu {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        width: fit-content;     /* as wide as its items (wraps on small screens) */
        max-width: 100%;
        list-style: none;
        margin: 0;
        padding: 4px;
        white-space: nowrap;
        background: var(--tc-field);
        border-radius: 8px;
        box-shadow: inset 0 0 0 1px var(--wa-border-strong);
}
.widget_menu li {
        display: block;
        margin: 0;
        padding: 0;
        background: none;
}
/* the end items of webapp_menu() (e.g. logout) */
.widget_menu li:not(.widget_menu_end) + li.widget_menu_end {
        margin-left: auto;
}
.widget_menu a {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12.5px;
        font-weight: 500;
        white-space: nowrap;
        padding: 6px 11px;
        color: var(--wa-text-2);
        text-decoration: none;
        border: 0;
        border-radius: 5px;
        transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.widget_menu a:hover, .widget_menu a:active, .widget_menu a:focus {
        color: var(--wa-text);
        text-decoration: none;
        background: rgba(255, 255, 255, 0.05);
}
.widget_menu a:focus-visible {
        outline: 2px solid transparent;
        box-shadow: var(--wa-focus);
}
.widget_menu li.selected a {
        color: var(--wa-primary);
        font-weight: 600;
        background: var(--wa-primary-soft);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 45%, transparent), 0 0 12px -4px color-mix(in srgb, var(--wa-primary) 60%, transparent);
}
.widget_menu li.disabled a {
        color: #56637a;
        background: none;
        cursor: default;
}
.widget_menu .fa {
        font-size: 13px;
}
.widget_menu a .red {
        color: var(--wa-danger);
}

.widget_table {
        background-color: var(--wa-surface);
        border: 1px solid var(--wa-border-strong);
        border-collapse: separate;
        border-spacing: 0;
        border-radius: 8px;
        overflow: hidden;
}
.widget_table th {
        padding: 9px 12px;
        font-family: var(--tc-mono);
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        text-align: left;
        color: color-mix(in srgb, var(--wa-primary) 55%, var(--wa-muted));
        background-color: var(--wa-surface-2);
        border: 0;
        border-bottom: 1px solid var(--wa-border-strong);
        white-space: nowrap;
}
.widget_table td {
        padding: 9px 12px;
        color: var(--wa-text);
        border: 0;
        border-top: 1px solid var(--wa-border);
        white-space: nowrap;
}
.widget_table tr:first-child td {
        border-top: 0;
}
.widget_table tr:hover td {
        background-color: color-mix(in srgb, var(--wa-primary) 5%, transparent);
}
/* icon links of the rows (e.g. download, delete) */
.widget_table a .fa {
        color: var(--wa-muted);
        transition: color 0.15s;
}
.widget_table a:hover .fa {
        color: var(--wa-primary);
}
.widget_table a:hover .fa-trash {
        color: var(--wa-danger);
}

/* ------------------------------------------------------ WebApps portal */

div.home {
        font-family: var(--wa-font);
        color: var(--wa-text-2);
        padding: 26px 0 0 0;
        margin: 0 auto;
        background-color: var(--wa-surface);
        display: inline-block;
        line-height: 1.4;
}
div.boxed {
        overflow: hidden;
        border: 0;
        background-image: linear-gradient(90deg, transparent, var(--wa-primary) 22%, var(--tc-violet) 78%, transparent),
                          linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 140px);
        background-size: 100% 2px, 100% 100%;
        background-repeat: no-repeat;
        border-radius: var(--wa-radius-lg);
        box-shadow: var(--wa-shadow), 0 0 0 1px var(--tc-edge), 0 0 60px -20px color-mix(in srgb, var(--wa-primary) 30%, transparent);
}
div.fullpage {
        height: 100%;
}
div.home h1 {
        font-family: var(--wa-font-title);
        font-size: 17px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-align: center;
        color: var(--wa-text);
        padding: 4px 28px 4px 28px;
}
div.home h2 {
        font-size: 12.5px;
        font-weight: 400;
        text-align: center;
        color: var(--wa-muted);
        padding: 2px 28px 20px 28px;
}
div.home h2 a {
        color: var(--wa-text-2);
        font-weight: 500;
        text-decoration: none;
}
div.home ul {
        width: 440px;
        max-width: 100%;
        list-style: none;
        margin: 0;
        padding: 0 14px;
}
div.home ul li {
        display: flex;
        align-items: flex-start;
        border-top: 1px solid var(--wa-border);
        border-radius: 0;
        padding: 0;
        margin: 0;
        text-align: left;
        transition: background-color 0.15s, box-shadow 0.15s;
}
div.home ul li:hover {
        background-color: var(--wa-surface-2);
        border-radius: 8px;
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 35%, transparent);
}
div.home ul li:hover + li {
        border-top-color: transparent;
}
/* backlit plate, the monochrome application icons become light silhouettes */
div.home span.icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 44px;
        height: 44px;
        margin: 12px 0 0 10px;
        border-radius: 8px;
        background: var(--tc-plate);
        box-shadow: var(--tc-plate-edge);
        transition: box-shadow 0.15s;
}
div.home span.icon img {
        filter: brightness(0) invert(1);
        opacity: 0.85;
        transition: opacity 0.15s, filter 0.15s;
}
div.home ul li:hover span.icon {
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wa-primary) 60%, transparent), var(--tc-glow);
}
div.home ul li:hover span.icon img {
        opacity: 1;
        filter: brightness(0) invert(1) drop-shadow(0 0 4px color-mix(in srgb, var(--wa-primary) 80%, transparent));
}
div.home span.title {
        font-size: 14px;
        font-weight: 600;
        color: var(--wa-text);
}
div.home span.help {
        font-size: 12px;
        padding-top: 3px;
        line-height: 1.45;
}
div.home ul li a {
        text-decoration: none;
        display: block;
        flex: 1;
        padding: 14px 36px 14px 14px;
        width: auto;
}
div.home ul li a:hover {
        text-decoration: none;
}
div.home ul li a > span {
        display: block;
        width: 100%;
        font-size: 12px;
        color: var(--wa-muted);
}
/* arrow in the muted color, the primary color on hover */
div.home a.arrow {
        position: relative;
}
div.home a.arrow::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 10px;
        width: 16px;
        height: 16px;
        margin-top: -8px;
        background-color: var(--wa-muted);
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 5l5 5-5 5"/></svg>') center / 16px no-repeat;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M8 5l5 5-5 5"/></svg>') center / 16px no-repeat;
}
div.home ul li:hover a.arrow::after {
        background-color: var(--wa-primary);
}
div.noapp {
        font-size: 14px;
        padding: 0 20px 30px 20px;
}
div.links {
        display: flex;
        margin: 0;
        border-top: 1px solid var(--wa-border);
        background-color: color-mix(in srgb, var(--wa-bg) 55%, var(--wa-surface));
}
div.links a {
        flex: 1;
        font-size: 12.5px;
        font-weight: 500;
        text-decoration: none;
        padding: 12px 10px;
        background-color: transparent;
        width: 50%;
        color: var(--wa-text-2);
        transition: background-color 0.15s, color 0.15s;
}
div.links a.admin {
        float: none;
        text-align: center;
        border-right: 1px solid var(--wa-border);
}
div.links a.websrv {
        float: none;
        text-align: center;
}
div.links a .fa {
        font-size: 1.1em;
        padding-right: 8px;
        color: var(--wa-muted);
}
div.links a:hover, div.links a:focus, div.links a:active {
        color: var(--wa-primary);
        background-color: var(--wa-surface-2);
        text-decoration: none;
}
div.links a:hover .fa {
        color: var(--wa-primary);
}
div.footer {
        color: var(--wa-muted);
        font-family: var(--tc-mono);
        font-size: 11.5px;
        text-align: right;
        font-weight: 400;
        padding: 11px 20px;
        margin: 0;
        background-color: color-mix(in srgb, var(--wa-bg) 55%, var(--wa-surface));
        border-top: 1px solid var(--wa-border);
}
div.footer a {
        text-decoration: none;
        font-weight: 500;
        color: var(--wa-text-2);
}

/* ------------------------------------------------------------ responsive */

/* small screens: the boxed card becomes a full page (mobile clients are not detected server-side) */
@media (max-width: 600px) {
        body.boxed {
                background: var(--wa-surface);
        }
        body.boxed::after {
                display: none;
        }
        table.middle {
                height: 100%;
                padding: 0;
        }
        table.middle > tbody > tr > td {
                height: 100%;
                vertical-align: top;
        }
        table.content_default {
                width: 100%;
                height: 100%;
                border-radius: 0;
                box-shadow: none;
        }
        table.content_default td.body {
                height: 100%;
                vertical-align: top;
        }
        table.content td.header {
                padding: 14px 16px 12px 16px;
                white-space: normal;
        }
        table.content td.logo {
                padding-right: 14px;
        }
        table.content td.body {
                padding: 16px;
        }
        .widget_lang {
                padding-left: 8px;
        }
        .widget_lang.widget_theme {
                padding-right: 8px;
        }
        .widget_result_error, .widget_result_success {
                max-width: 100%;
        }
        div.home.boxed {
                display: block;
                width: 100%;
                border-radius: 0;
                box-shadow: none;
        }
        div.home ul {
                width: auto;
        }
        .widget_action {
                width: calc(50% - 5px);
        }
        .widget_table {
                display: block;
                max-width: 100%;
                overflow-x: auto;
        }
        .widget_field, .widget_password, .widget_password .widget_field {
                max-width: 100%;
        }
        /* room for the help icon of a field (a percentage width, not only max-width, also lets
           the table shrink below the field width) */
        .widget_nowrap > :is(.widget_field, .widget_password) {
                max-width: calc(100% - 30px);
        }
        .widget_nowrap > .widget_field_wide {
                width: min(var(--wa-field-wide), calc(100% - 30px));
        }
        /* label / value rows stack vertically (legacy tables guessed with zero specificity) */
        td.body table.widget_form > tbody > tr > td.widget_label,
        td.body table.widget_form > tbody > tr > td.widget_value,
        :where(td.body table:not([class], .widget_plain *) > tbody > tr > td:first-child:nth-last-child(2):not(:empty, [style*="width"]),
               td.body table:not([class], .widget_plain *) > tbody > tr > td:first-child:not(:empty, [style*="width"]) + td:last-child) {
                display: block;
                padding-left: 0;
                padding-right: 0;
        }
        td.body table.widget_form > tbody > tr > td.widget_label,
        :where(td.body table:not([class], .widget_plain *) > tbody > tr > td.localized:first-child:nth-last-child(2):not(:empty, [style*="width"])) {
                padding: 10px 0 0 0;
                font-weight: 500;
                color: var(--wa-text);
        }
        /* stacked rows: the label sits on its field, the space goes between the rows */
        td:where(td.body table:not([class], .widget_plain *) > tbody > tr > td:first-child:nth-last-child(2):not(:empty, [style*="width"])) {
                padding: 10px 0 0 0;
        }
        td.body table.widget_form > tbody > tr > td.widget_value,
        td:where(td.body table:not([class], .widget_plain *) > tbody > tr > td:first-child:not(:empty, [style*="width"]) + td:last-child) {
                padding-top: 2px;
        }
}

/* avoid iOS zoom-on-focus */
@media (pointer: coarse) {
        :where(input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
               input[type="number"], input[type="search"], input[type="url"], input[type="date"], input[type="time"],
               input[type="datetime-local"], input:not([type]), select, textarea) {
                font-size: 16px;
                line-height: 18px;
        }
}

/* forced colors (Windows high contrast): native controls and visible focus */
@media (forced-colors: active) {
        :where(input[type="radio"], input[type="checkbox"]) {
                appearance: auto;
        }
        :focus-visible, .widget_radio.focused, .widget_switch input:focus-visible + .widget_switch_slider {
                outline: 2px solid CanvasText;
                outline-offset: 2px;
        }
        table.content td.header::before, td.widget_section::before, :where(td.body td[colspan] > h1:only-child)::before {
                display: none;
        }
        .widget_switch_slider {
                border: 1px solid CanvasText;
        }
        .widget_switch input:checked + .widget_switch_slider, .widget_switch_slider::after {
                forced-color-adjust: none;
                background: Highlight;
        }
        .widget_switch_slider::after {
                background: CanvasText;
        }
        .widget_radio:is(.selected, :has(> input:checked)) {
                outline: 2px solid Highlight;
        }
        .widget_lang_button::after, .widget_lang_list a.selected::after, .widget_result_icon::before, div.home a.arrow::after, .widget_app_icon {
                forced-color-adjust: none;
                background-color: CanvasText;
        }
}

@media (prefers-reduced-motion: reduce) {
        .widget_result_icon, .widget_lang_list {
                animation: none;
        }
        .widget_switch_slider, .widget_switch_slider::after, .widget_radio, .widget_action, .widget_action_icon,
        .widget_button, .widget_menu a, .widget_password_toggle, .widget_lang_button, .widget_lang_button::after, :where(input, select, textarea) {
                transition: none !important;
        }
        table.content td.header::before {
                animation: none;
        }
}
