:root {
    color-scheme: light;
    --ink: #172530;
    --muted: #647887;
    --line: #d8e2e7;
    --line-strong: #b9c8d2;
    --canvas: #eef3f5;
    --surface: #ffffff;
    --surface-soft: #f7fafb;
    --surface-tint: #eef8f5;
    --blue: #2e6689;
    --teal: #2e766d;
    --green: #2e7654;
    --amber: #9a701c;
    --red: #a54848;
    --shadow: 0 12px 30px rgba(24, 37, 48, 0.07);
}

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

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

button {
    cursor: pointer;
}

a {
    color: var(--blue);
}

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

h1,
h2,
h3 {
    color: var(--ink);
    letter-spacing: 0;
}

h1:focus {
    outline: 0;
}

h1 {
    margin-bottom: 0.38rem;
    font-size: clamp(1.75rem, 2.3vw, 2.35rem);
    line-height: 1.15;
}

h2 {
    margin-bottom: 0.38rem;
    font-size: 1.13rem;
    line-height: 1.25;
}

h3 {
    margin-bottom: 0.28rem;
    font-size: 1rem;
    line-height: 1.25;
}

.eyebrow {
    color: #5b7484;
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.muted,
.panel-heading p,
small {
    color: var(--muted);
}

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

.admin-sidebar {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #fbfcfd;
}

.admin-brand {
    min-height: 4.65rem;
    display: flex;
    align-items: center;
    padding: 0 1.05rem;
    border-bottom: 1px solid var(--line);
}

.admin-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    text-decoration: none;
}

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

.admin-brand strong {
    font-size: 0.96rem;
}

