:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #eef3f5;
    --text: #162027;
    --muted: #6b7882;
    --line: #d8e0e5;
    --accent: #0f7f78;
    --accent-dark: #0a625d;
    --danger: #b93636;
    --shadow: 0 14px 35px rgba(18, 32, 41, .08);
    font-family: "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

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

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .65rem .75rem;
    background: #fff;
    color: var(--text);
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: .4rem;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 600;
}

label input,
label select {
    color: var(--text);
    font-weight: 400;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.app-shell.anonymous-shell {
    display: block;
}

.stealth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.neutral-login {
    min-width: 140px;
    color: var(--muted);
    background: transparent;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.2rem;
    border-right: 1px solid var(--line);
    background: #10242b;
    color: #ecf5f4;
}

.brand {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.brand small,
.session-box span {
    display: block;
    color: #9eb5b8;
    font-size: .78rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--accent);
    font-weight: 800;
}

.sidebar nav {
    display: grid;
    gap: .4rem;
}

.sidebar nav a {
    padding: .72rem .8rem;
    border-radius: 6px;
    color: #cde1e2;
}

.sidebar nav a.active,
.sidebar nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.session-box {
    margin-top: auto;
    display: grid;
    gap: .6rem;
    padding: .9rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
}

.content {
    min-width: 0;
}

.security-banner {
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid #e6c275;
    background: #fff6dd;
    color: #694b12;
    font-size: .88rem;
}

.security-banner a {
    font-weight: 700;
    text-decoration: underline;
}

.page-shell {
    width: min(1180px, calc(100vw - 320px));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.narrow-page {
    max-width: 720px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-panel {
    width: min(430px, 100%);
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-panel form,
.form-grid {
    display: grid;
    gap: 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1,
.auth-panel h1 {
    margin: .1rem 0;
    font-size: 2rem;
    letter-spacing: 0;
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.page-header.compact {
    align-items: center;
}

.eyebrow {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .55rem .85rem;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}

.button-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button.compact .button-icon {
    width: 14px;
    height: 14px;
}

.button.icon-only,
.icon-button.icon-only {
    width: 38px;
    min-width: 38px;
    padding: 0;
}

.button.compact.icon-only {
    width: 32px;
    min-width: 32px;
    padding: 0;
}

.license-card-actions .button.icon-only {
    flex: 0 0 32px;
}

.button.primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: var(--accent-dark);
}

.button.ghost {
    background: transparent;
    color: inherit;
}

.icon-button {
    min-width: 42px;
    font-size: .82rem;
}

.danger {
    color: var(--danger);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metrics article,
.panel,
.table-panel,
.toolbar,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metrics article {
    display: grid;
    gap: .4rem;
    padding: 1rem;
}

.metrics span,
.muted,
.hint,
table small {
    color: var(--muted);
}

.metrics strong {
    font-size: 2rem;
}

.metrics small,
.panel-title small {
    color: var(--muted);
}

.dashboard-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-metrics article {
    border-top: 3px solid #7c8b94;
}

.dashboard-metrics .metric-download {
    border-top-color: var(--accent);
}

.dashboard-metrics .metric-upload {
    border-top-color: #3979a8;
}

.dashboard-metrics .metric-warning {
    border-top-color: #c78a2d;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
    gap: 1rem;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--muted);
    font-size: .78rem;
}

.download-dot,
.upload-dot,
.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
}

.upload-dot {
    margin-left: .35rem;
    background: #3979a8;
}

.activity-chart {
    height: 210px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .75rem;
    padding-top: .5rem;
    border-bottom: 1px solid var(--line);
}

.chart-column {
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: .5rem;
    text-align: center;
}

.chart-bars {
    min-height: 0;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4px;
}

.bar {
    width: min(16px, 35%);
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: var(--accent);
}

.bar.upload {
    background: #3979a8;
}

.distribution-panel h3 {
    margin: 1rem 0 .55rem;
    font-size: .78rem;
    color: var(--muted);
    text-transform: uppercase;
}

.distribution-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .25rem .75rem;
    margin: .55rem 0;
    font-size: .88rem;
}

.distribution-row > div {
    grid-column: 1 / -1;
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--surface-2);
}

.distribution-row i {
    display: block;
    height: 100%;
    background: var(--accent);
}

.activity-list {
    display: grid;
}

.activity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .7rem 0;
    border-top: 1px solid var(--line);
}

.activity-row:first-child {
    border-top: 0;
}

.status-dot.ok {
    background: var(--accent);
}

.status-dot.failed {
    background: var(--danger);
}

.activity-copy {
    min-width: 0;
    display: grid;
    gap: .15rem;
}

.activity-copy small,
.activity-row time {
    color: var(--muted);
    font-size: .78rem;
}

.badge {
    display: inline-flex;
    padding: .25rem .5rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
}

.badge.recommended {
    color: var(--accent-dark);
    background: #dcefed;
}

.endpoint-list details {
    display: grid;
    gap: .5rem;
    margin-top: .3rem;
    color: var(--muted);
}

.endpoint-list summary {
    cursor: pointer;
}

.dashboard-login {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.panel,
.empty-state {
    margin-top: 1rem;
    padding: 1rem;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-title h2 {
    margin: 0;
    font-size: 1.15rem;
}

.endpoint-list {
    display: grid;
    gap: .5rem;
}

.endpoint-list code,
.hint code {
    padding: .18rem .35rem;
    border-radius: 4px;
    background: var(--surface-2);
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    gap: .75rem;
    padding: .85rem;
    margin-bottom: 1rem;
}

.company-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.company-search,
.company-tools {
    display: flex;
    gap: .55rem;
}

.company-search {
    flex: 1 1 560px;
}

.company-search input {
    min-width: 220px;
}

.company-tools {
    flex: 0 0 auto;
}

.table-panel {
    overflow-x: auto;
}

.company-table-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.company-table-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--line);
    background: #fbfcfc;
    font-size: .82rem;
}

.company-table-summary span {
    color: var(--muted);
}

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

th,
td {
    padding: .85rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.company-table tbody tr {
    transition: background .15s ease;
}

.company-table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.company-col-name {
    width: 40%;
}

.company-col-group {
    width: 12%;
}

.company-col-category {
    width: 11%;
}

.company-col-licenses {
    width: 17%;
}

.company-col-links {
    width: 7%;
}

.company-col-actions {
    width: 13%;
}

.company-table tbody tr:hover {
    background: #f8fbfb;
}

.company-table td {
    border-bottom: 1px solid var(--line);
}

.company-table td.actions {
    display: table-cell;
    white-space: nowrap;
}

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

.company-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.company-identity > div {
    min-width: 0;
}

.company-identity strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.company-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    color: var(--accent-dark);
    background: #dcefed;
    font-size: .78rem;
    font-weight: 800;
}

.data-badge,
.link-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: .25rem .5rem;
    border-radius: 4px;
    color: #4e5d66;
    background: var(--surface-2);
    font-size: .75rem;
    font-weight: 700;
}

