:root {
    color-scheme: dark;
    --bg: #0f0f11;
    --bg-soft: #131319;
    --panel: rgba(26, 26, 30, 0.92);
    --panel-strong: rgba(31, 31, 38, 0.98);
    --glass: rgba(15, 15, 17, 0.78);
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --purple: #a855f7;
    --purple-soft: #c084fc;
    --cyan: #22d3ee;
    --cyan-soft: #67e8f9;
    --success: #34d399;
    --warning: #f59e0b;
    --danger: #fb7185;
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.28);
    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --ease: 220ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

html {
    font-size: 13px;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.16), transparent 28rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 24rem),
        radial-gradient(circle at bottom center, rgba(59, 130, 246, 0.08), transparent 30rem),
        linear-gradient(180deg, #0f0f11 0%, #09090b 100%);
    color: var(--text);
    line-height: 1.45;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    opacity: 0.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

::selection {
    background: rgba(168, 85, 247, 0.55);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f0f11;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

[hidden] {
    display: none !important;
}

.app-boot {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.boot-card,
.noscript {
    width: min(100%, 420px);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(26, 26, 30, 0.92), rgba(17, 17, 21, 0.98));
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.boot-logo {
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #c084fc, #22d3ee);
    -webkit-background-clip: text;
    color: transparent;
}

.boot-copy {
    margin: 0;
    color: var(--text-soft);
}

.app-shell {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    height: 100vh;
    min-height: 100vh;
    padding: 14px;
    overflow: hidden;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    max-width: 1680px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 15, 17, 0.88), rgba(15, 15, 17, 0.74));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-left {
    flex: 1 1 auto;
    gap: 10px;
}

.topbar-right {
    justify-content: flex-end;
    gap: 8px;
}

.topbar-right > .action-anchor {
    order: 3;
}

.topbar-right > .header-actions {
    order: 1;
}

.topbar-right > .mobile-head-actions {
    order: 2;
}

.brand-block {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.brand-copy {
    display: grid;
    width: 100%;
    min-width: 0;
}

.brand-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.6rem;
    font-size: clamp(1.15rem, 1.1vw + 0.85rem, 1.8rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--text);
}

.brand-mark {
    background: linear-gradient(to right, #c084fc, #22d3ee);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-main {
    color: #ffffff;
}

.brand-context {
    color: var(--cyan);
}

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

.mobile-head-actions {
    display: none;
}

.action-anchor {
    position: relative;
}

.btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 8px 12px;
    transition:
        transform var(--ease),
        background var(--ease),
        border-color var(--ease),
        color var(--ease),
        box-shadow var(--ease),
        opacity var(--ease);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.table-input:focus-visible,
.text-input:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.35);
    outline-offset: 2px;
}

.btn-primary {
    color: var(--text);
    border-color: rgba(168, 85, 247, 0.35);
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(79, 70, 229, 0.92));
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.28);
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.96), rgba(99, 102, 241, 0.96));
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.96);
    color: #050505;
    font-weight: 700;
}

.btn-secondary.is-active,
.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(34, 211, 238, 0.92));
    color: var(--text);
    border-color: rgba(168, 85, 247, 0.4);
}

.btn-template-download {
    border-color: rgba(34, 211, 238, 0.42);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.34), rgba(34, 211, 238, 0.2));
    color: var(--text);
    font-weight: 500;
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

.btn-template-download:hover:not(:disabled),
.btn-template-download.is-active {
    border-color: rgba(103, 232, 249, 0.78);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.64), rgba(34, 211, 238, 0.42));
    color: var(--text);
    font-weight: 500;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.18);
}

.btn-ghost {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
}

.btn-ghost:hover:not(:disabled),
.btn-ghost.is-active {
    border-color: rgba(34, 211, 238, 0.4);
    color: var(--text);
    background: rgba(34, 211, 238, 0.08);
}

.btn-danger {
    border-color: rgba(251, 113, 133, 0.35);
    color: #ffe7ee;
    background: rgba(251, 113, 133, 0.12);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(251, 113, 133, 0.18);
}

.btn[disabled] {
    opacity: 0.5;
    filter: grayscale(1);
}

.btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    transition:
        transform var(--ease),
        background var(--ease),
        border-color var(--ease),
        color var(--ease),
        box-shadow var(--ease);
}

.icon-btn:hover:not(:disabled),
.icon-btn.is-active {
    transform: translateY(-1px);
    color: var(--text);
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.12);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.12);
}

.icon-btn[data-tone="cyan"]:hover:not(:disabled),
.icon-btn[data-tone="cyan"].is-active {
    border-color: rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.12);
}

.compact-layout-toggle {
    flex: 0 0 auto;
}

.support-question-symbol {
    font-size: 1.12rem;
    line-height: 1;
    font-weight: 900;
}

.app-shell.is-compact-layout .topbar-left [data-dropdown="menu"] {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    justify-content: center;
    gap: 0;
}

.app-shell.is-compact-layout .topbar-left [data-dropdown="menu"] span,
.app-shell.is-compact-layout .topbar-left [data-dropdown="menu"] > i:last-child,
.app-shell.is-compact-layout .topbar-left [data-dropdown="menu"] > svg:last-child {
    display: none;
}

.app-shell.is-compact-layout .brand-mark,
.app-shell.is-compact-layout .brand-main {
    display: none;
}