.admin-brand small {
    margin-top: 0.08rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.brand-mark {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbe5dd;
    border-radius: 7px;
    background: #eaf7f3;
    color: #26766a;
}

.admin-nav {
    display: grid;
    gap: 0.15rem;
    padding: 0.95rem 0.85rem;
}

.admin-nav-section {
    margin: 0.72rem 0 0.22rem;
    color: #6b7b87;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-nav-section:first-child {
    margin-top: 0;
}

.admin-nav a {
    min-height: 2.45rem;
    display: flex;
    align-items: center;
    gap: 0.68rem;
    padding: 0.48rem 0.66rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #314250;
    font-size: 0.87rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.admin-nav a.active {
    border-color: #b8dcd4;
    background: #eaf5f3;
    color: #133b35;
}

.admin-nav a.active .icon-shell {
    color: var(--teal);
}

.admin-nav a:hover {
    border-color: #d8e4e8;
    background: #f2f6f8;
    color: var(--ink);
}

.sidebar-footer {
    display: grid;
    gap: 0.45rem;
    margin-top: auto;
    padding: 0.9rem 1.2rem 1.2rem;
    border-top: 1px solid var(--line);
}

.sidebar-footer small {
    font-size: 0.75rem;
    line-height: 1.35;
}

.admin-main {
    min-width: 0;
    background: var(--canvas);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 4.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.platform-context {
    display: grid;
    gap: 0.08rem;
}

.platform-context strong {
    font-size: 0.98rem;
}

.admin-topbar-actions,
.operator-profile,
.platform-status {
    display: flex;
    align-items: center;
}

.admin-topbar-actions {
    justify-content: flex-end;
    gap: 0.62rem;
}

.platform-status {
    min-height: 2.55rem;
    gap: 0.48rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid #b8d8d2;
    border-radius: 8px;
    background: var(--surface-tint);
    color: #1d5f52;
    white-space: nowrap;
}

.platform-status > span,
.operator-profile > span:not(.avatar) {
    display: grid;
    gap: 0.04rem;
}

.platform-status strong,
.operator-profile strong {
    color: var(--ink);
    font-size: 0.79rem;
    line-height: 1.05;
}

.platform-status small,
.operator-profile small {
    font-size: 0.7rem;
    line-height: 1.1;
}

.operator-profile {
    min-height: 2.55rem;
    gap: 0.5rem;
    padding: 0.2rem 0.25rem 0.2rem 0.3rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #214f4a;
    color: #ffffff;
    font-size: 0.73rem;
    font-weight: 900;
}

.admin-content {
    width: min(1540px, 100%);
    padding: 1.55rem 1.7rem 2.4rem;
}

.page-header,
.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.page-header {
    margin-bottom: 1.1rem;
}

.page-header p {
    max-width: 50rem;
    margin-bottom: 0;
    color: var(--muted);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(24, 37, 48, 0.04);
}

.panel:not(.company-directory) {
    padding: 1.05rem;
}

.panel-heading {
    margin-bottom: 0.95rem;
}

.panel-heading p {
    max-width: 42rem;
    margin: 0.28rem 0 0;
    font-size: 0.87rem;
}

.section-icon {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe3e9;
    border-radius: 7px;
    background: #f1f8fa;
    color: var(--blue);
}

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

.metric-card {
    min-height: 8.1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0.62rem;
    align-content: start;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(24, 37, 48, 0.04);
}

.metric-icon {
    grid-row: span 3;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8e0db;
    border-radius: 7px;
    background: #eef8f5;
    color: var(--teal);
}

.metric-card:nth-child(2) .metric-icon,
.metric-card:nth-child(3) .metric-icon {
    border-color: #cfe2ee;
    background: #f0f7fb;
    color: var(--blue);
}

.metric-card:nth-child(4) .metric-icon {
    border-color: #d4e8da;
    background: #f0f8f2;
    color: var(--green);
}

.metric-card > span:not(.metric-icon) {
    color: #637988;
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.metric-card strong {
    margin-top: 0.14rem;
    color: var(--ink);
    font-size: 1.42rem;
    line-height: 1.05;
}

.metric-card small {
    margin-top: 0.23rem;
    font-size: 0.76rem;
}

.operator-grid,
.workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.95rem;
}

.platform-overview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
}

.health-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
}

.health-list div {
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
}

.health-list dt {
    color: #617889;
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.health-list dd {
    margin: 0.26rem 0 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 750;
}

.platform-health-panel .health-list + .notice {
    margin-top: 0.8rem;
}

.audit-list,
.company-list,
.invite-list {
    display: grid;
    gap: 0.5rem;
}

.audit-list {
    max-height: 17.6rem;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.audit-item {
    display: flex;
    gap: 0.58rem;
    padding: 0.16rem 0 0.62rem;
    border-bottom: 1px solid var(--line);
}

.audit-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.audit-item p {
    margin: 0.15rem 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.audit-item small {
    font-size: 0.71rem;
}

.audit-dot {
    width: 0.54rem;
    height: 0.54rem;
    flex: 0 0 auto;
    margin-top: 0.34rem;
    border-radius: 999px;
    background: #91a4ae;
}

.audit-dot.green {
    background: var(--teal);
}

.audit-dot.red {
    background: var(--red);
}

.onboarding-panel {
    margin-bottom: 0.95rem;
}

.operator-form {
    display: grid;
    gap: 0.82rem;
}

.compact-form {
    gap: 0.6rem;
}

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

.form-grid-compact {
    max-width: 860px;
}

.form-section-heading {
    margin: 0.35rem 0 -0.2rem;
    color: #567181;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.operator-form label,
.reset-form label,
.login-form label {
    display: grid;
    gap: 0.32rem;
    color: #314b5a;
    font-size: 0.78rem;
    font-weight: 800;
}

.operator-form input,
.operator-form select,
.reset-form input,
.login-form input {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.48rem 0.62rem;
    border: 1px solid #b8cbd4;
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 500;
}

.operator-form input:focus,
.operator-form select:focus,
.reset-form input:focus,
.login-form input:focus {
    outline: 2px solid rgba(46, 118, 109, 0.16);
    border-color: var(--teal);
}

.feature-fieldset {
    margin: 0;
    padding: 0.78rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
}

.feature-fieldset legend {
    padding: 0 0.3rem;
    color: #5b7484;
    font-size: 0.69rem;
    font-weight: 850;
    text-transform: uppercase;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    gap: 0.48rem;
}

.feature-toggle,
.access-toggle {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    min-height: 2.55rem;
    padding: 0.42rem 0.52rem;
    border: 1px solid #d7e2e7;
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 750;
}

.feature-toggle:hover,
.access-toggle:hover {
    border-color: #abd4ca;
    background: #f6fbf9;
}

.feature-toggle input,
.access-toggle input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.toggle-track {
    display: inline-flex;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 1.24rem;
    padding: 0.12rem;
    border: 1px solid #b8c8d2;
    border-radius: 999px;
    background: #dce6ec;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle-knob {
    display: block;
    width: 0.94rem;
    height: 0.94rem;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.22);
    transition: transform 0.18s ease;
}

.feature-toggle input:checked + .toggle-track,
.access-toggle input:checked + .toggle-track {
    border-color: var(--teal);
    background: var(--teal);
}

.feature-toggle input:checked + .toggle-track .toggle-knob,
.access-toggle input:checked + .toggle-track .toggle-knob {
    transform: translateX(0.98rem);
}

.feature-toggle input:focus-visible + .toggle-track,
.access-toggle input:focus-visible + .toggle-track {
    outline: 3px solid rgba(46, 118, 109, 0.24);
    outline-offset: 2px;
}

.access-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.primary-button,
.text-button,
.danger-button,
.table-action,
.icon-button {
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.48rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-weight: 800;
    text-decoration: none;
}

.primary-button {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
}

.primary-button:hover {
    background: #1f665e;
}

.text-button,
.table-action,
.icon-button {
    background: var(--surface);
    color: var(--ink);
}

.text-button:hover,
.table-action:hover,
.icon-button:hover {
    border-color: var(--line-strong);
    background: #f7fafb;
}

.danger-button {
    border-color: var(--red);
    background: var(--red);
    color: #ffffff;
}

.danger-button:hover {
    background: #8f3f3f;
}

.icon-button {
    width: 2.35rem;
    padding: 0;
}

.action-button {
    white-space: nowrap;
}

.notice {
    margin: 0 0 0.95rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid;
    border-radius: 7px;
    font-size: 0.86rem;
    font-weight: 700;
}

.notice-ok {
    border-color: #9ed4c9;
    background: #eaf8f3;
    color: #176858;
}

.notice-error {
    border-color: #ecb2b2;
    background: #fff0f0;
    color: #8a3333;
}

.notice-warning {
    border-color: #e8cc8b;
    background: #fff7e7;
    color: #7d5a17;
}

.company-layout {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
    gap: 0.95rem;
    align-items: start;
    margin-bottom: 0.95rem;
}

.company-directory {
    position: sticky;
    top: 5.5rem;
    overflow: hidden;
}

.company-directory .panel-heading {
    padding: 1rem 1rem 0;
}

.directory-count {
    min-width: 1.65rem;
    min-height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe0e5;
    border-radius: 999px;
    background: #f5f9fa;
    color: #577180;
    font-size: 0.72rem;
    font-weight: 850;
}

.company-list {
    padding: 0.2rem 0.55rem 0.65rem;
}

.company-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.72rem;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--ink);
    text-decoration: none;
}

.company-list-item:hover {
    border-color: #d7e8e3;
    background: #f4faf8;
}

.company-list-item.selected {
    border-color: #a8d9ce;
    background: #eaf5f3;
}

.company-list-item strong,
.company-list-item small {
    display: block;
}

.company-list-item strong {
    overflow-wrap: anywhere;
    font-size: 0.87rem;
}

.company-list-item small {
    margin-top: 0.18rem;
    font-size: 0.72rem;
    line-height: 1.3;
}

.company-workspace {
    min-width: 0;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem;
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    background: var(--surface);
}

.workspace-header h2 {
    margin: 0.2rem 0;
}

.workspace-header p {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 0.76rem;
}

.workspace-header-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.workspace-tabs {
    display: flex;
    gap: 0.05rem;
    overflow-x: auto;
    padding: 0 0.65rem;
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--surface);
}

.workspace-tab {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.72rem 0.68rem 0.62rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #607685;
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.workspace-tab:hover {
    color: var(--ink);
}

.workspace-tab.active {
    border-bottom-color: var(--teal);
    color: var(--teal);
}

.workspace-tab span {
    min-width: 1.2rem;
    min-height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #edf2f5;
    color: #587080;
    font-size: 0.68rem;
}

.workspace-grid {
    margin-top: 0.95rem;
}

.command-company-panel {
    margin-bottom: 0.95rem;
}

.company-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.58rem;
}

.company-summary-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.58rem;
    min-height: 4.45rem;
    padding: 0.72rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--ink);
    text-decoration: none;
}

