:root {
    color-scheme: dark;
    --admin-bg: #060913;
    --admin-surface: rgba(255, 255, 255, .065);
    --admin-surface-strong: rgba(255, 255, 255, .1);
    --admin-sidebar: rgba(7, 11, 22, .88);
    --admin-line: rgba(255, 255, 255, .12);
    --admin-text: #f7f9ff;
    --admin-muted: #9aa7bd;
    --admin-soft: #dce7fb;
    --admin-primary: #83b9ff;
    --admin-primary-2: #6ee7b7;
    --admin-danger: #ff9fb2;
    --admin-success: #a8f3bd;
    --admin-radius: 22px;
    --admin-shadow: 0 28px 90px rgba(0, 0, 0, .34);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--admin-bg);
}

body {
    margin: 0;
    min-height: 100vh !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 8% 4%, rgba(131, 185, 255, .22), transparent 28rem),
        radial-gradient(circle at 92% 10%, rgba(110, 231, 183, .14), transparent 28rem),
        linear-gradient(180deg, #070b16 0%, #050812 100%) !important;
    color: var(--admin-text) !important;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 70%);
}

.shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 292px minmax(0, 1fr) !important;
}

.shell > aside {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--admin-line) !important;
    padding: 22px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), transparent),
        var(--admin-sidebar) !important;
    backdrop-filter: blur(18px);
}

.brand {
    position: relative;
    display: grid !important;
    grid-template-columns: 44px 1fr;
    gap: 3px 12px !important;
    align-items: center;
    min-height: 52px;
    margin-bottom: 28px !important;
}

.brand::before {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-2));
    color: #07111f;
    content: "T";
    font-weight: 950;
}

.brand strong {
    font-size: 21px !important;
    letter-spacing: -.04em;
}

.brand span {
    color: var(--admin-muted) !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

nav {
    display: grid;
    gap: 7px !important;
}

nav a,
nav button {
    display: block;
    position: relative;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
    width: 100%;
    border: 1px solid transparent !important;
    border-radius: 16px !important;
    padding: 12px 13px 12px 40px !important;
    color: var(--admin-soft) !important;
    font-weight: 780 !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

nav a::before,
nav button::before {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    content: "";
    transform: translateY(-50%);
}

nav a.active,
nav a:hover,
nav button:hover {
    border-color: rgba(131, 185, 255, .28) !important;
    background: rgba(131, 185, 255, .13) !important;
    color: #ffffff !important;
    transform: translateX(2px);
}

nav a.active::before {
    background: var(--admin-primary);
    box-shadow: 0 0 24px rgba(131, 185, 255, .72);
}

nav form {
    margin: 6px 0 0;
}

nav form button {
    margin-top: 0 !important;
    color: var(--admin-muted) !important;
}

.admin-nav-toggle {
    display: none;
}

main {
    display: grid;
    gap: 22px;
    align-content: start;
    width: 100%;
    max-width: 1480px;
    min-width: 0;
    padding: clamp(22px, 4vw, 42px) !important;
}

.content-editor-shell main {
    width: 100% !important;
    max-width: none !important;
    padding: clamp(18px, 2.5vw, 32px) clamp(18px, 3vw, 36px) 40px !important;
}

.content-editor-shell .card {
    max-width: none !important;
    width: 100% !important;
    padding: clamp(20px, 3vw, 32px) !important;
}

.content-editor-shell header {
    align-items: center !important;
}

.content-editor-shell .widget-builder-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.8fr) !important;
    gap: 24px !important;
}

.content-editor-shell .widget-preview {
    top: 18px !important;
    max-height: calc(100vh - 36px);
    overflow: auto;
}

.content-editor-shell .content-meta-grid,
.content-editor-shell .content-seo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.content-editor-shell .content-meta-grid .span-full,
.content-editor-shell .content-seo-grid .span-full {
    grid-column: 1 / -1;
}

.content-editor-shell .content-body-note {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}

.content-editor-shell .card form > label,
.content-editor-shell .card form details > label {
    margin-top: 14px;
}

.content-editor-shell .content-meta-grid label,
.content-editor-shell .content-seo-grid label {
    margin-top: 0;
}