.app-shell.is-compact-layout .brand-title {
    min-width: 0;
    font-size: clamp(1rem, 0.84rem + 0.4vw, 1.22rem);
    letter-spacing: 0;
    text-transform: none;
}

.app-shell.is-compact-layout .brand-context {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell.is-compact-layout {
    gap: 10px;
    padding: 10px;
}

.app-shell.is-compact-layout .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 10px;
}

.app-shell.is-compact-layout .header-actions,
.app-shell.is-compact-layout .topbar-right > .action-anchor {
    display: none;
}

.app-shell.is-compact-layout .mobile-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-shell.is-compact-layout .topbar-left {
    gap: 8px;
}

.app-shell.is-compact-layout .topbar-right {
    justify-content: flex-end;
}

.app-shell.is-compact-layout .mobile-drawer {
    display: contents;
}

.app-shell.is-compact-layout .mobile-drawer .overlay-close {
    display: none;
}

.app-shell.is-compact-layout .workspace {
    padding: 12px;
}

.app-shell.is-compact-layout .workspace-head {
    display: none;
}

.shell-body {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    max-width: 1680px;
    min-height: 0;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
}

.shell-body > [data-shell-region="toolbar"],
.shell-body > [data-shell-region="workspace"] {
    display: flex;
    min-width: 0;
    min-height: 0;
}

.shell-body > [data-shell-region="toolbar"] > .side-panel,
.shell-body > [data-shell-region="workspace"] > .workspace {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.shell-body.is-toolbar-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.shell-body.is-toolbar-collapsed > [data-shell-region="toolbar"] {
    display: none;
}

.app-shell.is-compact-layout .shell-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    overflow: visible;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(26, 26, 30, 0.92), rgba(17, 17, 21, 0.96));
    box-shadow: var(--shadow-md);
}

.side-panel {
    position: relative;
    display: grid;
    gap: 12px;
    min-height: 0;
    height: 100%;
    padding: 14px;
    overflow: auto;
}

.side-panel.is-collapsed {
    display: none;
}

.workspace {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
}

.toolbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.panel-title {
    margin: 0;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: var(--cyan-soft);
}

.panel-heading {
    margin: 6px 0 0;
    font-size: 1.36rem;
    font-weight: 900;
    line-height: 1.1;
}

.panel-copy {
    margin: 6px 0 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.variant-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    background: rgba(34, 211, 238, 0.08);
    color: var(--text);
    font-size: 0.78rem;
}

.variant-badge span {
    color: var(--text-muted);
}

.toolbar-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
    min-height: 100%;
}

.toolbar-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.toolbar-head-special {
    grid-template-columns: minmax(0, 1fr);
}

.toolbar-head .variant-badge {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 8px 10px;
    border-radius: 14px;
}

.toolbar-head .variant-badge > span {
    font-size: 0;
    line-height: 0;
}

.toolbar-head .variant-badge > span::after {
    content: "\0412\0430\0440\0438\0430\043d\0442";
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--text-muted);
}

.toolbar-head .profile-badge > span::after {
    content: "\0420\0430\0437\0434\0435\043b";
}

.toolbar-head .special-badge > span::after {
    content: "\0420\0430\0437\0434\0435\043b";
}

