:root {
    color-scheme: dark;
    font-family: "Segoe UI", Inter, system-ui, sans-serif;
    --bg: #07101f;
    --panel: rgba(20, 31, 52, .78);
    --panel-soft: rgba(255, 255, 255, .045);
    --line: rgba(255, 255, 255, .12);
    --text: #f4f7fb;
    --muted: #9facbf;
    --accent: #67e8c4;
    --accent-dark: #123d38;
    --danger: #ff7b8d;
    --success: #68e6ad;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.admin-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 8%, rgba(45, 212, 191, .13), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(96, 165, 250, .13), transparent 32%),
        linear-gradient(145deg, #07101f 0%, #0a1425 48%, #050a14 100%);
}

.admin-background::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
    background-image: radial-gradient(rgba(255, 255, 255, .35) .7px, transparent .7px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 74%);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -.04em;
}

h2 {
    margin-bottom: 4px;
    font-size: clamp(20px, 2.3vw, 27px);
    letter-spacing: -.025em;
}

h3 {
    margin-bottom: 4px;
    font-size: 18px;
}

.muted,
.license-title-row p {
    color: var(--muted);
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid rgba(103, 232, 196, .32);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(103, 232, 196, .21), rgba(96, 165, 250, .12));
    color: #d9fff5;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
    font-size: 20px;
    font-weight: 800;
}

.brand-mark--small {
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 13px;
    font-size: 14px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.admin-login-card {
    width: min(440px, 100%);
    padding: clamp(28px, 5vw, 44px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)), rgba(10, 20, 37, .8);
    box-shadow: 0 36px 90px rgba(0, 0, 0, .38);
    backdrop-filter: blur(24px);
}

.admin-login-card h1 {
    font-size: 34px;
}

.admin-form,
.license-form {
    display: grid;
    gap: 16px;
}

.admin-form {
    margin-top: 28px;
}

.admin-form label,
.field {
    display: grid;
    gap: 7px;
}

.admin-form label > span,
.field > span {
    color: #b8c4d4;
    font-size: 12px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    background: rgba(3, 8, 18, .46);
    color: var(--text);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:focus,
select:focus {
    border-color: rgba(103, 232, 196, .62);
    background: rgba(3, 8, 18, .7);
    box-shadow: 0 0 0 3px rgba(103, 232, 196, .1);
}

input::placeholder {
    color: #657389;
}

.primary-button,
.ghost-button,
.danger-button,
.success-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
    transition: transform .16s ease, opacity .16s ease, background .16s ease;
}