.content-editor-shell .content-meta-grid textarea[name="body"] {
    min-height: 140px;
}

.content-editor-shell .content-editor-modes {
    margin-top: 20px;
}

.content-editor-shell .editor-mode-tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .5);
}

.content-editor-shell .editor-mode-tab {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: transparent;
    color: var(--admin-muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.content-editor-shell .editor-mode-tab.is-active {
    background: var(--admin-surface);
    color: var(--admin-text);
    box-shadow: 0 1px 2px rgba(20, 17, 13, .08);
}

.content-editor-shell .editor-panel {
    display: none;
}

.content-editor-shell .editor-panel.is-active {
    display: block;
}

.content-editor-shell .editor-mode-help {
    margin: 0 0 16px;
}

.content-editor-shell .html-code-editor {
    width: 100%;
    min-height: 320px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    tab-size: 2;
}

.content-editor-shell .html-code-editor--inline {
    min-height: 220px;
}

.content-editor-shell .rich-text-shell {
    display: grid;
    gap: 8px;
}

.content-editor-shell .rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.content-editor-shell .rich-text-btn {
    border: 1px solid var(--admin-line);
    border-radius: 8px;
    padding: 6px 10px;
    background: var(--admin-surface);
    color: var(--admin-text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.content-editor-shell .rich-text-area {
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    background: #fff;
    line-height: 1.6;
}

.content-editor-shell .preview-html {
    overflow: hidden;
    border: 1px dashed var(--admin-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
}

.content-editor-shell .preview-html-frame {
    display: block;
    width: 100%;
    min-height: 220px;
    border: 0;
    background: #fff;
}

.content-editor-shell .widget-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.content-editor-shell .widget-list {
    display: grid;
    gap: 14px;
}

.content-editor-shell .widget-fields {
    display: grid;
    gap: 12px;
}

.content-editor-shell .widget-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.content-editor-shell .widget-editor-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0 !important;
}

.content-editor-shell .widget-editor-card h3 {
    margin: 0;
}

.content-editor-shell .widget-preview h3 {
    margin: 0 0 14px;
}

.content-editor-shell .widget-preview-frame {
    display: grid;
    gap: 14px;
}

.content-editor-shell .preview-empty {
    color: var(--admin-muted);
}

.content-editor-shell .preview-block h4 {
    margin: 0 0 8px;
    font-size: 20px;
}

.content-editor-shell .preview-image img {
    display: block;
    width: 100%;
    max-height: 240px;
    border-radius: 12px;
    object-fit: cover;
}

.content-editor-shell .preview-image figcaption {
    margin-top: 8px;
}

.content-editor-shell .preview-card-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.content-editor-shell .preview-card-grid h5 {
    margin: 0 0 6px;
    font-size: 16px;
}

.content-editor-shell details.content-collapsible {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
}

.content-editor-shell details.content-collapsible > summary {
    margin-bottom: 0;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.content-editor-shell details.content-collapsible[open] > summary {
    margin-bottom: 12px;
}

.content-editor-shell details > summary {
    cursor: pointer;
    font-weight: 800;
}

.content-editor-shell .card .section-title {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--admin-line);
}

.content-editor-shell .card .actions {
    margin-top: 20px;
}

@media (max-width: 780px) {
    .content-editor-shell .content-meta-grid,
    .content-editor-shell .content-seo-grid {
        grid-template-columns: 1fr;
    }
}

.panel:has(> table) {
    overflow-x: auto;
}

header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    align-items: flex-start !important;
    margin-bottom: 0 !important;
}

header h1 {
    margin: 0 0 9px !important;
    font-size: clamp(28px, 3.2vw, 42px) !important;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.05em;
}

h2 {
    margin: 0 0 16px;
    letter-spacing: -.04em;
}

.muted {
    color: var(--admin-muted) !important;
}

a {
    color: var(--admin-primary) !important;
}

.card,
.panel,
.widget-editor-card,
.widget-preview,
.asset,
.menu-row,
main > form > .panel,
form .admin-form-panel,
form .panel {
    border: 1px solid var(--admin-line) !important;
    border-radius: var(--admin-radius) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035)),
        rgba(255, 255, 255, .045) !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .18);
}

