:root {
    color-scheme: light;
    --bg: #eef3f8;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --panel-strong: #edf4ff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #d7dee9;
    --line-soft: #edf1f7;
    --brand: #008878;
    --brand-dark: #00645b;
    --brand-soft: #dff7f2;
    --accent: #e86c2f;
    --accent-soft: #fff1e9;
    --ok: #047857;
    --ok-soft: #e7f8ef;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --warn: #b45309;
    --sidebar: #071b24;
    --sidebar-ink: #e6edf7;
    --sidebar-muted: #9fb0c6;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, .06);
    --radius: 8px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a1020;
    --panel: #111827;
    --panel-soft: #162033;
    --panel-strong: #1d2a43;
    --ink: #edf2f7;
    --muted: #9aa8bc;
    --line: #27344a;
    --line-soft: #223047;
    --brand: #2dd4bf;
    --brand-dark: #a7f3d0;
    --brand-soft: #103d39;
    --accent: #f28a45;
    --accent-soft: #472614;
    --ok: #5ee0a2;
    --ok-soft: #0f3528;
    --danger: #ff9b90;
    --danger-soft: #3b1818;
    --warn: #fbbf24;
    --sidebar: #031113;
    --sidebar-ink: #eef4ff;
    --sidebar-muted: #94a3b8;
    --shadow: 0 18px 50px rgba(0, 0, 0, .28);
    --shadow-soft: 0 12px 26px rgba(0, 0, 0, .2);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

body,
button,
input,
select,
textarea {
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand), transparent 65%);
    outline-offset: 2px;
}

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

.sidebar {
    background: linear-gradient(180deg, var(--sidebar) 0%, #12333a 100%);
    border-right: 1px solid rgba(255, 255, 255, .08);
    color: var(--sidebar-ink);
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100vh;
    padding: 22px;
    position: sticky;
    top: 0;
}

html[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #031113 0%, #082329 100%);
}

.brand {
    align-items: center;
    display: flex;
    gap: 13px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
    display: inline-flex;
    flex: 0 0 auto;
    height: 48px;
    justify-content: center;
    overflow: hidden;
    padding: 7px 8px;
    width: 92px;
}

.brand-mark img {
    display: block;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

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

.brand strong {
    font-size: 16px;
    letter-spacing: .02em;
}

.brand small {
    color: var(--sidebar-muted);
    font-size: 12px;
    margin-top: 2px;
}

.theme-toggle {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius);
    color: var(--sidebar-ink);
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, .14);
}