.primary-button {
    background: linear-gradient(180deg, #7cf0d0, #4fd5b3);
    color: #06211d;
    box-shadow: 0 14px 30px rgba(45, 212, 191, .18);
}

.primary-button--link {
    min-width: 132px;
}

.ghost-button {
    border-color: var(--line);
    background: rgba(255, 255, 255, .055);
}

.danger-button {
    border-color: rgba(255, 123, 141, .28);
    background: rgba(255, 123, 141, .12);
    color: #ffc2ca;
}

.success-button {
    border-color: rgba(104, 230, 173, .28);
    background: rgba(104, 230, 173, .12);
    color: #adf8d3;
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.success-button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
}

.admin-header {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(20px, 4vw, 58px);
    border-bottom: 1px solid var(--line);
    background: rgba(5, 11, 22, .68);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.admin-brand strong,
.admin-brand small {
    display: block;
}

.admin-brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.admin-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header__actions form {
    margin: 0;
}

.secure-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.secure-badge {
    padding: 7px 11px;
    background: rgba(104, 230, 173, .1);
    color: #9af1c7;
}

.admin-user {
    color: var(--muted);
    font-size: 13px;
}

.admin-shell {
    width: min(1460px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(28px, 5vw, 60px) 0 80px;
}

.page-heading,
.panel-heading,
.license-title-row,
.license-card__actions,
.generated-key-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-heading {
    margin-bottom: 28px;
}

.license-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-summary span {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.license-summary strong {
    color: var(--text);
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.stat-card,
.panel,
.generated-key-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 22px 56px rgba(0, 0, 0, .18);
    backdrop-filter: blur(18px);
}

.stat-card {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 18px;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.stat-card strong {
    font-size: 34px;
    letter-spacing: -.04em;
}

.panel,
.generated-key-card {
    margin-top: 20px;
    padding: clamp(20px, 3vw, 30px);
    border-radius: 22px;
}

.panel-heading {
    margin-bottom: 22px;
}

.panel-note {
    color: var(--muted);
    font-size: 12px;
}

.generated-key-card {
    border-color: rgba(103, 232, 196, .3);
    background: linear-gradient(145deg, rgba(29, 78, 70, .52), rgba(16, 36, 54, .78));
}

.generated-key-card p {
    margin-bottom: 0;
    color: #b8dacf;
}

.generated-key-card--inline {
    margin: 0 0 24px;
    padding: 18px 20px;
    border-radius: 16px;
    box-shadow: none;
}

.generated-key-card--inline h3 {
    margin-bottom: 5px;
}

.generated-key-row {
    margin-top: 20px;
}

.generated-key-row code {
    flex: 1;
    min-width: 0;
    padding: 15px 17px;
    overflow-x: auto;
    border: 1px solid rgba(103, 232, 196, .25);
    border-radius: 14px;
    background: rgba(2, 12, 18, .45);
    color: #d8fff4;
    font-size: clamp(13px, 2vw, 17px);
    white-space: nowrap;
}

.license-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field--wide,
.form-actions,
.validation-summary {
    grid-column: span 2;
}

.field small,
.field em {
    min-height: 14px;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.field em,
.validation-summary {
    color: #ff9aa8;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.form-actions .primary-button {
    min-width: 180px;
}

.search-form {
    width: min(440px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.license-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-soft);
    scrollbar-color: rgba(103, 232, 196, .45) transparent;
}

.license-table {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
    text-align: left;
}

.license-table th {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 12, 18, .28);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.license-table td {
    padding: 16px;
    vertical-align: top;
    font-size: 12px;
}

.license-table__main-row:not(:first-child) td {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.license-table__main-row:hover td,
.license-table__main-row:hover + .license-table__activation-row td {
    background: rgba(103, 232, 196, .025);
}

.license-table td > small,
.license-table td > code {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.license-table td > code {
    color: #718096;
}

.license-key-cell {
    min-width: 300px;
}

.license-key-cell > code {
    margin-top: 0;
    color: #c9fff0;
    font-size: 11px;
    white-space: nowrap;
}

.license-key-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.license-key-actions form,
.license-key-cell > form {
    margin: 0;
}

.license-key-actions .ghost-button,
.legacy-key-button {
    padding: 7px 9px;
    font-size: 10px;
}

.legacy-key-note {
    display: block;
    max-width: 240px;
    color: #f4c58a;
    font-size: 10px;
    line-height: 1.45;
}

.legacy-key-button {
    margin-top: 8px;
}

.license-expiry-cell {
    min-width: 150px;
}

.license-expiry-editor {
    margin-top: 7px;
}

.license-expiry-editor summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 10px;
    font-weight: 750;
}

.license-expiry-editor form {
    display: grid;
    gap: 6px;
    width: 180px;
    margin-top: 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(2, 12, 18, .72);
}

.license-expiry-editor input {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 11px;
}

.license-expiry-editor small {
    color: var(--muted);
    font-size: 9px;
}

.license-expiry-editor .ghost-button {
    padding: 7px 9px;
    font-size: 10px;
}

.license-customer {
    display: block;
    color: var(--text);
    font-size: 13px;
}

.license-table__action-heading,
.license-table__actions {
    text-align: right;
}

.license-table__actions form {
    margin: 0;
}

.table-action-button {
    min-width: 96px;
    padding: 9px 12px;
    font-size: 12px;
}

.license-table__activation-row td {
    padding: 0 16px 12px;
}

.status-pill {
    padding: 6px 10px;
}

.status-pill--active {
    background: rgba(104, 230, 173, .12);
    color: #9af1c7;
}

.status-pill--passive {
    background: rgba(255, 123, 141, .12);
    color: #ffacb7;
}

.feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
}

.feature-row span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(96, 165, 250, .1);
    color: #b7d5ff;
    font-size: 10px;
    font-weight: 700;
}

.feature-row--compact {
    margin-top: 7px;
}

.feature-row--compact span {
    padding: 4px 7px;
}

.activation-panel {
    padding-top: 12px;
    padding-bottom: 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.activation-panel--table {
    padding: 0;
    border-top: 0;
}

.activation-panel--table[open] {
    padding: 10px 12px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .13);
}

.activation-panel summary {
    cursor: pointer;
    color: #c5cfdd;
    font-size: 12px;
    font-weight: 750;
}

.activation-list {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.activation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .13);
}

.activation-row strong,
.activation-row small {
    display: block;
}

.activation-row strong {
    font-family: Consolas, monospace;
    font-size: 12px;
}

.activation-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.activation-row form {
    margin: 0;
}

.empty-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
}

.alert {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    font-size: 13px;
}

.alert--danger {
    border-color: rgba(255, 123, 141, .3);
    background: rgba(255, 123, 141, .1);
    color: #ffc0c8;
}

.alert--success {
    border-color: rgba(104, 230, 173, .3);
    background: rgba(104, 230, 173, .1);
    color: #aaf4d0;
}

@media (max-width: 980px) {
    .license-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .admin-header,
    .page-heading,
    .panel-heading,
    .generated-key-row {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-header {
        position: static;
    }

    .admin-header__actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .secure-badge {
        display: none;
    }

    .admin-shell {
        width: min(100% - 24px, 1460px);
        padding-top: 28px;
    }

    .stats-grid,
    .license-form {
        grid-template-columns: 1fr;
    }

    .license-summary {
        width: 100%;
        flex-wrap: wrap;
    }

    .license-summary span {
        flex: 1;
        justify-content: center;
        min-width: 92px;
    }

    .field--wide,
    .form-actions,
    .validation-summary {
        grid-column: auto;
    }

    .form-actions .primary-button,
    .primary-button--link {
        width: 100%;
    }

    .search-form {
        width: 100%;
    }

    .activation-row {
        grid-template-columns: 1fr auto;
    }

    .activation-row form {
        grid-column: 1 / -1;
    }

    .activation-row form button {
        width: 100%;
    }
}

.manifest-import-form {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
    gap: 22px;
    align-items: stretch;
}

.manifest-json-field textarea {
    min-height: 360px;
    resize: vertical;
    font: 12px/1.65 "Cascadia Code", Consolas, monospace;
}

.manifest-upload-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.manifest-upload-side .primary-button {
    margin-top: auto;
}

.manifest-rules {
    display: grid;
    gap: 9px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .025);
    color: var(--muted);
    font-size: 12px;
}

.manifest-rules strong {
    color: var(--text);
}

.manifest-rules span::before {
    content: "✓";
    margin-right: 8px;
    color: var(--accent);
}

.application-admin-list {
    display: grid;
    gap: 18px;
}

.application-admin-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(4, 13, 27, .5);
}

.application-admin-card--passive {
    opacity: .68;
}

.application-admin-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.application-admin-heading h3,
.application-admin-heading p {
    margin: 0;
}

.application-admin-heading p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.status-pill--published {
    border-color: rgba(96, 165, 250, .35);
    background: rgba(59, 130, 246, .14);
    color: #bfdbfe;
}

.application-admin-grid {
    display: grid;
    grid-template-columns: minmax(300px, .82fr) minmax(380px, 1.18fr);
    gap: 22px;
    align-items: stretch;
}

.promo-card-preview {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    padding: 17px 18px 15px;
    overflow: hidden;
    border: 1px solid rgba(196, 211, 232, .25);
    border-radius: 21px;
    background:
        radial-gradient(circle at 20% 15%, rgba(96, 165, 250, .17), transparent 40%),
        linear-gradient(145deg, rgba(75, 89, 119, .78), rgba(23, 34, 58, .92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
}

.promo-card-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #f4f7fb;
    font-size: 12px;
}

.promo-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fb7185;
    box-shadow: 0 0 0 0 rgba(251, 113, 133, .5);
    animation: promo-dot-pulse 1.8s ease-out infinite;
}

.promo-card-preview__body {
    flex: 1;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.promo-card-preview__icon {
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .3));
}

.promo-card-preview__body div {
    display: grid;
    gap: 8px;
}

.promo-card-preview__body strong {
    color: #f7f9fc;
    font-size: 20px;
    line-height: 1.15;
}

.promo-card-preview__body span {
    color: #c9d2e0;
    font-size: 12px;
    line-height: 1.5;
}

.promo-card-preview__more {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: #f0c879;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
}

.promotion-edit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.promotion-edit-form .field:nth-child(1),
.promotion-edit-form .field:nth-child(2),
.promotion-edit-form .publish-option,
.promotion-edit-form .primary-button {
    grid-column: 1 / -1;
}

.publish-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #dce5ef;
    font-size: 12px;
    font-weight: 750;
}