.card,
.panel,
main > form > .panel,
form .admin-form-panel,
form .panel {
    padding: 24px !important;
}

main form {
    display: grid;
    gap: 20px;
    width: 100%;
}

main form > .primary,
main form > button[type="submit"]:not(.secondary-button) {
    justify-self: start;
    margin-top: 4px;
}

.grid {
    display: grid;
    gap: 18px !important;
}

.stat {
    display: block;
    margin: 10px 0 12px !important;
    font-size: clamp(38px, 4vw, 58px) !important;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.06em;
    background: linear-gradient(135deg, #ffffff, var(--admin-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.admin-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-bottom: 24px;
}

.admin-kpi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
    min-height: 166px;
    overflow: hidden;
}

.admin-kpi-card .muted {
    display: block;
    margin: 0;
}

.admin-kpi-card .stat {
    flex: 0 0 auto;
}

.admin-kpi-card a {
    margin-top: auto;
    font-weight: 800;
}

.admin-kpi-card::after {
    position: absolute;
    right: -34px;
    bottom: -44px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(131, 185, 255, .24), transparent 68%);
    content: "";
}

.admin-table-card {
    overflow: hidden;
}

.admin-table-card h2 {
    margin-bottom: 18px;
}

table {
    width: 100%;
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto;
}

.admin-table-card table {
    table-layout: fixed;
}

th,
td {
    padding: 14px 16px !important;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
}

.admin-table-card table:not(.admin-users-table) th:nth-child(1),
.admin-table-card table:not(.admin-users-table) td:nth-child(1) {
    width: 16%;
}

.admin-table-card table:not(.admin-users-table) th:nth-child(3),
.admin-table-card table:not(.admin-users-table) td:nth-child(3) {
    width: 12%;
}

.admin-table-card table:not(.admin-users-table) th:nth-child(4),
.admin-table-card table:not(.admin-users-table) td:nth-child(4) {
    width: 18%;
    white-space: nowrap;
}

.admin-users-table {
    table-layout: auto;
}

.admin-table-card .admin-users-table th:nth-child(1),
.admin-table-card .admin-users-table td:nth-child(1) {
    width: 20%;
    min-width: 120px;
}

.admin-table-card .admin-users-table th:nth-child(2),
.admin-table-card .admin-users-table td:nth-child(2) {
    width: 18%;
    min-width: 110px;
    white-space: nowrap;
}

.admin-table-card .admin-users-table th:nth-child(3),
.admin-table-card .admin-users-table td:nth-child(3) {
    width: auto;
}

.admin-table-card td code {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.5;
}

th {
    color: var(--admin-muted) !important;
    font-size: 12px !important;
    letter-spacing: .11em !important;
}

td,
th {
    border-color: rgba(255, 255, 255, .09) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

tbody tr {
    transition: background .16s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, .035);
}

code {
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, .22);
    color: var(--admin-soft) !important;
}

label {
    display: grid;
    gap: 8px;
    margin: 0;
    color: var(--admin-soft) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .01em;
}

input,
select,
textarea,
input[type="file"] {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 14px !important;
    background: rgba(4, 8, 18, .54) !important;
    color: #ffffff !important;
    font: inherit;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
    min-height: 132px;
    line-height: 1.65;
    resize: vertical;
}

select {
    cursor: pointer;
}

input[type="file"] {
    padding: 10px 12px;
}

button,
.button,
.primary,
.primary-button,
.secondary-button {
    border: 0 !important;
    border-radius: 999px !important;
    min-height: 42px;
    padding: 11px 16px !important;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-2)) !important;
    color: #07111f !important;
    cursor: pointer;
    font-weight: 900 !important;
    text-decoration: none !important;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

button:hover,
.button:hover,
.primary:hover,
.secondary-button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .22);
}

