:root {
    --pt-bg: #eef2f5;
    --pt-surface: #ffffff;
    --pt-surface-alt: #f6f8fa;
    --pt-border: #cbd4dc;
    --pt-text: #17232d;
    --pt-muted: #53616d;
    --pt-accent: #f2c94c;
    --pt-accent-strong: #b88c00;
    --pt-danger: #f4b6b6;
    --pt-danger-border: #8d2929;
    --pt-success: #d7eedc;
    --pt-success-border: #3f714a;
    --pt-warning: #fff0bf;
    --pt-warning-border: #806100;
    --pt-shadow: 0 8px 28px rgba(20, 35, 45, .08);
    --pt-sidebar-width: 250px;
    --pt-mobile-nav-height: 68px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--pt-bg); }
html, body {
    margin: 0;
    min-height: 100%;
    background: var(--pt-bg);
    color: var(--pt-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
}
body.pt-dialog-open { overflow: hidden; }
a { color: #254d68; }
a:hover { color: #172f41; }
button, input, select, textarea { font: inherit; color: var(--pt-text); background: var(--pt-surface); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--pt-border);
    border-radius: 8px;
    padding: 9px 11px;
    min-height: 42px;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 3px solid rgba(184, 140, 0, .35);
    outline-offset: 2px;
}
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pt-skip-link {
    position: fixed; left: 12px; top: -100px; z-index: 1000;
    background: var(--pt-accent); color: var(--pt-text); padding: 10px 14px; border-radius: 7px;
}
.pt-skip-link:focus { top: 12px; }

.pt-app-layout { min-height: 100vh; display: grid; grid-template-columns: var(--pt-sidebar-width) minmax(0, 1fr); }
.pt-sidebar {
    background: #dfe6eb;
    border-right: 1px solid var(--pt-border);
    padding: 13px 11px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 60;
}
.pt-sidebar-head { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--pt-border); }
.pt-brand {
    flex: 1; display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--pt-text); padding: 4px 5px 12px;
}
.pt-brand-mark {
    width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 10px;
    background: var(--pt-accent); border: 1px solid var(--pt-accent-strong); font-size: 22px; font-weight: 800; color: var(--pt-text);
}
.pt-brand strong, .pt-brand small { display: block; }
.pt-brand small { color: var(--pt-muted); margin-top: 1px; font-size: 11px; }
.pt-icon-btn {
    min-width: 44px; min-height: 44px; border: 1px solid var(--pt-border); border-radius: 9px;
    background: var(--pt-surface); color: var(--pt-text); cursor: pointer; font-size: 21px; line-height: 1;
}
.pt-sidebar-close { display: none; }
.pt-sidebar-scrim { display: none; }
.pt-nav { margin-top: 10px; display: grid; gap: 7px; }
.pt-nav-group { display: grid; gap: 3px; }
.pt-nav-group h2 {
    margin: 9px 7px 2px; color: var(--pt-muted); font-size: 11px; line-height: 1.2;
    text-transform: uppercase; letter-spacing: .055em;
}
.pt-nav a {
    display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--pt-text);
    min-height: 42px; padding: 7px 9px; border-radius: 8px; border: 1px solid transparent;
}
.pt-nav-icon {
    width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 7px;
    border: 1px solid var(--pt-border); background: var(--pt-surface-alt); font-size: 11px; font-weight: 800;
}
.pt-nav a:hover { background: #edf1f4; border-color: var(--pt-border); }
.pt-nav a.is-active { background: var(--pt-accent); border-color: var(--pt-accent-strong); font-weight: 750; }
.pt-nav a.is-active .pt-nav-icon { background: #f8e39a; border-color: var(--pt-accent-strong); }
.pt-sidebar-footer {
    margin-top: auto; border-top: 1px solid var(--pt-border); padding: 12px 7px 0;
    display: grid; gap: 4px; color: var(--pt-muted); font-size: 13px;
}
.pt-sidebar-footer strong { color: var(--pt-text); }
.pt-workspace { min-width: 0; }
.pt-mobile-header { display: none; }
.pt-topbar {
    min-height: 66px; background: var(--pt-surface); border-bottom: 1px solid var(--pt-border); padding: 9px 18px;
    display: flex; justify-content: space-between; gap: 12px; align-items: end; position: sticky; top: 0; z-index: 30;
}
.pt-context-form { display: flex; gap: 9px; align-items: end; flex-wrap: wrap; }
.pt-context-form label { min-width: 210px; }
.pt-context-form label > span { display: block; font-size: 12px; color: var(--pt-muted); margin-bottom: 3px; }
.pt-topbar-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pt-topbar-actions form { margin: 0; }
.pt-context-line {
    min-height: 39px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
    padding: 7px 18px; border-bottom: 1px solid var(--pt-border); background: #f7f9fa; color: var(--pt-muted); font-size: 13px;
}
.pt-context-line strong { color: var(--pt-text); }
.pt-context-badge { padding: 2px 7px; border: 1px solid #755700; background: #f9df8d; color: #342700; border-radius: 999px; }
.pt-main { padding: 18px; max-width: 1600px; width: 100%; }

.pt-page-heading { display: flex; justify-content: space-between; gap: 15px; align-items: start; margin-bottom: 14px; }
.pt-page-heading h1 { margin: 0; font-size: clamp(23px, 3vw, 29px); line-height: 1.2; }
.pt-page-heading p { margin: 4px 0 0; color: var(--pt-muted); }
.pt-version { border: 1px solid var(--pt-border); border-radius: 999px; padding: 5px 10px; background: var(--pt-surface); color: var(--pt-text); font-size: 13px; }
.pt-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.pt-card, .pt-panel { background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: 11px; box-shadow: var(--pt-shadow); }
.pt-card { padding: 14px; }
.pt-card h2, .pt-panel h2 { margin: 0 0 8px; font-size: 17px; }
.pt-card p, .pt-panel p { color: var(--pt-muted); }
.pt-card-number { font-size: 30px; font-weight: 800; }
.pt-panel { padding: 15px; margin: 12px 0; }
.pt-panel-narrow { max-width: 650px; }
.pt-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pt-form { display: grid; gap: 10px; }
.pt-form label { display: grid; gap: 4px; font-weight: 650; }
.pt-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-check { display: flex !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.pt-check input { width: auto; min-height: auto; }
.pt-btn {
    display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 42px;
    border: 1px solid #8795a0; border-radius: 8px; padding: 8px 12px; background: #edf1f4;
    color: var(--pt-text); font-weight: 700; text-decoration: none; cursor: pointer;
}
.pt-btn:hover { background: #dfe6eb; color: var(--pt-text); }
.pt-btn-primary { background: var(--pt-accent); border-color: var(--pt-accent-strong); color: var(--pt-text); }
.pt-btn-primary:hover { background: #e7bd37; color: var(--pt-text); }
.pt-btn-danger { background: var(--pt-danger); border-color: var(--pt-danger-border); color: #3d1616; }
.pt-btn-small { min-height: 38px; padding: 6px 10px; font-size: 13px; }
.pt-alert {
    border: 1px solid var(--pt-border); border-left-width: 5px; border-radius: 8px; padding: 11px 13px;
    margin: 12px 0; background: var(--pt-surface); color: var(--pt-text);
}
.pt-alert p { margin: 4px 0 0; color: inherit; }
.pt-alert-warning { background: var(--pt-warning); border-color: var(--pt-warning-border); }
.pt-alert-success { background: var(--pt-success); border-color: var(--pt-success-border); }
.pt-alert-error { background: var(--pt-danger); border-color: var(--pt-danger-border); color: #3d1616; }
.pt-table-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--pt-border); border-radius: 8px; }
.pt-table { border-collapse: collapse; width: 100%; min-width: 720px; background: var(--pt-surface); }
.pt-table th, .pt-table td { padding: 8px 9px; border-bottom: 1px solid var(--pt-border); text-align: left; vertical-align: top; color: var(--pt-text); }
.pt-table th { background: #dfe6eb; font-size: 13px; position: sticky; top: 0; }
.pt-table tr:last-child td { border-bottom: 0; }
.pt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pt-list li { border: 1px solid var(--pt-border); border-radius: 7px; padding: 8px 10px; display: flex; justify-content: space-between; gap: 10px; background: var(--pt-surface-alt); }
.pt-definition { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; }
.pt-definition dt { font-weight: 700; }
.pt-definition dd { margin: 0; }
.pt-inline-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.pt-form-compact { min-width: 260px; padding-top: 8px; }
details summary { cursor: pointer; font-weight: 700; color: var(--pt-text); }
.pt-support-banner { background: #f9df8d; border: 2px solid #755700; border-radius: 8px; color: #342700; padding: 9px 12px; margin: 0 0 12px; font-weight: 600; }
.pt-support-banner a { color: #263d4d; margin-left: 8px; }
.pt-standalone { background: var(--pt-bg); }
.pt-public-main { max-width: 900px; margin: 40px auto; padding: 18px; }
code { color: #293743; background: #edf1f4; border: 1px solid var(--pt-border); border-radius: 4px; padding: 1px 4px; }

.pt-module-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pt-module-card { display: block; padding: 13px; border: 1px solid var(--pt-border); background: var(--pt-surface-alt); border-radius: 9px; color: var(--pt-text); text-decoration: none; }
.pt-module-card:hover { border-color: var(--pt-accent-strong); background: #fff8db; color: var(--pt-text); }
.pt-module-card strong, .pt-module-card small { display: block; }
.pt-module-card small { margin-top: 3px; color: var(--pt-muted); }

.pt-command-dialog[hidden] { display: none; }
.pt-command-dialog { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding: max(8vh, 24px) 14px 14px; }
.pt-command-backdrop { position: absolute; inset: 0; background: rgba(19, 31, 40, .48); }
.pt-command-panel { position: relative; width: min(680px, 100%); max-height: 82vh; overflow: hidden; background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: 13px; box-shadow: 0 20px 70px rgba(13, 24, 32, .3); padding: 14px; }
.pt-command-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-command-head h2 { margin: 0; font-size: 20px; }
.pt-command-search { display: block; margin: 10px 0; }
.pt-command-results { max-height: 53vh; overflow-y: auto; display: grid; gap: 5px; }
.pt-command-results a { display: block; border: 1px solid var(--pt-border); border-radius: 8px; padding: 9px 11px; text-decoration: none; color: var(--pt-text); background: var(--pt-surface-alt); }
.pt-command-results a:hover, .pt-command-results a:focus { border-color: var(--pt-accent-strong); background: #fff8db; }
.pt-command-results strong, .pt-command-results small { display: block; }
.pt-command-results small { color: var(--pt-muted); margin-top: 2px; }
.pt-command-help { margin: 9px 0 0; font-size: 12px; color: var(--pt-muted); }
.pt-mobile-bottom { display: none; }

@media (max-width: 1100px) {
    .pt-app-layout { grid-template-columns: 1fr; }
    .pt-sidebar {
        position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); max-height: none;
        transform: translateX(-105%); transition: transform .2s ease; box-shadow: 16px 0 40px rgba(20, 35, 45, .2);
    }
    .pt-menu-open .pt-sidebar { transform: translateX(0); }
    .pt-sidebar-close { display: inline-grid; place-items: center; }
    .pt-sidebar-scrim { position: fixed; inset: 0; z-index: 55; border: 0; background: rgba(19, 31, 40, .42); }
    .pt-menu-open .pt-sidebar-scrim { display: block; }
    .pt-mobile-header {
        min-height: 58px; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
        position: sticky; top: 0; z-index: 35; background: var(--pt-surface); border-bottom: 1px solid var(--pt-border);
    }
    .pt-mobile-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--pt-text); }
    .pt-mobile-brand .pt-brand-mark { width: 34px; height: 34px; flex-basis: 34px; font-size: 19px; }
    .pt-topbar { position: static; align-items: stretch; flex-direction: column; padding: 9px 12px; }
    .pt-context-form { align-items: stretch; }
    .pt-context-form label { min-width: min(260px, 100%); flex: 1; }
    .pt-context-line { padding: 7px 12px; }
    .pt-main { padding: 13px; }
}

@media (max-width: 767px) {
    body.pt-app { padding-bottom: calc(var(--pt-mobile-nav-height) + env(safe-area-inset-bottom)); }
    .pt-topbar-actions [data-pt-command] { display: none; }
    .pt-context-form { display: grid; grid-template-columns: 1fr auto; width: 100%; }
    .pt-context-form label { grid-column: 1 / -1; min-width: 0; }
    .pt-topbar-actions { justify-content: space-between; }
    .pt-page-heading { align-items: flex-start; }
    .pt-page-heading .pt-version { flex: 0 0 auto; }
    .pt-two-columns, .pt-field-row { grid-template-columns: 1fr; }
    .pt-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .pt-card { padding: 11px; }
    .pt-card-number { font-size: 25px; }
    .pt-panel { padding: 12px; }
    .pt-definition { grid-template-columns: 1fr; gap: 2px; }
    .pt-definition dd { margin-bottom: 8px; }
    .pt-list li { flex-direction: column; }
    .pt-table-wrap { border: 0; overflow: visible; }
    .pt-table { min-width: 0; display: block; background: transparent; }
    .pt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .pt-table tbody, .pt-table tr, .pt-table td { display: block; width: 100%; }
    .pt-table tr { margin: 0 0 10px; border: 1px solid var(--pt-border); border-radius: 10px; background: var(--pt-surface); box-shadow: var(--pt-shadow); overflow: hidden; }
    .pt-table td { min-height: 39px; padding: 8px 10px 8px 44%; border-bottom: 1px solid var(--pt-border); position: relative; overflow-wrap: anywhere; }
    .pt-table td::before { content: attr(data-label); position: absolute; left: 10px; top: 8px; width: calc(44% - 18px); font-weight: 750; color: var(--pt-muted); }
    .pt-table td:last-child { border-bottom: 0; }
    .pt-mobile-bottom {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        min-height: var(--pt-mobile-nav-height); padding-bottom: env(safe-area-inset-bottom); background: var(--pt-surface); border-top: 1px solid var(--pt-border); box-shadow: 0 -8px 25px rgba(20,35,45,.12);
    }
    .pt-mobile-bottom a, .pt-mobile-bottom button {
        min-width: 0; min-height: 62px; padding: 6px 3px; border: 0; border-right: 1px solid #edf0f2; background: var(--pt-surface);
        color: var(--pt-text); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; cursor: pointer;
    }
    .pt-mobile-bottom .is-active { background: #fff4c8; font-weight: 800; }
    .pt-mobile-nav-icon { font-size: 14px; font-weight: 850; }
    .pt-public-main { margin: 12px auto; padding: 10px; }
}

@media (max-width: 430px) {
    .pt-card-grid { grid-template-columns: 1fr; }
    .pt-topbar-actions { display: grid; grid-template-columns: 1fr; }
    .pt-topbar-actions .pt-btn, .pt-topbar-actions form, .pt-topbar-actions form .pt-btn { width: 100%; }
    .pt-page-heading { flex-direction: column; }
    .pt-command-dialog { padding: 12px 8px; align-items: start; }
    .pt-command-panel { max-height: calc(100vh - 24px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.pt-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pt-section-heading h2, .pt-section-heading p { margin-top: 0; }
.pt-status-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 9px; border: 1px solid var(--pt-accent-strong); border-radius: 999px; background: #fff4c8; color: var(--pt-text); font-size: 12px; font-weight: 750; }
@media (max-width: 600px) { .pt-section-heading { flex-direction: column; } }

.pt-app-update {
    margin: 10px 14px 0; padding: 10px 12px; border: 1px solid #9a7414; border-left-width: 5px;
    border-radius: 9px; background: #fff1ba; color: var(--pt-text); display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.pt-app-update[hidden] { display: none; }
.pt-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.pt-feature { border: 1px solid var(--pt-border); border-radius: 9px; background: var(--pt-surface-alt); padding: 11px; }
.pt-feature h3 { margin: 0 0 5px; font-size: 16px; color: var(--pt-text); }
.pt-feature p { margin: 0; color: var(--pt-muted); }
@media (max-width: 767px) {
    .pt-app-update { margin: 8px 10px 0; align-items: stretch; flex-direction: column; }
    .pt-app-update .pt-btn { width: 100%; }
}

/* 0.6.0 – shared responsive experience contract */
:root {
    --pt-radius-sm: 8px;
    --pt-radius-md: 11px;
    --pt-space-1: 4px;
    --pt-space-2: 8px;
    --pt-space-3: 12px;
    --pt-space-4: 16px;
    --pt-control-height: 44px;
}
button, input, select { min-height: var(--pt-control-height); }
.pt-btn, .pt-nav a { min-height: var(--pt-control-height); }
.pt-form-inline-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: end;
    gap: var(--pt-space-3);
}
.pt-form-inline-responsive .pt-btn { width: 100%; }
.pt-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
    min-height: 44px;
    font-weight: 600 !important;
}
.pt-toggle input { width: 20px; min-height: 20px; margin: 0; }
.pt-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.pt-permission-wrap { overflow: auto; overscroll-behavior-inline: contain; }
.pt-permission-table { min-width: 980px; }
.pt-permission-table th:not(:first-child), .pt-permission-table td:not(:first-child) { text-align: center; }
.pt-permission-table th:first-child { min-width: 180px; }
.pt-permission-select { min-width: 118px; }
.pt-module-card { min-height: 76px; }

@media (max-width: 767px) {
    /* Permission matrices remain the same matrix on every device. On small
       screens they scroll horizontally instead of changing meaning. */
    .pt-permission-wrap { border: 1px solid var(--pt-border); overflow-x: auto; }
    .pt-permission-table { display: table; min-width: 980px; background: var(--pt-surface); }
    .pt-permission-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .pt-permission-table tbody { display: table-row-group; }
    .pt-permission-table tr { display: table-row; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
    .pt-permission-table th, .pt-permission-table td { display: table-cell; width: auto; min-height: 0; padding: 8px 9px; position: static; border-bottom: 1px solid var(--pt-border); }
    .pt-permission-table td::before { content: none; }
    .pt-form-inline-responsive { grid-template-columns: 1fr; }
}
.pt-module-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.pt-module-access-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 92px;
    padding: 12px;
    border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius-md);
    background: var(--pt-surface-alt);
    cursor: pointer;
}
.pt-module-access-card:has(input:checked) { border-color: var(--pt-accent-strong); background: #fff8db; }
.pt-module-access-card input { width: 21px; min-height: 21px; margin: 2px 0 0; }
.pt-module-access-card span, .pt-module-access-card strong, .pt-module-access-card small, .pt-module-access-card em { display: block; }
.pt-module-access-card small { margin-top: 3px; color: var(--pt-muted); }
.pt-module-access-card em { margin-top: 7px; color: var(--pt-muted); font-size: 12px; font-style: normal; }

.pt-ai-output { white-space: pre-wrap; max-height: 360px; overflow: auto; }
.pt-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pt-space-2);
    margin: 10px 0 14px;
}
.pt-role-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--pt-space-2);
    min-height: 44px;
    padding: 5px 6px 5px 12px;
    border: 1px solid var(--pt-border);
    border-radius: 999px;
    background: var(--pt-surface-alt);
    color: var(--pt-text);
    font-weight: 700;
}
.pt-inline-form { display: inline-flex; margin: 0; }
.pt-btn-compact { min-height: 32px; padding: 4px 9px; font-size: 12px; }

/* 0.7.0 – enrollment settings, historical choices and compact administration */
.pt-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}
.pt-setting-card,
.pt-setting-row {
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    background: #f7f9fa;
    padding: 12px;
}
.pt-setting-card { display: grid; gap: 5px; }
.pt-setting-card small,
.pt-choice-note,
.pt-choice-unavailable span { color: var(--pt-muted); font-size: 12px; }
.pt-setting-row { margin: 10px 0; }
.pt-choice-note { margin-left: 6px; }
.pt-choice-unavailable {
    display: grid;
    gap: 2px;
    margin: 7px 0;
    padding: 10px 12px;
    border: 1px dashed var(--pt-border);
    border-radius: 10px;
    background: #eceff1;
    color: #55616b;
}
@media (max-width: 700px) {
    .pt-settings-grid { grid-template-columns: 1fr; }
}

.pt-compact-details{display:inline-block;max-width:24rem}
.pt-compact-details>summary{cursor:pointer;list-style:none}
.pt-compact-details>summary::-webkit-details-marker{display:none}
.pt-compact-details[open]{display:block;width:min(24rem,80vw);margin-top:.5rem}
.pt-compact-details .pt-form{margin-top:.5rem;padding:.75rem;border:1px solid var(--pt-border,#cbd5e1);border-radius:.75rem;background:var(--pt-surface,#fff)}

/* 0.8.2 – compact field system and short mobile workflows */
/* 0.8.2 – compact field system and short mobile workflows */
:root {
    --pt-sidebar-width: 224px;
    --pt-control-height: 36px;
    --pt-control-height-touch: 40px;
    --pt-form-gap-x: 9px;
    --pt-form-gap-y: 6px;
    --pt-shadow: 0 3px 14px rgba(20, 35, 45, .07);
}

html, body { font-size: 14px; line-height: 1.38; }
input, select, textarea {
    min-width: 0;
    min-height: var(--pt-control-height);
    padding: 6px 8px;
    border-radius: 7px;
}
textarea { min-height: 58px; line-height: 1.35; }

.pt-sidebar { padding: 9px 8px; }
.pt-sidebar-head { gap: 2px; }
.pt-brand { gap: 8px; padding: 2px 4px 8px; }
.pt-brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; font-size: 18px; }
.pt-nav { margin-top: 6px; gap: 3px; }
.pt-nav-group { gap: 1px; }
.pt-nav-group h2 { margin: 7px 6px 1px; font-size: 9.5px; }
.pt-nav a { min-height: 34px; padding: 4px 7px; gap: 7px; border-radius: 7px; }
.pt-nav-icon { width: 21px; height: 21px; flex-basis: 21px; border-radius: 6px; font-size: 9px; }
.pt-sidebar-footer { padding-top: 8px; font-size: 12px; }

.pt-topbar { min-height: 54px; padding: 6px 12px; gap: 8px; }
.pt-context-form { gap: 6px; }
.pt-context-form label { min-width: 190px; }
.pt-context-form label > span { font-size: 11px; margin-bottom: 2px; }
.pt-context-line { min-height: 31px; padding: 4px 12px; font-size: 12px; }
.pt-main { max-width: 1500px; padding: 11px 13px 16px; }

.pt-page-heading { gap: 10px; margin-bottom: 8px; }
.pt-page-heading h1 { font-size: clamp(21px, 2.2vw, 26px); }
.pt-page-heading p { margin-top: 2px; }
.pt-version { padding: 3px 8px; font-size: 11px; }
.pt-card-grid { gap: 7px; margin: 7px 0; }
.pt-card { padding: 9px 10px; }
.pt-card h2, .pt-panel h2 { margin-bottom: 5px; font-size: 15px; }
.pt-card-number { font-size: 24px; }
.pt-panel { padding: 10px 11px; margin: 8px 0; border-radius: 9px; }
.pt-panel p { margin: 5px 0; }
.pt-two-columns { gap: 8px; }
.pt-inline-actions { gap: 5px; }
.pt-btn { min-height: 36px; padding: 6px 10px; border-radius: 7px; }
.pt-btn-small { min-height: 32px; padding: 4px 8px; font-size: 12px; }
.pt-alert { margin: 7px 0; padding: 8px 10px; }
.pt-table th, .pt-table td { padding: 6px 7px; }
.pt-list { gap: 4px; }
.pt-list li { padding: 6px 8px; }

/* Forms use a 12-column flow instead of forcing every field into half a page. */
.pt-form,
.pt-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--pt-form-gap-x);
    row-gap: var(--pt-form-gap-y);
    align-items: end;
}
.pt-form > *,
.pt-form-grid > * { grid-column: 1 / -1; min-width: 0; }
.pt-form > .pt-field-row,
.pt-form-grid > .pt-field-row { display: contents; }

.pt-form > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
.pt-form > label:has(> select),
.pt-form-grid > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
.pt-form-grid > label:has(> select),
.pt-form > .pt-field-row > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
.pt-form > .pt-field-row > label:has(> select),
.pt-form-grid > .pt-field-row > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
.pt-form-grid > .pt-field-row > label:has(> select) {
    grid-column: span 4;
    min-width: 0;
}

/* Names and long identifiers get half width, not the whole screen. */
.pt-form label:has(> input[name="first_name"]),
.pt-form label:has(> input[name="last_name"]),
.pt-form label:has(> input[name$="_first_name"]),
.pt-form label:has(> input[name$="_last_name"]),
.pt-form-grid label:has(> input[name="first_name"]),
.pt-form-grid label:has(> input[name="last_name"]),
.pt-form-grid label:has(> input[name$="_first_name"]),
.pt-form-grid label:has(> input[name$="_last_name"]),
.pt-form label:has(> input[type="email"]),
.pt-form-grid label:has(> input[type="email"]),
.pt-form label:has(> input[name="address"]),
.pt-form-grid label:has(> input[name="address"]) { grid-column: span 6; }

/* Short values stay short. */
.pt-form label:has(> input[type="date"]),
.pt-form label:has(> input[type="time"]),
.pt-form label:has(> input[type="number"]),
.pt-form-grid label:has(> input[type="date"]),
.pt-form-grid label:has(> input[type="time"]),
.pt-form-grid label:has(> input[type="number"]),
.pt-form label:has(> input[name*="postal_code"]),
.pt-form-grid label:has(> input[name*="postal_code"]),
.pt-form label:has(> input[name="clothing_size"]),
.pt-form-grid label:has(> input[name="clothing_size"]),
.pt-form label:has(> select[name="grade"]),
.pt-form-grid label:has(> select[name="grade"]),
.pt-form label:has(> input[name*="year"]),
.pt-form-grid label:has(> input[name*="year"]),
.pt-form label:has(> input[name*="sort_order"]),
.pt-form-grid label:has(> input[name*="sort_order"]) { grid-column: span 2; }

.pt-form label:has(> input[type="file"]),
.pt-form-grid label:has(> input[type="file"]) { grid-column: span 6; }

.pt-form > label:has(> textarea),
.pt-form-grid > label:has(> textarea) { grid-column: 1 / -1; }
.pt-form > .pt-field-row > label:has(> textarea),
.pt-form-grid > .pt-field-row > label:has(> textarea) { grid-column: span 6; }

.pt-form label,
.pt-form-grid label { gap: 2px; font-size: 12.5px; line-height: 1.25; }
.pt-form > .pt-check,
.pt-form-grid > .pt-check,
.pt-form > .pt-inline-actions .pt-check,
.pt-form-grid > .pt-inline-actions .pt-check { grid-column: span 4; min-height: 30px; }
.pt-form > .pt-btn,
.pt-form-grid > .pt-btn { grid-column: span 3; justify-self: start; }
.pt-form > .pt-inline-actions,
.pt-form-grid > .pt-inline-actions { margin-top: 1px; }

/* Collapsible blocks keep optional or sensitive data nearby without creating long pages. */
.pt-form-section {
    grid-column: 1 / -1;
    border: 1px solid var(--pt-border);
    border-radius: 8px;
    background: var(--pt-surface-alt);
    overflow: hidden;
}
.pt-form-section > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    padding: 6px 9px;
    cursor: pointer;
}
.pt-form-section > summary::-webkit-details-marker { display: none; }
.pt-form-section > summary::after { content: "+"; font-size: 18px; line-height: 1; }
.pt-form-section[open] > summary::after { content: "–"; }
.pt-form-section[open] > summary { border-bottom: 1px solid var(--pt-border); }
.pt-form-section-body { padding: 8px 9px; }
.pt-form-section-note { color: var(--pt-muted); font-size: 11px; font-weight: 600; }
.pt-form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 2px;
}
.pt-form-actions .pt-btn { width: auto; }

/* Compact details and settings everywhere. */
details.pt-panel > summary { min-height: 32px; }
.pt-setting-card, .pt-setting-row { padding: 8px 9px; border-radius: 9px; }
.pt-settings-grid { gap: 7px; margin: 8px 0 11px; }
.pt-module-access-card { min-height: 68px; padding: 8px; }
.pt-module-card { min-height: 58px; padding: 9px; }

@media (max-width: 1100px) {
    .pt-main { padding: 9px 10px 14px; }
    .pt-topbar { padding: 6px 10px; }
}

@media (max-width: 767px) {
    :root { --pt-form-gap-x: 6px; --pt-form-gap-y: 5px; }
    html, body { font-size: 13.5px; }
    input, select, textarea, button { min-height: var(--pt-control-height-touch); }
    textarea { min-height: 52px; }
    .pt-mobile-header { min-height: 50px; padding: 5px 8px; }
    .pt-topbar { padding: 5px 8px; gap: 5px; }
    .pt-context-line { padding: 3px 8px; }
    .pt-main { padding: 7px 7px 12px; }
    .pt-page-heading { margin-bottom: 6px; }
    .pt-page-heading h1 { font-size: 21px; }
    .pt-panel { padding: 8px; margin: 6px 0; }
    .pt-card-grid { gap: 5px; }
    .pt-card { padding: 7px 8px; }
    .pt-form, .pt-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .pt-form > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
    .pt-form > label:has(> select),
    .pt-form-grid > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
    .pt-form-grid > label:has(> select),
    .pt-form > .pt-field-row > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
    .pt-form > .pt-field-row > label:has(> select),
    .pt-form-grid > .pt-field-row > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])),
    .pt-form-grid > .pt-field-row > label:has(> select),
    .pt-form label:has(> input[name="first_name"]),
    .pt-form label:has(> input[name="last_name"]),
    .pt-form label:has(> input[name$="_first_name"]),
    .pt-form label:has(> input[name$="_last_name"]),
    .pt-form-grid label:has(> input[name="first_name"]),
    .pt-form-grid label:has(> input[name="last_name"]),
    .pt-form-grid label:has(> input[name$="_first_name"]),
    .pt-form-grid label:has(> input[name$="_last_name"]),
    .pt-form label:has(> input[type="email"]),
    .pt-form-grid label:has(> input[type="email"]) { grid-column: span 2; }

    .pt-form label:has(> input[name="address"]),
    .pt-form-grid label:has(> input[name="address"]) { grid-column: span 3; }

    .pt-form label:has(> input[type="date"]),
    .pt-form label:has(> input[type="time"]),
    .pt-form label:has(> input[type="number"]),
    .pt-form-grid label:has(> input[type="date"]),
    .pt-form-grid label:has(> input[type="time"]),
    .pt-form-grid label:has(> input[type="number"]),
    .pt-form label:has(> input[name="clothing_size"]),
    .pt-form-grid label:has(> input[name="clothing_size"]),
    .pt-form label:has(> select[name="grade"]),
    .pt-form-grid label:has(> select[name="grade"]) { grid-column: span 2; }

    .pt-form label:has(> input[name*="postal_code"]),
    .pt-form-grid label:has(> input[name*="postal_code"]),
    .pt-form label:has(> input[name*="sort_order"]),
    .pt-form-grid label:has(> input[name*="sort_order"]) { grid-column: span 1; }

    .pt-form label:has(> input[type="file"]),
    .pt-form-grid label:has(> input[type="file"]),
    .pt-form > label:has(> textarea),
    .pt-form-grid > label:has(> textarea) { grid-column: 1 / -1; }
    .pt-form > .pt-field-row > label:has(> textarea),
    .pt-form-grid > .pt-field-row > label:has(> textarea) { grid-column: span 4; }
    .pt-form > .pt-check,
    .pt-form-grid > .pt-check { grid-column: span 2; }
    .pt-form > .pt-btn,
    .pt-form-grid > .pt-btn { grid-column: span 2; width: 100%; }
    .pt-form-actions { margin-top: 2px; }
    .pt-form-actions .pt-btn { width: 100%; }
    .pt-table tr { margin-bottom: 6px; border-radius: 8px; }
    .pt-table td { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
}

@media (max-width: 430px) {
    .pt-topbar-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-topbar-actions form:last-child:nth-child(odd),
    .pt-topbar-actions > .pt-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .pt-page-heading { flex-direction: row; }
    .pt-page-heading p { font-size: 12px; }
}

/* 0.8.2 finishing rules for dense lists and inline table forms. */
.pt-form-compact{min-width:0;display:grid;gap:5px;padding-top:4px}.pt-form-compact label{gap:2px;font-size:12px}.pt-form-compact input,.pt-form-compact select,.pt-form-compact textarea{min-height:32px;padding:4px 6px}.pt-form-compact textarea{min-height:48px}
@media(min-width:768px){.pt-table-wrap{max-height:min(68vh,720px);overscroll-behavior:contain}.pt-table-wrap>.pt-table th{top:0;z-index:1}}

/* Brand and navigation presentation. */
:root {
    --pt-brand-blue: #4a78c2;
    --pt-brand-teal: #47a7a1;
    --pt-brand-coral: #ef7b6c;
    --pt-brand-purple: #8a6ccf;
    --pt-brand-gold: #f2c94c;
}
.pt-sidebar {
    background:
        radial-gradient(circle at 18% 5%, rgba(74, 120, 194, .16), transparent 25%),
        radial-gradient(circle at 88% 24%, rgba(138, 108, 207, .13), transparent 24%),
        radial-gradient(circle at 28% 79%, rgba(71, 167, 161, .13), transparent 27%),
        linear-gradient(180deg, #e8f1f7 0%, #eef0f8 52%, #f7f0df 100%);
}
.pt-sidebar-head {
    position: relative;
    min-height: 78px;
    align-items: flex-start;
    overflow: hidden;
}
.pt-brand {
    position: relative;
    min-width: 0;
    gap: 5px;
    padding: 4px 3px 13px;
    align-items: center;
}
.pt-brand-logo {
    width: 78px;
    height: 53px;
    flex: 0 0 78px;
    display: block;
    object-fit: contain;
}
.pt-brand-copy {
    min-width: 0;
    position: relative;
    z-index: 2;
}
.pt-brand-copy strong {
    font-size: 20px;
    line-height: 1.05;
    letter-spacing: -.02em;
}
.pt-brand-copy small {
    max-width: 120px;
    line-height: 1.25;
}
.pt-brand-decoration {
    position: absolute;
    right: 2px;
    top: 2px;
    color: #775d9f;
    font-size: 13px;
    letter-spacing: 3px;
    opacity: .56;
    transform: rotate(-6deg);
    pointer-events: none;
}
.pt-nav {
    gap: 9px;
}
.pt-nav-group {
    gap: 4px;
}
.pt-nav-group h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 10px 5px 3px;
    color: #3f5060;
    font-size: 11px;
    letter-spacing: .06em;
}
.pt-area-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
}
.pt-area-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pt-area-icon-personer { color: #276c5d; border-color: #a8d4c8; background: #e3f3ee; }
.pt-area-icon-opplaering { color: #315f9d; border-color: #adc5e8; background: #e8f0fb; }
.pt-area-icon-klassekorps { color: #7654a7; border-color: #c7b5e1; background: #f0eafb; }
.pt-area-icon-eiendeler { color: #8a5f19; border-color: #e0c98d; background: #fbf1d8; }
.pt-area-icon-styre { color: #9a4d44; border-color: #e2b2ad; background: #fae9e7; }
.pt-area-icon-rapporter { color: #35687a; border-color: #acd0dd; background: #e6f2f6; }
.pt-area-icon-nettsider { color: #3e6e3d; border-color: #b5d4b3; background: #eaf4e8; }
.pt-area-icon-annet { color: #5c6670; border-color: #c6ced4; background: #eef1f3; }
.pt-area-icon-administrasjon { color: #6b4b77; border-color: #ccb8d3; background: #f1e9f4; }
.pt-nav a {
    background: rgba(255, 255, 255, .28);
    border-color: rgba(163, 178, 190, .34);
}
.pt-nav a:hover {
    background: rgba(255, 255, 255, .72);
    border-color: #aab8c3;
}
.pt-nav a.is-active {
    background: linear-gradient(135deg, #f9dd80 0%, #f2c94c 62%, #efb95f 100%);
    border-color: #a77d00;
    box-shadow: 0 4px 12px rgba(133, 98, 0, .13);
}
.pt-nav-icon {
    background: rgba(255, 255, 255, .72);
}
.pt-nav-group[data-area="personer"] .pt-nav-icon { color: #276c5d; border-color: #a8d4c8; background: #e3f3ee; }
.pt-nav-group[data-area="opplaering"] .pt-nav-icon { color: #315f9d; border-color: #adc5e8; background: #e8f0fb; }
.pt-nav-group[data-area="klassekorps"] .pt-nav-icon { color: #7654a7; border-color: #c7b5e1; background: #f0eafb; }
.pt-nav-group[data-area="eiendeler"] .pt-nav-icon { color: #8a5f19; border-color: #e0c98d; background: #fbf1d8; }
.pt-nav-group[data-area="styre"] .pt-nav-icon { color: #9a4d44; border-color: #e2b2ad; background: #fae9e7; }
.pt-nav-group[data-area="rapporter"] .pt-nav-icon { color: #35687a; border-color: #acd0dd; background: #e6f2f6; }
.pt-nav-group[data-area="nettsider"] .pt-nav-icon { color: #3e6e3d; border-color: #b5d4b3; background: #eaf4e8; }
.pt-nav-group[data-area="annet"] .pt-nav-icon { color: #5c6670; border-color: #c6ced4; background: #eef1f3; }
.pt-nav-group[data-area="administrasjon"] .pt-nav-icon { color: #6b4b77; border-color: #ccb8d3; background: #f1e9f4; }
.pt-nav a.is-active .pt-nav-icon {
    background: rgba(255, 255, 255, .58);
    color: #4a3a0a;
    border-color: #b48b16;
}
.pt-topbar {
    background: linear-gradient(90deg, #ffffff 0%, #f7fbfd 55%, #fbf8f0 100%);
}
.pt-context-line {
    background: linear-gradient(90deg, #f6f9fb 0%, #f8f6fb 58%, #faf7ef 100%);
}
.pt-mobile-logo {
    width: 52px;
    height: 34px;
    object-fit: contain;
}
.pt-mobile-brand {
    gap: 4px;
}
.pt-mobile-brand strong {
    font-size: 18px;
}

@media (max-width: 1100px) {
    .pt-sidebar-head { min-height: 74px; }
}

@media (max-width: 767px) {
    .pt-mobile-logo { width: 46px; height: 31px; }
    .pt-brand-logo { width: 72px; height: 49px; flex-basis: 72px; }
}


.pt-topbar {
    display: grid;
    grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 7px 14px;
    background:
        radial-gradient(circle at 8% 20%, rgba(74,120,194,.12), transparent 24%),
        radial-gradient(circle at 67% 0%, rgba(138,108,207,.10), transparent 28%),
        linear-gradient(90deg,#fff 0%,#f8fbfd 56%,#fff9e9 100%);
}
.pt-topbar-brand {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    color: var(--pt-text); text-decoration: none;
}
.pt-topbar-brand img { width: 92px; height: 56px; object-fit: contain; flex: 0 0 92px; }
.pt-topbar-brand span:not(.pt-topbar-notes) { display: grid; min-width: 0; }
.pt-topbar-brand strong { font-size: 21px; line-height: 1; letter-spacing: -.02em; }
.pt-topbar-brand small { color: var(--pt-muted); font-size: 11px; margin-top: 3px; white-space: nowrap; }
.pt-topbar-notes { color: #7b5ea7; letter-spacing: 3px; font-size: 14px; opacity: .72; transform: rotate(-5deg); }
.pt-context-form { justify-self: end; grid-column: 3; grid-row: 1; }
.pt-topbar-actions { justify-self: end; grid-column: 2; grid-row: 1; }

.pt-sidebar-head { min-height: 92px; }
.pt-brand-logo { width: 102px; height: 66px; flex-basis: 102px; }
.pt-brand-copy strong { font-size: 22px; }
.pt-brand-decoration { top: 4px; right: 4px; font-size: 14px; }
.pt-nav { display: grid; gap: 13px; margin-top: 8px; }
.pt-nav-group { display: grid; gap: 0; }
.pt-nav-toggle {
    width: 100%; min-height: 42px; display: grid;
    grid-template-columns: 29px minmax(0,1fr) 18px; align-items: center; gap: 8px;
    margin: 0; padding: 5px 7px; border: 1px solid rgba(148,163,177,.42);
    border-radius: 10px; background: rgba(255,255,255,.54); color: #2c3d4d;
    font: inherit; font-size: 12px; font-weight: 800; text-align: left; cursor: pointer;
    box-shadow: 0 1px 2px rgba(37,52,64,.05);
}
.pt-nav-toggle:hover, .pt-nav-toggle:focus-visible { background: rgba(255,255,255,.86); border-color: #9dadba; }
.pt-nav-toggle:focus-visible { outline: 2px solid #3f79b7; outline-offset: 2px; }
.pt-nav-toggle .pt-area-icon { width: 27px; height: 27px; flex-basis: 27px; }
.pt-nav-toggle-label { min-width: 0; }
.pt-nav-chevron { justify-self: end; font-size: 17px; line-height: 1; transition: transform .18s ease; }
.pt-nav-group.is-open .pt-nav-chevron { transform: rotate(180deg); }
.pt-nav-items { display: grid; gap: 2px; padding: 4px 1px 0 12px; }
.pt-nav-items[hidden] { display: none !important; }
.pt-nav-group[data-area="oversikt"] .pt-nav-items { padding: 0; }
.pt-nav-group[data-area="oversikt"] { margin-bottom: 1px; }
.pt-nav a { min-height: 33px; padding: 4px 7px; border-radius: 7px; }
.pt-nav-group[data-area="oversikt"] a { min-height: 38px; }

.pt-main {
    background:
        radial-gradient(circle at 92% 4%, rgba(239,123,108,.07), transparent 22%),
        radial-gradient(circle at 8% 80%, rgba(71,167,161,.06), transparent 26%),
        #eef3f7;
}
.pt-dashboard-heading { margin-bottom: 8px; }
.pt-welcome-stage {
    position: relative; overflow: hidden; margin: 0 0 14px; border: 1px solid #b8c6d2;
    border-radius: 18px; background:
        linear-gradient(180deg,rgba(255,255,255,.96),rgba(249,251,253,.96)),
        repeating-linear-gradient(0deg,transparent 0 21px,rgba(45,70,88,.05) 21px 22px);
    box-shadow: 0 14px 34px rgba(40,60,75,.11); min-height: 330px;
}
.pt-welcome-stage.is-empty { display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 30px; }
.pt-welcome-stage.is-empty h2 { margin: 0; font-size: 25px; }
.pt-welcome-stage.is-empty p { max-width: 650px; margin: 0; color: var(--pt-muted); }
.pt-score-decoration { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pt-score-decoration span { position: absolute; color: #5c6f80; opacity: .10; font-size: 48px; transform: rotate(-9deg); }
.pt-score-decoration span:nth-child(1){left:3%;top:6%;font-size:92px;color:#4a78c2}.pt-score-decoration span:nth-child(2){left:21%;top:19%;color:#47a7a1}.pt-score-decoration span:nth-child(3){right:21%;top:8%;color:#ef7b6c}.pt-score-decoration span:nth-child(4){right:5%;top:28%;color:#8a6ccf}.pt-score-decoration span:nth-child(5){left:8%;bottom:18%;color:#d3a827}
.pt-welcome-score { min-height: 150px; display: grid; place-items: center; padding: 14px 24px 4px; position: relative; }
.pt-welcome-score-logo { width: min(360px,48vw); height: 128px; object-fit: contain; position: relative; z-index: 2; filter: drop-shadow(0 8px 10px rgba(41,71,93,.12)); }
.pt-score-lines { position: absolute; left: 8%; right: 8%; top: 44%; display: grid; gap: 10px; opacity: .15; }
.pt-score-lines i { display: block; height: 1px; background: #29475d; }
.pt-organization-logo-wrap { display: grid; place-items: center; min-height: 82px; margin-top: -8px; position: relative; z-index: 3; }
.pt-organization-logo, .pt-logo-placeholder.pt-organization-logo { width: 94px; height: 94px; object-fit: contain; border-radius: 50%; background: #fff; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(38,55,69,.18); }
.pt-logo-placeholder { display: inline-grid; place-items: center; font-weight: 900; color: #29475d; background: linear-gradient(135deg,#dcebf5,#eee8fb 55%,#fff1cf); }
.pt-identity-ribbon {
    position: relative; z-index: 2; display: grid; grid-template-columns: minmax(160px,.8fr) minmax(260px,1.7fr) minmax(260px,1.15fr);
    align-items: stretch; margin-top: -30px; padding-top: 30px;
    background: linear-gradient(92deg,#d6e7f5 0%,#e8def7 52%,#f6dce8 100%); color: #233746;
}
.pt-identity-ribbon > div { min-height: 94px; display: flex; align-items: center; justify-content: center; padding: 14px 18px; border-left: 1px solid rgba(57,76,91,.16); }
.pt-ribbon-members { flex-direction: column; }
.pt-ribbon-members strong { font-size: 31px; line-height: 1; }
.pt-ribbon-members span { font-size: 12px; margin-top: 4px; }
.pt-ribbon-organization { flex-direction: column; text-align: center; }
.pt-ribbon-organization strong { font-size: 23px; line-height: 1.15; }
.pt-ribbon-organization span { margin-top: 5px; font-size: 12px; opacity: .82; }
.pt-ribbon-main { gap: 12px; justify-content: flex-start !important; }
.pt-ribbon-main > div { display: grid; gap: 2px; min-width: 0; }
.pt-ribbon-main strong { font-size: 14px; }
.pt-ribbon-main span { font-size: 11px; opacity: .82; overflow-wrap: anywhere; }
.pt-main-organization-logo, .pt-logo-placeholder.pt-main-organization-logo, .pt-main-org-placeholder { width: 58px; height: 58px; flex: 0 0 58px; object-fit: contain; border-radius: 50%; background: rgba(255,255,255,.96); border: 2px solid rgba(88,100,118,.18); color: #5f4d8d; display: grid; place-items: center; font-weight: 900; }
.pt-dashboard-modules .pt-module-cards { grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 10px; }
.pt-dashboard-modules .pt-module-card { position: relative; overflow: hidden; min-height: 92px; padding: 14px 14px 12px 48px; background: linear-gradient(135deg,#fff,#f6f9fc); border-radius: 12px; }
.pt-module-note { position: absolute; left: 14px; top: 14px; font-size: 25px; color: #6c5aa2; opacity: .78; }
.pt-platform-summary .pt-card-grid { grid-template-columns: repeat(4,minmax(130px,1fr)); }
.pt-platform-summary .pt-card { display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:64px; }
.pt-platform-summary .pt-card-number { font-size:24px; }

@media (max-width: 1180px) {
    .pt-topbar { grid-template-columns: auto minmax(0,1fr); }
    .pt-context-form { grid-column: 2; grid-row: 1; }
    .pt-topbar-actions { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
    .pt-identity-ribbon { grid-template-columns: .7fr 1.4fr 1fr; }
}
@media (max-width: 900px) {
    .pt-topbar-brand { display:none; }
    .pt-topbar { display:flex; }
    .pt-context-form { margin-left:0; }
    .pt-identity-ribbon { grid-template-columns: 1fr; padding-top: 18px; }
    .pt-identity-ribbon > div { min-height:72px; border-left:0; border-top:1px solid rgba(57,76,91,.14); }
    .pt-welcome-stage { min-height:0; }
}
@media (max-width: 767px) {
    .pt-nav { gap: 10px; }
    .pt-brand-logo { width: 92px; height: 60px; flex-basis: 92px; }
    .pt-welcome-score-logo { width: 84vw; height: 100px; }
    .pt-ribbon-organization strong { font-size:20px; }
    .pt-platform-summary .pt-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.pt-layout-switcher {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid #b8c4ce;
    border-radius: 10px;
    background: #edf2f5;
    box-shadow: inset 0 1px 2px rgba(32, 48, 60, .06);
}
.pt-layout-switcher button {
    width: auto;
    min-width: 78px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #334757;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.pt-layout-switcher button:hover { background: rgba(255, 255, 255, .72); }
.pt-layout-switcher button[aria-pressed="true"] {
    border-color: #8fa5b5;
    background: #fff;
    color: #172f41;
    box-shadow: 0 2px 7px rgba(29, 48, 62, .12);
}
.pt-layout-switcher svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pt-layout-switcher-mobile { display: none; }

.pt-launchpad[hidden],
.pt-module-workspace[hidden],
.pt-module-return[hidden] { display: none !important; }

html[data-pt-layout="launchpad"] .pt-app-layout,
.pt-layout-launchpad .pt-app-layout { grid-template-columns: minmax(0, 1fr); }
html[data-pt-layout="launchpad"] .pt-sidebar,
html[data-pt-layout="launchpad"] .pt-sidebar-scrim,
.pt-layout-launchpad .pt-sidebar,
.pt-layout-launchpad .pt-sidebar-scrim { display: none !important; }
.pt-layout-launchpad .pt-main { max-width: none; width: 100%; }
.pt-layout-launchpad .pt-workspace { min-width: 0; }

.pt-launchpad {
    width: min(1720px, 100%);
    margin: 0 auto;
    outline: none;
}
.pt-launchpad-heading {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
    padding: 22px 24px;
    border: 1px solid #b7c7d3;
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 12%, rgba(74, 120, 194, .18), transparent 31%),
        radial-gradient(circle at 88% 18%, rgba(239, 123, 108, .13), transparent 27%),
        radial-gradient(circle at 64% 110%, rgba(71, 167, 161, .16), transparent 31%),
        linear-gradient(135deg, #ffffff 0%, #f8fbfd 54%, #fff8e8 100%);
    box-shadow: 0 12px 30px rgba(34, 54, 68, .10);
}
.pt-launchpad-heading::after {
    content: "";
    position: absolute;
    right: 7%;
    top: 13px;
    width: 150px;
    height: 70px;
    opacity: .10;
    background: repeating-linear-gradient(0deg, #314c60 0 1px, transparent 1px 10px);
    transform: rotate(-3deg);
    pointer-events: none;
}
.pt-launchpad-heading > * { position: relative; z-index: 1; }
.pt-launchpad-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border: 1px solid #b6c7d3;
    border-radius: 999px;
    background: rgba(255, 255, 255, .76);
    color: #425c6e;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.pt-launchpad-heading h1 {
    margin: 7px 0 2px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.08;
    letter-spacing: -.025em;
}
.pt-launchpad-heading p { margin: 0; color: var(--pt-muted); font-size: 14px; }
.pt-launchpad-areas { display: grid; gap: 17px; }
.pt-launchpad-area {
    --pt-tile-ink: #36596f;
    --pt-tile-border: #b8c9d5;
    --pt-tile-soft: #eaf2f7;
    padding: 14px;
    border: 1px solid #c4d0d9;
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 5px 18px rgba(32, 51, 64, .06);
}
.pt-launchpad-area[data-area="personer"] { --pt-tile-ink:#276c5d; --pt-tile-border:#a8d4c8; --pt-tile-soft:#e3f3ee; }
.pt-launchpad-area[data-area="opplaering"] { --pt-tile-ink:#315f9d; --pt-tile-border:#adc5e8; --pt-tile-soft:#e8f0fb; }
.pt-launchpad-area[data-area="klassekorps"] { --pt-tile-ink:#7654a7; --pt-tile-border:#c7b5e1; --pt-tile-soft:#f0eafb; }
.pt-launchpad-area[data-area="eiendeler"] { --pt-tile-ink:#8a5f19; --pt-tile-border:#e0c98d; --pt-tile-soft:#fbf1d8; }
.pt-launchpad-area[data-area="styre"] { --pt-tile-ink:#8d4942; --pt-tile-border:#e2b2ad; --pt-tile-soft:#fae9e7; }
.pt-launchpad-area[data-area="rapporter"] { --pt-tile-ink:#35687a; --pt-tile-border:#acd0dd; --pt-tile-soft:#e6f2f6; }
.pt-launchpad-area[data-area="nettsider"] { --pt-tile-ink:#3e6e3d; --pt-tile-border:#b5d4b3; --pt-tile-soft:#eaf4e8; }
.pt-launchpad-area[data-area="annet"] { --pt-tile-ink:#5c6670; --pt-tile-border:#c6ced4; --pt-tile-soft:#eef1f3; }
.pt-launchpad-area[data-area="administrasjon"] { --pt-tile-ink:#6b4b77; --pt-tile-border:#ccb8d3; --pt-tile-soft:#f1e9f4; }
.pt-launchpad-area-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 11px;
}
.pt-launchpad-area-heading .pt-area-icon { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
.pt-launchpad-area-heading .pt-area-icon svg { width: 25px; height: 25px; }
.pt-launchpad-area-heading h2 { margin: 0; font-size: 18px; line-height: 1.15; }
.pt-launchpad-area-heading p { margin: 2px 0 0; color: var(--pt-muted); font-size: 12px; }
.pt-launchpad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.pt-launchpad-tile {
    position: relative;
    min-width: 0;
    min-height: 104px;
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr) 18px;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: start;
    gap: 7px 10px;
    padding: 13px 12px;
    border: 1px solid var(--pt-tile-border);
    border-radius: 13px;
    background: linear-gradient(145deg, #fff 0%, var(--pt-tile-soft) 145%);
    color: var(--pt-text);
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(33, 51, 64, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.pt-launchpad-tile:hover,
.pt-launchpad-tile:focus-visible {
    color: var(--pt-text);
    border-color: var(--pt-tile-ink);
    box-shadow: 0 9px 20px rgba(34, 53, 67, .13);
    transform: translateY(-2px);
}
.pt-launchpad-tile.is-active { box-shadow: inset 0 0 0 2px var(--pt-tile-ink), 0 5px 14px rgba(34, 53, 67, .09); }
.pt-launchpad-tile-icon {
    width: 45px;
    height: 45px;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    border: 1px solid var(--pt-tile-border);
    border-radius: 12px;
    background: var(--pt-tile-soft);
    color: var(--pt-tile-ink);
}
.pt-launchpad-tile-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.pt-launchpad-tile-copy { min-width: 0; }
.pt-launchpad-tile-copy strong { display: block; font-size: 15px; line-height: 1.18; }
.pt-launchpad-tile-copy small {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    color: var(--pt-muted);
    font-size: 11px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pt-launchpad-tile-code {
    grid-column: 2;
    align-self: end;
    justify-self: start;
    min-width: 22px;
    min-height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid var(--pt-tile-border);
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    color: var(--pt-tile-ink);
    font-size: 10px;
    font-weight: 900;
}
.pt-launchpad-tile-arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; color: var(--pt-tile-ink); font-size: 25px; line-height: 1; }

.pt-module-return {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    padding: 7px 9px;
    border: 1px solid #c1ccd5;
    border-radius: 10px;
    background: rgba(255, 255, 255, .82);
}
.pt-back-to-launchpad {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid #9eb1bf;
    border-radius: 8px;
    background: #edf3f6;
    color: #243d4f;
    font-weight: 800;
    text-decoration: none;
}
.pt-back-to-launchpad:hover { background: #dfeaf0; color: #172f41; }
.pt-back-to-launchpad span:first-child { font-size: 18px; }
.pt-module-breadcrumb { display: flex; align-items: center; gap: 6px; color: var(--pt-muted); font-size: 12px; }
.pt-module-breadcrumb strong { color: var(--pt-text); }

/* Keep the classic sidebar visible on tablets; off-canvas begins at mobile width. */
@media (min-width: 768px) and (max-width: 1100px) {
    html[data-pt-layout="sidebar"] .pt-app-layout,
    .pt-layout-sidebar .pt-app-layout { grid-template-columns: var(--pt-sidebar-width) minmax(0, 1fr); }
    html[data-pt-layout="sidebar"] .pt-sidebar,
    .pt-layout-sidebar .pt-sidebar {
        display: flex;
        position: sticky;
        inset: auto;
        top: 0;
        width: auto;
        max-height: 100vh;
        transform: none;
        box-shadow: none;
    }
    html[data-pt-layout="sidebar"] .pt-mobile-header,
    .pt-layout-sidebar .pt-mobile-header,
    .pt-layout-sidebar .pt-sidebar-close,
    .pt-layout-sidebar .pt-sidebar-scrim { display: none !important; }
}

@media (min-width: 1420px) {
    .pt-launchpad-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1050px) and (max-width: 1419px) {
    .pt-launchpad-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1049px) {
    .pt-launchpad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pt-launchpad-tile { min-height: 112px; }
}
@media (max-width: 900px) {
    .pt-layout-switcher:not(.pt-layout-switcher-mobile) button { min-width: 42px; }
    .pt-layout-switcher:not(.pt-layout-switcher-mobile) button span { display: none; }
    .pt-launchpad-heading { align-items: stretch; flex-direction: column; }
    .pt-launchpad-heading .pt-btn { align-self: flex-start; }
}
@media (max-width: 767px) {
    .pt-layout-switcher-mobile { display: inline-grid; flex: 0 0 auto; }
    .pt-layout-switcher-mobile button { min-width: 36px; width: 36px; min-height: 36px; padding: 4px; }
    .pt-layout-switcher:not(.pt-layout-switcher-mobile) { width: 100%; }
    .pt-layout-switcher:not(.pt-layout-switcher-mobile) button { width: 100%; min-height: 38px; }
    .pt-layout-launchpad .pt-mobile-menu-button { visibility: hidden; pointer-events: none; }
    .pt-layout-launchpad .pt-mobile-bottom { display: none; }
    body.pt-app.pt-layout-launchpad { padding-bottom: 0; }
    .pt-launchpad-heading { padding: 16px; margin-bottom: 10px; border-radius: 14px; }
    .pt-launchpad-heading h1 { font-size: 27px; }
    .pt-launchpad-heading p { font-size: 12px; }
    .pt-launchpad-area { padding: 10px; border-radius: 13px; }
    .pt-launchpad-area-heading { margin-bottom: 8px; }
    .pt-launchpad-area-heading p { display: none; }
    .pt-launchpad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .pt-launchpad-tile {
        min-height: 116px;
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: 7px;
        padding: 10px;
    }
    .pt-launchpad-tile-icon { width: 38px; height: 38px; grid-row: 1; }
    .pt-launchpad-tile-icon svg { width: 23px; height: 23px; }
    .pt-launchpad-tile-copy { grid-column: 1 / -1; grid-row: 2; }
    .pt-launchpad-tile-copy strong { font-size: 13px; }
    .pt-launchpad-tile-copy small { font-size: 10px; -webkit-line-clamp: 2; }
    .pt-launchpad-tile-code { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
    .pt-launchpad-tile-arrow { display: none; }
    .pt-module-return { align-items: flex-start; flex-direction: column; }
    .pt-module-breadcrumb { width: 100%; overflow-wrap: anywhere; }
}
@media (max-width: 390px) {
    .pt-mobile-brand strong { display: none; }
    .pt-launchpad-grid { grid-template-columns: 1fr; }
    .pt-launchpad-tile { min-height: 92px; grid-template-columns: 42px minmax(0, 1fr) 18px; grid-template-rows: 1fr; }
    .pt-launchpad-tile-icon { width: 42px; height: 42px; grid-row: 1; }
    .pt-launchpad-tile-copy { grid-column: 2; grid-row: 1; }
    .pt-launchpad-tile-code { display: none; }
    .pt-launchpad-tile-arrow { display: block; grid-column: 3; grid-row: 1; }
}
@media (max-width: 767px) {
    .pt-topbar-actions > .pt-layout-switcher { display: none; }
}
html[data-pt-layout="launchpad"] body[data-current-module="oversikt"] .pt-launchpad[hidden] { display: block !important; }
html[data-pt-layout="launchpad"] body[data-current-module="oversikt"] .pt-module-workspace { display: none !important; }


/* Adaptive layout engine 0.8.92 */
.pt-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

html[data-pt-layout="app-grid"] .pt-app-layout { grid-template-columns: minmax(0, 1fr); }
html[data-pt-layout="app-grid"] .pt-sidebar,
html[data-pt-layout="app-grid"] .pt-sidebar-scrim { display: none !important; }
html[data-pt-layout="app-grid"] body[data-current-module="oversikt"] .pt-launchpad[hidden] { display: block !important; }
html[data-pt-layout="app-grid"] body[data-current-module="oversikt"] .pt-module-workspace { display: none !important; }

.pt-launchpad:not([hidden]),
.pt-module-workspace:not([hidden]) { animation: pt-layout-fade-in .15s ease both; }
@keyframes pt-layout-fade-in {
    from { opacity: .45; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

.pt-nav-chevron { transition: transform .16s ease; transform: rotate(-90deg); }
.pt-nav-group.is-open > .pt-nav-toggle .pt-nav-chevron { transform: rotate(0deg); }

@media (min-width: 768px) {
    .pt-table-wrap[data-pt-sticky-first="true"] .pt-table th:first-child,
    .pt-table-wrap[data-pt-sticky-first="true"] .pt-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--pt-surface);
        box-shadow: 1px 0 0 var(--pt-border), 5px 0 10px rgba(31, 48, 60, .04);
    }
    .pt-table-wrap[data-pt-sticky-first="true"] .pt-table th:first-child {
        z-index: 4;
        background: #dfe6eb;
    }
    .pt-table-wrap[data-pt-sticky-first="true"] .pt-table tbody tr:nth-child(even) td:first-child {
        background: #fafbfc;
    }
}

/* Launchpad columns: 2 mobile, 3–4 tablet, 4–6 desktop. */
@media (max-width: 639px) {
    .pt-launchpad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 819px) {
    .pt-launchpad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 820px) and (max-width: 1399px) {
    .pt-launchpad-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1400px) and (max-width: 1799px) {
    .pt-launchpad-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
    .pt-launchpad-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .pt-layout-switcher-mobile { grid-template-columns: repeat(3, 36px); }
    .pt-layout-switcher-mobile button { min-width: 36px; width: 36px; }
    .pt-layout-launchpad .pt-mobile-menu-button { visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pt-launchpad:not([hidden]),
    .pt-module-workspace:not([hidden]) { animation: none; }
}