.publish-option input {
    width: 16px;
    height: 16px;
}

.promo-icon--glow {
    animation: promo-icon-glow 2.8s ease-in-out infinite;
}

.promo-icon--pulse {
    animation: promo-icon-pulse 2.4s ease-in-out infinite;
}

.promo-icon--float {
    animation: promo-icon-float 3.4s ease-in-out infinite;
}

@keyframes promo-dot-pulse {
    70% { box-shadow: 0 0 0 8px rgba(251, 113, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); }
}

@keyframes promo-icon-glow {
    50% { filter: drop-shadow(0 0 20px rgba(96, 165, 250, .75)); }
}

@keyframes promo-icon-pulse {
    50% { transform: scale(1.07); }
}

@keyframes promo-icon-float {
    50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
    .promo-live-dot,
    .promo-card-preview__icon {
        animation: none !important;
    }
}

@media (max-width: 1050px) {
    .manifest-import-form,
    .application-admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .application-admin-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .application-admin-heading form button,
    .promotion-edit-form .primary-button {
        width: 100%;
    }

    .promotion-edit-form {
        grid-template-columns: 1fr;
    }

    .promotion-edit-form .field,
    .promotion-edit-form .publish-option,
    .promotion-edit-form .primary-button {
        grid-column: auto;
    }

    .promo-card-preview__body {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .promo-card-preview__icon {
        width: 68px;
        height: 68px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.core-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.core-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    background: rgba(5, 11, 22, .82);
    backdrop-filter: blur(22px);
}

.core-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 22px;
    color: var(--text);
    text-decoration: none;
}

.core-brand strong,
.core-brand small {
    display: block;
}

.core-brand strong {
    font-size: 17px;
}

.core-brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.core-nav {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.core-nav__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
}

.core-nav__item--active {
    border-color: rgba(103, 232, 196, .2);
    background: rgba(103, 232, 196, .09);
}

.core-nav__icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(103, 232, 196, .13);
    color: var(--accent);
    font-size: 20px;
}