.secondary-button {
    border: 1px solid rgba(255, 255, 255, .12) !important;
    background: rgba(255, 255, 255, .08) !important;
    color: var(--admin-soft) !important;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.success,
.error {
    border-radius: 16px;
    padding: 12px 14px;
}

.success {
    border: 1px solid rgba(168, 243, 189, .24);
    background: rgba(168, 243, 189, .08);
    color: var(--admin-success) !important;
}

.error {
    border: 1px solid rgba(255, 159, 178, .28);
    background: rgba(255, 159, 178, .08);
    color: var(--admin-danger) !important;
}

.warning {
    border: 1px solid rgba(255, 196, 86, .32);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 196, 86, .1);
    color: #ffd98a;
    line-height: 1.6;
}

.page-list {
    margin: 12px 0 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 8px;
}

a.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .08);
    color: var(--admin-soft) !important;
    text-decoration: none !important;
    font-weight: 700;
}

.section-title {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    border-color: rgba(255, 255, 255, .1) !important;
}

.section-title h2 {
    margin: 0 0 6px;
}

.widget-builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr) !important;
    gap: 22px;
    align-items: start;
}

.widget-editor-card {
    padding: 18px !important;
}

.widget-editor-card header {
    padding: 0 !important;
}

.widget-preview {
    top: 28px !important;
    background:
        radial-gradient(circle at top right, rgba(131, 185, 255, .16), transparent 12rem),
        rgba(5, 9, 18, .86) !important;
}

.preview-block,
.preview-card-grid article {
    border-color: rgba(255, 255, 255, .1) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .055) !important;
}

.preview-button {
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-2)) !important;
    color: #07111f !important;
}

.asset {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    padding: 0 !important;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 18px !important;
}

.asset-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(0, 0, 0, .08);
}

.asset img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .22s ease, filter .22s ease;
}

.asset:hover img {
    filter: saturate(1.08);
    transform: scale(1.035);
}

.asset-meta {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-top: 1px solid var(--admin-line);
}

.asset-meta code {
    display: block;
    max-width: 100%;
    white-space: normal;
    word-break: break-all;
    font-size: 12px;
    line-height: 1.45;
}

.admin-media-library {
    display: grid;
    gap: 16px;
}

.admin-media-library-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
}

.admin-media-library-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.admin-media-library-head .muted {
    margin: 0;
}

.admin-media-empty {
    padding: 28px 24px !important;
    text-align: center;
}

.admin-media-empty .muted {
    margin: 0;
}

.admin-upload-card {
    display: grid;
    gap: 14px;
}

.admin-upload-card > h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.admin-upload-card > .muted {
    margin: -6px 0 0;
}

.admin-upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.admin-upload-field {
    min-width: 0;
}

.admin-upload-field > span {
    font-size: 13px;
    font-weight: 700;
}

.admin-split-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px) !important;
    align-items: start;
}

.admin-split-grid > .admin-form-panel {
    position: sticky;
    top: 22px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(131, 185, 255, .65) !important;
    box-shadow: 0 0 0 4px rgba(131, 185, 255, .12);
    background: rgba(7, 12, 24, .74) !important;
}

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

.admin-form-panel > .muted {
    margin: -4px 0 0;
}

.admin-form-panel > label {
    margin-top: 2px;
}

.admin-form-panel .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px !important;
}

.admin-form-panel h2 {
    margin: 0 0 2px;
    font-size: 22px;
    font-weight: 800;
}

.panel > h2:first-child,
.card > h2:first-child {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 800;
}

.admin-form-panel form,
.panel > form {
    display: grid;
    gap: 14px;
}

.admin-form-panel form > .primary,
.admin-form-panel form > button[type="submit"]:not(.secondary-button),
.panel > form > .primary,
.panel > form > button[type="submit"]:not(.secondary-button) {
    justify-self: start;
    margin-top: 4px;
}

label:has(> input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

label:has(> input[type="checkbox"]) input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.theme-card {
    position: relative;
    display: grid;
    gap: 18px;
    overflow: hidden;
}

.theme-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.theme-actions form {
    margin: 0;
}

.theme-card-active {
    border-color: rgba(110, 231, 183, .38) !important;
}

.theme-preview {
    display: grid;
    gap: 10px;
    min-height: 170px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 16px;
    background:
        radial-gradient(circle at 25% 20%, rgba(131, 185, 255, .32), transparent 8rem),
        linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .035));
}