.data-badge.category-demo {
    color: #7a5418;
    background: #fff0ce;
}

.data-badge.category-full,
.data-badge.category-admin {
    color: var(--accent-dark);
    background: #dcefed;
}

.data-badge.category-nd {
    color: var(--muted);
}

.link-count {
    min-width: 30px;
    border-radius: 50%;
}

.license-usage {
    min-width: 105px;
    display: grid;
    gap: .35rem;
    font-size: .78rem;
    color: var(--muted);
}

.license-usage span strong {
    display: inline;
    color: var(--text);
}

.license-usage > div {
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--surface-2);
}

.license-usage i {
    display: block;
    height: 100%;
    background: #3979a8;
}

td strong,
td small {
    display: block;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
}

.icon-action {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #42525c;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.icon-action:hover {
    border-color: #9fadb5;
    background: var(--surface-2);
    color: var(--text);
}

.icon-action.danger:hover {
    border-color: #e2a2a2;
    background: #fff1f1;
    color: var(--danger);
}

.icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.pager,
.form-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
}

.company-pager {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.page-size,
.page-buttons {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.page-size label,
.page-summary {
    color: var(--muted);
    font-size: .8rem;
}

.page-size select {
    width: 72px;
    min-height: 34px;
    padding: .35rem .5rem;
}

.page-buttons {
    justify-content: center;
}

.page-number {
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.page-number:hover {
    border-color: var(--line);
    background: var(--surface);
}

.page-number.active {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    font-weight: 700;
}

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

.stack-list {
    display: grid;
    gap: .7rem;
}

.stack-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: .75rem;
    align-items: end;
}

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

.check-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    height: 38px;
}

.check-row input {
    width: auto;
}

.license-section {
    margin-top: 1.25rem;
}

.license-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.license-section-header h2 {
    margin: .1rem 0;
    font-size: 1.35rem;
}

.license-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.license-empty {
    display: grid;
    gap: .3rem;
    place-items: center;
    min-height: 150px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
}

.license-card {
    position: relative;
    overflow: hidden;
    margin-bottom: .75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(18, 32, 41, .05);
}

.license-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--accent);
    content: "";
}

.license-card.is-booked::before {
    background: #3979a8;
}

.license-card.is-expired::before {
    background: var(--danger);
}

.license-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem .8rem 1.15rem;
    border-bottom: 1px solid var(--line);
    background: #fbfcfc;
}

.license-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.license-number {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}

.license-identity > div {
    min-width: 0;
    display: grid;
    gap: .2rem;
}