.core-nav__item strong,
.core-nav__item small {
    display: block;
}

.core-nav__item strong {
    font-size: 13px;
}

.core-nav__item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.core-sidebar__footer {
    margin-top: auto;
    padding: 12px 8px 0;
}

.core-content {
    min-width: 0;
}

.core-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(20px, 4vw, 48px);
    border-bottom: 1px solid var(--line);
    background: rgba(5, 11, 22, .68);
    backdrop-filter: blur(20px);
}

.core-topbar > div:first-child strong,
.core-topbar > div:first-child span {
    display: block;
}

.core-topbar > div:first-child span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.core-shell {
    width: min(1180px, calc(100% - 40px));
}

.simple-license-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.simple-license-form > .validation-summary,
.simple-license-form > .module-fieldset,
.simple-license-form > .form-actions {
    grid-column: 1 / -1;
}

.module-fieldset {
    min-width: 0;
    margin: 2px 0 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(3, 8, 18, .22);
}

.module-fieldset legend {
    padding: 0 7px;
    color: #b8c4d4;
    font-size: 12px;
    font-weight: 750;
}

.module-fieldset > small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 10px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.module-option {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
    color: #c9d4e1;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.module-option:has(input:checked) {
    border-color: rgba(103, 232, 196, .38);
    background: rgba(103, 232, 196, .09);
    color: #d8fff4;
}

