@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    color-scheme: light;
    --ink: #162033;
    --muted: #667085;
    --line: #d7e0ef;
    --blue: #205dd8;
    --orange: #b45309;
    --surface: #ffffff;
    --soft: #f4f7fb;
    --body-bg: linear-gradient(135deg, #e9f1ff 0%, #f8fbff 42%, #eef8f5 100%);
    --panel-bg: rgba(255, 255, 255, .92);
    --panel-soft-bg: #f7faff;
    --sidebar-bg: rgba(255, 255, 255, .8);
    --topbar-bg: rgba(233, 241, 255, .96);
    --input-bg: #ffffff;
    --input-border: #b8c1ce;
    --button-soft-bg: #eff6ff;
    --shadow-color: rgba(24, 38, 62, .08);
    --modal-overlay: rgba(15, 23, 42, .46);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e6edf7;
    --muted: #9aa8bc;
    --line: #26364d;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --surface: #111827;
    --soft: #172033;
    --body-bg: linear-gradient(135deg, #07111f 0%, #111827 45%, #0b1f1e 100%);
    --panel-bg: rgba(17, 24, 39, .94);
    --panel-soft-bg: #172033;
    --sidebar-bg: rgba(8, 15, 28, .92);
    --topbar-bg: rgba(11, 18, 32, .96);
    --input-bg: #0f172a;
    --input-border: #334155;
    --button-soft-bg: #102548;
    --shadow-color: rgba(0, 0, 0, .32);
    --modal-overlay: rgba(0, 0, 0, .62);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--body-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(460px, 100%);
}

.login-card,
.empty-state,
.page-heading,
.tool-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-bg);
    box-shadow: 0 20px 70px var(--shadow-color);
}

.login-card {
    padding: 28px;
}

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

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

h1 {
    margin-bottom: 10px;
    font-size: 30px;
    line-height: 1.1;
}

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

.form-stack {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.form-stack label {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.form-stack span {
    color: var(--ink);
    font-weight: 800;
}

.login-card input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--input-bg);
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    padding: 20px;
    background: var(--sidebar-bg);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    margin-bottom: 0;
}

.brand span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    background: var(--blue);
    font-weight: 900;
}

.brand strong {
    font-size: 20px;
}

.sidebar nav {
    display: grid;
    gap: 6px;
}

.sidebar nav a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--ink);
    font-weight: 800;
}

.sidebar nav a:hover {
    background: var(--button-soft-bg);
}

.sidebar nav a.active {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 10px 24px rgba(32, 93, 216, .22);
}

.sidebar nav a.active i,
.sidebar nav a.active span {
    color: #fff;
}

.sidebar-toggle.btn-icon,
.sidebar-close.btn-icon {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.main-panel {
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 22px;
}

.topbar {
    position: sticky;
    top: -22px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -22px -22px 20px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(215, 224, 239, .9);
    background: var(--topbar-bg);
    backdrop-filter: blur(10px);
}

.topbar-user {
    display: grid;
    gap: 3px;
}

.topbar-user span {
    color: var(--muted);
    font-size: 13px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: none;
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
    background: var(--panel-bg);
}

.theme-switcher button {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    color: var(--muted);
    background: transparent;
}

.theme-switcher button:hover,
.theme-switcher button.active {
    color: #fff;
    background: var(--blue);
}

.page-heading,
.empty-state {
    padding: 22px;
}

.domain-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.grid-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-bg);
    overflow: hidden;
}

.grid-panel.loading .table-scroll {
    opacity: .55;
    pointer-events: none;
}

.data-grid-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.data-grid-toolbar h2 {
    margin-bottom: 6px;
}

.grid-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.grid-search {
    display: grid;
    gap: 7px;
    min-width: min(360px, 100%);
}

.grid-search label {
    color: var(--ink);
    font-weight: 800;
}

.log-filter-panel {
    padding: 18px 20px;
    margin-bottom: 18px;
}

.log-detail summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 800;
}

.log-detail dl {
    display: grid;
    grid-template-columns: minmax(120px, max-content) minmax(180px, 1fr);
    gap: 6px 12px;
    max-width: 520px;
    margin: 10px 0 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft-bg);
}

.log-detail dt {
    color: var(--muted);
    font-weight: 800;
}

.log-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.table-scroll {
    overflow: auto;
}

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

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

.data-table th {
    color: #44546c;
    background: var(--panel-soft-bg);
    font-size: 13px;
}

.grid-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-weight: 900;
}

.grid-sort-link i {
    color: #94a3b8;
    font-size: 14px;
}

.grid-sort-link.active {
    color: #0b3b91;
}

.grid-sort-link.active i {
    color: #0b3b91;
}

.actions-column {
    width: 142px;
    min-width: 142px;
}

.grid-empty-cell {
    padding: 24px !important;
    color: var(--muted);
    text-align: center !important;
    font-weight: 800;
}

.muted-line {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: #475569;
    background: #e2e8f0;
    font-size: 12px;
    font-weight: 900;
}

.status-pill.active {
    color: #166534;
    background: #dcfce7;
}

.status-pill.success {
    color: #166534;
    background: #dcfce7;
}

.status-pill.passive {
    color: #475569;
    background: #e2e8f0;
}

.feed-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feed-thumb-empty {
    background: var(--soft);
    color: var(--muted);
}

.feed-title-cell {
    display: grid;
    gap: 4px;
    min-width: 240px;
}

.feed-title-cell span {
    color: var(--muted);
    font-size: 0.875rem;
    max-width: 520px;
}

.feed-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.feed-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 20px;
    align-items: start;
}

.feed-editor-main,
.feed-editor-side,
.feed-subpanel {
    display: grid;
    gap: 12px;
    align-content: start;
    align-self: start;
}

.feed-modal .pa-modal-body,
.feed-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 20px;
    align-content: start;
}

.feed-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.feed-modal .pa-modal-actions,
.feed-modal .modal-footer {
    flex: none;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.feed-editor-grid .form-field,
.feed-editor-grid .full {
    position: relative;
    min-width: 0;
}

.feed-editor-grid .form-field > label,
.feed-editor-grid .full > label {
    position: absolute;
    z-index: 2;
    top: -7px;
    left: 12px;
    padding: 0 4px;
    background: var(--surface);
    color: #a44705;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.feed-editor-grid .form-control,
.feed-editor-grid .form-select {
    min-height: 42px;
}

.feed-editor-grid textarea.form-control {
    min-height: 128px;
    resize: vertical;
}

.feed-editor-grid .rich-field .ck.ck-editor {
    margin-top: 6px;
    min-width: 0;
}

.feed-editor-grid .rich-field .ck.ck-editor__main > .ck-editor__editable {
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
}

.feed-editor-grid .rich-field .ck.ck-toolbar,
.feed-editor-grid .rich-field .ck.ck-editor__main > .ck-editor__editable {
    border-color: #b7c3d5;
}

.help-rich-field .ck.ck-editor {
    margin-top: 8px;
    min-width: 0;
}

.help-rich-field .ck.ck-editor__main > .ck-editor__editable {
    min-height: 250px;
    max-height: 420px;
    padding: 18px 20px;
    overflow: auto;
}

.help-rich-field .ck.ck-toolbar,
.help-rich-field .ck.ck-editor__main > .ck-editor__editable {
    border-color: #b7c3d5;
}

.feed-subpanel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--soft);
}

.feed-subpanel-head,
.feed-link-row,
.feed-editor-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.feed-subpanel-title {
    display: grid;
    gap: 3px;
}

.feed-subpanel-title strong {
    font-size: 0.98rem;
}

.feed-subpanel-title span {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.35;
}

.feed-link-row,
.feed-editor-two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.feed-link-empty,
.feed-media-empty {
    color: var(--muted);
    font-size: 0.9rem;
}