.theme-icon {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.theme-icon::before {
    content: "☀";
    font-size: 13px;
}

html[data-theme="dark"] .theme-icon::before {
    content: "☾";
}

.nav-list {
    display: grid;
    gap: 7px;
    margin-top: 6px;
}

.nav-list a,
.logout-form button {
    align-items: center;
    border: 0;
    border-radius: var(--radius);
    color: #dce6f5;
    display: flex;
    font: inherit;
    font-weight: 650;
    min-height: 43px;
    padding: 11px 12px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.nav-list a.active,
.nav-list a:hover,
.logout-form button:hover {
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
}

.nav-list a.active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.logout-form {
    margin-top: auto;
}

.logout-form button {
    background: transparent;
    cursor: pointer;
}

.main-panel {
    min-width: 0;
    padding: clamp(18px, 3vw, 34px);
}

.main-panel > * {
    margin-left: auto;
    margin-right: auto;
    max-width: 1480px;
}

.page-header {
    align-items: flex-end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.page-header h1,
.auth-copy h1 {
    color: var(--ink);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.08;
    margin: 0;
}

.header-subtitle {
    color: var(--muted);
    display: inline-block;
    margin-top: 8px;
}

.eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.content-block,
.form-panel,
.token-box {
    background: color-mix(in srgb, var(--panel), transparent 1%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
    padding: clamp(16px, 2vw, 22px);
}

.block-heading {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.block-heading h2,
.form-panel h2 {
    color: var(--ink);
    font-size: 18px;
    margin: 0;
}

.block-heading span,
.form-panel header span,
.auth-copy p {
    color: var(--muted);
}

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

.module-tile {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 106px;
    padding: 16px;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.module-tile strong,
.module-tile span {
    display: block;
}

.module-tile strong {
    font-size: 16px;
}

.module-tile span {
    color: var(--muted);
    margin-top: 20px;
}

.module-tile.enabled {
    background: linear-gradient(135deg, var(--brand-soft), var(--panel));
    border-color: color-mix(in srgb, var(--brand), var(--line) 45%);
}

.module-tile.enabled:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 18px;
}

.summary-tile {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    min-height: 102px;
    padding: 16px;
}

.summary-tile span,
.summary-tile small {
    color: var(--muted);
    display: block;
}

.summary-tile span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.summary-tile strong {
    color: var(--ink);
    display: block;
    font-size: clamp(18px, 2vw, 22px);
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.summary-tile small {
    margin-top: 5px;
}

.summary-tile-wide {
    grid-column: span 2;
}

.detail-form {
    display: grid;
    gap: 18px;
}

.detail-form .block-heading {
    margin-bottom: 0;
}

.field-section {
    border-top: 1px solid var(--line-soft);
    padding-top: 18px;
}

.field-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.field-section h3 {
    color: var(--ink);
    font-size: 15px;
    margin: 0 0 10px;
}

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

.field-item {
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 64px;
    padding: 10px 12px;
}

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

.field-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.field-item strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.auth-page {
    background: var(--bg);
}

.auth-page .app-shell {
    grid-template-columns: 1fr;
}

.auth-page .sidebar {
    display: none;
}

.auth-page .main-panel {
    background:
        linear-gradient(116deg, color-mix(in srgb, var(--brand-soft), transparent 22%) 0%, transparent 43%),
        linear-gradient(305deg, color-mix(in srgb, var(--accent-soft), transparent 10%) 0%, transparent 38%),
        var(--bg);
    min-height: 100vh;
    padding: 0;
}

.auth-page .main-panel > * {
    max-width: none;
}

.login-screen {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(18px, 4vw, 46px);
    position: relative;
}

.login-screen::after {
    background:
        linear-gradient(135deg, transparent 0%, transparent 58%, color-mix(in srgb, var(--brand), transparent 88%) 58%, color-mix(in srgb, var(--accent), transparent 88%) 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.login-topbar,
.login-shell {
    margin-left: auto;
    margin-right: auto;
    max-width: 1180px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.login-topbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.login-brand,
.login-card-logo {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--radius);
    display: inline-flex;
    justify-content: center;
}

.login-brand {
    box-shadow: var(--shadow-soft);
    min-height: 64px;
    padding: 10px 14px;
}

.login-brand img {
    display: block;
    height: auto;
    max-width: 48vw;
    width: 190px;
}

.login-theme-toggle {
    background: color-mix(in srgb, var(--panel), transparent 4%);
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    width: auto;
}

.login-theme-toggle:hover {
    background: var(--panel);
}

.login-theme-toggle .theme-icon {
    background: var(--brand-soft);
}

.login-shell {
    align-items: center;
    display: grid;
    gap: clamp(30px, 6vw, 84px);
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 430px);
    padding: clamp(34px, 7vh, 86px) 0;
}

.login-copy h1 {
    color: var(--ink);
    font-size: 52px;
    line-height: 1.04;
    margin: 0;
    max-width: 650px;
}

.login-lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    margin: 18px 0 0;
    max-width: 570px;
}

.login-benefits {
    display: grid;
    gap: 18px;
    margin-top: 34px;
    max-width: 610px;
}

.login-benefits div {
    align-items: start;
    display: grid;
    gap: 4px 13px;
    grid-template-areas:
        "mark title"
        "mark text";
    grid-template-columns: 36px minmax(0, 1fr);
}

.benefit-mark {
    align-items: center;
    background: color-mix(in srgb, var(--brand-soft), var(--panel) 38%);
    border: 1px solid color-mix(in srgb, var(--brand), transparent 72%);
    border-radius: var(--radius);
    display: inline-flex;
    grid-area: mark;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.benefit-mark::before {
    border-bottom: 2px solid var(--brand);
    border-left: 2px solid var(--brand);
    content: "";
    height: 6px;
    transform: rotate(-45deg) translate(1px, -1px);
    width: 11px;
}

.login-benefits strong {
    color: var(--ink);
    font-size: 15px;
    grid-area: title;
}

.login-benefits small {
    color: var(--muted);
    font-size: 14px;
    grid-area: text;
    line-height: 1.5;
}

.login-card {
    border-color: color-mix(in srgb, var(--brand), var(--line) 74%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .16);
    gap: 18px;
    margin-bottom: 0;
    padding: clamp(24px, 4vw, 34px);
}

html[data-theme="dark"] .login-card {
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.login-card-logo {
    justify-self: start;
    margin-bottom: 4px;
    padding: 9px 12px;
    width: 178px;
}

.login-card-logo img {
    display: block;
    height: auto;
    width: 100%;
}

.login-card h2 {
    font-size: 24px;
}

.login-card input {
    min-height: 48px;
}

.login-card .check-line {
    color: var(--muted);
    font-weight: 650;
}

.login-card .primary-button {
    min-height: 48px;
}

.auth-wrap {
    align-items: center;
    display: grid;
    gap: clamp(22px, 5vw, 46px);
    grid-template-columns: minmax(240px, 460px) minmax(280px, 440px);
    margin-top: min(10vh, 90px);
}

.auth-wrap.compact {
    max-width: 860px;
}

.auth-copy h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.auth-copy p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 420px;
}

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

.form-panel header {
    margin-bottom: 6px;
}

label {
    color: var(--ink);
    display: grid;
    font-size: 14px;
    font-weight: 750;
    gap: 7px;
}

input,
select,
textarea {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    min-height: 43px;
    padding: 10px 12px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--brand), var(--line) 20%);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand), transparent 84%);
    outline: 0;
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted), transparent 20%);
}

textarea {
    resize: vertical;
}

input[type="color"] {
    padding: 4px;
}

.check-line,
.check-card {
    align-items: center;
    display: flex;
    gap: 10px;
}

.check-line input,
.check-card input {
    min-height: 0;
    width: auto;
}

.check-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 46px;
    padding: 10px 12px;
}