.module-option input {
    width: 16px;
    min-height: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
}

.customer-license-list {
    display: grid;
    gap: 14px;
}

.customer-license-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .025);
}

.customer-license-card__heading,
.customer-title-row,
.license-key-panel,
.customer-license-card__actions {
    display: flex;
    align-items: center;
}

.customer-license-card__heading {
    justify-content: space-between;
    gap: 20px;
}

.customer-title-row {
    gap: 10px;
}

.customer-title-row h3,
.customer-license-card__heading p {
    margin-bottom: 0;
}

.customer-license-card__heading p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.license-expiry-summary {
    text-align: right;
}

.license-expiry-summary span,
.license-expiry-summary strong {
    display: block;
}

.license-expiry-summary span,
.license-key-panel > span,
.assigned-modules > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.license-expiry-summary strong {
    margin-top: 4px;
    font-size: 14px;
}

.license-key-panel {
    gap: 10px;
    margin-top: 18px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(2, 12, 18, .36);
}

.license-key-panel code {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    color: #d8fff4;
    font-size: 12px;
    white-space: nowrap;
}

.license-key-panel em {
    flex: 1;
    color: #f4c58a;
    font-size: 11px;
}

.license-key-panel .ghost-button {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 10px;
}

.assigned-modules {
    margin-top: 16px;
}

.customer-license-card__actions {
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.customer-license-card__actions > form {
    margin: 0 0 0 auto;
}

.license-editor {
    flex: 1;
}

.license-editor > summary {
    width: max-content;
    cursor: pointer;
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
}

.license-editor[open] {
    width: 100%;
}

.license-edit-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(3, 8, 18, .32);
}

.license-edit-form > .module-fieldset,
.license-edit-form > .form-actions {
    grid-column: 1 / -1;
}

.license-edit-form .form-actions,
.simple-license-form .form-actions {
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    .module-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .core-layout {
        grid-template-columns: 1fr;
    }

    .core-sidebar {
        position: static;
        height: auto;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .core-brand {
        padding-bottom: 14px;
    }

    .core-nav {
        padding-top: 10px;
    }

    .core-sidebar__footer {
        display: none;
    }

    .core-topbar {
        position: static;
    }

    .simple-license-form,
    .license-edit-form {
        grid-template-columns: 1fr;
    }

    .license-edit-form > .module-fieldset,
    .license-edit-form > .form-actions {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .core-topbar,
    .customer-license-card__heading,
    .customer-license-card__actions,
    .license-key-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .core-topbar .admin-header__actions {
        justify-content: space-between;
    }

    .module-grid {
        grid-template-columns: 1fr 1fr;
    }

    .license-expiry-summary {
        text-align: left;
    }

    .customer-license-card__actions > form {
        width: 100%;
        margin-left: 0;
    }

    .customer-license-card__actions > form button,
    .license-key-panel button {
        width: 100%;
    }
}

.setup-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(20px, 4vw, 48px);
}

.setup-card {
    width: min(920px, 100%);
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)), rgba(10, 20, 37, .88);
    box-shadow: 0 36px 90px rgba(0, 0, 0, .38);
    backdrop-filter: blur(24px);
}

.setup-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.setup-header .brand-mark {
    flex: 0 0 auto;
    margin: 0;
}

.setup-header h1 {
    margin-bottom: 5px;
    font-size: clamp(28px, 4vw, 40px);
}

.setup-header p:last-child,
.setup-section-heading p:last-child {
    margin-bottom: 0;
}

.setup-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 30px 0;
    padding: 0;
    list-style: none;
}