.company-summary-item:hover {
    border-color: #abd4ca;
    background: #f3faf8;
}

.company-summary-icon {
    width: 2.05rem;
    height: 2.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8dcd4;
    border-radius: 7px;
    background: #eaf5f3;
    color: var(--teal);
}

.company-summary-item strong,
.company-summary-item small {
    display: block;
}

.company-summary-item strong {
    font-size: 0.84rem;
}

.company-summary-item small {
    margin-top: 0.16rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.9rem;
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.panel-link:hover {
    color: #23556f;
    text-decoration: underline;
}

.panel-link.compact {
    margin-top: 0;
}

.security-audit-grid .audit-panel {
    min-height: 100%;
}

.status-pill {
    min-height: 1.45rem;
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f6fafb;
    color: #526976;
    font-size: 0.68rem;
    font-weight: 850;
    white-space: nowrap;
}

.status-pill.green {
    border-color: #9ed4c9;
    background: #eaf8f3;
    color: #176858;
}

.status-pill.red {
    border-color: #ecb2b2;
    background: #fff0f0;
    color: #8a3333;
}

.status-pill.amber {
    border-color: #e8cc8b;
    background: #fff7e7;
    color: #7d5a17;
}

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

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

th {
    background: #f3f7f8;
    color: #5b7380;
    font-size: 0.67rem;
    text-align: left;
    text-transform: uppercase;
}

th,
td {
    padding: 0.6rem;
    border-bottom: 1px solid var(--line);
}

td {
    font-size: 0.81rem;
}

td strong,
td small {
    display: block;
}

td small {
    margin-top: 0.14rem;
    font-size: 0.71rem;
}

.table-action {
    min-height: 2rem;
    padding: 0.34rem 0.55rem;
    font-size: 0.75rem;
}

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

.invite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.58rem 0;
    border-bottom: 1px solid var(--line);
}