.feed-check-list,
.feed-domain-targets {
    display: grid;
    gap: 8px;
}

.feed-check-list label,
.feed-domain-targets label,
.feed-subpanel > label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.feed-check-list input[type="checkbox"],
.feed-domain-targets input[type="checkbox"],
.feed-subpanel > label input[type="checkbox"] {
    appearance: none;
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    margin: 0;
    background: var(--surface);
}

.feed-check-list input[type="checkbox"]::before,
.feed-domain-targets input[type="checkbox"]::before,
.feed-subpanel > label input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 6px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    opacity: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}

.feed-check-list input[type="checkbox"]:checked,
.feed-domain-targets input[type="checkbox"]:checked,
.feed-subpanel > label input[type="checkbox"]:checked {
    border-color: #2563eb;
    background: #2563eb;
}

.feed-check-list input[type="checkbox"]:checked::before,
.feed-domain-targets input[type="checkbox"]:checked::before,
.feed-subpanel > label input[type="checkbox"]:checked::before {
    opacity: 1;
}

.feed-media-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    max-height: 280px;
    overflow: auto;
    padding-right: 4px;
}

.feed-media-card {
    position: relative;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--surface);
    cursor: pointer;
    min-height: 152px;
}

.feed-media-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feed-media-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: transparent;
    display: grid;
    place-items: center;
    z-index: 1;
}

.feed-media-card input:checked + .feed-media-check {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.feed-media-card.selected,
.feed-media-card:has(input:checked) {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(32, 93, 216, 0.16);
}

.feed-media-card.selected .feed-media-check {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.feed-media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.feed-media-title {
    font-size: 0.78rem;
    color: var(--muted);
    overflow-wrap: anywhere;
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
}

.table-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 7px;
    min-width: 121px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .feed-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .feed-subpanel-head,
    .feed-link-row,
    .feed-editor-two {
        grid-template-columns: 1fr;
    }
}

.table-actions form {
    flex: none;
    margin: 0;
}

.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
}

.btn-icon i {
    font-size: 16px;
    line-height: 1;
}

.pa-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--modal-overlay);
}

.pa-modal-backdrop[hidden] {
    display: none !important;
}

.domain-modal {
    display: flex;
    flex-direction: column;
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .42);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}