.toolbar-head .variant-badge strong {
    display: block;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.toolbar-refresh {
    align-self: start;
}

.toolbar-meta > .variant-badge,
.toolbar-row-variants > .icon-btn {
    display: none;
}

.toolbar-grid {
    display: grid;
    gap: 8px;
    align-content: start;
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-row-paired {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolbar-row-variants {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}

.toolbar-row-tariffs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.toolbar-row-special-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.toolbar-row-special-actions .btn {
    justify-content: center;
}

.toolbar-row-save-changes {
    display: grid;
}

.toolbar-row-games-templates {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.toolbar-row-template-upload {
    display: grid;
    width: 100%;
}

.template-upload {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 144px;
    width: 100%;
    min-width: 0;
    padding: 18px 12px;
    border: 1px dashed rgba(34, 211, 238, 0.38);
    border-radius: var(--radius-md);
    background: rgba(34, 211, 238, 0.06);
    color: var(--text);
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.template-upload:hover {
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(34, 211, 238, 0.11);
}

.template-upload:focus-within {
    outline: 2px solid rgba(34, 211, 238, 0.35);
    outline-offset: 2px;
}

.template-upload.is-loading {
    cursor: wait;
    opacity: 0.72;
}

.template-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.template-upload-label {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 700;
}

.side-panel .toolbar-row .action-anchor {
    flex: 1 1 auto;
    min-width: 0;
}

.side-panel .toolbar-row .btn {
    width: 100%;
    min-width: 0;
}

.app-shell.is-compact-layout .toolbar-head .variant-badge,
.app-shell.is-compact-layout .toolbar-head-special,
.app-shell.is-compact-layout .toolbar-meta,
.app-shell.is-compact-layout .toolbar-row-table-controls,
.app-shell.is-compact-layout .toolbar-row-template-upload {
    display: none;
}

.app-shell.is-compact-layout .side-panel {
    display: block;
    align-self: start;
    gap: 8px;
    height: auto;
    overflow: visible;
    padding: 8px 10px;
}

.app-shell.is-compact-layout .side-panel .toolbar-shell {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: visible;
}

.app-shell.is-compact-layout .side-panel .toolbar-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.app-shell.is-compact-layout .side-panel .toolbar-head .variant-badge {
    display: none;
}

.app-shell.is-compact-layout .side-panel .toolbar-grid {
    display: flex;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    gap: 6px;
    width: auto;
    min-width: 0;
    overflow: visible;
    padding-bottom: 0;
}

.app-shell.is-compact-layout .side-panel .toolbar-grid > * {
    flex: 0 0 auto;
}

.app-shell.is-compact-layout .side-panel .toolbar-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.app-shell.is-compact-layout .side-panel .toolbar-row-paired,
.app-shell.is-compact-layout .side-panel .toolbar-row-variants,
.app-shell.is-compact-layout .side-panel .toolbar-row-games-templates {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-width: 0;
}

.app-shell.is-compact-layout .side-panel .toolbar-row-tariffs {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-width: 0;
}

.app-shell.is-compact-layout .side-panel .toolbar-row .action-anchor,
.app-shell.is-compact-layout .side-panel .toolbar-row .btn,
.app-shell.is-compact-layout .side-panel .toolbar-head .icon-btn {
    flex: 0 0 auto;
    width: auto;
}

.app-shell.is-compact-layout .side-panel .toolbar-row .btn,
.app-shell.is-compact-layout .side-panel .toolbar-row .icon-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    justify-content: center;
    gap: 0;
    white-space: nowrap;
}

.app-shell.is-compact-layout .side-panel .toolbar-head .icon-btn {
    width: 32px;
    height: 32px;
}

.app-shell.is-compact-layout .side-panel .toolbar-row-table-controls {
    display: none;
}

.app-shell.is-compact-layout .side-panel .toolbar-row .btn .btn-label,
.app-shell.is-compact-layout .side-panel .template-upload-label {
    display: none;
}

.toolbar-meta {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
}

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

.stat-card {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.stat-kicker {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.stat-value {
    margin-top: 2px;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.stat-meta {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 0.72rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 0.74rem;
    line-height: 1;
}

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

.chip[data-tone="cyan"] {
    border-color: rgba(34, 211, 238, 0.2);
    background: rgba(34, 211, 238, 0.09);
}

.chip[data-tone="purple"] {
    border-color: rgba(168, 85, 247, 0.2);
    background: rgba(168, 85, 247, 0.09);
}

.chip[data-tone="danger"] {
    border-color: rgba(251, 113, 133, 0.24);
    background: rgba(251, 113, 133, 0.1);
}

.hint-block {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.hint-block.is-stacked {
    flex-direction: column;
    gap: 10px;
}

.hint-block p {
    margin: 0;
}

.hint-block.is-stacked p {
    position: relative;
    padding-left: 16px;
}

.hint-block.is-stacked p::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgb(34, 211, 238);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.38);
}

.hint-block.is-stacked p.is-warning {
    color: rgb(245, 158, 11);
}

.hint-block.is-stacked p.is-warning::before {
    background: rgb(245, 158, 11);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.38);
}

.action-menu,
.floating-menu,
.context-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    z-index: 80;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: rgba(15, 15, 17, 0.96);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(22px);
}

.toolbar-menu {
    max-width: min(280px, calc(100vw - 40px));
}

.toolbar-menu-left {
    left: 0;
    right: auto;
}

.toolbar-menu-right {
    left: auto;
    right: 0;
}

.floating-menu {
    right: auto;
    left: 0;
}

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

.menu-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    align-items: stretch;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-soft);
    text-align: left;
}

.menu-item:hover,
.menu-item.is-active {
    border-color: rgba(34, 211, 238, 0.18);
    background: rgba(34, 211, 238, 0.08);
    color: var(--text);
}

.menu-item small {
    color: var(--text-muted);
}

.menu-item-delete {
    width: 40px;
    min-width: 40px;
    height: 100%;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-muted);
}

.menu-item-delete:hover,
.menu-item-delete:focus-visible {
    border-color: rgba(251, 113, 133, 0.22);
    background: rgba(251, 113, 133, 0.1);
    color: #fff1f2;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

.workspace-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.workspace-head-profile {
    align-items: flex-start;
}

.workspace-copy {
    display: grid;
    gap: 8px;
}

.workspace-title {
    margin: 0;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.workspace-description {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    max-width: 70ch;
}

.workspace-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workspace-profile {
    overflow: auto;
}

.profile-stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

.profile-block {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        rgba(10, 12, 18, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.profile-block.is-collapsed {
    gap: 0;
}

.profile-block-account {
    border-color: rgba(34, 211, 238, 0.16);
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 18rem),
        linear-gradient(180deg, rgba(16, 22, 37, 0.88), rgba(10, 14, 24, 0.9));
}

.profile-block-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.profile-block-toggle {
    appearance: none;
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.profile-block-toggle:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.35);
    outline-offset: 4px;
    border-radius: 12px;
}

.profile-block-title,
.profile-block-head h3 {
    display: block;
    margin: 0;
    min-width: 0;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.profile-block-chevron {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--ease), color var(--ease);
}

.profile-block:not(.is-collapsed) .profile-block-chevron {
    transform: rotate(180deg);
    color: var(--cyan-soft);
}

.profile-block-toggle:hover .profile-block-chevron {
    color: var(--text);
}

.profile-block-body {
    display: grid;
    gap: 14px;
    animation: profile-block-open 180ms ease-out;
    transform-origin: top;
}

.profile-block-body[hidden] {
    display: none;
}

@keyframes profile-block-open {
    from {
        opacity: 0;
        transform: scaleY(0.97);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

.profile-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.profile-row-account {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.profile-row[data-profile-row-block="pc_promos"] {
    grid-template-columns: repeat(14, minmax(0, 1fr));
}

.profile-row[data-profile-row-block="pc_promos"] > .profile-field {
    grid-column: span 2;
}

.profile-row[data-profile-row-block="pc_promos"] > .profile-field[data-profile-field-name="promo"] {
    grid-column: span 4;
}

.profile-row[data-profile-row-block="pc_promos"] > .profile-field[data-profile-field-name="yfp_promo"] {
    grid-column: span 3;
}

.profile-row[data-profile-row-block="pc_promos"] > .profile-field[data-profile-field-name="yandex_metric_id"],
.profile-row[data-profile-row-block="pc_promos"] > .profile-field[data-profile-field-name="show_help"] {
    grid-column: span 2;
}

.profile-row[data-profile-row-block="pc_promos"] > .profile-field[data-profile-field-name="help"] {
    grid-column: span 3;
}

@media (max-width: 1180px) {
    .profile-row[data-profile-row-block="pc_promos"] {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .profile-row[data-profile-row-block="pc_promos"] > .profile-field {
        grid-column: auto;
    }
}

.profile-field {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.profile-field.is-dirty {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.profile-field.is-invalid {
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(127, 29, 29, 0.12);
}

.profile-field-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.45;
}

.profile-field-caption {
    color: inherit;
}

.profile-field-label label,
.profile-field-label span,
.profile-field-label div {
    color: inherit;
}

.profile-field-link {
    color: var(--cyan-soft);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.profile-field-link:hover {
    color: #ffffff;
}

.profile-field-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.14);
    color: var(--cyan-soft);
    font-size: 0.74rem;
    font-weight: 700;
}

.profile-field-input-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

.profile-field-input-row .profile-input {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-inline-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.profile-inline-icon-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
}

.profile-boolean-input {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--text);
    font-weight: 600;
}

.profile-boolean-input .checkbox-shell {
    flex: 0 0 auto;
}

.profile-input-readonly {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-soft);
}

.profile-badge {
    width: 100%;
}

.table-shell {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.table-scroll {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    scrollbar-gutter: stable both-edges;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 8, 10, 0.48);
}

.data-table {
    width: max-content;
    min-width: max(100%, var(--table-computed-width, 860px));
    border-collapse: separate;
    border-spacing: 0;
}

.data-table.is-column-virtualized {
    --table-virtual-column-width: 220px;
    table-layout: fixed;
}

.data-table.is-virtualized tbody td {
    white-space: nowrap;
}

.data-table.is-virtualized .cell-value {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table thead th,
.data-table tbody td,
.data-table tfoot td {
    padding: 8px 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(20, 20, 24, 0.98), rgba(15, 15, 17, 0.96));
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr.is-selected td {
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.08), rgba(168, 85, 247, 0.08));
}

.data-table tbody tr:hover td:first-child {
    background: rgb(16, 16, 20);
}

.data-table tbody tr.is-selected td:first-child {
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.14)),
        rgb(12, 12, 15);
}

.data-table thead th.is-pinned,
.data-table tbody td.is-pinned,
.data-table tfoot td.is-pinned {
    position: sticky;
    background: rgb(12, 12, 15);
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.data-table thead th.is-pinned {
    z-index: 7;
}

.data-table tbody td.is-pinned {
    z-index: 2;
}

.data-table tfoot td.is-pinned {
    z-index: 5;
    background: rgba(18, 18, 22, 0.98);
}

.data-table tbody tr:hover td.is-pinned {
    background: rgb(16, 16, 20);
}

.data-table tbody tr.is-selected td.is-pinned {
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.14)),
        rgb(12, 12, 15);
}

.table-empty-row td {
    text-align: center;
    padding: 18px 12px;
}

.data-table tbody .table-spacer-row td {
    padding: 0;
    border: 0;
    background: transparent !important;
}

.data-table tbody .table-spacer-row td:first-child {
    position: static;
}

.table-spacer {
    width: 1px;
}

.table-empty-state {
    display: grid;
    gap: 6px;
    justify-items: center;
    color: var(--text-muted);
}

.table-empty-state strong {
    color: var(--text);
    font-size: 0.92rem;
}

.data-table th:first-child,
.data-table td:first-child,
.data-table tfoot td:first-child {
    position: sticky;
    left: 0;
    z-index: 6;
    background: rgb(12, 12, 15);
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.data-table tbody td:first-child {
    z-index: 2;
}

.data-table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: rgba(18, 18, 22, 0.98);
    font-weight: 700;
}

.data-table th:last-child,
.data-table td:last-child {
    border-right: 0;
}

.table-column-spacer-cell {
    padding: 0 !important;
    border: 0 !important;
    min-width: 0 !important;
    background: transparent !important;
}

.data-table thead th.head-cell {
    min-width: 0;
    cursor: pointer;
    position: sticky;
    padding-bottom: 44px;
}

.head-cell.is-selected {
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.38);
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.12), rgba(168, 85, 247, 0.08));
}