.primary-button,
.secondary-button,
.actions-cell button,
.actions-cell a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #ffffff;
}

.primary-button:hover,
.secondary-button:hover,
.actions-cell button:hover,
.actions-cell a:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.secondary-button,
.actions-cell button,
.actions-cell a {
    background: var(--panel);
    border-color: var(--line);
    color: var(--ink);
}

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

.form-grid .wide {
    grid-column: 1 / -1;
}

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

.check-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

.filter-row {
    align-items: end;
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1fr) 160px 160px auto;
    margin-bottom: 18px;
    padding: 12px;
}

.filter-row.clients-filter {
    grid-template-columns: minmax(260px, 1fr) 180px auto;
}

.filter-row.os-filter {
    grid-template-columns: minmax(120px, .65fr) minmax(180px, 1fr) 160px 160px auto;
}

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 920px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 13px 12px;
    text-align: left;
    vertical-align: top;
}

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

th {
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

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

tbody tr:hover {
    background: color-mix(in srgb, var(--brand-soft), transparent 65%);
}

.dense-table {
    min-width: 1080px;
}

.dense-table th,
.dense-table td {
    font-size: 12px;
    padding: 8px 9px;
}

.dense-table td {
    min-width: 76px;
    overflow-wrap: anywhere;
}

.dense-table td:nth-child(2),
.dense-table td:nth-child(3),
.dense-table td:nth-child(4) {
    min-width: 155px;
}

.status-pill {
    background: var(--ok-soft);
    border: 1px solid color-mix(in srgb, var(--ok), transparent 55%);
    border-radius: 999px;
    color: var(--ok);
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    padding: 4px 9px;
    white-space: nowrap;
}

.status-pill.inactive {
    background: var(--panel-soft);
    border-color: var(--line);
    color: var(--muted);
}

.status-pill.status-open {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand), transparent 55%);
    color: var(--brand-dark);
}