.pa-modal-header {
    flex: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.pa-modal-header h2 {
    margin-bottom: 0;
}

.icon-close {
    appearance: none;
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 0;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.icon-close span {
    display: block;
    transform: translateY(-1px);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.icon-close:hover {
    border-color: var(--muted);
    color: var(--ink);
    background: var(--panel-soft-bg);
}

.icon-close:focus-visible {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.tab-bar {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 20px 0;
    background: var(--panel-soft-bg);
}

.tab-bar a {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 11px 14px;
    color: #475569;
    font-weight: 900;
}

.tab-bar a.active {
    color: #0b3b91;
    border-color: #9bb8ff;
    border-bottom-color: var(--surface);
    background: var(--surface);
}

.pa-modal-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.domain-form,
.domain-user-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.pa-modal-body > .subpanel,
.domain-form > .subpanel,
.domain-user-form > .subpanel {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.subpanel {
    display: grid;
    gap: 16px;
    padding: 20px;
}

.subpanel-heading.split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

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

.horizontal-form .form-row {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
}

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

.horizontal-form .form-col {
    min-width: 0;
}

.horizontal-form.two-col {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.horizontal-form label {
    position: relative;
    display: block;
    min-height: 42px;
}

.horizontal-form label > span {
    position: absolute;
    z-index: 1;
    top: -7px;
    left: 12px;
    padding: 0 4px;
    color: #a44705;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.horizontal-form textarea {
    resize: vertical;
}

.horizontal-form label.checkbox-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
}

.horizontal-form label.checkbox-field > span {
    position: static;
    padding: 0;
    background: transparent;
}

.horizontal-form input[type="checkbox"] {
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: 22px;
    height: 22px;
    min-height: 22px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    padding: 0;
    background: #fff;
    cursor: pointer;
}

.horizontal-form input[type="checkbox"]::before {
    content: "";
    width: 12px;
    height: 7px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    opacity: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}

.horizontal-form input[type="checkbox"]:checked {
    border-color: #2563eb;
    background: #2563eb;
}

.horizontal-form input[type="checkbox"]:checked::before {
    opacity: 1;
}

.horizontal-form input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.users-page-shell {
    display: grid;
    gap: 18px;
}

.users-page-shell.is-loading {
    cursor: progress;
}

.users-page-shell.is-loading .users-table-wrap {
    opacity: .58;
    pointer-events: none;
}

[data-ajax-list].is-loading {
    cursor: progress;
    opacity: .72;
    pointer-events: none;
}

.users-heading {
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.users-heading h1 {
    margin: 0;
}

.users-count-badge {
    align-self: flex-start;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-muted);
    font-size: 13px;
    font-weight: 700;
}

.users-filter-panel,
.users-list-panel {
    padding: 0;
    overflow: hidden;
}

.users-filter-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(140px, .65fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
}

.users-filter-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.users-filter-actions {
    display: flex;
    gap: 8px;
}

.users-list-panel .panel-title {
    padding: 20px 22px 14px;
}

.users-table-wrap {
    border-top: 1px solid var(--border);
}

.users-table th,
.users-table td {
    vertical-align: middle;
}

.users-table .sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.users-table .sort-link i {
    color: var(--muted);
    font-size: 13px;
}

.user-detail-modal {
    max-width: min(980px, calc(100vw - 40px));
    background: #f8fafc;
}

.user-detail-body {
    display: grid;
    gap: 16px;
    overflow: auto;
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(241, 245, 249, .96));
}

.user-detail-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    font-size: 22px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
}

.user-detail-hero strong {
    display: block;
    color: var(--text);
    font-size: 20px;
    line-height: 1.15;
}

.user-detail-hero span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.user-detail-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-detail-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.user-detail-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.user-detail-section h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.user-detail-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
    background: transparent;
}

.user-detail-item:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.user-detail-item span {
    display: block;
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.user-detail-item strong {
    display: block;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
}

.user-password-form,
.user-host-form {
    display: grid;
    gap: 12px;
}

.user-host-list {
    display: grid;
    gap: 8px;
}

.user-host-row {
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .75fr) auto minmax(92px, auto);
    padding: 10px 0;
}

.user-host-row:last-child {
    border-bottom: 0;
}

.user-host-row strong {
    color: #111827;
    display: block;
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.user-host-row div > span {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.empty-host-note {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.user-host-field,
.user-password-field,
.user-password-check {
    display: grid;
    grid-template-columns: minmax(150px, .35fr) minmax(0, .65fr);
    gap: 14px;
    align-items: center;
}

.user-host-field > span,
.user-password-field > span,
.user-password-check > span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.user-host-actions,
.user-password-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.user-host-message,
.user-password-message {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    margin-right: auto;
}

.user-host-message.success,
.user-password-message.success {
    color: #166534;
}

.user-host-message.error,
.user-password-message.error {
    color: #b91c1c;
}

.pa-modal-actions {
    flex: none;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: var(--surface);
}

.in-modal {
    margin: 20px;
}

.domain-user-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.domain-user-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.domain-user-modal {
    width: min(820px, calc(100vw - 48px));
}

.domain-user-form {
    border-top: 1px solid #e2e8f0;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    min-height: 42px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background: var(--input-bg);
}

.password-field input {
    min-height: 40px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.password-eye {
    min-height: 40px;
    border: 0;
    border-left: 1px solid #cbd5e1;
    border-radius: 0;
    color: #334155;
    background: var(--input-bg);
    padding: 0;
}

.ajax-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, .22);
    backdrop-filter: blur(2px);
}

.ajax-loading-overlay[hidden] {
    display: none;
}

.ajax-loading-box {
    display: inline-grid;
    grid-template-columns: 26px auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 0 18px;
    color: #172554;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    font-weight: 800;
}

:root[data-theme="dark"] .data-table th {
    color: #cbd5e1;
}

:root[data-theme="dark"] .tab-bar a.active,
:root[data-theme="dark"] .grid-sort-link.active,
:root[data-theme="dark"] .grid-sort-link.active i {
    color: #93c5fd;
}

:root[data-theme="dark"] .horizontal-form label > span {
    color: #fbbf24;
}

:root[data-theme="dark"] .status-pill.active {
    color: #bbf7d0;
    background: rgba(22, 101, 52, .42);
}

:root[data-theme="dark"] .status-pill.passive {
    color: #cbd5e1;
    background: #334155;
}

.ajax-loading-box i {
    color: #2563eb;
    font-size: 22px;
    animation: ajax-loading-spin .85s linear infinite;
}

@keyframes ajax-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.shipping-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.shipping-zone-editor {
    display: grid;
    grid-template-columns: minmax(280px, .36fr) minmax(360px, 1fr);
    gap: 16px;
    align-items: start;
}

.shipping-tree-panel {
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #fff;
    max-height: 620px;
    overflow: auto;
    padding: 8px;
}

.shipping-district-panel {
    min-width: 0;
}

.shipping-district-panel.loading {
    opacity: .72;
    pointer-events: none;
}

.shipping-save-message {
    margin: 0 0 12px;
}

.tree-view {
    color: #172554;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-view-branch {
    border-left: 1px solid #dbeafe;
    margin-left: 18px;
    padding-left: 3px;
}

.tree-view-item {
    margin: 1px 0;
}

.tree-view-item.collapsed > .tree-view-branch {
    display: none;
}

.tree-view-row {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #172554;
    display: flex;
    flex-direction: row;
    gap: 7px;
    min-height: 38px;
    padding: 4px 7px;
    transition: background .16s ease, border-color .16s ease;
}

.tree-view-row:hover {
    background: #f0f9ff;
    border-color: #dbeafe;
}

.tree-view-row.active {
    background: #eef4ff;
    border-color: #7aa2ff;
    color: #0f172a;
}

.tree-view-row.group-node .tree-view-label span {
    font-weight: 700;
}

.tree-view-toggle,
.tree-view-label {
    background: transparent;
    border: 0;
    color: inherit;
}

.tree-view-toggle {
    align-items: center;
    display: inline-flex;
    flex: 0 0 23px;
    font-size: 18px;
    height: 23px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 23px;
}

.tree-view-toggle-placeholder {
    flex: 0 0 23px;
    height: 1px;
    width: 23px;
}

.tree-view-chevron {
    display: inline-block;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .16s ease;
}

.tree-view-chevron.expanded {
    transform: rotate(90deg);
}

.tree-view-label {
    display: grid;
    flex: 1 1 auto;
    gap: 1px;
    justify-content: stretch;
    min-height: 34px;
    min-width: 0;
    padding: 3px 0;
    text-align: left;
}

.tree-view-label span {
    color: #172554;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-view-label small {
    color: #47658f;
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.15;
}

.compact-number {
    width: 140px;
    min-height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px;
}

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

.domain-image-card {
    display: grid;
    gap: 10px;
    border: 1px solid #d7e2f4;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.domain-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f5f9;
}

.media-picker-backdrop {
    z-index: 1100;
}

.education-management-shell {
    display: grid;
    gap: 1.25rem;
}

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

.section-heading .lead {
    color: var(--muted);
    margin: 0.35rem 0 0;
}

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

.education-stat-grid article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}

.education-stat-grid span,
.education-title-cell small {
    color: var(--muted);
    display: block;
    font-size: 0.85rem;
}

.education-stat-grid strong {
    color: var(--ink);
    display: block;
    font-size: 1.35rem;
    line-height: 1.2;
}

.education-list-panel {
    overflow: hidden;
}

.education-table {
    width: 100%;
}

.education-table td,
.education-table th {
    border-bottom: 1px solid var(--line);
    padding: 0.85rem;
    vertical-align: middle;
}

.education-title-cell {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 54px minmax(0, 1fr);
}

.education-title-cell img,
.education-image-placeholder {
    border-radius: 8px;
    height: 54px;
    width: 54px;
}

.education-title-cell img {
    object-fit: cover;
}

.education-image-placeholder {
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--muted);
    display: grid;
    place-items: center;
}

.education-actions {
    min-width: 8.25rem;
    white-space: nowrap;
}

.education-actions .btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    margin: 0 0 0 6px;
}

.education-actions .btn-icon {
    flex: none;
}

.education-student-panel {
    padding: 18px;
}

.education-student-panel .panel-title {
    margin-bottom: 16px;
}

.education-student-filters {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(150px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.education-student-filters label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.education-student-filters span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.education-student-filter-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.curriculum-tree-shell {
    display: grid;
    gap: 18px;
}

.curriculum-tree-heading {
    margin: 0;
}

.curriculum-tree-panel {
    overflow: hidden;
}

.curriculum-tree-filters {
    align-items: end;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, .8fr) auto;
    margin: 0;
    padding: 18px;
}

.curriculum-tree-title {
    border-top: 1px solid var(--border);
    padding: 20px 22px 14px;
}

.curriculum-tree-view {
    padding: 0 18px 20px;
}

.curriculum-tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.curriculum-tree-branch {
    position: relative;
    margin-left: 19px;
    padding-left: 17px;
}

.curriculum-tree-branch::before {
    content: "";
    position: absolute;
    inset: 0 auto 10px 0;
    width: 1px;
    background: #dbeafe;
}

.curriculum-tree-item {
    position: relative;
    margin: 4px 0;
}

.curriculum-tree-item.collapsed > .curriculum-tree-branch {
    display: none;
}

.curriculum-tree-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    padding: 9px 12px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.curriculum-tree-row:hover {
    border-color: #9bb8ff;
    background: #f8fbff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.curriculum-tree-toggle,
.curriculum-tree-toggle-placeholder {
    width: 28px;
    height: 28px;
}

.curriculum-tree-toggle {
    display: inline-grid;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #1e3a8a;
    background: #f8fafc;
    padding: 0;
}

.curriculum-tree-toggle i {
    font-size: 13px;
    transition: transform .15s ease;
}

.curriculum-tree-item.expanded > .curriculum-tree-row .curriculum-tree-toggle i {
    transform: rotate(90deg);
}

.curriculum-tree-node {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.curriculum-tree-node strong,
.curriculum-tree-node small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.curriculum-tree-node strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
}

.curriculum-tree-node small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.curriculum-tree-kind {
    justify-self: start;
    border-radius: 999px;
    padding: 4px 8px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.curriculum-tree-kind.lesson {
    color: #065f46;
    background: #d1fae5;
}

.curriculum-tree-kind.topic {
    color: #7c2d12;
    background: #ffedd5;
}

.curriculum-tree-kind.subtopic {
    color: #475569;
    background: #e2e8f0;
}

.curriculum-tree-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 260px;
}

.curriculum-tree-meta > span:not(.status-pill) {
    min-height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 3px 9px;
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 750;
}

.curriculum-tree-meta b {
    color: #0f172a;
    font-weight: 900;
}

.follow-up-bulk-toolbar,
.table-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.follow-up-bulk-toolbar {
    margin-bottom: 14px;
}

.follow-up-bulk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.follow-up-bulk-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.follow-up-bulk-grid h3 {
    font-size: 15px;
    margin: 0 0 10px;
}

@media (max-width: 1180px) {
    .follow-up-bulk-grid {
        grid-template-columns: 1fr;
    }
}

.education-students-shell .edit-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.student-detail-panel {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.student-management-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: var(--panel-soft-bg);
}

.student-management-tabs a,
.student-management-tabs button {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--muted);
    background: transparent;
    font-weight: 800;
}

.student-management-tabs a.active,
.student-management-tabs button.active {
    color: #0b3b91;
    border-color: #9bb8ff;
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(32, 93, 216, .08);
}

.student-management-grid,
.teacher-summary-grid,
.tracking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.teacher-hero-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.student-management-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
}

.student-management-card.span-2 {
    grid-column: 1 / -1;
}

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

.form-grid.compact label,
.form-grid.compact .span-2 {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.form-grid.compact .span-2 {
    grid-column: 1 / -1;
}

.form-grid.compact .form-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.teacher-risk-card {
    display: grid;
    gap: 8px;
    align-content: start;
}

.teacher-risk-card.danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.teacher-risk-card.warning {
    border-color: #fed7aa;
    background: #fff8ed;
}

.teacher-risk-card.success {
    border-color: #bbf7d0;
    background: #f3fff7;
}

.teacher-risk-score {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.teacher-risk-score strong {
    font-size: 42px;
    line-height: 1;
}

.teacher-metric-card {
    display: grid;
    gap: 6px;
    align-content: start;
}

.teacher-metric-card span,
.teacher-metric-card small {
    color: var(--muted);
    font-size: 13px;
}

.teacher-metric-card strong {
    font-size: 20px;
}

.student-info-list {
    display: grid;
    gap: 9px;
    margin: 0;
}

.student-info-list div {
    display: grid;
    grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 28px;
}

.student-info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.student-info-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.student-management-list,
.teacher-action-list,
.teacher-topic-list {
    display: grid;
    gap: 10px;
}

.student-management-list > div,
.teacher-action-list > div,
.teacher-topic-list > a {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: var(--panel-soft-bg);
}

.teacher-topic-list > a {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.teacher-topic-list span,
.student-management-list span,
.teacher-action-list span,
.teacher-topic-list small {
    color: var(--muted);
    font-size: 13px;
}

.teacher-topic-list em {
    color: var(--blue);
    font-style: normal;
    font-weight: 900;
}

.compact-empty {
    box-shadow: none;
    padding: 14px;
}

.follow-up-task-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.follow-up-task-main,
.follow-up-task-description {
    display: grid;
    gap: 3px;
}

.follow-up-task-description {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
}

.follow-up-task-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: #475569;
    background: #e2e8f0;
    font-size: 12px;
    font-weight: 900;
}

.follow-up-task-status.completed {
    color: #166534;
    background: #dcfce7;
}

.follow-up-task-status.deferred {
    color: #92400e;
    background: #fef3c7;
}

.follow-up-task-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
}

.follow-up-task-actions form {
    margin: 0;
}

:root[data-theme="dark"] .student-management-tabs a.active,
:root[data-theme="dark"] .student-management-tabs button.active {
    color: #93c5fd;
}

:root[data-theme="dark"] .teacher-risk-card.danger {
    background: rgba(127, 29, 29, .24);
}

:root[data-theme="dark"] .teacher-risk-card.warning {
    background: rgba(120, 53, 15, .24);
}

:root[data-theme="dark"] .teacher-risk-card.success {
    background: rgba(20, 83, 45, .24);
}

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

.education-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.education-modal-form .pa-modal-body {
    overflow: auto;
    padding: 20px;
}

.education-editor-grid .form-field,
.education-editor-grid .full {
    position: relative;
    min-width: 0;
}

.education-editor-grid .form-field > label,
.education-editor-grid .full > label.form-label {
    position: absolute;
    z-index: 1;
    top: -7px;
    left: 12px;
    padding: 0 4px;
    background: var(--surface);
    color: #a44705;
    font-size: 12px;
    line-height: 1;
}

.education-editor-grid textarea.form-control {
    min-height: 92px;
    resize: vertical;
}

.education-editor-grid .full > label.form-label {
    position: static;
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    background: transparent;
    font-size: 14px;
    font-weight: 800;
}

.education-editor-grid .full {
    grid-column: 1 / -1;
}

.selected-media-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border: 1px solid #d7e0ed;
    border-radius: 8px;
    padding: 10px;
    background: var(--panel-soft-bg);
}

.education-editor-grid .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    color: var(--ink);
    font-weight: 800;
}