.setup-progress li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.setup-progress li span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #c8d2df;
}

.setup-progress li.is-active {
    border-color: rgba(103, 232, 196, .42);
    background: rgba(103, 232, 196, .09);
    color: #d8fff4;
}

.setup-progress li.is-active span,
.setup-progress li.is-complete span {
    background: var(--accent);
    color: #06211d;
}

.setup-step {
    min-height: 390px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 8, 18, .3);
}

.setup-step[hidden],
.field[hidden] {
    display: none;
}

.setup-section-heading {
    margin-bottom: 24px;
}

.setup-section-heading > p:last-child {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.setup-grid .field--wide {
    grid-column: 1 / -1;
}

.setup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
}

.setup-actions button {
    min-width: 150px;
}

.setup-message {
    margin: -14px 0 18px;
}

.setup-summary {
    display: grid;
    gap: 10px;
    margin: 0;
}

.setup-summary > div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .025);
}

.setup-summary dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.setup-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
}

.setup-atomic-note {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid rgba(103, 232, 196, .24);
    border-radius: 13px;
    background: rgba(103, 232, 196, .07);
    color: #bcebdd;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 680px) {
    .setup-header,
    .setup-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .setup-progress,
    .setup-grid {
        grid-template-columns: 1fr;
    }

    .setup-grid .field--wide {
        grid-column: auto;
    }

    .setup-progress li:not(.is-active) {
        display: none;
    }

    .setup-summary > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .setup-actions button {
        width: 100%;
    }
}

/* Compact DexCore management workspace */
.core-layout--workspace {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.core-content--workspace {
    min-height: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.core-content--workspace .core-topbar {
    flex: 0 0 66px;
    min-height: 66px;
}

.admin-workspace {
    width: min(1480px, calc(100% - 32px));
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 auto;
    padding: 18px 0;
    overflow: hidden;
}

.workspace-heading {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.workspace-breadcrumb {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .14em;
}

.workspace-heading h1 {
    margin: 0;
    font-size: clamp(24px, 2.1vw, 30px);
    letter-spacing: -.03em;
}

.workspace-heading > div:first-child > p:last-child {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.workspace-heading__actions,
.workspace-stats {
    display: flex;
    align-items: center;
    gap: 9px;
}

.workspace-stats span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.workspace-stats strong {
    color: var(--text);
    font-size: 13px;
}

.workspace-alert {
    flex: 0 0 auto;
    margin: 0;
    padding: 9px 12px;
    font-size: 11px;
}

.data-panel {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(13, 24, 43, .82);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .16);
}

.data-toolbar {
    flex: 0 0 auto;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(4, 12, 25, .28);
}

.data-toolbar h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.015em;
}

.data-toolbar > div > span,
.data-toolbar__note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.data-search {
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    gap: 7px;
}

.data-search input {
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 9px;
    font-size: 11px;
}

.button--compact,
.icon-button {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 10px;
    white-space: nowrap;
}

.icon-button {
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-weight: 750;
}

.data-table-wrap {
    min-height: 0;
    flex: 1;
    overflow: auto;
    scrollbar-color: rgba(103, 232, 196, .35) transparent;
}

.data-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: left;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 38px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: #101c30;
    color: #8190a4;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.data-table td {
    height: 58px;
    padding: 8px 12px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, .065);
    vertical-align: middle;
    font-size: 11px;
}