.theme-preview span {
    display: block;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
}

.theme-preview span:nth-child(1) {
    width: 44%;
    height: 16px;
}

.theme-preview span:nth-child(2) {
    width: 76%;
    height: 48px;
    border-radius: 18px;
}

.theme-preview span:nth-child(3) {
    width: 62%;
    height: 14px;
}

.theme-badge {
    display: inline-flex;
    justify-self: start;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(110, 231, 183, .14);
    color: var(--admin-success);
    font-weight: 900;
}

.login-screen {
    display: grid !important;
    place-items: center;
}

.login-screen main {
    position: relative;
    width: min(460px, calc(100vw - 32px)) !important;
    border: 1px solid var(--admin-line) !important;
    border-radius: 30px !important;
    padding: 34px !important;
    background:
        radial-gradient(circle at top right, rgba(131, 185, 255, .18), transparent 14rem),
        rgba(8, 12, 24, .86) !important;
    box-shadow: var(--admin-shadow) !important;
    overflow: hidden;
}

.login-screen main::before {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-2));
    color: #07111f;
    content: "T";
    font-size: 24px;
    font-weight: 950;
}

.login-screen h1 {
    font-size: 42px !important;
    letter-spacing: -.06em;
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr !important;
    }

    .shell > aside {
        position: sticky;
        top: 0;
        z-index: 40;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand toggle"
            "nav nav";
        gap: 0 12px;
        align-items: center;
        height: auto;
        padding: 14px 16px !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--admin-line) !important;
    }

    .shell > aside .brand {
        grid-area: brand;
        margin-bottom: 0 !important;
    }

    .admin-nav-toggle {
        grid-area: toggle;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--admin-line);
        border-radius: 14px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, .05);
        color: var(--admin-soft);
        cursor: pointer;
        font: inherit;
        font-size: 13px;
        font-weight: 800;
    }

    .admin-nav-toggle-bars,
    .admin-nav-toggle-bars::before,
    .admin-nav-toggle-bars::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: "";
        transition: transform .2s ease;
    }

    .admin-nav-toggle-bars {
        position: relative;
    }

    .admin-nav-toggle-bars::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .admin-nav-toggle-bars::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .shell.is-nav-open .admin-nav-toggle-bars {
        background: transparent;
    }

    .shell.is-nav-open .admin-nav-toggle-bars::before {
        top: 0;
        transform: rotate(45deg);
    }

    .shell.is-nav-open .admin-nav-toggle-bars::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .shell > aside nav {
        grid-area: nav;
        display: none;
        grid-template-columns: 1fr !important;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--admin-line);
    }

    .shell.is-nav-open > aside nav {
        display: grid;
    }

    nav form {
        margin: 0;
    }

    main {
        padding: 22px !important;
    }

    .widget-builder-layout {
        grid-template-columns: 1fr !important;
    }

    .widget-preview {
        position: static !important;
    }
}

.menu-row {
    display: grid;
    gap: 16px;
    padding: 18px !important;
    margin-bottom: 0;
}

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

.menu-row-main,
.menu-child-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.menu-row-main label,
.menu-child-row label {
    min-width: 0;
}

.menu-children {
    margin-top: 4px;
    padding: 14px 16px;
    border: 1px dashed var(--admin-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .02);
}

.menu-children-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.menu-children-list {
    display: grid;
    gap: 10px;
}

.menu-child-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
}

@media (max-width: 1100px) {
    .menu-row-main,
    .menu-child-row {
        grid-template-columns: 1fr 1fr;
    }

    .menu-row-main .row-actions,
    .menu-child-row .row-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1100px) {
    .admin-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .admin-split-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    header {
        display: grid !important;
    }

    .admin-kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-form-panel .grid {
        grid-template-columns: 1fr !important;
    }

    .grid:not(.media-grid) {
        grid-template-columns: 1fr !important;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    }

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

    .admin-split-grid > .admin-form-panel {
        position: static;
    }

    .card,
    .panel,
    main > form > .panel,
    form .admin-form-panel,
    form .panel {
        padding: 18px !important;
    }

    td,
    th {
        padding: 12px 10px !important;
    }
}