.education-editor-grid .checkbox-row input[type="checkbox"] {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid #b7c4d7;
    border-radius: 5px;
    margin: 0;
    background: var(--surface);
}

.education-editor-grid .checkbox-row input[type="checkbox"]::before {
    content: "";
    width: 11px;
    height: 7px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    opacity: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}

.education-editor-grid .checkbox-row input[type="checkbox"]:checked {
    border-color: #2563eb;
    background: #2563eb;
}

.education-editor-grid .checkbox-row input[type="checkbox"]:checked::before {
    opacity: 1;
}

.app-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.app-stat-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.app-stat-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.app-stat-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
}

.app-actions {
    gap: 8px;
    white-space: nowrap;
}

.visitor-metrics-shell {
    display: grid;
    gap: 18px;
}

.visitor-filter-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.visitor-filter-actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

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

.visitor-stat-grid article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.visitor-stat-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.visitor-stat-grid strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
}

.visitor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.visitor-tabs a {
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.visitor-tabs a.active,
.visitor-tabs a:hover {
    border-color: rgba(37, 99, 235, .28);
    background: rgba(37, 99, 235, .08);
    color: #2563eb;
}

.visitor-report-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.visitor-report-heading,
.visitor-metric-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.visitor-report-heading h2 {
    margin: 0;
    font-size: 18px;
}

.visitor-metric-pager {
    color: var(--muted);
    font-size: 14px;
}

.visitor-metric-pager .disabled {
    pointer-events: none;
    opacity: .45;
}

.visitor-table th a {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.visitor-table th a.active {
    color: #2563eb;
}

.visitor-overview-note,
.visitor-report-limit {
    margin: 0;
    color: var(--muted);
}

.visitor-report-limit {
    font-size: 13px;
}

.hourly-bars {
    display: grid;
    gap: 10px;
}

.hourly-bars div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.hourly-bars span {
    color: var(--muted);
    font-weight: 700;
}

.hourly-bars strong {
    min-width: 38px;
    padding: 6px 9px;
    border-radius: 6px;
    background: rgba(37, 99, 235, .16);
    color: #2563eb;
    text-align: right;
}

.journey-steps {
    display: grid;
    gap: 6px;
    min-width: 260px;
}

.journey-steps span {
    display: grid;
    grid-template-columns: 104px minmax(120px, 1fr) 70px;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    background: #f8fafc;
}

.journey-steps em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.journey-steps strong {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.student-activity-shell {
    display: grid;
    gap: 18px;
}

.student-activity-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.student-activity-filter-actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

.student-activity-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.student-activity-stats article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.student-activity-stats span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.student-activity-stats strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 23px;
    line-height: 1.1;
}

.student-activity-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.student-activity-timeline {
    display: grid;
    gap: 12px;
}

.student-activity-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
}

.student-activity-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eff6ff;
    color: #1d4ed8;
}

.student-activity-item.question .student-activity-icon {
    background: #ecfdf5;
    color: #047857;
}

.student-activity-item.material .student-activity-icon {
    background: #fff7ed;
    color: #c2410c;
}

.student-activity-item.session .student-activity-icon {
    background: #f5f3ff;
    color: #6d28d9;
}

.student-activity-head,
.student-activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.student-activity-head span,
.student-activity-meta span {
    color: #64748b;
    font-size: 14px;
}

