/* Admin assets live outside /admin to avoid a route-directory collision. */
:root {
    --body-bg: #f1faff;
    --sidebar-bg: #e8f6ff;
    --text-color: #2d3744;
    --kosmos-pink: #26aff0;
    --kosmos-pink-dark: #0078b0;
    --kosmos-aqua: #a8e2ff;
    --kosmos-ink: #2d3744;
    --kosmos-muted: #58687c;
    --kosmos-success: #087357;
    --kosmos-warning: #874b00;
    --kosmos-danger: #a51c2c;
    --kosmos-info: #145da8;
    --kosmos-border: color-mix(in srgb, var(--text-color, #2d3744) 12%, transparent);
    --kosmos-card: var(--content-panel-bg, #fff);
    --kosmos-shadow: 0 8px 28px rgba(45, 55, 68, .07);
    --kosmos-auth-bg: #f1faff;
    --kosmos-auth-card: #fff;
    --kosmos-auth-text: #2d3744;
    --kosmos-auth-muted: #58687c;

    --code-color: #a43b29;
    --color-primary: #0078b0;
    --link-color: #006ba6;
    --link-color-rgb: 0, 107, 166;
    --link-hover-color: #005584;
    --link-hover-color-rgb: 0, 85, 132;
    --button-focus-outline-color: rgba(38, 175, 240, .55);
    --button-primary-bg: linear-gradient(to bottom, #0085bf, #0078b0);
    --button-primary-hover-bg: linear-gradient(to bottom, #0078b0, #006ba6);
    --button-primary-active-bg: #005584;
    --pagination-active-bg: #0078b0;
    --form-type-check-input-checked-bg: #0078b0;
    --form-switch-checked-bg: #0078b0;
}

.ea-dark-scheme,
html[data-kosmos-color-scheme="dark"] {
    --kosmos-pink: #72cfff;
    --kosmos-pink-dark: #a8e2ff;
    --kosmos-aqua: #a8e2ff;
    --kosmos-ink: #f1faff;
    --kosmos-muted: #a8b8c9;
    --kosmos-success: #7de3bf;
    --kosmos-warning: #ffd083;
    --kosmos-danger: #ff9da8;
    --kosmos-info: #9bcaff;
    --kosmos-border: rgba(232, 246, 255, .15);
    --kosmos-card: #243240;
    --kosmos-shadow: 0 12px 34px rgba(0, 0, 0, .28);
    --kosmos-auth-bg: #17212d;
    --kosmos-auth-card: #243240;
    --kosmos-auth-text: #f1faff;
    --kosmos-auth-muted: #b8c9d9;

    --body-bg: #171717;
    --text-color: #d4d4d4;
    --text-color-rgb: 212, 212, 212;
    --text-muted: #a3a3a3;
    --content-panel-bg: #243240;
    --fieldset-bg: #202d39;
    --code-color: #ffad9c;
    --color-primary: #72cfff;
    --link-color: #8bd8ff;
    --link-color-rgb: 139, 216, 255;
    --link-hover-color: #c5eaff;
    --link-hover-color-rgb: 197, 234, 255;
    --button-focus-outline-color: rgba(114, 207, 255, .68);
    --button-primary-bg: #0078b0;
    --button-primary-hover-bg: #0085bf;
    --button-primary-active-bg: #0095db;
    --pagination-active-bg: #0078b0;
    --pagination-active-color: #fff;
    --form-help-color: #a8b8c9;
    --form-control-bg: #171717;
    --form-control-disabled-bg: #242424;
    --form-input-border-color: #525252;
    --form-input-hover-border-color: #737373;
    --form-input-text-color: #e5e5e5;
    --form-tabs-help-color: #a8b8c9;
    --form-column-help-color: #a8b8c9;
    --form-fieldset-help-color: #a8b8c9;
    --table-hover-cell-bg: #2a3a48;
    --table-selected-cell-bg: #183d55;
    --form-type-autocomplete-dropdown-bg: #283744;
    --form-type-autocomplete-dropdown-active-item-bg: #31516a;
    --modal-bg: #243240;
    --modal-header-bg: #283744;
    --modal-footer-bg: #202d39;
    --page-login-bg: #202d39;
    --page-login-form-bg: #283744;
    --page-login-form-control-bg: #171717;
    --page-login-form-control-border-color: #525252;
}

.ea a:focus-visible,
.ea button:focus-visible,
.ea input:focus-visible,
.ea select:focus-visible,
.ea textarea:focus-visible,
.kosmos-standalone a:focus-visible,
.kosmos-standalone button:focus-visible {
    outline: 3px solid var(--button-focus-outline-color);
    outline-offset: 2px;
}

.ea .form-control:focus,
.ea .form-select:focus,
.ea .ts-control.focus,
.ea .ts-wrapper.focus .ts-control {
    border-color: var(--kosmos-pink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kosmos-pink) 22%, transparent);
}

.ea input:-webkit-autofill,
.ea input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--form-input-text-color);
    box-shadow: 0 0 0 1000px var(--form-control-bg) inset;
    caret-color: var(--form-input-text-color);
}

.ea .form-help,
.ea .form-text,
.ea .help-block,
.ea .form-column-help,
.ea .form-fieldset-help {
    color: var(--form-help-color);
}

.ea .nav-tabs .nav-link {
    color: var(--text-secondary-color);
}

.ea .nav-tabs .nav-link:hover,
.ea .nav-tabs .nav-link:focus-visible,
.ea .nav-tabs .nav-link.active {
    color: var(--link-color);
}

.ea .datagrid tbody tr,
.ea .datagrid tbody td {
    transition: background-color 100ms ease, color 100ms ease;
}

.ea .ts-dropdown,
.ea .dropdown-menu,
.ea .popover,
.ea .modal-content {
    border-color: var(--border-secondary-color);
    box-shadow: var(--kosmos-shadow);
}

.ea .ts-dropdown .active,
.ea .ts-dropdown .option:hover {
    background: var(--form-type-autocomplete-dropdown-active-item-bg);
    color: var(--form-input-text-color);
}

.ea .modal-backdrop.show {
    opacity: .62;
}

.ea-dark-scheme .modal-backdrop.show {
    opacity: .76;
}

.ea .page-link:focus-visible {
    border-color: var(--kosmos-pink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kosmos-pink) 22%, transparent);
}

.ea .alert {
    border-radius: 9px;
}

.ea code:not(pre code),
.kosmos-standalone code:not(pre code) {
    background: color-mix(in srgb, var(--kosmos-pink) 8%, transparent);
    border-radius: 5px;
    color: var(--code-color, var(--kosmos-pink-dark));
    overflow-wrap: anywhere;
    padding: .08em .32em;
}

.ea pre {
    max-width: 100%;
    overflow: auto;
    overflow-wrap: normal;
}

.ea .field-image img,
.ea .field-avatar img,
.ea .ea-lightbox-thumbnail img,
.ea .ea-lightbox img {
    background: color-mix(in srgb, var(--kosmos-muted) 8%, transparent);
    border-radius: 8px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.ea .field-image a:focus-visible,
.ea .ea-lightbox-thumbnail:focus-visible {
    border-radius: 8px;
    outline: 3px solid var(--button-focus-outline-color);
    outline-offset: 3px;
}

.page-login {
    background:
        radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--kosmos-pink) 13%, transparent), transparent 34%),
        radial-gradient(circle at 88% 88%, color-mix(in srgb, var(--kosmos-aqua) 13%, transparent), transparent 32%),
        var(--page-login-bg);
}

