:root {
    color-scheme: light;
    --remote-navy: #112b3a;
    --remote-navy-2: #183f50;
    --remote-surface: #ffffff;
    --remote-canvas: #f4f7f8;
    --remote-border: #dce6e9;
    --remote-text: #18313c;
    --remote-muted: #6e828b;
    --remote-accent: #28a89a;
    --remote-accent-dark: #16877c;
    --remote-success: #16845d;
    --remote-warning: #a56b13;
    --remote-danger: #bd4c4c;
    --remote-focus: #75d9cf;
    --remote-content-width: 1320px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--remote-text);
    background: var(--remote-canvas);
    font-size: 15px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--remote-canvas); line-height: 1.5; }
a { color: var(--remote-accent-dark); }
a:hover { color: #116e66; }
button, input, select { font: inherit; }
button, .button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 15px;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid var(--remote-focus);
    outline-offset: 2px;
}
button.primary, .button.primary {
    background: var(--remote-accent-dark);
    border-color: var(--remote-accent-dark);
    color: #fff;
    font-weight: 600;
}
button.primary:hover:not(:disabled), .button.primary:hover {
    background: #116e66;
    border-color: #116e66;
    color: #fff;
}
button.secondary, .button.secondary {
    background: var(--remote-surface);
    border-color: var(--remote-border);
    color: var(--remote-text);
}
button.secondary:hover:not(:disabled), .button.secondary:hover {
    background: #f1f8f7;
    border-color: #a8d2cd;
    color: var(--remote-accent-dark);
}
button:disabled, button.disabled {
    background: #e7edef;
    border-color: #d6e0e3;
    color: #74868d;
    cursor: not-allowed;
}
main.page-container {
    width: min(var(--remote-content-width), calc(100% - 48px));
    margin: 0 auto;
    padding: 38px 0 64px;
}
.remote-header { min-height: 62px; background: var(--remote-navy); color: #dce9ec; }
.remote-header-inner {
    width: min(var(--remote-content-width), calc(100% - 48px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}
.remote-brand, .remote-workspace-brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}
.remote-brand:hover, .remote-workspace-brand:hover { color: #fff; }
.remote-logo { display: block; width: 29px; height: 29px; object-fit: contain; }
.remote-brand-copy { display: grid; gap: 1px; }
.remote-brand-copy strong { font-size: .92rem; letter-spacing: .15em; line-height: 1.05; }
.remote-brand-copy small { color: #86a4ad; font-size: .67rem; letter-spacing: .03em; }
.remote-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; }
.remote-nav a {
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    color: #b9cdd1;
    padding: 0 12px;
    font-size: .84rem;
    text-decoration: none;
}
.remote-nav a:hover, .remote-nav a.active { color: #fff; }
.remote-nav a.active { border-bottom-color: var(--remote-accent); }
.remote-account { position: relative; margin-left: auto; }
.remote-account summary {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #dce9ec;
    cursor: pointer;
    list-style: none;
    padding: 6px 0 6px 8px;
}
.remote-account summary::-webkit-details-marker { display: none; }
.remote-account summary::after { content: "⌄"; color: #8aa4ab; font-size: .85rem; margin-left: 1px; }
.account-initial {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 1px solid #5fd1c4;
    border-radius: 50%;
    color: #a5e3dc;
    font-size: .8rem;
    font-weight: 700;
}
.account-identity { display: grid; gap: 1px; line-height: 1.15; }
.account-identity strong { color: #fff; font-size: .79rem; font-weight: 600; }
.account-identity small { color: #86a4ad; font-size: .67rem; }
.account-panel {
    position: absolute;
    z-index: 5;
    top: calc(100% + 4px);
    right: 0;
    width: 230px;
    padding: 14px;
    border: 1px solid var(--remote-border);
    border-radius: 7px;
    background: var(--remote-surface);
    box-shadow: 0 12px 30px rgba(17, 43, 58, .16);
}
.account-panel strong, .account-panel small { display: block; }
.account-panel strong { color: var(--remote-text); font-size: .84rem; }
.account-panel small { color: var(--remote-muted); font-size: .73rem; overflow-wrap: anywhere; }
.account-panel .account-role { margin-top: 3px; color: var(--remote-accent-dark); font-weight: 600; }
.account-panel form { margin-top: 13px; padding-top: 12px; border-top: 1px solid #edf2f3; }
.account-panel button { width: 100%; min-height: 35px; padding: 6px 10px; font-size: .78rem; }
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}
.eyebrow { margin: 0 0 8px; color: var(--remote-accent-dark); font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; color: var(--remote-text); font-size: 1.75rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; }
h2 { margin-bottom: 5px; font-size: 1rem; font-weight: 650; }
h3 { font-size: .93rem; font-weight: 650; }
.page-header p, .muted { margin-bottom: 0; color: var(--remote-muted); font-size: .86rem; }
.surface { overflow: hidden; border: 1px solid var(--remote-border); border-radius: 8px; background: var(--remote-surface); box-shadow: 0 5px 18px rgba(17, 43, 58, .035); }
.surface-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--remote-border); }
.surface-header h2, .surface-header p { margin-bottom: 0; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.data-table th, .data-table td { padding: 15px 20px; border-bottom: 1px solid #edf2f3; vertical-align: middle; }
.data-table th { background: #f8fafb; color: var(--remote-muted); font-size: .67rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfd; }
.primary-cell { color: var(--remote-text); font-weight: 600; }
.secondary-cell { color: var(--remote-muted); font-size: .82rem; }
.system-id { color: var(--remote-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .69rem; overflow-wrap: anywhere; }
.status-pill, .role-pill, .enrollment-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; background: #eef1f2; color: #52636a; font-size: .7rem; font-weight: 650; line-height: 1; white-space: nowrap; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: #9aa9ae; content: ""; }
.status-pill.online { background: #e5f6ef; color: var(--remote-success); }
.status-pill.online::before { background: #3ab384; }
.role-pill, .enrollment-pill.complete { background: #e6f5f2; color: #136f67; }
.enrollment-pill.pending { background: #fff4df; color: var(--remote-warning); }
.table-action { min-height: 34px; padding: 6px 13px; font-size: .76rem; }
.empty-state { padding: 54px 28px; text-align: center; }
.empty-state h2 { margin-bottom: 7px; }
.empty-state p { max-width: 430px; margin: 0 auto; color: var(--remote-muted); font-size: .84rem; }
.alert { margin-bottom: 20px; padding: 11px 14px; border: 1px solid #b8ddd7; border-left: 3px solid var(--remote-accent-dark); border-radius: 5px; background: #eff9f7; color: #175e57; font-size: .82rem; }
.form-panel { display: grid; gap: 16px; margin-bottom: 18px; padding: 20px; border: 1px solid #b8ddd7; border-radius: 8px; background: #fbfefd; }
.form-panel h2, .form-panel p { margin-bottom: 0; }
.form-panel > p { color: var(--remote-muted); font-size: .81rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 6px; color: var(--remote-text); font-size: .77rem; font-weight: 650; }
.field.full { grid-column: 1 / -1; }
.field input, .field select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cbdadd; border-radius: 5px; outline: 0; background: #fff; color: var(--remote-text); font-size: .84rem; }
.field input:hover, .field select:hover { border-color: #9dbcc0; }
.form-actions { display: flex; align-items: center; gap: 9px; }
.form-actions .button, .form-actions button { min-height: 36px; font-size: .78rem; }
.section-tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--remote-border); border-radius: 7px; background: #edf2f3; }
.section-tabs a { flex: 1; padding: 8px 13px; border-radius: 5px; color: #526a75; font-size: .78rem; font-weight: 600; text-align: center; text-decoration: none; }
.section-tabs a:hover, .section-tabs a.active { background: #fff; color: var(--remote-accent-dark); box-shadow: 0 1px 3px rgba(17, 43, 58, .08); }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-toolbar h2 { margin: 0; font-size: 1.04rem; }
.section-toolbar p { margin: 4px 0 0; color: var(--remote-muted); font-size: .79rem; }
.section-toolbar .button { min-height: 35px; padding: 7px 12px; font-size: .76rem; white-space: nowrap; }
.admin-table .data-table { min-width: 620px; }
.assignment-table .data-table { min-width: 540px; }
.access-system-list { display: flex; flex-wrap: wrap; gap: 7px; }
.access-system-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #bee0db;
    border-radius: 999px;
    background: #eaf7f4;
    color: #135c56;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1;
}
.access-system-details {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px 7px 10px;
}
.access-system-name,
.access-system-site {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.access-system-site { color: #527a75; font-size: .66rem; font-weight: 500; }
.access-system-chip a {
    padding: 7px 10px 7px 8px;
    border-left: 1px solid #bee0db;
    color: #8d3838;
    font-size: .7rem;
    text-decoration: none;
}
.access-system-chip a:hover { background: #fff2f2; color: #702b2b; }
.token-panel { display: grid; gap: 15px; padding: 20px; }
.token-panel p { margin-bottom: 0; color: var(--remote-muted); font-size: .82rem; }
.token-panel .notice { padding: 11px 13px; border-left: 3px solid var(--remote-warning); background: #fff8eb; color: #7a571b; font-size: .78rem; }
.token-value { display: block; overflow-wrap: anywhere; padding: 14px; border: 1px solid var(--remote-border); border-radius: 5px; background: #f4f7f8; color: var(--remote-navy); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .83rem; user-select: all; }
.token-meta { color: var(--remote-muted); font-size: .77rem; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: var(--remote-canvas); }
.login-layout { width: min(100%, 420px); }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 22px; color: var(--remote-navy); }
.login-brand .remote-logo { width: 42px; height: 42px; }
.login-brand strong { font-size: 1.12rem; letter-spacing: .16em; }
.login-card { padding: 30px; border: 1px solid var(--remote-border); border-radius: 9px; background: var(--remote-surface); box-shadow: 0 14px 36px rgba(17, 43, 58, .08); }
.login-card h1 { margin-bottom: 8px; text-align: center; }
.login-card > p { margin-bottom: 24px; color: var(--remote-muted); font-size: .84rem; text-align: center; }
.login-form { display: grid; gap: 15px; }
.login-form .field input { min-height: 42px; }
.login-form button { width: 100%; margin-top: 4px; }
.login-error { margin: 0 0 17px; padding: 10px 12px; border: 1px solid #e5baba; border-left: 3px solid var(--remote-danger); border-radius: 5px; background: #fff5f5; color: #8d3838; font-size: .8rem; }
.remote-workspace { min-height: 100vh; display: flex; flex-direction: column; background: #edf2f3; }
.remote-workspace-bar { z-index: 2; min-height: 42px; display: flex; align-items: center; gap: 14px; padding: 5px 14px; background: var(--remote-navy); color: #dce9ec; }
.remote-workspace-brand { gap: 7px; font-size: .79rem; font-weight: 650; }
.remote-workspace-brand .remote-logo { width: 22px; height: 22px; }
.workspace-divider { width: 1px; height: 18px; background: #41616c; }
.workspace-system { overflow: hidden; color: #fff; font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.workspace-actions a, .workspace-actions button { min-height: 29px; padding: 4px 9px; border: 1px solid #51717a; border-radius: 4px; background: transparent; color: #b4ede7; font-size: .71rem; text-decoration: none; }
.workspace-actions a:hover, .workspace-actions button:hover { border-color: #87d8ce; background: #183f50; color: #fff; }
.remote-frame { width: 100%; flex: 1; min-height: calc(100vh - 42px); border: 0; background: #fff; }
.remote-storage-error { position: fixed; z-index: 3; top: 54px; right: 14px; max-width: 390px; margin: 0; padding: 10px 12px; border: 1px solid #e5baba; border-radius: 5px; background: #fff5f5; color: #8d3838; font-size: .78rem; }
@media (max-width: 760px) {
    main.page-container, .remote-header-inner { width: min(100% - 32px, var(--remote-content-width)); }
    .remote-header-inner { flex-wrap: wrap; gap: 0 16px; padding: 8px 0; }
    .remote-header { min-height: 0; }
    .remote-nav { order: 3; width: 100%; min-height: 37px; margin-top: 4px; }
    .remote-nav a { padding: 0 10px; }
    .page-header { display: block; margin-bottom: 21px; }
    .page-header .button { margin-top: 14px; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .section-tabs { overflow-x: auto; }
    .section-tabs a { flex: 0 0 auto; min-width: 94px; }
    .section-toolbar { align-items: flex-start; }
}
@media (max-width: 500px) {
    main.page-container { width: calc(100% - 24px); padding-top: 28px; }
    .remote-header-inner { width: calc(100% - 24px); }
    .remote-account .account-identity { display: none; }
    .surface-header, .form-panel, .token-panel { padding: 15px; }
    .data-table th, .data-table td { padding: 13px 15px; }
    .login-card { padding: 24px 20px; }
    .login-brand { margin-bottom: 18px; }
    .remote-workspace-bar { gap: 9px; padding-left: 10px; padding-right: 10px; }
    .workspace-actions { gap: 4px; }
    .workspace-actions a, .workspace-actions button { padding: 4px 7px; }
}