.select-cell {
    width: 58px;
    min-width: 58px;
    text-align: center;
}

.checkbox-shell {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.02);
}

.checkbox-shell input {
    width: 16px;
    height: 16px;
    accent-color: var(--purple);
}

.data-table tbody td.is-editable-boolean {
    text-align: center;
    vertical-align: middle;
}

.data-table tbody td.is-edit-dirty {
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.1), rgba(16, 185, 129, 0.08));
}

.data-table tbody tr:hover td.is-edit-dirty,
.data-table tbody tr.is-selected td.is-edit-dirty {
    background:
        linear-gradient(180deg, rgba(34, 211, 238, 0.16), rgba(16, 185, 129, 0.14));
}

.data-table tbody td.is-edit-invalid {
    background:
        linear-gradient(180deg, rgba(248, 113, 113, 0.14), rgba(239, 68, 68, 0.12));
}

.table-boolean-toggle {
    width: 26px;
    height: 26px;
    margin: 0 auto;
    border-radius: 9px;
}

.table-boolean-toggle input {
    accent-color: var(--cyan);
    cursor: pointer;
}

.table-boolean-toggle.is-dirty {
    border-color: rgba(34, 211, 238, 0.46);
    background: rgba(34, 211, 238, 0.12);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.table-boolean-toggle.is-readonly {
    opacity: 0.55;
}

.table-edit-lib-input {
    min-width: 100%;
}

.table-edit-pc-price-input {
    min-width: 100%;
}

.table-edit-pc-price-input.is-readonly {
    opacity: 0.55;
}

.table-cell-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.table-cell-button:hover,
.table-cell-button:focus-visible {
    color: var(--cyan);
    outline: none;
}

.table-data-cell.is-action-cell {
    min-width: 168px;
}

.table-action-button {
    width: 100%;
    min-height: 34px;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    padding-inline: 10px;
}

.table-action-button .btn-label {
    line-height: 1.2;
    white-space: nowrap;
}

.table-yaplay-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    font-weight: 700;
    color: var(--success);
}