.field-caption {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.license-identity code {
    overflow: hidden;
    color: var(--text);
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: .92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.license-card-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .45rem;
}

.license-status {
    min-width: 86px;
    padding: .32rem .55rem;
    border-radius: 4px;
    color: var(--accent-dark);
    background: #dcefed;
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.is-booked .license-status {
    color: #285779;
    background: #e0edf6;
}

.is-expired .license-status {
    color: #842020;
    background: #fbe4e4;
}

.button.compact {
    min-height: 32px;
    padding: .35rem .65rem;
    font-size: .78rem;
}

.license-detail-grid {
    display: grid;
    grid-template-columns: 1fr .75fr 1fr 1.3fr 1fr 1fr;
    gap: .75rem;
    padding: .85rem 1rem 1rem 1.15rem;
}

.license-detail-grid input {
    min-height: 40px;
    background: #fff;
}

.booking-toggle {
    min-width: 0;
}

.toggle-control {
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: .55rem;
}

.toggle-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toggle-track {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: #b8c3c9;
    cursor: pointer;
    transition: background .18s ease;
}

.toggle-track i {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .18s ease;
}

.toggle-control input:checked + .toggle-track {
    background: #3979a8;
}

.toggle-control input:checked + .toggle-track i {
    transform: translateX(16px);
}

.toggle-control input:focus-visible + .toggle-track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.toggle-control strong {
    overflow: hidden;
    color: var(--text);
    font-size: .82rem;
    text-overflow: ellipsis;
}

.alert {
    margin-bottom: 1rem;
    padding: .8rem;
    border-radius: 6px;
}

.alert.error {
    border: 1px solid #efb2b2;
    background: #fff1f1;
    color: #842020;
}

.alert.success {
    border: 1px solid #9dcfc8;
    background: #ebf8f6;
    color: var(--accent-dark);
}

.account-panel form {
    display: grid;
    gap: 1rem;
}

.account-panel label small {
    font-weight: 400;
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: sticky;
        z-index: 10;
        height: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: .75rem;
        padding: .75rem 1rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .sidebar nav {
        grid-column: 1 / -1;
        display: flex;
        gap: .25rem;
        overflow-x: auto;
    }

    .sidebar nav a {
        flex: 0 0 auto;
        padding: .55rem .7rem;
    }

    .session-box {
        margin: 0;
        padding: 0;
        border: 0;
        align-content: center;
        justify-items: end;
    }

    .session-box span,
    .session-box strong {
        display: none;
    }

    .page-shell {
        width: min(100% - 2rem, 1180px);
    }

    .metrics,
    .form-grid,
    .toolbar,
    .stack-row,
    .stack-row.two {
        grid-template-columns: 1fr;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .company-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .company-search {
        flex-basis: auto;
    }

    .company-tools {
        justify-content: flex-end;
    }

    .company-pager {
        grid-template-columns: 1fr;
    }

    .page-size,
    .page-buttons,
    .page-summary {
        justify-self: center;
    }

    .license-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .license-status {
        margin-right: auto;
    }

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

    .table-panel,
    .company-table-panel {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .company-table-summary {
        margin-bottom: .75rem;
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: .75rem;
    }

    tr {
        padding: .4rem .85rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .company-table colgroup,
    .company-table thead {
        display: none;
    }

    .company-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .75rem;
    }

    .company-table td {
        display: block;
        width: auto;
        padding: .65rem 0;
        border: 0;
    }

    .company-table td:not(:first-child):not(.actions) {
        display: none;
    }

    .company-table td:first-child::before,
    .company-table td.actions::before {
        display: none;
    }

    .company-table .company-avatar,
    .company-table .company-identity small {
        display: none;
    }

    .company-table td.actions {
        display: block;
        align-items: center;
        padding-left: .25rem;
    }

    .company-table .company-identity strong {
        -webkit-line-clamp: 2;
    }

    td {
        display: grid;
        grid-template-columns: minmax(90px, .7fr) 1fr;
        gap: .75rem;
        padding: .55rem 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
    }

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

    td.actions::before {
        margin-right: auto;
    }

    .page-header,
    .pager,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .page-shell {
        width: min(100% - 1rem, 1180px);
        padding-top: 1rem;
    }

    .page-header h1,
    .auth-panel h1 {
        font-size: 1.55rem;
    }

    .dashboard-metrics,
    .license-detail-grid {
        grid-template-columns: 1fr;
    }

    .company-search,
    .company-tools {
        flex-direction: column;
    }

    .page-buttons {
        flex-wrap: wrap;
    }

    .page-buttons .button[title="Erste Seite"],
    .page-buttons .button[title="Letzte Seite"] {
        display: none;
    }

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

    .license-card-actions .button {
        flex: 1 1 auto;
    }

    .license-status {
        width: 100%;
        margin: 0;
    }

    .license-identity code {
        font-size: .78rem;
    }

    .dashboard-login,
    .activity-row {
        align-items: stretch;
    }

    .dashboard-login {
        flex-direction: column;
    }

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

    .activity-row time {
        grid-column: 2;
    }

    .panel,
    .empty-state {
        padding: .85rem;
    }
}