.status-pill.status-closed {
    background: var(--ok-soft);
    border-color: color-mix(in srgb, var(--ok), transparent 45%);
    color: var(--ok);
}

.status-pill.status-canceled {
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger), transparent 45%);
    color: var(--danger);
}

.status-pill.status-neutral {
    background: var(--panel-soft);
    border-color: var(--line);
    color: var(--muted);
}

.permission-pill {
    background: var(--brand-soft);
    border: 1px solid color-mix(in srgb, var(--brand), transparent 65%);
    border-radius: 999px;
    color: var(--brand-dark);
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    padding: 4px 9px;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cell-muted {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.code-name-cell strong {
    color: var(--ink);
    display: block;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.table-link {
    color: var(--brand);
    font-weight: 800;
}

.json-tree {
    display: grid;
    gap: 8px;
}

.json-tree .json-tree {
    border-left: 2px solid var(--line);
    margin-left: 8px;
    padding-left: 12px;
}

.json-node {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
}

.json-node summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.json-row {
    align-items: start;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
    padding: 10px;
}

.json-key {
    color: var(--ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.json-value {
    color: var(--ink);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.json-count,
.json-empty {
    color: var(--muted);
    font-size: 13px;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions-cell form {
    margin: 0;
}

.notice {
    border-radius: var(--radius);
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice.success {
    background: var(--ok-soft);
    border: 1px solid color-mix(in srgb, var(--ok), transparent 55%);
    color: var(--ok);
}

.notice.danger {
    background: var(--danger-soft);
    border: 1px solid color-mix(in srgb, var(--danger), transparent 55%);
    color: var(--danger);
}

.field-error {
    color: var(--danger);
    font-size: 13px;
    margin: 0;
}

.empty-state {
    color: var(--muted);
    margin: 0;
}

.token-box {
    border-color: color-mix(in srgb, var(--warn), transparent 35%);
}

.token-box strong,
.token-box code,
.token-box span {
    display: block;
}

.token-box code,
.copy-field {
    background: #0b1220;
    border: 0;
    border-radius: var(--radius);
    color: #f8fafc;
    font-family: Consolas, Monaco, monospace;
    margin-top: 10px;
    overflow-wrap: anywhere;
    padding: 12px;
}

.copy-field {
    min-height: 44px;
}

.invite-box {
    margin-bottom: 18px;
}

.invite-box span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

nav[role="navigation"] {
    margin-top: 18px;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 232px minmax(0, 1fr);
    }

    .sidebar {
        padding: 18px;
    }

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

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        border-right: 0;
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr;
        min-height: auto;
        position: static;
    }

    .nav-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        margin-top: 0;
    }

    .logout-form {
        margin-top: 0;
    }

    .main-panel {
        padding: 18px;
    }

    .auth-wrap,
    .filter-row,
    .filter-row.os-filter,
    .filter-row.clients-filter {
        grid-template-columns: 1fr;
    }

    .auth-wrap {
        margin-top: 24px;
    }

    .login-screen {
        min-height: 100svh;
    }

    .login-shell {
        align-items: start;
        grid-template-columns: 1fr;
        padding: 34px 0 0;
    }

    .login-copy h1 {
        font-size: 40px;
    }

    .login-card {
        max-width: 560px;
        width: 100%;
    }

    .two-cols {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .block-heading {
        flex-direction: column;
    }

    .actions-cell {
        min-width: 170px;
    }

    .summary-tile-wide {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .main-panel {
        padding: 14px;
    }

    .content-block,
    .form-panel,
    .token-box,
    .summary-tile {
        padding: 14px;
    }

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

    .login-screen {
        padding: 14px;
    }

    .login-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .login-brand {
        min-height: 58px;
        width: 100%;
    }

    .login-brand img {
        max-width: 220px;
        width: 100%;
    }

    .login-theme-toggle {
        justify-content: center;
        width: 100%;
    }

    .login-copy h1 {
        font-size: 32px;
    }

    .primary-button,
    .secondary-button,
    .actions-cell button,
    .actions-cell a {
        width: 100%;
    }
}