.data-table tbody tr:hover td {
    background: rgba(103, 232, 196, .025);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table th:nth-child(1) { width: 17%; }
.data-table th:nth-child(2) { width: 16%; }
.data-table th:nth-child(3) { width: 18%; }
.data-table th:nth-child(4) { width: 18%; }
.data-table th:nth-child(5) { width: 10%; }
.data-table th:nth-child(6) { width: 8%; }
.data-table th:nth-child(7) { width: 13%; }

.data-table--applications th:nth-child(1) { width: 5%; }
.data-table--applications th:nth-child(2) { width: 21%; }
.data-table--applications th:nth-child(3) { width: 10%; }
.data-table--applications th:nth-child(4) { width: 9%; }
.data-table--applications th:nth-child(5) { width: 8%; }
.data-table--applications th:nth-child(6) { width: 9%; }
.data-table--applications th:nth-child(7) { width: 16%; }
.data-table--applications th:nth-child(8) { width: 22%; }

.data-table__actions-heading {
    text-align: right;
}

.data-table__empty {
    height: 180px !important;
    color: var(--muted);
    text-align: center;
}

.table-primary,
.table-secondary {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-primary {
    color: var(--text);
    font-size: 11px;
}

.table-secondary {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.table-value,
.table-date,
.table-code {
    color: #d5dce7;
    font-size: 10px;
}

.table-code {
    color: #b9f7e6;
}

.table-key {
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-key code {
    min-width: 0;
    overflow: hidden;
    color: #c9fff0;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.table-tags span {
    max-width: 115px;
    padding: 4px 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(96, 165, 250, .1);
    color: #bdd8ff;
    font-size: 8px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.table-actions form {
    margin: 0;
}

.data-table .status-pill {
    padding: 5px 8px;
    font-size: 9px;
}

.status-pill--draft {
    background: rgba(148, 163, 184, .11);
    color: #c3ccd8;
}

.application-table-icon {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .25));
}

.data-footer {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 14px;
    border-top: 1px solid var(--line);
    background: rgba(4, 12, 25, .28);
    color: var(--muted);
    font-size: 10px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination a,
.pagination span,
.pagination strong {
    min-width: 52px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #dce5ef;
    text-align: center;
    text-decoration: none;
    font-size: 9px;
}

.pagination strong {
    color: var(--accent);
}

.pagination .is-disabled {
    opacity: .4;
}

.admin-modal {
    width: min(860px, calc(100% - 28px));
    max-height: calc(100vh - 36px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 18px;
    outline: none;
    background: transparent;
    color: var(--text);
}

.admin-modal--wide {
    width: min(1040px, calc(100% - 28px));
}

.admin-modal--small {
    width: min(620px, calc(100% - 28px));
}

.admin-modal::backdrop {
    background: rgba(1, 6, 14, .78);
    backdrop-filter: blur(7px);
}

.modal-frame {
    max-height: calc(100vh - 36px);
    overflow: auto;
    border: 1px solid rgba(151, 170, 198, .26);
    border-radius: 18px;
    background: linear-gradient(180deg, #14223a, #0c1729);
    box-shadow: 0 34px 90px rgba(0, 0, 0, .52);
    scrollbar-color: rgba(103, 232, 196, .38) transparent;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.modal-header span {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .12em;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.modal-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .045);
    color: #cfd8e5;
    cursor: pointer;
    font-size: 20px;
}

.modal-form {
    padding: 18px 20px 20px;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.modal-form input,
.modal-form select,
.manifest-entry-form input,
.promotion-edit-form--modal input,
.promotion-edit-form--modal select {
    min-height: 40px;
    border-radius: 10px;
    font-size: 11px;
}

.module-fieldset--modal {
    margin-top: 14px;
    padding: 13px;
    border-radius: 13px;
}

.module-fieldset--modal .module-grid {
    gap: 7px;
}

.module-fieldset--modal .module-option {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 9px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.generated-key-row--modal {
    margin: 18px 20px 0;
}

.generated-key-row--modal code {
    font-size: 13px;
}

.admin-modal--small .modal-footer {
    margin: 18px 20px 20px;
}

.manifest-entry-form {
    padding: 16px 18px 18px;
}

.manifest-validation-summary {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 123, 141, .24);
    border-radius: 10px;
    background: rgba(255, 123, 141, .08);
    font-size: 10px;
}

.manifest-validation-summary.validation-summary-valid {
    display: none;
}

.manifest-validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

.manifest-inline-alert {
    margin: 0 0 12px;
}

.manifest-entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(285px, .65fr);
    gap: 12px;
    margin-top: 12px;
}

.manifest-form-section {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(3, 8, 18, .24);
}

.manifest-section-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.manifest-section-heading > span {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(103, 232, 196, .3);
    border-radius: 8px;
    background: rgba(103, 232, 196, .1);
    color: var(--accent);
    font-size: 10px;
    font-weight: 850;
}

.manifest-section-heading strong,
.manifest-section-heading small {
    display: block;
}

.manifest-section-heading strong {
    font-size: 12px;
}

.manifest-section-heading small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.manifest-fields {
    display: grid;
    gap: 10px;
}

.manifest-fields--three {
    grid-template-columns: .8fr 1.35fr .55fr;
}

.manifest-fields--two {
    grid-template-columns: .65fr 1.35fr;
}

.field--manifest-wide {
    grid-column: 1 / -1;
}

.manifest-entry-form .field {
    gap: 5px;
}

.manifest-entry-form .field > span {
    font-size: 10px;
}

.manifest-entry-form .field small,
.manifest-entry-form .field em {
    min-height: 0;
    font-size: 9px;
    line-height: 1.35;
}

.manifest-entry-form .field em:empty {
    display: none;
}

.manifest-icon-field input[type="file"] {
    min-height: 42px;
    padding: 7px;
}

.manifest-system-values {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
}

.manifest-system-values > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
}

.manifest-system-values dt,
.manifest-system-values dd {
    margin: 0;
    font-size: 9px;
}

.manifest-system-values dt {
    color: var(--muted);
}

.manifest-system-values dd {
    color: #d8fff4;
    font-weight: 750;
    text-align: right;
}

.manifest-safety-note {
    margin-top: 12px;
    padding: 9px 11px;
    border: 1px solid rgba(103, 232, 196, .2);
    border-radius: 9px;
    background: rgba(103, 232, 196, .055);
    color: #b9c9d8;
    font-size: 9px;
    line-height: 1.45;
}

.manifest-safety-note strong {
    color: var(--accent);
}

.manifest-modal-footer {
    margin-top: 12px;
}

.promotion-modal-grid {
    display: grid;
    grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr);
    gap: 18px;
    padding: 18px 20px 20px;
}

.promo-card-preview--compact {
    min-height: 260px;
}

.promotion-edit-form--modal {
    gap: 10px;
}

.promotion-modal-footer {
    grid-column: 1 / -1;
    margin-top: 0;
}

body.modal-open {
    overflow: hidden;
}

@media (max-height: 760px) and (min-width: 841px) {
    .admin-workspace {
        gap: 9px;
        padding: 10px 0;
    }

    .workspace-heading > div:first-child > p:last-child,
    .workspace-breadcrumb {
        display: none;
    }

    .workspace-heading h1 {
        font-size: 23px;
    }

    .data-toolbar {
        min-height: 54px;
    }

    .data-table td {
        height: 50px;
    }

    .data-footer {
        flex-basis: 42px;
    }
}

@media (max-width: 1100px) {
    .workspace-heading > div:first-child > p:last-child,
    .workspace-stats {
        display: none;
    }

    .modal-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-form-grid .field:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .promotion-modal-grid,
    .manifest-entry-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .core-layout--workspace,
    .core-content--workspace {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .admin-workspace {
        min-height: 680px;
        overflow: visible;
    }

    .workspace-heading,
    .data-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-heading__actions {
        justify-content: space-between;
    }

    .data-panel {
        min-height: 560px;
    }

    .data-search {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .admin-workspace {
        width: min(100% - 20px, 1480px);
    }

    .workspace-heading__actions,
    .data-search,
    .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-heading__actions > button,
    .data-search > *,
    .modal-footer > * {
        width: 100%;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .manifest-fields--three,
    .manifest-fields--two {
        grid-template-columns: 1fr;
    }

    .field--manifest-wide {
        grid-column: auto;
    }

    .modal-form-grid .field:last-child {
        grid-column: auto;
    }

    .module-fieldset--modal .module-grid {
        grid-template-columns: 1fr 1fr;
    }

    .data-footer {
        align-items: stretch;
        flex-direction: column;
        flex-basis: auto;
    }
}