.student-activity-body p {
    margin: 6px 0;
}

.student-activity-limit {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.user-license-shell {
    display: grid;
    gap: 18px;
}

.user-license-filter {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.user-license-filter-actions {
    display: flex;
    gap: 10px;
}

.user-license-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.user-license-stats article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.user-license-stats span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.user-license-stats strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
}

.user-license-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.user-license-actions {
    gap: 8px;
    white-space: nowrap;
}

.user-license-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.user-license-modal-form .pa-modal-body,
.user-license-history-modal .pa-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 20px;
}

.user-license-modal-form .pa-modal-actions,
.user-license-history-modal .pa-modal-actions {
    flex: none;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.user-license-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.user-license-editor-grid .full {
    grid-column: 1 / -1;
}

.customer-comments-shell {
    display: grid;
    gap: 18px;
}

.comment-filter-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.comment-filter-actions,
.comment-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.comment-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.comment-stat-grid article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.comment-stat-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.comment-stat-grid strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
}

.comment-table-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.comment-table-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.comment-table-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
}

.comment-table-heading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.customer-comment-table td {
    vertical-align: top;
}

.customer-comment-table .comment-text {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--ink);
    line-height: 1.45;
}

.inline-action-form {
    margin: 0;
}

.app-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.app-modal-form .pa-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 20px;
}

.app-modal-form .pa-modal-actions {
    flex: none;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.app-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.app-editor-grid .form-field,
.app-check-group {
    position: relative;
    min-width: 0;
}

.app-editor-grid .form-field > label,
.app-check-group .field-caption {
    position: absolute;
    z-index: 2;
    top: -7px;
    left: 12px;
    padding: 0 4px;
    background: var(--surface);
    color: #a44705;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.app-editor-grid .form-control,
.app-editor-grid .form-select,
.app-check-group {
    min-height: 42px;
}

.app-check-group {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    border: 1px solid #d7e0ed;
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--surface);
}

.app-editor-grid .checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.app-editor-grid .checkbox-row input[type="checkbox"] {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid #b7c4d7;
    border-radius: 5px;
    margin: 0;
    background: var(--surface);
}

.app-editor-grid .checkbox-row input[type="checkbox"]::before {
    content: "";
    width: 11px;
    height: 7px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    opacity: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}

.app-editor-grid .checkbox-row input[type="checkbox"]:checked {
    border-color: #2563eb;
    background: #2563eb;
}

.app-editor-grid .checkbox-row input[type="checkbox"]:checked::before {
    opacity: 1;
}

.trial-list-panel {
    margin-top: 16px;
}

.trial-list-panel .panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.trial-list-panel .panel-title h2 {
    margin-bottom: 0;
}

.trial-list-panel .panel-title > span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.trial-table {
    min-width: 1040px;
}

.trial-table th:last-child,
.trial-table td:last-child {
    width: 190px;
}

.trial-table td strong {
    display: block;
    margin-bottom: 3px;
}

.trial-actions {
    min-width: 176px;
    justify-content: flex-end;
    white-space: nowrap;
}

.trial-actions .btn-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    margin: 0;
}

.trial-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.trial-modal-form .pa-modal-body {
    overflow: auto;
    padding: 20px;
}

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

.trial-editor-grid .form-field,
.trial-editor-grid .full {
    position: relative;
    min-width: 0;
}

.trial-editor-grid .full {
    grid-column: 1 / -1;
}

.trial-editor-grid .form-field > label,
.trial-editor-grid .full > label.form-label {
    position: absolute;
    z-index: 1;
    top: -7px;
    left: 12px;
    padding: 0 4px;
    color: #a44705;
    background: var(--surface);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.trial-editor-grid .full > label.form-label {
    position: static;
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    background: transparent;
    font-size: 14px;
    font-weight: 800;
}

.trial-editor-grid textarea.form-control {
    min-height: 92px;
    resize: vertical;
}

.trial-answer-list {
    display: grid;
    gap: 12px;
    margin: 14px 0;
}

.trial-answer-list article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.question-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--muted);
    background: var(--panel-soft-bg);
    font-size: 12px;
    font-weight: 800;
}

.question-text {
    margin-bottom: 12px;
}

.education-selected-image {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 54px;
    object-fit: cover;
    width: 54px;
}

@media (max-width: 960px) {
    .section-heading {
        display: grid;
    }

    .education-stat-grid,
    .app-stat-grid,
    .app-editor-grid,
    .education-editor-grid,
    .trial-editor-grid {
        grid-template-columns: 1fr;
    }
}

.media-modal {
    background: var(--surface, #fff);
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    box-shadow: 0 22px 54px rgba(15, 23, 42, .24);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: min(88vh, 58rem);
    max-width: 84rem;
    overflow: hidden;
    width: min(calc(100vw - 24px), 84rem);
}

.media-modal-header,
.media-modal-footer {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px 18px;
}

.media-modal-header {
    border-bottom: 1px solid #e5eaf2;
}

.media-modal-header h2 {
    font-size: 22px;
    margin: 0;
}

.media-modal-close {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    width: 38px;
}

.media-modal-close:hover {
    background: #eef4ff;
    border-color: #8fb1ff;
    color: #0f3f9f;
}

.media-modal-body {
    display: grid;
    gap: 14px;
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    padding: 16px 18px;
}

.media-modal-body.upload-mode {
    grid-template-columns: minmax(0, 1fr);
}

.media-category-sidebar {
    align-content: start;
    background: #f8fafc;
    border: 1px solid #dde6f2;
    border-radius: 8px;
    display: grid;
    gap: 7px;
    min-height: 0;
    overflow: auto;
    padding: 10px;
}

.media-upload-toggle,
.media-category-button {
    min-height: 38px;
    width: 100%;
}

.media-category-button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #42504a;
    font-weight: 800;
    padding: 8px 12px;
    text-align: left;
}

.media-category-button.active,
.media-category-button:hover {
    background: #dceee7;
    border-color: #a7d2c2;
    color: #176b5d;
}

.media-category-tree {
    background: #fff;
    border: 1px solid #dde3ef;
    border-radius: 8px;
    min-height: 0;
    padding: 6px;
}

.media-modal-gallery {
    min-height: 0;
    overflow: auto;
    padding-right: 3px;
}