.column-crumb {
    display: block;
    margin-bottom: 2px;
    padding-right: 34px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    color: var(--text-muted);
}

.column-title {
    min-height: 2.3rem;
    padding-right: 34px;
}

.column-title strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
}

.column-label {
    display: block;
    min-width: 0;
    padding-right: 0;
    text-align: left;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    color: rgba(192, 132, 252, 0.88);
}

.column-label.is-wrapped {
    display: block;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

.column-meta {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 28px;
}

.app-shell.is-compact-layout .data-table thead th.head-cell {
    padding-bottom: 8px;
}

.app-shell.is-compact-layout .column-crumb,
.app-shell.is-compact-layout .column-title {
    padding-right: 0;
}

.app-shell.is-compact-layout .column-title {
    min-height: auto;
}

.app-shell.is-compact-layout .head-cell .drag-handle,
.app-shell.is-compact-layout .head-cell .column-meta {
    display: none;
}

.mini-icon {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.mini-icon:hover,
.mini-icon.is-active {
    border-color: rgba(168, 85, 247, 0.25);
    background: rgba(168, 85, 247, 0.12);
    color: var(--text);
}

.sort-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    font-size: 0.68rem;
    white-space: nowrap;
}

.column-filter {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.table-input,
.text-input,
.select-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.select-input {
    appearance: none;
    color-scheme: dark;
    padding-right: 38px;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 12px center;
    background-size: auto, 14px 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.select-input:hover {
    border-color: rgba(34, 211, 238, 0.2);
    background-color: rgba(255, 255, 255, 0.06);
}

.select-input:focus,
.select-input:focus-visible {
    outline: none;
    border-color: rgba(34, 211, 238, 0.32);
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.select-input option,
.select-input optgroup {
    background: #131319;
    color: #ffffff;
}

.text-input.is-mixed,
.btn.is-mixed {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
    color: var(--text);
}

.table-input.is-invalid,
.text-input.is-invalid,
.select-input.is-invalid {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(127, 29, 29, 0.18);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.table-input::placeholder,
.text-input::placeholder {
    color: #6b7280;
}

.cell-value {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-soft);
    line-height: 1.5;
}

.cell-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cyan-soft);
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: 0.18em;
}

.cell-link:hover {
    color: var(--cyan);
}

.cell-value.is-empty {
    color: rgba(156, 163, 175, 0.6);
}

.cell-value[data-tone="r"],
.cell-link[data-tone="r"] {
    color: var(--danger);
}

.cell-value[data-tone="y"],
.cell-link[data-tone="y"] {
    color: var(--warning);
}

.cell-value[data-tone="g"],
.cell-link[data-tone="g"] {
    color: var(--success);
}

.summary-label {
    color: var(--cyan-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
}

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

.workspace-special-instructions {
    overflow: auto;
}

.special-report-table {
    display: grid;
    gap: 12px;
    align-content: start;
    min-height: 0;
}

.special-report-row {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        rgba(10, 12, 18, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.special-report-cell {
    min-width: 0;
}

.special-report-button {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 148px;
    padding: 16px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
    transition:
        transform var(--ease),
        border-color var(--ease),
        box-shadow var(--ease),
        background var(--ease);
}

.special-report-button:hover:not(:disabled),
.special-report-button:focus-visible:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.special-report-button:disabled {
    opacity: 0.56;
    filter: grayscale(0.65);
}

.special-report-button-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.special-report-button-icon {
    width: 40px;
    height: 40px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.special-report-button-icon svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
}

.special-report-button--purple .special-report-button-icon {
    color: var(--purple-soft);
}

.special-report-button--cyan .special-report-button-icon {
    color: var(--cyan-soft);
}

.special-report-button--amber .special-report-button-icon {
    color: #fbbf24;
}

.special-report-button-title {
    min-width: 0;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.special-report-button-meta {
    display: block;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.special-report-instruction {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 4px 4px 4px 2px;
}

.special-report-instruction h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.3;
}

.special-report-instruction ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.special-report-instruction li {
    position: relative;
    padding-left: 16px;
    color: var(--text-soft);
    line-height: 1.58;
}

.special-report-instruction li::before {
    content: "";
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.24);
}

.app-shell.is-compact-layout .special-report-row {
    grid-template-columns: minmax(0, 1fr);
}

.app-shell.is-compact-layout .special-report-button {
    min-height: 58px;
    padding: 12px;
}

.app-shell.is-compact-layout .special-report-button-head {
    margin-bottom: 0;
}

.app-shell.is-compact-layout .special-report-button-meta,
.app-shell.is-compact-layout .special-report-instruction {
    display: none;
}

.empty-state-auth {
    max-width: 860px;
    margin: clamp(16px, 4vw, 44px) auto;
    padding: clamp(28px, 4vw, 42px);
    text-align: left;
    color: var(--text);
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 22rem),
        radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.18), transparent 26rem),
        linear-gradient(180deg, rgba(16, 22, 37, 0.96), rgba(10, 13, 24, 0.98));
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.empty-state-auth::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
}

.auth-gate {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
}

.auth-gate-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: rgba(34, 211, 238, 0.1);
    color: var(--cyan-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-gate h2 {
    margin: 0;
    font-size: clamp(1.8rem, 2vw + 1rem, 3rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.auth-gate-copy,
.auth-gate-note {
    margin: 0;
    color: var(--text-soft);
}

.auth-gate-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
    color: var(--text-soft);
}

.auth-gate-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.7;
}

.auth-gate-steps li::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    flex-shrink: 0;
    background: linear-gradient(to right, #a855f7, #22d3ee);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.auth-gate-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-weight: 600;
}

.auth-gate-link {
    color: var(--cyan-soft);
    text-decoration: underline;
    text-decoration-color: rgba(34, 211, 238, 0.44);
    text-underline-offset: 0.18em;
}

.auth-gate-link:hover {
    color: #ffffff;
    text-decoration-color: rgba(255, 255, 255, 0.72);
}

.auth-gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.loading-state {
    padding: 32px;
    display: grid;
    gap: 16px;
}

.skeleton {
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    background-size: 200% 100%;
    animation: skeleton-wave 1.4s linear infinite;
}

.builder-backdrop,
.save-backdrop,
.filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(12px);
}

.modal-card {
    width: min(100%, 1180px);
    max-height: min(88vh, 980px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(18, 18, 22, 0.98), rgba(10, 10, 14, 0.98));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.filter-backdrop {
    z-index: 96;
}

.save-card {
    width: min(100%, 520px);
    max-height: none;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.filter-card {
    width: min(100%, 760px);
    max-height: min(82vh, 760px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.profile-help-card {
    width: min(100%, 980px);
    max-height: min(86vh, 860px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.changes-response-card {
    width: min(100%, 760px);
    max-height: min(82vh, 760px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.new-pc-guid-card {
    width: min(100%, 680px);
    max-height: min(82vh, 760px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.special-filter-card {
    width: min(100%, 720px);
    max-height: min(84vh, 820px);
}

.tariff-picker-card {
    width: min(100%, 860px);
    max-height: min(82vh, 780px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.changes-response-scroll {
    max-height: min(54vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
    display: grid;
    gap: 10px;
}

.changes-response-line {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.changes-response-line a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.modal-head,
.modal-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
}

.modal-head h2,
.modal-head h3 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 900;
}

.modal-head p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.tariff-picker-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.03);
}

.tariff-picker-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.tariff-picker-table th,
.tariff-picker-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.tariff-picker-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(15, 23, 42, 0.94);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.tariff-picker-row {
    cursor: pointer;
}

.tariff-picker-row:hover td,
.tariff-picker-row:focus-visible td,
.tariff-picker-row.is-selected td {
    background: rgba(34, 211, 238, 0.12);
}

.profile-help-support-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.profile-help-support-field {
    min-width: 0;
    display: grid;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-help-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.03);
}

.profile-help-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.profile-help-table th,
.profile-help-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

.profile-help-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(15, 23, 42, 0.94);
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-help-table tr.is-selected td {
    background: rgba(34, 211, 238, 0.1);
}

.profile-help-table-drag {
    width: 54px;
    text-align: center;
}

.profile-help-table-check {
    width: 54px;
}

.profile-help-table-title {
    width: 280px;
}

.profile-help-title-input,
.profile-help-text-input {
    width: 100%;
}

.profile-help-text-input {
    min-height: 112px;
    resize: vertical;
    line-height: 1.5;
}

.profile-help-row.is-dragging {
    opacity: 0.45;
}

.profile-help-row.is-drop-target td {
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.08);
}

.special-pc-filter {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.special-pc-filter-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.special-pc-filter-all,
.special-pc-filter-row {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: var(--text-soft);
    font-weight: 700;
}

.special-pc-filter-all {
    color: var(--text);
}

.special-pc-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.special-pc-filter-summary {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.special-pc-filter-list {
    display: grid;
    gap: 8px;
    max-height: min(34vh, 320px);
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.special-pc-filter-row {
    padding: 8px 10px;
    border-radius: 12px;
}

.special-pc-filter-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.field-stack .special-top-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.45;
    text-transform: none;
}

.profile-help-drag-handle {
    cursor: grab;
}

.profile-help-drag-handle:active {
    cursor: grabbing;
}

.tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-weight: 700;
}

.tab-btn.is-active {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.12);
    color: var(--text);
}

.modal-body {
    min-height: 0;
    overflow: auto;
    padding: 24px;
}

.settings-grid {
    display: grid;
    gap: 18px;
}

.tree-table,
.reorder-list {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.03);
}

.tree-sticky-block,
.reorder-sticky-block {
    position: sticky;
    top: 0;
    z-index: 5;
    isolation: isolate;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    background: rgb(18, 18, 22);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.tree-sticky-block .tree-header,
.reorder-sticky-block .reorder-header {
    position: relative;
    z-index: 1;
    background:
        linear-gradient(0deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)),
        rgb(18, 18, 22);
}

.tree-sticky-block .tree-row,
.reorder-sticky-block .reorder-row {
    position: relative;
    z-index: 1;
    background: rgb(18, 18, 22);
}

.tree-sticky-block .tree-row.tree-service-row,
.reorder-sticky-block .reorder-row.reorder-service-row {
    background:
        linear-gradient(180deg, rgba(168, 85, 247, 0.1), rgba(34, 211, 238, 0.04)),
        rgb(18, 18, 22);
}

.tree-header,
.reorder-header,
.tree-row,
.reorder-row {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) 110px 120px minmax(180px, 1fr) 110px;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pc-group-table .tree-header,
.pc-group-table .tree-row {
    grid-template-columns: minmax(280px, 1fr) 110px;
}

.tree-header,
.reorder-header {
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 800;
}

.reorder-header {
    cursor: default;
}

.tree-service-row,
.reorder-service-row {
    background:
        linear-gradient(180deg, rgba(168, 85, 247, 0.1), rgba(34, 211, 238, 0.04));
}

.tree-row:last-child,
.reorder-row:last-child {
    border-bottom: 0;
}

.tree-node {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tree-indent {
    flex: 0 0 auto;
    width: 14px;
    height: 1px;
}

.tree-name {
    min-width: 0;
}

.tree-name strong {
    display: block;
}

.tree-name small {
    color: var(--text-muted);
}

.builder-service-label strong {
    color: var(--text-soft);
}

.builder-service-label small {
    color: var(--purple-soft);
}

.tree-toggle {
    justify-self: start;
}

.sort-toggle {
    justify-self: start;
}

.summary-toggle {
    justify-self: start;
}

.filter-input-wrap {
    min-width: 0;
}

.filter-builder-btn {
    justify-content: flex-start;
    width: 100%;
}

.filter-builder-btn strong {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--text);
    font-size: 0.76rem;
}

.filter-builder-btn.is-active {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.1);
}

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.filter-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.03);
}

.filter-table {
    width: 100%;
    border-collapse: collapse;
}

.filter-table th,
.filter-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
    vertical-align: middle;
}

.filter-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(18, 18, 22, 0.98);
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.filter-table-check {
    width: 64px;
}

.filter-table-operator {
    width: 170px;
}

.filter-empty-state {
    padding: 28px;
}

.subtle-copy {
    color: var(--text-muted);
    line-height: 1.6;
}

.reorder-list {
    display: grid;
}

.reorder-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.reorder-row.is-pinnable {
    grid-template-columns: 38px minmax(0, 1fr) 92px minmax(176px, max-content);
}

.drag-handle {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    box-sizing: border-box;
    line-height: 0;
    appearance: none;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
    background: transparent;
}

.drag-handle svg {
    width: 16px;
    height: 16px;
    display: block;
}

.reorder-name {
    min-width: 0;
}

.reorder-name strong {
    display: block;
}

.reorder-name small {
    color: var(--text-muted);
}

.reorder-pin-toggle {
    justify-self: center;
}

.reorder-head-pin,
.reorder-head-actions {
    text-align: center;
}

.reorder-head-pin {
    justify-self: center;
}

.reorder-head-actions {
    justify-self: stretch;
}

.reorder-controls {
    justify-self: end;
}

.reorder-service-slot,
.reorder-service-actions,
.tree-service-cell {
    min-height: 1px;
}

.head-cell .drag-handle {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 8px;
}

.head-cell .drag-handle svg {
    width: 12px;
    height: 12px;
}

.reorder-controls {
    display: flex;
    gap: 8px;
}

.reorder-row.is-dragging,
.head-cell.is-dragging {
    opacity: 0.45;
}

.reorder-row.is-drop-target,
.head-cell.is-drop-target {
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.08);
}

.field-stack {
    display: grid;
    gap: 10px;
}

.field-stack label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: var(--text-muted);
}

.new-pc-guid-value-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.new-pc-guid-input {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0;
}

.save-helper {
    color: var(--text-muted);
    line-height: 1.6;
}

.context-menu {
    position: fixed;
    top: var(--menu-top, 0);
    left: var(--menu-left, 0);
    right: auto;
    min-width: 240px;
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 110;
    display: grid;
    gap: 12px;
}

.toast {
    min-width: min(100vw - 40px, 320px);
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 10, 14, 0.92);
    box-shadow: var(--shadow-md);
}

.toast strong {
    display: block;
    margin-bottom: 4px;
}

.toast p {
    margin: 0;
    color: var(--text-soft);
}

.toast[data-tone="success"] {
    border-color: rgba(52, 211, 153, 0.28);
}

.toast[data-tone="warning"] {
    border-color: rgba(251, 191, 36, 0.28);
}

.toast[data-tone="danger"] {
    border-color: rgba(251, 113, 133, 0.28);
}

.ghost-copy {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.mobile-drawer {
    display: contents;
}

.overlay-close {
    display: none;
}

@keyframes skeleton-wave {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 1180px) {
    .shell-body {
        grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
    }

    .brand-title {
        font-size: clamp(1rem, 0.9vw + 0.8rem, 1.4rem);
    }
}

@media (max-width: 960px) {
    .app-shell {
        gap: 10px;
        padding: 10px;
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 8px 10px;
    }

    .shell-body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        align-content: start;
        overflow: visible;
    }

    .header-actions {
        display: none;
    }

    .compact-layout-toggle {
        display: none;
    }

    .mobile-head-actions {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .topbar-left {
        gap: 8px;
    }

    .topbar-right {
        justify-content: flex-end;
    }

    .brand-title {
        gap: 0.25rem 0.45rem;
        font-size: 0.92rem;
        letter-spacing: 0.04em;
    }

    .mobile-drawer {
        display: contents;
    }

    .mobile-drawer .overlay-close {
        display: none;
    }

    .workspace {
        padding: 12px;
    }

    .workspace-head {
        display: none;
    }

    .side-panel {
        display: block;
        align-self: start;
        gap: 8px;
        height: auto;
        overflow: visible;
        padding: 8px 10px;
    }

    .topbar-right > .action-anchor {
        display: none;
    }

    .toolbar-meta {
        display: none;
    }

    .side-panel .toolbar-shell {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        width: 100%;
        min-width: 0;
        min-height: 0;
        overflow: visible;
    }

    .side-panel .toolbar-head {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
    }

    .side-panel .toolbar-head .variant-badge {
        display: none;
    }

    .side-panel .toolbar-grid {
        display: flex;
        flex-wrap: nowrap;
        flex: 1 1 auto;
        gap: 6px;
        width: auto;
        min-width: 0;
        overflow: visible;
        padding-bottom: 0;
    }

    .side-panel .toolbar-grid > * {
        flex: 0 0 auto;
    }

    .side-panel .toolbar-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .side-panel .toolbar-row-paired,
    .side-panel .toolbar-row-variants,
    .side-panel .toolbar-row-games-templates {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        min-width: 0;
    }

    .side-panel .toolbar-row-tariffs {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .side-panel .toolbar-row .action-anchor,
    .side-panel .toolbar-row .btn,
    .side-panel .toolbar-head .icon-btn {
        flex: 0 0 auto;
        width: auto;
    }

    .side-panel .toolbar-row .action-anchor {
        align-self: flex-start;
    }

    .side-panel .toolbar-row .btn {
        height: 32px;
        min-height: 32px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .side-panel .toolbar-row-template-upload {
        flex: 1 1 240px;
        min-width: 220px;
    }

    .side-panel .template-upload {
        min-height: 32px;
        height: 32px;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .side-panel .toolbar-head .icon-btn {
        width: 32px;
        height: 32px;
    }

    .quick-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 960px) {
    .side-panel.is-icon-only .toolbar-row .btn {
        width: 32px;
        min-width: 32px;
        padding: 0;
        justify-content: center;
        gap: 0;
    }

    .side-panel.is-icon-only .toolbar-row .btn .btn-label {
        display: none;
    }

    .side-panel.is-icon-only .toolbar-row-template-upload {
        flex: 0 0 auto;
        min-width: 32px;
    }

    .side-panel.is-icon-only .template-upload {
        width: 32px;
        min-width: 32px;
        padding: 0;
        gap: 0;
    }

    .side-panel.is-icon-only .template-upload-label {
        display: none;
    }
}

@media (max-width: 780px) {
    .side-panel .toolbar-row .action-anchor,
    .side-panel .toolbar-row .btn {
        flex-basis: auto;
    }

    .special-report-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .special-report-button {
        min-height: 132px;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .modal-card {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px;
    }

    .pc-group-table .tree-header,
    .pc-group-table .tree-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .tree-header,
    .tree-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .reorder-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .reorder-header {
        display: none;
    }

    .reorder-row.is-pinnable .reorder-pin-toggle,
    .reorder-row.is-pinnable .reorder-controls {
        grid-column: 1 / -1;
    }

    .tree-service-cell,
    .reorder-service-slot,
    .reorder-service-actions {
        display: none;
    }

    .reorder-controls {
        grid-column: 1 / -1;
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .topbar {
        gap: 8px;
    }

    .topbar-left {
        gap: 6px;
    }

    .btn,
    .icon-btn {
        min-height: 34px;
    }

    .workspace,
    .side-panel {
        padding: 10px;
    }

    .brand-title {
        font-size: 0.74rem;
        gap: 0.2rem 0.35rem;
    }

    .brand-context {
        width: 100%;
    }

    .modal-head,
    .modal-foot,
    .modal-body,
    .tab-row {
        padding-left: 16px;
        padding-right: 16px;
    }

    .new-pc-guid-value-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-help-support-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