.invite-item:last-child {
    border-bottom: 0;
}

.invite-item strong,
.invite-item small {
    display: block;
}

.invite-item strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.81rem;
}

.invite-item small {
    margin-top: 0.16rem;
    font-size: 0.71rem;
}

.danger-zone {
    border-color: #e4b0b0;
    background: #fffafa;
}

.reset-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.reset-form label {
    min-width: min(320px, 100%);
}

.loading-state,
.empty-page {
    padding: 2rem;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #173440;
}

.login-card {
    width: min(480px, 100%);
    padding: 1.5rem;
    border: 1px solid rgba(216, 226, 231, 0.9);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.login-copy {
    margin: 1.4rem 0;
}

.login-copy h1 {
    margin: 0.2rem 0 0.5rem;
}

.login-copy p {
    margin-bottom: 0;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 0.75rem;
}

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

@media (max-width: 1150px) {
    .admin-shell {
        grid-template-columns: 245px minmax(0, 1fr);
    }

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

    .platform-overview-grid {
        grid-template-columns: 1fr;
    }

    .company-layout {
        grid-template-columns: 250px minmax(0, 1fr);
    }
}

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

    .admin-sidebar {
        min-height: auto;
    }

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

    .admin-nav-section {
        grid-column: 1 / -1;
    }

    .sidebar-footer {
        display: none;
    }

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

    .company-directory {
        position: static;
    }

    .company-list {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    }

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

@media (max-width: 680px) {
    .admin-topbar {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        padding: 0.8rem 1rem;
    }

    .admin-topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .platform-status {
        min-width: 0;
    }

    .operator-profile > span:not(.avatar) {
        display: none;
    }

    .admin-content {
        padding: 1rem;
    }

    .page-header,
    .panel-heading,
    .workspace-header {
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .metric-grid,
    .operator-grid,
    .workspace-grid,
    .form-grid,
    .health-list {
        grid-template-columns: 1fr;
    }

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

    .workspace-header-meta {
        width: 100%;
        justify-content: space-between;
    }

    .reset-form {
        align-items: stretch;
    }
}