.media-gallery-toolbar {
    align-items: center;
    background: var(--surface, #fff);
    border-bottom: 1px solid #eef2f7;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(18rem, 1fr) 176px auto;
    margin-bottom: 14px;
    padding-bottom: 12px;
    position: sticky;
    top: 0;
    z-index: 4;
}

.media-search-field {
    align-items: center;
    background: #fff;
    border: 1px solid #d5dfec;
    border-radius: 8px;
    display: flex;
    gap: 8px;
    overflow: hidden;
    padding: 0 12px;
}

.media-search-field input {
    background: transparent;
    border: 0;
    box-shadow: none;
    flex: 1 1 auto;
    min-height: 40px;
    outline: 0;
    padding: 0;
}

.content-media-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.media-choice-card {
    background: #fff;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    display: grid;
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.media-choice-card:hover {
    border-color: #b8c7da;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.media-choice-card.selected {
    border-color: #176b5d;
    box-shadow: 0 0 0 2px rgba(23, 107, 93, .14);
}

.media-choice-visual {
    background-color: #fff;
    position: relative;
}

.media-choice-visual img {
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: contain;
    width: 100%;
}

.media-choice-body {
    display: grid;
    gap: 8px;
    padding: 10px 11px 11px;
}

.media-choice-card .image-actions {
    display: flex;
    gap: 6px;
    position: absolute;
    right: 8px;
    top: 7px;
    z-index: 2;
}

.media-choice-card .image-actions .icon-action {
    align-items: center;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .14);
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.media-choice-selectors {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 11px;
}

.media-choice-selectors label,
.category-picker label {
    align-items: center;
    border: 0;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.media-choice-selectors input,
.category-picker input {
    accent-color: #1d4ed8;
    height: 16px;
    margin: 0;
    width: 16px;
}

.media-choice-title {
    color: #0f172a;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-upload-panel {
    background: #f8fafc;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.modal-upload-head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.modal-upload-panel input[type="file"] {
    background: #fff;
    border: 1px solid #cfd8e6;
    border-radius: 6px;
    min-height: 36px;
    padding: 6px;
    width: 100%;
}

.upload-preview-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.upload-preview-card {
    background: #fff;
    border: 1px solid #dde6f2;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding-bottom: 10px;
}

.upload-preview-card img {
    aspect-ratio: 4 / 3;
    object-fit: contain;
    width: 100%;
}

.upload-preview-card label {
    border: 0;
    display: grid;
    gap: 4px;
    padding: 0 9px;
}

.upload-preview-card span {
    color: #64748b;
    font-size: 12px;
    padding: 0 9px;
}

.category-picker {
    display: grid;
    gap: 7px;
}

.inline-editor {
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: 9px;
    padding-top: 9px;
}

.inline-editor label {
    display: grid;
    gap: 4px;
}

.media-modal-footer {
    background: var(--surface, #fff);
    border-top: 1px solid #e5eaf2;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.tool-card {
    display: grid;
    gap: 8px;
    min-height: 118px;
    padding: 18px;
}

.tool-card:hover {
    border-color: #8bb2ff;
    transform: translateY(-1px);
}

.tool-card strong {
    color: #15356f;
    font-size: 18px;
}

.tool-card span,
.empty-state p {
    color: var(--muted);
}

.empty-state {
    margin-top: 16px;
}

.role-management-shell {
    display: grid;
    gap: 16px;
}

.role-editor-panel {
    padding: 20px;
}

.role-editor-backdrop {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.role-editor-modal {
    display: flex;
    width: min(1320px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
}

.role-modal-form {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.role-modal-body {
    display: grid;
    gap: 16px;
    min-height: 0;
    padding: 18px 22px;
    overflow: auto;
}

.role-modal-footer {
    flex: none;
    border-top: 1px solid var(--line);
}

.role-modal-body .edit-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.role-modal-layout {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 18px;
    min-height: 0;
}

.role-detail-column,
.role-permission-column {
    min-width: 0;
}

.role-detail-column {
    display: grid;
    align-content: start;
    gap: 16px;
}

.role-permission-column {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 320px;
}

.role-permission-column .permission-matrix-wrap {
    max-height: calc(100vh - 260px);
    min-height: 280px;
}

.section-heading.compact {
    align-items: center;
    margin-bottom: 16px;
    padding: 0;
    border: 0;
    background: transparent;
}

.section-heading.compact h2 {
    margin: 0;
    font-size: 22px;
}

.section-heading.compact .lead {
    margin: 6px 0 0;
    font-size: 14px;
}

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

.role-form-grid .full {
    grid-column: 1 / -1;
}

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

.permission-module-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 100%;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-bg);
}

.permission-module-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.permission-module-card header span:not(.badge) {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.check-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.check-row input {
    width: 16px;
    height: 16px;
}

.permission-matrix-wrap {
    max-height: 560px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.permission-matrix {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.permission-matrix th,
.permission-matrix td {
    height: 42px;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    vertical-align: middle;
}

.permission-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    color: var(--ink);
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.permission-matrix .permission-module-col,
.permission-matrix .permission-module-name {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 260px;
    max-width: 340px;
    text-align: left;
}

.permission-matrix thead .permission-module-col {
    z-index: 4;
}

.permission-matrix .permission-code-col,
.permission-matrix .permission-menu-col {
    min-width: 120px;
}

.permission-matrix .permission-module-name strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-matrix tbody tr:hover th,
.permission-matrix tbody tr:hover td {
    background: #f8fbff;
}

.permission-check-cell {
    min-width: 82px;
    text-align: center;
}

.permission-check-cell label {
    display: inline-grid;
    place-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.permission-check-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.permission-empty {
    color: #94a3b8;
    font-weight: 700;
}

.role-menu-order {
    display: grid;
    gap: 8px;
}

.role-menu-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft-bg);
}

.role-menu-order-row.muted {
    opacity: .52;
}

.role-menu-order-row span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.role-menu-order-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: none;
}

.role-menu-order-tools input {
    width: 88px;
}

.role-actions {
    white-space: nowrap;
}

.help-management-shell {
    display: grid;
    gap: 16px;
}

.help-content-cell,
.help-date-cell {
    display: grid;
    gap: 3px;
}

.help-content-cell span,
.help-content-cell small,
.help-date-cell span,
.help-target-summary {
    color: var(--muted);
    font-size: 12px;
}

.help-content-cell small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.help-target-summary {
    margin-top: 4px;
    max-width: 320px;
}

.help-actions {
    white-space: nowrap;
}

.help-modal-form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.help-modal-body {
    padding: 18px 22px;
    overflow: auto;
}

.help-modal-footer {
    flex: none;
    border-top: 1px solid var(--line);
}

.help-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.help-edit-grid .form-field {
    position: relative;
    display: block;
    padding-top: 0;
}

.help-edit-grid .form-field > label {
    position: absolute;
    z-index: 2;
    top: -7px;
    left: 12px;
    margin: 0;
    padding: 0 4px;
    color: #a44705;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.help-edit-grid .form-field > .form-control,
.help-edit-grid .form-field > .form-select {
    min-height: 38px;
    padding-top: 9px;
}

.help-edit-grid .full {
    grid-column: 1 / -1;
}

.help-edit-grid > .checkbox-row {
    align-self: end;
    min-height: 42px;
    padding: 9px 0;
}

.help-rich-field {
    margin-top: 6px;
}

.help-rich-field > label {
    top: -6px;
}

.help-target-list {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft-bg);
}

.help-target-list [data-help-target-items] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-target-list [data-help-target-items] > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: var(--panel-bg);
    font-size: 12px;
    font-weight: 700;
}

.host-management-shell {
    display: grid;
    gap: 16px;
}

.host-title-cell {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 220px;
}

.host-title-cell small {
    color: var(--muted);
    display: block;
}

.host-logo-dot {
    align-items: center;
    background: #eaf1ff;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    color: #174ea6;
    display: inline-flex;
    flex: none;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.host-actions {
    white-space: nowrap;
}

.host-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.host-modal-form .pa-modal-body {
    display: block;
    overflow: auto;
    padding: 16px 20px;
}

.host-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft-bg);
}

.modal-tabs .tab-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 14px;
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.modal-tabs .tab-button:hover {
    color: var(--ink);
    background: rgba(37, 99, 235, .08);
}

.modal-tabs .tab-button.active {
    border-color: #bfdbfe;
    color: #0b3b91;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.modal-tabs .tab-button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.host-edit-panel {
    min-height: 260px;
}

.host-editor-grid,
.host-contract-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.host-contract-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
}

.host-editor-grid .full,
.host-contract-grid .full {
    grid-column: 1 / -1;
}

.contract-editor-panels {
    min-width: 0;
}

.contract-type-tabs {
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft-bg);
}

.contract-type-button {
    appearance: none;
    display: grid;
    gap: 4px;
    width: 100%;
    min-height: 58px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 10px 12px;
    color: var(--muted);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.contract-type-button span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.contract-type-button small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.contract-type-button:hover {
    border-color: #dbeafe;
    background: rgba(37, 99, 235, .07);
}

.contract-type-button.active {
    border-color: #bfdbfe;
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.contract-type-button.active span {
    color: #0b3b91;
}

.contract-type-button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.host-editor-grid .form-field,
.host-contract-grid .form-field,
.host-media-field {
    position: relative;
}

.host-editor-grid .form-field > label,
.host-contract-grid .form-field > label,
.host-media-field > label {
    background: var(--surface, #fff);
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
    left: 12px;
    line-height: 1;
    padding: 0 5px;
    position: absolute;
    top: -6px;
    z-index: 1;
}

.host-editor-grid .form-control,
.host-editor-grid .form-select,
.host-contract-grid .form-control {
    min-height: 44px;
    padding-top: 12px;
}

.color-field {
    display: grid;
    gap: 8px;
    grid-template-columns: 44px minmax(0, 1fr);
}

.color-field > label {
    grid-column: 1 / -1;
}

.color-field input[type="color"] {
    appearance: none;
    background: transparent;
    border: 1px solid #b7c3d5;
    border-radius: 8px;
    height: 44px;
    padding: 3px;
    width: 44px;
}

.host-media-field {
    border: 1px solid #d5e0ef;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 18px 14px 14px;
}

.host-media-preview {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.host-media-preview img {
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    height: 64px;
    object-fit: cover;
    width: 96px;
}

.host-media-preview span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    max-width: 680px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.host-media-empty {
    border: 1px dashed #c9d5e5;
    border-radius: 8px;
    color: var(--muted);
    padding: 14px;
}

.host-contract-grid .ck.ck-editor {
    margin-top: 6px;
}

.host-contract-grid .ck.ck-editor__main > .ck-editor__editable {
    min-height: 240px;
}

.host-contract-grid .ck.ck-toolbar,
.host-contract-grid .ck.ck-editor__main > .ck-editor__editable {
    border-color: #b7c3d5;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
        height: 100vh;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1050;
        width: min(82vw, 320px);
        height: 100vh;
        max-height: none;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        box-shadow: 24px 0 48px rgba(15, 23, 42, .22);
        transform: translateX(-100%);
        transition: transform .24s ease;
        will-change: transform;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle.btn-icon,
    .sidebar-close.btn-icon {
        display: inline-grid;
        place-items: center;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        display: block;
        background: rgba(15, 23, 42, .46);
    }

    .sidebar-backdrop[hidden] {
        display: none !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .main-panel {
        height: 100vh;
        min-height: 0;
        overflow-y: auto;
        padding: 16px;
    }

    .topbar {
        top: -16px;
        margin: -16px -16px 16px;
        padding: 14px 16px;
        justify-content: flex-start;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .form-stack label {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .data-grid-toolbar,
    .domain-heading,
    .subpanel-heading.split {
        align-items: stretch;
        flex-direction: column;
    }

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

    .horizontal-form .form-row.two-col {
        grid-template-columns: 1fr;
    }

    .shipping-zone-editor {
        grid-template-columns: 1fr;
    }

    .role-form-grid,
    .help-edit-grid,
    .host-editor-grid,
    .host-contract-grid,
    .permission-grid {
        grid-template-columns: 1fr;
    }

    .contract-type-tabs {
        grid-template-columns: 1fr;
    }

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

    .role-menu-order-row {
        align-items: stretch;
        flex-direction: column;
    }

    .role-menu-order-tools {
        justify-content: flex-start;
    }

    .modal-tabs .tab-button {
        flex: 1 1 calc(50% - 6px);
    }
}

@media (max-width: 992px) {
    .visitor-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-activity-filter,
    .student-activity-stats,
    .user-license-filter,
    .user-license-stats,
    .comment-filter-panel,
    .comment-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .users-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .visitor-filter-panel {
        grid-template-columns: 1fr;
    }

    .student-activity-filter,
    .student-activity-stats,
    .user-license-filter,
    .user-license-stats,
    .user-license-editor-grid,
    .comment-filter-panel,
    .comment-stat-grid {
        grid-template-columns: 1fr;
    }

    .users-heading,
    .user-detail-hero {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .users-filter-form,
    .user-detail-grid {
        grid-template-columns: 1fr;
    }

    .curriculum-tree-filters,
    .curriculum-tree-row,
    .curriculum-tree-node {
        grid-template-columns: 1fr;
    }

    .curriculum-tree-row {
        position: relative;
        padding-left: 48px;
    }

    .curriculum-tree-toggle,
    .curriculum-tree-toggle-placeholder {
        position: absolute;
        top: 12px;
        left: 12px;
    }

    .curriculum-tree-meta {
        justify-content: flex-start;
        min-width: 0;
        flex-wrap: wrap;
    }

    .users-filter-actions,
    .user-detail-pills {
        justify-content: flex-start;
    }

    .user-detail-body {
        padding: 16px;
    }

    .user-detail-item {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .user-host-field,
    .user-password-field,
    .user-password-check,
    .user-host-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .user-host-actions,
    .user-password-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .visitor-report-heading,
    .visitor-metric-pager {
        align-items: flex-start;
        flex-direction: column;
    }

    .hourly-bars div {
        grid-template-columns: 1fr;
    }
}

/* Fuse-inspired global skin */
:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #d6dde8;
    --blue: #2563eb;
    --orange: #b45309;
    --surface: #ffffff;
    --soft: #f8fafc;
    --body-bg: #f8fafc;
    --panel-bg: #ffffff;
    --panel-soft-bg: #f1f5f9;
    --sidebar-bg: #111827;
    --topbar-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --button-soft-bg: #1f2937;
    --shadow-color: rgba(15, 23, 42, .06);
    --modal-overlay: rgba(15, 23, 42, .5);
    --fuse-sidebar-ink: #f8fafc;
    --fuse-sidebar-muted: #93a4b8;
    --fuse-sidebar-accent: #38bdf8;
}

:root[data-theme="dark"] {
    --ink: #e5edf8;
    --muted: #94a3b8;
    --line: #263244;
    --surface: #111827;
    --soft: #0f172a;
    --body-bg: #0b1120;
    --panel-bg: #111827;
    --panel-soft-bg: #172033;
    --sidebar-bg: #080f1f;
    --topbar-bg: #111827;
    --input-bg: #0f172a;
    --input-border: #334155;
    --button-soft-bg: #172033;
    --shadow-color: rgba(0, 0, 0, .28);
}

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

body {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    background: var(--body-bg);
}

h1 {
    color: var(--ink);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
}

h2 {
    font-weight: 700;
    letter-spacing: 0;
}

.app-shell {
    grid-template-columns: 278px minmax(0, 1fr);
    background: var(--body-bg);
}

.sidebar {
    padding: 22px 14px;
    border-right: 0;
    background: var(--sidebar-bg);
    color: var(--fuse-sidebar-ink);
    scrollbar-color: #6b7280 transparent;
}

.sidebar-head {
    margin: 0 0 24px;
    padding: 0 8px;
}

.brand {
    min-height: 42px;
    color: #fff;
}

.brand span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #e0f2fe;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    font-size: 11px;
    letter-spacing: 0;
}

.brand strong {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .01em;
}

.sidebar nav {
    gap: 4px;
}

.sidebar nav::before,
.sidebar nav::after {
    display: block;
    padding: 16px 10px 8px;
    color: var(--fuse-sidebar-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.sidebar nav::before {
    content: "Yönetici Araçları";
}

.sidebar nav a {
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 40px;
    border-radius: 7px;
    padding: 9px 10px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

.sidebar nav a i {
    color: #e2e8f0;
    font-size: 15px;
}

.sidebar nav a:hover {
    color: #fff;
    background: #1f2937;
}

.sidebar nav a.active {
    color: #fff;
    background: #273244;
    box-shadow: none;
}

.sidebar nav a.active i {
    color: #fff;
}

.main-panel {
    padding: 0;
    background: var(--body-bg);
}

.main-panel > :not(.topbar) {
    width: min(1200px, calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
}

.main-panel > .section-heading:first-of-type,
.main-panel > .page-heading:first-of-type {
    width: 100%;
    max-width: none;
    margin: 0 0 32px;
}

.topbar {
    top: 0;
    min-height: 56px;
    margin: 0;
    padding: 10px 18px 10px 26px;
    border-bottom: 1px solid #e2e8f0;
    background: var(--topbar-bg);
    backdrop-filter: none;
}

.topbar-user {
    margin-left: auto;
}

.topbar-user strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.topbar-user span {
    font-size: 12px;
}

.theme-switcher {
    border: 0;
    background: transparent;
}

.theme-switcher button {
    width: 30px;
    height: 30px;
    min-height: 30px;
}

.theme-switcher button:hover,
.theme-switcher button.active {
    color: var(--blue);
    background: #eef4ff;
}

.topbar-actions > .theme-switcher[role="group"] {
    display: none;
}

.topbar-icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    color: #64748b;
    background: transparent;
}

.topbar-icon-button:hover,
.topbar-icon-button[aria-expanded="true"] {
    color: #0f172a;
    background: #f1f5f9;
}

.locale-button span {
    font-size: 15px;
    line-height: 1;
}

.theme-dropdown {
    position: relative;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    min-width: 112px;
    padding: 6px;
    border: 1px solid #d7deea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}

.theme-menu[hidden] {
    display: none !important;
}

.theme-menu button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    width: 100%;
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    padding: 0 6px;
    color: #111827;
    background: transparent;
    font-size: 13px;
    text-align: left;
}

.theme-menu button:hover {
    background: #f8fafc;
}

.theme-menu button i {
    display: none;
    color: #2563eb;
    font-size: 14px;
}

.theme-menu button.active i {
    display: inline-block;
}

.page-heading,
.empty-state,
.section-heading {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.section-heading,
.page-heading {
    padding: 42px max(24px, calc((100vw - 1200px - 278px) / 2 + 24px));
    color: #fff;
    background: linear-gradient(90deg, #1d4ed8 0%, #1e3a8a 56%, #172554 100%);
}

.section-heading h1,
.page-heading h1,
.section-heading .lead,
.page-heading p,
.section-heading .eyebrow,
.page-heading .eyebrow {
    color: #fff;
}

.section-heading .lead,
.page-heading p {
    max-width: 760px;
    opacity: .72;
}

.eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.section-heading .eyebrow,
.page-heading .eyebrow {
    opacity: .82;
}

.grid-panel,
.login-card,
.empty-state,
.tool-card,
.comment-filter-panel,
.comment-stat-grid article,
.comment-table-panel,
.user-license-filter,
.user-license-stats article,
.user-license-panel,
.visitor-filter-panel,
.visitor-stat-grid article,
.visitor-report-panel,
.education-stat-grid article,
.section-heading.compact,
.tool-panel,
.subpanel,
.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: none;
}

.grid-panel,
.comment-table-panel,
.user-license-panel,
.visitor-report-panel,
.tool-panel,
.subpanel {
    overflow: hidden;
}

.data-grid-toolbar,
.comment-table-heading,
.visitor-report-heading {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.comment-table-heading {
    margin: -18px -18px 12px;
}

.data-grid-toolbar h2,
.comment-table-heading h2,
.visitor-report-heading h2 {
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
}

.table-scroll,
.table-responsive {
    background: #fff;
}

.data-table th,
.data-table td,
.admin-table th,
.admin-table td,
.table th,
.table td {
    border-color: var(--line);
    padding: 13px 14px;
}

.data-table th,
.admin-table th,
.table thead th {
    color: #0f172a;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
}

.data-table td,
.admin-table td,
.table td {
    color: #111827;
    font-size: 13px;
}

.form-control,
.form-select,
.grid-search input,
.login-card input {
    min-height: 36px;
    border-color: var(--input-border);
    border-radius: 6px;
    color: var(--ink);
    background-color: var(--input-bg);
    font-size: 13px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
.grid-search input:focus,
.login-card input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.form-field > label,
.grid-search label,
.form-stack span {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.btn {
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}

.btn-primary {
    border-color: #2563eb;
    background: #2563eb;
}

.btn-outline-secondary,
.btn-outline-primary {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    color: #0f172a;
    border-color: #94a3b8;
    background: #f8fafc;
}

.status-pill {
    min-height: 24px;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 800;
}

.pa-modal,
.domain-modal,
.modal-content {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.pa-modal-header,
.modal-header,
.pa-modal-actions,
.modal-footer {
    background: #fff;
}

:root[data-theme="dark"] .section-heading,
:root[data-theme="dark"] .page-heading {
    background: linear-gradient(90deg, #1e3a8a 0%, #172554 60%, #0f172a 100%);
}

:root[data-theme="dark"] .data-grid-toolbar,
:root[data-theme="dark"] .comment-table-heading,
:root[data-theme="dark"] .visitor-report-heading,
:root[data-theme="dark"] .table-scroll,
:root[data-theme="dark"] .table-responsive,
:root[data-theme="dark"] .pa-modal-header,
:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .pa-modal-actions,
:root[data-theme="dark"] .modal-footer {
    background: var(--surface);
}

:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .admin-table th,
:root[data-theme="dark"] .table thead th {
    color: #dbeafe;
    background: #172033;
}

:root[data-theme="dark"] .data-table td,
:root[data-theme="dark"] .admin-table td,
:root[data-theme="dark"] .table td {
    color: #e5edf8;
}

:root[data-theme="dark"] .user-detail-modal,
:root[data-theme="dark"] .user-detail-body {
    background: #0f172a;
}

:root[data-theme="dark"] .user-detail-hero,
:root[data-theme="dark"] .user-detail-section {
    border-color: rgba(148, 163, 184, .24);
    background: #111827;
    box-shadow: none;
}

:root[data-theme="dark"] .user-detail-section h3,
:root[data-theme="dark"] .user-detail-item strong {
    color: #e5edf8;
}

:root[data-theme="dark"] .user-detail-section h3::after,
:root[data-theme="dark"] .user-detail-item {
    border-color: #263244;
}

:root[data-theme="dark"] .curriculum-tree-row {
    border-color: #263244;
    background: #111827;
    box-shadow: none;
}

:root[data-theme="dark"] .curriculum-tree-row:hover {
    border-color: #3b82f6;
    background: #172033;
}

:root[data-theme="dark"] .curriculum-tree-node strong,
:root[data-theme="dark"] .curriculum-tree-meta b {
    color: #e5edf8;
}

:root[data-theme="dark"] .curriculum-tree-node small {
    color: #9fb0c7;
}

:root[data-theme="dark"] .curriculum-tree-branch::before {
    background: #263244;
}

:root[data-theme="dark"] .curriculum-tree-toggle,
:root[data-theme="dark"] .curriculum-tree-meta > span:not(.status-pill) {
    border-color: #334155;
    color: #dbeafe;
    background: #0f172a;
}

.inline-form {
    display: inline-flex;
    margin: 0 0 0 6px;
    vertical-align: middle;
}

.education-lesson-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 520px;
}

.education-lesson-levels span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--soft);
    font-size: 12px;
}

.education-lesson-levels em {
    font-style: normal;
    color: var(--muted);
}

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

    .main-panel > :not(.topbar),
    .main-panel > .section-heading:first-of-type,
    .main-panel > .page-heading:first-of-type {
        width: 100%;
    }

    .section-heading,
    .page-heading {
        padding: 30px 18px;
    }
}