.page-login .login-wrapper .content {
    border: 1px solid var(--kosmos-border);
    border-radius: 18px;
    box-shadow: var(--kosmos-shadow);
}

.page-login .login-wrapper .main-header #header-logo {
    border-color: var(--kosmos-border);
}

.page-login .login-wrapper .main-header #header-logo .logo {
    color: var(--text-color);
    font-weight: 750;
    letter-spacing: -.025em;
}

.page-login .login-wrapper .btn-primary {
    min-height: 42px;
}

.kosmos-section {
    margin: 1.5rem 0 2rem;
}

.kosmos-section-heading {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.kosmos-section-heading h2,
.kosmos-panel h2,
.kosmos-session-actions h2 {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -.02em;
    margin: .12rem 0 0;
}

.kosmos-eyebrow {
    color: var(--kosmos-pink);
    display: block;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.kosmos-muted {
    color: var(--kosmos-muted);
}

.kosmos-status-strip {
    align-items: center;
    background: color-mix(in srgb, var(--kosmos-aqua) 12%, var(--kosmos-card));
    border: 1px solid color-mix(in srgb, var(--kosmos-aqua) 40%, transparent);
    border-radius: 14px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .9rem 1rem;
}

.kosmos-status-strip > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.kosmos-status-strip.is-paused {
    background: color-mix(in srgb, #ffb020 12%, var(--kosmos-card));
    border-color: color-mix(in srgb, #ffb020 38%, transparent);
}

.kosmos-live-dot {
    background: #14a57b;
    border-radius: 50%;
    box-shadow: 0 0 0 5px color-mix(in srgb, #14a57b 16%, transparent);
    height: .55rem;
    width: .55rem;
}

.is-paused .kosmos-live-dot {
    background: #dc8120;
    box-shadow: 0 0 0 5px color-mix(in srgb, #dc8120 16%, transparent);
}

.kosmos-status-actions {
    color: var(--kosmos-muted);
    font-size: .82rem;
}

.kosmos-stat-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.kosmos-stat-card,
.kosmos-panel {
    background: var(--kosmos-card);
    border: 1px solid var(--kosmos-border);
    border-radius: 14px;
    box-shadow: var(--kosmos-shadow);
}

.kosmos-stat-card {
    display: flex;
    flex-direction: column;
    min-height: 132px;
    padding: 1rem;
}

.kosmos-stat-card > span {
    color: var(--kosmos-muted);
    font-size: .76rem;
}

.kosmos-stat-card strong {
    font-size: 1.6rem;
    letter-spacing: -.035em;
    margin: auto 0 .15rem;
}

.kosmos-stat-card small {
    color: var(--kosmos-muted);
}

.kosmos-stat-card.has-warning {
    border-color: color-mix(in srgb, #dc3545 35%, transparent);
}

.kosmos-dashboard-columns,
.kosmos-detail-columns {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin: 1.5rem 0 2rem;
}

.kosmos-panel {
    padding: 1.15rem;
}

.kosmos-metrics-list {
    margin: 0;
}

.kosmos-metrics-list > div {
    align-items: center;
    border-bottom: 1px solid var(--kosmos-border);
    display: flex;
    justify-content: space-between;
    padding: .62rem 0;
}

.kosmos-metrics-list > div:last-child {
    border-bottom: 0;
}

.kosmos-metrics-list dt {
    color: var(--kosmos-muted);
    font-weight: 500;
}

.kosmos-metrics-list dd {
    font-size: 1rem;
    font-weight: 750;
    margin: 0;
}

.kosmos-style-count {
    align-items: baseline;
    display: flex;
    gap: .55rem;
    margin: 1.2rem 0 .5rem;
}

.kosmos-style-count strong {
    color: var(--kosmos-pink);
    font-size: 3rem;
    letter-spacing: -.06em;
}

.kosmos-table-wrap {
    background: var(--kosmos-card);
    border: 1px solid var(--kosmos-border);
    border-radius: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.kosmos-table-wrap .table {
    margin: 0;
}

.kosmos-table-wrap th,
.kosmos-table-wrap td {
    padding: .75rem;
    vertical-align: middle;
}

.kosmos-empty,
.kosmos-empty-state {
    color: var(--kosmos-muted);
    padding: 2rem;
    text-align: center;
}

.kosmos-empty-state {
    background: var(--kosmos-card);
    border: 1px dashed var(--kosmos-border);
    border-radius: 14px;
}

.kosmos-empty-state i {
    color: var(--kosmos-pink);
    font-size: 2rem;
}

.kosmos-status {
    background: color-mix(in srgb, var(--kosmos-muted) 12%, transparent);
    border-radius: 999px;
    display: inline-flex;
    font-size: .68rem;
    font-weight: 750;
    padding: .24rem .52rem;
    white-space: nowrap;
}

.status-completed {
    background: color-mix(in srgb, #14a57b 16%, transparent);
    color: var(--kosmos-success);
}

.status-processing,
.status-queued {
    background: color-mix(in srgb, #ffb020 20%, transparent);
    color: var(--kosmos-warning);
}

.status-failed {
    background: color-mix(in srgb, #dc3545 15%, transparent);
    color: var(--kosmos-danger);
}

.status-ready,
.status-style_selected,
.status-photo_ready {
    background: color-mix(in srgb, #2589ff 14%, transparent);
    color: var(--kosmos-info);
}

/* Style lab */
.kosmos-lab-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(360px, .82fr) minmax(420px, 1.18fr);
}

.kosmos-lab-form-panel .form-group {
    margin: 1rem 0;
}

.kosmos-reference-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 1rem;
}

.kosmos-reference-grid figure {
    margin: 0;
}

.kosmos-reference-grid figure > span {
    color: var(--kosmos-muted);
    display: block;
    font-size: .72rem;
    margin-bottom: .35rem;
}

.kosmos-image-placeholder,
.kosmos-lab-file-preview {
    align-items: center;
    aspect-ratio: 2 / 3;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--kosmos-pink) 6%, transparent), color-mix(in srgb, var(--kosmos-aqua) 9%, transparent)),
        var(--body-bg);
    border: 1px dashed var(--kosmos-border);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.kosmos-image-placeholder::after {
    color: var(--kosmos-muted);
    content: 'нет изображения';
    font-size: .7rem;
}

.kosmos-image-placeholder.has-image::after {
    display: none;
}

.kosmos-image-placeholder img,
.kosmos-lab-file-preview img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.kosmos-lab-style-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .75rem 0;
}

.kosmos-lab-style-meta span {
    background: color-mix(in srgb, var(--kosmos-pink) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--kosmos-pink) 18%, transparent);
    border-radius: 999px;
    font-size: .68rem;
    padding: .24rem .48rem;
}

.kosmos-budget-note {
    background: color-mix(in srgb, #ffb020 11%, transparent);
    border: 1px solid color-mix(in srgb, #ffb020 28%, transparent);
    border-radius: 9px;
    color: var(--kosmos-muted);
    font-size: .76rem;
    padding: .65rem;
}

.kosmos-lab-file-preview {
    aspect-ratio: 3 / 2;
    margin: .75rem 0;
    max-height: 220px;
}

.kosmos-lab-result-panel {
    min-width: 0;
}

.kosmos-progress-steps {
    display: grid;
    gap: .25rem;
    grid-template-columns: repeat(4, 1fr);
    margin: 1.2rem 0;
}

.kosmos-progress-steps > div {
    align-items: center;
    color: var(--kosmos-muted);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    position: relative;
    text-align: center;
}

.kosmos-progress-steps > div::before {
    background: var(--kosmos-border);
    content: '';
    height: 2px;
    position: absolute;
    right: 50%;
    top: 14px;
    width: 100%;
    z-index: 0;
}

.kosmos-progress-steps > div:first-child::before {
    display: none;
}

.kosmos-progress-steps span {
    align-items: center;
    background: var(--body-bg);
    border: 2px solid var(--kosmos-border);
    border-radius: 50%;
    display: flex;
    font-size: .7rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    position: relative;
    width: 30px;
    z-index: 1;
}

.kosmos-progress-steps .is-active {
    color: var(--kosmos-pink);
}

.kosmos-progress-steps .is-active::before,
.kosmos-progress-steps .is-active span {
    border-color: var(--kosmos-pink);
}

.kosmos-progress-steps .is-active::before {
    background: var(--kosmos-pink);
}

.kosmos-progress-steps .is-current span {
    background: var(--kosmos-pink);
    color: #fff;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--kosmos-pink) 12%, transparent);
}

.kosmos-result-canvas {
    align-items: center;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 25% 15%, color-mix(in srgb, var(--kosmos-pink) 15%, transparent), transparent 36%),
        radial-gradient(circle at 80% 85%, color-mix(in srgb, var(--kosmos-aqua) 18%, transparent), transparent 34%),
        var(--body-bg);
    border: 1px solid var(--kosmos-border);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    max-height: 650px;
    overflow: hidden;
    position: relative;
}

.kosmos-result-placeholder {
    color: var(--kosmos-muted);
    text-align: center;
}

.kosmos-result-placeholder i {
    color: color-mix(in srgb, var(--kosmos-pink) 60%, var(--kosmos-aqua));
    font-size: 2.5rem;
}

.kosmos-result-canvas > img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.kosmos-result-metrics {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(4, 1fr);
    margin: .8rem 0;
}

.kosmos-result-metrics > div {
    background: var(--body-bg);
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    padding: .65rem;
}

.kosmos-result-metrics span {
    color: var(--kosmos-muted);
    font-size: .67rem;
}

.kosmos-result-metrics strong {
    font-size: .86rem;
}

.kosmos-lab-log {
    background: #182431;
    border-radius: 9px;
    color: #e8f4fb;
    font-size: .72rem;
    margin: .75rem 0 0;
    max-height: 145px;
    min-height: 62px;
    overflow: auto;
    padding: .75rem;
    white-space: pre-wrap;
}

.kosmos-json-field {
    background: #182431;
    border-radius: 8px;
    color: #e8f4fb;
    font-size: .72rem;
    margin: 0;
    max-height: 420px;
    overflow: auto;
    padding: .8rem;
    white-space: pre-wrap;
}

/* Session detail */
.kosmos-session-actions {
    align-items: center;
    background: color-mix(in srgb, var(--kosmos-pink) 6%, var(--kosmos-card));
    border: 1px solid color-mix(in srgb, var(--kosmos-pink) 18%, transparent);
    border-radius: 14px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(260px, 1fr) auto;
    margin-top: 1.5rem;
    padding: 1rem;
}

.kosmos-session-actions p {
    color: var(--kosmos-muted);
    margin: .25rem 0 0;
}

.kosmos-session-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.kosmos-session-actions .alert {
    grid-column: 1 / -1;
    margin: 0;
}

.kosmos-attempt-list {
    display: grid;
    gap: .7rem;
}

.kosmos-attempt {
    background: var(--body-bg);
    border: 1px solid var(--kosmos-border);
    border-left: 3px solid var(--kosmos-muted);
    border-radius: 9px;
    padding: .8rem;
}

.kosmos-attempt.is-completed {
    border-left-color: #14a57b;
}

.kosmos-attempt.is-failed {
    border-left-color: #dc3545;
}

.kosmos-attempt.is-discarded {
    border-left-color: #ff9f1c;
}

.kosmos-attempt > header,
.kosmos-timeline-card > header {
    align-items: center;
    display: flex;
    gap: .7rem;
    justify-content: space-between;
}

.kosmos-attempt > header > div {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.kosmos-attempt time,
.kosmos-timeline-card time {
    color: var(--kosmos-muted);
    font-size: .72rem;
}

.kosmos-attempt dl {
    display: grid;
    gap: .45rem;
    grid-template-columns: 1fr 1fr;
    margin: .7rem 0 0;
}

.kosmos-attempt dl > div {
    min-width: 0;
}

.kosmos-attempt dt {
    color: var(--kosmos-muted);
    font-size: .68rem;
    font-weight: 500;
}

.kosmos-attempt dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.kosmos-attempt-error {
    background: color-mix(in srgb, #dc3545 10%, transparent);
    border-radius: 7px;
    color: var(--kosmos-danger);
    margin-top: .65rem;
    padding: .55rem;
}

.kosmos-attempt details,
.kosmos-timeline-card details {
    margin-top: .65rem;
}

.kosmos-attempt summary,
.kosmos-timeline-card summary {
    color: var(--kosmos-muted);
    cursor: pointer;
    font-size: .74rem;
}

.kosmos-attempt pre,
.kosmos-timeline-card pre {
    background: #182431;
    border-radius: 7px;
    color: #e8f4fb;
    font-size: .67rem;
    margin: .5rem 0 0;
    max-height: 240px;
    overflow: auto;
    padding: .65rem;
    white-space: pre-wrap;
}

.kosmos-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kosmos-timeline > li {
    display: grid;
    gap: .6rem;
    grid-template-columns: 16px minmax(0, 1fr);
    padding-bottom: .8rem;
    position: relative;
}

.kosmos-timeline > li::before {
    background: var(--kosmos-border);
    content: '';
    height: 100%;
    left: 7px;
    position: absolute;
    top: 10px;
    width: 1px;
}

.kosmos-timeline > li:last-child::before {
    display: none;
}

.kosmos-timeline-dot {
    background: var(--kosmos-pink);
    border: 3px solid var(--kosmos-card);
    border-radius: 50%;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--kosmos-pink) 34%, transparent);
    height: 13px;
    margin-top: 5px;
    position: relative;
    width: 13px;
    z-index: 1;
}

.kosmos-timeline-card {
    background: var(--body-bg);
    border: 1px solid var(--kosmos-border);
    border-radius: 9px;
    padding: .7rem;
}

.kosmos-timeline-card p {
    margin: .45rem 0 0;
}

.kosmos-timeline-meta {
    align-items: center;
    color: var(--kosmos-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .7rem;
    gap: .45rem;
    margin-top: .28rem;
}

/* Read-only image overview on the style edit page. */
.kosmos-style-image-preview {
    background: color-mix(in srgb, var(--kosmos-pink) 4%, var(--kosmos-card));
    border: 1px solid var(--kosmos-border);
    border-radius: 14px;
    box-shadow: var(--kosmos-shadow);
    margin: 0 0 1.25rem;
    padding: 1rem;
}

.kosmos-style-image-preview-header {
    align-items: end;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.kosmos-style-image-preview-header h2 {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -.02em;
    margin: .12rem 0 0;
}

.kosmos-style-image-preview-header > p {
    color: var(--kosmos-muted);
    font-size: .78rem;
    margin: 0;
    max-width: 560px;
}

.kosmos-style-image-preview-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kosmos-style-image-card {
    background: var(--body-bg);
    border: 1px solid var(--kosmos-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    margin: 0;
    min-width: 0;
    overflow: hidden;
}

.kosmos-style-image-card figcaption {
    min-height: 88px;
    padding: .8rem .85rem .7rem;
}

.kosmos-style-image-card figcaption > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: space-between;
}

.kosmos-style-image-card figcaption strong {
    color: var(--text-color);
    font-size: .88rem;
}

.kosmos-style-image-card figcaption p {
    color: var(--kosmos-muted);
    font-size: .72rem;
    line-height: 1.35;
    margin: .38rem 0 0;
}

.kosmos-style-image-status {
    background: color-mix(in srgb, var(--kosmos-pink) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--kosmos-pink) 24%, transparent);
    border-radius: 999px;
    color: var(--kosmos-pink-dark);
    font-size: .62rem;
    font-weight: 750;
    padding: .18rem .42rem;
}

.kosmos-style-image-stage {
    align-items: center;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--kosmos-pink) 7%, transparent), color-mix(in srgb, var(--kosmos-aqua) 9%, transparent)),
        var(--content-panel-bg);
    border-block: 1px solid var(--kosmos-border);
    display: flex;
    height: clamp(260px, 30vw, 410px);
    justify-content: center;
    overflow: hidden;
    position: relative;
}

a.kosmos-style-image-stage {
    cursor: zoom-in;
}

a.kosmos-style-image-stage:hover {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--kosmos-pink) 12%, transparent), color-mix(in srgb, var(--kosmos-aqua) 14%, transparent)),
        var(--content-panel-bg);
}

a.kosmos-style-image-stage:focus-visible {
    outline: 3px solid var(--button-focus-outline-color);
    outline-offset: -4px;
}

.kosmos-style-image-stage img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.kosmos-style-image-stage.is-empty {
    border-style: dashed;
    color: var(--kosmos-muted);
    font-size: .75rem;
    padding: 1rem;
    text-align: center;
}

.kosmos-style-image-meta {
    align-items: center;
    display: flex;
    gap: .65rem;
    justify-content: space-between;
    min-height: 52px;
    padding: .65rem .85rem;
}

.kosmos-style-image-meta code {
    display: block;
    font-size: .66rem;
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kosmos-style-image-meta a {
    flex: 0 0 auto;
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none;
}

.ea-dark-scheme .kosmos-style-image-card,
html[data-kosmos-color-scheme="dark"] .kosmos-style-image-card {
    background: color-mix(in srgb, var(--body-bg) 86%, #000);
}

.ea-dark-scheme .kosmos-style-image-stage,
html[data-kosmos-color-scheme="dark"] .kosmos-style-image-stage {
    background:
        linear-gradient(135deg, rgba(114, 207, 255, .07), rgba(168, 226, 255, .09)),
        var(--form-control-bg);
}

/* Standalone security screens intentionally do not depend on EasyAdmin markup. */
.kosmos-standalone {
    background:
        radial-gradient(circle at 14% 9%, color-mix(in srgb, var(--kosmos-pink) 14%, transparent), transparent 34%),
        radial-gradient(circle at 88% 91%, color-mix(in srgb, var(--kosmos-aqua) 13%, transparent), transparent 32%),
        var(--kosmos-auth-bg);
    box-sizing: border-box;
    color: var(--kosmos-auth-text);
    font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
}

.kosmos-standalone *,
.kosmos-standalone *::before,
.kosmos-standalone *::after {
    box-sizing: inherit;
}

.kosmos-logout-page {
    display: grid;
    padding: 20px;
    place-items: center;
}

.kosmos-auth-card {
    background: var(--kosmos-auth-card);
    border: 1px solid var(--kosmos-border);
    border-radius: 24px;
    box-shadow: var(--kosmos-shadow);
    max-width: 420px;
    padding: 32px;
    text-align: center;
    width: 100%;
}

.kosmos-auth-card h1 {
    color: var(--kosmos-auth-text);
    font-size: 28px;
    letter-spacing: -.025em;
    margin: 0 0 12px;
}

.kosmos-auth-card p {
    color: var(--kosmos-auth-muted);
    margin: 0 0 24px;
}

.kosmos-auth-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.kosmos-auth-actions form {
    margin: 0;
}

.kosmos-auth-button {
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 750;
    justify-content: center;
    min-height: 46px;
    padding: 11px 22px;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.kosmos-auth-button:hover {
    transform: translateY(-1px);
}

.kosmos-auth-button.is-secondary {
    background: color-mix(in srgb, var(--kosmos-auth-text) 8%, var(--kosmos-auth-card));
    border-color: var(--kosmos-border);
    color: var(--kosmos-auth-text);
}

.kosmos-auth-button.is-secondary:hover {
    background: color-mix(in srgb, var(--kosmos-auth-text) 14%, var(--kosmos-auth-card));
}

.kosmos-auth-button.is-primary {
    background: #0078b0;
    color: #fff;
}

.kosmos-auth-button.is-primary:hover {
    background: #006ba6;
}

@media (prefers-color-scheme: dark) {
    html:not([data-kosmos-color-scheme="light"]) .kosmos-standalone {
        --kosmos-pink: #72cfff;
        --kosmos-aqua: #a8e2ff;
        --kosmos-border: rgba(232, 246, 255, .15);
        --kosmos-shadow: 0 12px 34px rgba(0, 0, 0, .28);
        --kosmos-auth-bg: #17212d;
        --kosmos-auth-card: #243240;
        --kosmos-auth-text: #f1faff;
        --kosmos-auth-muted: #b8c9d9;
    }
}

@media (max-width: 1280px) {
    .kosmos-stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .kosmos-lab-grid {
        grid-template-columns: minmax(320px, .9fr) minmax(390px, 1.1fr);
    }
}

@media (max-width: 900px) {
    .kosmos-dashboard-columns,
    .kosmos-detail-columns,
    .kosmos-lab-grid {
        grid-template-columns: 1fr;
    }

    .kosmos-style-image-preview-grid {
        grid-template-columns: 1fr;
    }

    .kosmos-style-image-stage {
        height: min(70vh, 620px);
    }

    .kosmos-session-actions {
        grid-template-columns: 1fr;
    }

    .kosmos-session-action-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .kosmos-status-strip,
    .kosmos-section-heading,
    .kosmos-style-image-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .kosmos-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kosmos-result-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .kosmos-style-image-preview {
        padding: .75rem;
    }

    .kosmos-style-image-stage {
        height: min(62vh, 520px);
    }

    .page-login .login-wrapper .content {
        border-radius: 14px;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .kosmos-stat-grid,
    .kosmos-reference-grid,
    .kosmos-attempt dl {
        grid-template-columns: 1fr;
    }

    .kosmos-panel,
    .kosmos-session-actions {
        padding: .85rem;
    }

    .kosmos-session-action-buttons,
    .kosmos-session-action-buttons .btn,
    .kosmos-lab-form-panel .btn-lg {
        width: 100%;
    }

    .kosmos-session-action-buttons .btn {
        justify-content: center;
    }

    .kosmos-attempt > header,
    .kosmos-timeline-card > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .kosmos-progress-steps {
        gap: .1rem;
    }

    .kosmos-progress-steps small {
        font-size: .63rem;
        line-height: 1.2;
    }

    .kosmos-result-canvas {
        max-height: none;
    }

    .kosmos-auth-card {
        border-radius: 18px;
        padding: 26px 20px;
    }

    .kosmos-auth-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .kosmos-auth-actions form,
    .kosmos-auth-button {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .kosmos-result-metrics {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ea *,
    .ea *::before,
    .ea *::after,
    .kosmos-standalone *,
    .kosmos-standalone *::before,
    .kosmos-standalone *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Hospitality operations dashboard */
.hospitality-dashboard{--hd-ink:#243746;--hd-muted:#718392;--hd-line:#e5edf3;--hd-card:#fff;color:var(--hd-ink);padding-bottom:28px}
.hd-hero{position:relative;overflow:hidden;border-radius:22px;padding:30px 34px;background:linear-gradient(115deg,#12384d,#006fa7 70%,#26aff0);color:#fff;display:flex;justify-content:space-between;gap:24px;box-shadow:0 14px 38px #0078b017}
.hd-hero:after{content:"";position:absolute;width:290px;height:290px;border:52px solid #ffffff08;border-radius:50%;right:100px;top:-170px;pointer-events:none}
.hd-kicker{display:block;letter-spacing:.14em;font-size:10px;font-weight:750;color:var(--hd-muted);margin-bottom:7px}
.hd-hero .hd-kicker{color:#bde9ff}.hd-hero h1{font-size:30px!important;font-weight:750!important;letter-spacing:-.8px;margin:0 0 10px!important;color:#fff!important}.hd-hero p{color:#d0e9f6;font-size:13px;margin:0 0 20px}.hd-live{display:flex;align-items:center;gap:9px;font-size:12px;flex-wrap:wrap}.hd-dot{width:7px;height:7px;display:inline-block;border-radius:50%;background:#ffc27b}.hd-dot.is-on{background:#7de0c2;box-shadow:0 0 0 4px #7de0c212}.hd-live a{margin-left:12px;color:#c7ecff!important;text-decoration:none}.hd-live i{font-size:9px;margin-left:4px}.hd-hero-meta{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:9px;min-width:180px;z-index:1}.hd-hero-meta strong{font-size:22px;letter-spacing:-.5px}.hd-hero-meta span{font-size:11px;color:#d0e9f6}.hd-hero-meta a{border:1px solid #ffffff38;border-radius:9px;color:#fff!important;padding:8px 12px;font-size:12px;text-decoration:none}.hd-hero-meta a:hover{background:#ffffff15}
.hd-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:28px 0 17px}.hd-toolbar h2,.hd-panel h2{font-size:17px!important;letter-spacing:-.3px;margin:0!important;font-weight:700!important;color:var(--hd-ink)!important}.hd-toolbar>div>span{font-size:11px;color:var(--hd-muted);display:block;margin-top:5px}.hd-periods{display:flex;gap:3px;padding:4px;border:1px solid var(--hd-line);border-radius:11px;background:var(--hd-card)}.hd-periods a{color:var(--hd-muted);text-decoration:none;padding:8px 16px;border-radius:7px;font-size:12px;font-weight:650;white-space:nowrap}.hd-periods .is-selected{color:#006fa7;background:#e7f6ff}
.hd-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:22px}.hd-kpi{background:var(--hd-card);border:1px solid var(--hd-line);border-radius:15px;padding:19px 21px;min-width:0;box-shadow:0 4px 16px #26384903}.hd-kpi>div{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:12px;color:var(--hd-muted);font-weight:600}.hd-kpi>div>i{color:#58a7cd;font-size:15px}.hd-kpi>strong{display:block;font-size:34px;line-height:1.2;letter-spacing:-1px;margin:14px 0 8px;font-weight:750;font-variant-numeric:tabular-nums}.hd-kpi strong em{font-size:19px;font-style:normal;margin-left:6px;color:var(--hd-muted);font-weight:500}.hd-kpi small{font-size:11px;color:var(--hd-muted);line-height:1.5}.hd-kpi-accent{background:linear-gradient(125deg,#eaf8ff,#f5fcff);border-color:#c7e8fa}.hd-kpi-accent>strong{color:#0078b0}
.hd-main-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:20px;margin-bottom:20px}.hd-panel{border:1px solid var(--hd-line);border-radius:17px;background:var(--hd-card);padding:24px;min-width:0}.hd-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.hd-panel-heading>a,.hd-text-link{font-size:11px;font-weight:650;color:#0078b0;text-decoration:none}.hd-pill{font-size:10px;background:#f1f6f9;color:#687e8d;padding:5px 9px;border-radius:7px;white-space:nowrap}.hd-pill.is-warning,.hd-bot-state.is-warning{color:#a55a13;background:#fff3df}.hd-note{font-size:11px;line-height:1.6;color:var(--hd-muted);margin:16px 0 0}
.hd-funnel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.hd-funnel-step{display:flex;flex-direction:column;gap:11px;min-width:0}.hd-step-icon{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:#eaf6fd;color:#2089ba;border-radius:10px;font-size:12px}.hd-funnel-step>strong{font-size:29px;line-height:1;letter-spacing:-.7px}.hd-funnel-step>span:not(.hd-step-icon){font-size:10px;color:var(--hd-muted);min-height:28px;line-height:1.4}.hd-track{height:5px;background:#edf3f7;border-radius:5px;overflow:hidden}.hd-track>span{display:block;height:100%;background:linear-gradient(90deg,#26aff0,#0078b0);border-radius:5px}.hd-insight{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;background:#f5faff;border-radius:10px;margin-top:18px;color:#477084;font-size:11px;line-height:1.6}.hd-insight i{color:#168abd;margin-top:3px}
.hd-queue{display:flex;gap:30px;margin-bottom:16px;padding-bottom:18px;border-bottom:1px solid var(--hd-line)}.hd-queue>div{display:flex;align-items:baseline;gap:8px}.hd-queue strong{font-size:26px;line-height:1;letter-spacing:-.5px}.hd-queue span{font-size:11px;color:var(--hd-muted)}.hd-bot{display:flex;gap:10px;align-items:center;margin:14px 0}.hd-bot-icon{width:31px;height:31px;display:flex;align-items:center;justify-content:center;color:#1587c1;background:#eaf6fd;border-radius:10px;font-weight:750;flex-shrink:0}.hd-bot>div:nth-child(2){flex:1;min-width:0}.hd-bot strong{font-size:12px;display:block}.hd-bot small{display:block;font-size:9px;color:var(--hd-muted);margin-top:4px;line-height:1.5}.hd-bot-state{font-size:9px;color:var(--hd-muted);white-space:nowrap}.hd-bot-state.is-ready{color:#218667}.hd-text-link{display:block;padding-top:7px}.hd-text-link i{margin-left:8px}.hd-alert{background:#fff3df;border-radius:8px;color:#a55a13;padding:10px;font-size:11px;line-height:1.5}
.hd-legend{display:flex;gap:12px;font-size:10px;color:var(--hd-muted)}.hd-legend i{display:inline-block;width:6px;height:6px;background:#b8e4f9;margin-right:5px;border-radius:2px}.hd-legend span:nth-child(2) i{background:#0886c1}.hd-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:13px;padding-top:14px}.hd-chart-day{display:flex;flex-direction:column;align-items:center;gap:11px;font-size:10px;color:var(--hd-muted)}.hd-chart-bars{display:flex;align-items:flex-end;justify-content:center;gap:4px;width:100%;height:145px;border-bottom:1px solid var(--hd-line);background:repeating-linear-gradient(to top,transparent,transparent 47px,#e9eff45c 48px)}.hd-bar{position:relative;flex:1;max-width:22px;min-height:2px;background:#b8e4f9;border-radius:4px 4px 0 0}.hd-bar.is-completed{background:linear-gradient(#26aff0,#0078b0)}.hd-bar>span{position:absolute;top:-17px;left:50%;transform:translateX(-50%);font-size:9px;color:#6e8798}.hd-catalog-total{display:flex;align-items:center;gap:14px;margin-bottom:20px}.hd-catalog-total strong{font-size:32px;letter-spacing:-1px}.hd-catalog-total strong span{font-size:21px;color:#a2b3bf;font-weight:450}.hd-catalog-total>span{font-size:11px;color:var(--hd-muted)}.hd-category{margin:16px 0}.hd-category>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:10px}.hd-category i{width:22px;color:#489dc5}
.hd-style{display:flex;align-items:center;gap:13px;padding:12px 0;border-top:1px solid var(--hd-line)}.hd-style:nth-child(2){border-top:0;padding-top:0}.hd-rank{font-size:10px;color:#9caeba}.hd-style img,.hd-style-placeholder{width:40px;height:50px;object-fit:cover;object-position:center 25%;border-radius:8px;background:#eaf5fb}.hd-style>div{flex:1;min-width:0}.hd-style strong{display:block;font-size:12px}.hd-style small{display:block;color:var(--hd-muted);font-size:10px;margin-top:5px}.hd-style-count{font-size:20px;font-weight:700;text-align:right}.hd-style-count small{font-weight:400}.hd-style-placeholder{display:flex;align-items:center;justify-content:center;color:#69a7c3}.hd-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:24px 8px;color:var(--hd-muted)}.hd-empty>i{font-size:20px;background:#f0f6fa;padding:16px;border-radius:50%;color:#68a4c1}.hd-empty>strong{font-size:13px;color:var(--hd-ink)}.hd-empty>span{font-size:11px;line-height:1.6;max-width:260px}.hd-empty-success>i{color:#2d9679;background:#edf8f4}.hd-error{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--hd-line);padding:12px 0;color:var(--hd-ink);text-decoration:none}.hd-error>i:first-child{color:#c9873d}.hd-error>div{flex:1;min-width:0}.hd-error strong{font-size:12px;display:block}.hd-error small{font-size:10px;color:var(--hd-muted);display:block;margin-top:4px;overflow-wrap:anywhere}.hd-error>i:last-child{font-size:10px;color:var(--hd-muted)}.hd-budget{display:grid;grid-template-columns:1fr auto;gap:6px;padding:15px 0 0;border-top:1px solid var(--hd-line);margin-top:15px;font-size:12px}.hd-budget small{grid-column:1/-1;color:var(--hd-muted);font-size:10px}.hd-sessions{margin-bottom:20px}.hd-sessions .table{margin-bottom:0;font-size:11px}.hd-sessions th{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--hd-muted);font-weight:600!important;white-space:nowrap}.hd-sessions td{vertical-align:middle;padding-top:13px!important;padding-bottom:13px!important;white-space:nowrap}.hd-cell-note{display:block;font-size:9px;color:var(--hd-muted);margin-top:5px}.hd-cost-details summary{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;cursor:pointer;list-style:none}.hd-cost-details summary>span>i{margin-right:10px;color:#4b97ba}.hd-cost-details summary strong i{font-size:10px;margin-left:12px}.hd-cost-details[open] summary{margin-bottom:16px}.hd-cost-details .kosmos-metrics-list{margin-top:14px;font-size:12px}.hd-cost-details summary::-webkit-details-marker{display:none}
html[data-ea-color-scheme="dark"] .hospitality-dashboard,body.ea-dark-scheme .hospitality-dashboard{--hd-ink:#e5eff6;--hd-muted:#9bb0bf;--hd-line:#344956;--hd-card:#223340}.ea-dark-scheme .hd-kpi-accent{background:#203f50}.ea-dark-scheme .hd-insight{background:#243f50;color:#aecbd9}.ea-dark-scheme .hd-pill,.ea-dark-scheme .hd-periods .is-selected{background:#2d485a;color:#a4dcf5}
@media(min-width:1650px){.hd-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.hd-kpi{padding:18px}.hd-kpi>div{font-size:11px}}
@media(max-width:1100px){.hd-main-grid{grid-template-columns:1fr}.hd-hero{padding:26px}.hd-funnel-step>span:not(.hd-step-icon){min-height:unset}.hd-hero h1{font-size:26px!important}}
@media(max-width:650px){.hd-hero{padding:22px;flex-direction:column;border-radius:17px}.hd-hero-meta{align-items:flex-start;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;gap:10px}.hd-hero-meta strong{font-size:14px}.hd-hero-meta a{display:none}.hd-hero h1{font-size:25px!important}.hd-toolbar{align-items:flex-start;flex-direction:column;gap:14px}.hd-periods{width:100%}.hd-periods a{flex:1;text-align:center}.hd-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hd-kpi{padding:16px}.hd-kpi>strong{font-size:29px}.hd-kpi>div{font-size:11px;align-items:flex-start}.hd-kpi>div>i{font-size:12px}.hd-kpi small{font-size:10px}.hd-panel{padding:18px;border-radius:14px}.hd-panel-heading{margin-bottom:20px}.hd-panel h2{font-size:16px!important}.hd-funnel{gap:10px}.hd-funnel-step>span:not(.hd-step-icon){min-height:28px;font-size:9px}.hd-funnel-step>strong{font-size:25px}.hd-chart{gap:8px}.hd-chart-bars{height:120px;gap:3px}.hd-bot-state{font-size:8px}.hd-live a{margin-left:0}.hd-main-grid{gap:15px;margin-bottom:15px}.hd-legend{gap:7px;font-size:9px}.hd-style{gap:10px}}
